12

When localizing my storyboard, I get entries in my strings file that look like:

/* Class = "NSTextFieldCell"; title = "Text Cell"; ObjectID = "vHF-LZ-23i"; */ "vHF-LZ-23i.title" = "Text Cell";

Is there anyway to exclude dummy text or other strings from going into the storyboard localization strings files?

davis
  • 1,808
  • 6
  • 26
  • 48

1 Answers1

7

As Jenszcz mentioned in his comment that you can solve this problem by using BartyCrouch open-source project, I was curios to give it a try And worked excellently :) Here are the steps I followed to get it work within 5 minutes.

1- Install BartyCrouch. See the installation procedure from url.

2- Created a sample project, which you can access here. In that project created 2 labels ("Text Included" & "Text Excluded #bc-ignore!").

3- Add RunScript (instructions on how to add a build script here)

if which bartycrouch > /dev/null; then
    bartycrouch update -x
    bartycrouch lint -x
else
    echo "warning: BartyCrouch not installed, download it from https://github.com/Flinesoft/BartyCrouch"
fi

enter image description here

4- After building the project the Main.strings file excluded one label.Here are the screenshots showing the storyboard file & .strings file. enter image description hereenter image description here

Jeehut
  • 17,934
  • 8
  • 57
  • 72
iMemon
  • 1,095
  • 1
  • 12
  • 20