Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Localizable strings are being mirrored into all storyboard .strings files #88

Closed
AlexGingell opened this issue Mar 2, 2018 · 6 comments

Comments

@AlexGingell
Copy link

AlexGingell commented Mar 2, 2018

I'm seeing a very strange problem after upgrading BartyCrouch to v3.10 today. Unfortunately I don't know exactly which version I upgraded from, but I do know that it was v3.x.

Prior to the upgrade, BC would correctly detect NSLocalizedString() macros in my source code and place these strings in Localizable.strings as expected (and only there). It would also pick up any strings in my storyboards and and place them in the corresponding storyboard .strings files. All good.

After the upgrade, NSLocalizedString strings are still sent to Localizable.strings, but are also being mirrored into every storyboard .strings file in my project - even storyboards that do not have any strings in them and whose .strings files should be completely empty.

My build phase script remains unchanged and is based on your example:

if which bartycrouch > /dev/null; then
# Incrementally update all Storyboards/XIBs strings files.
bartycrouch interfaces -p "$PROJECT_DIR/Werble" --default-to-base
# Add new keys to Localizable.strings files from NSLocalizedString in code
bartycrouch code -p "$PROJECT_DIR/Werble" -l "$PROJECT_DIR/Werble/Supporting Files" -a --default-to-keys
else
echo "warning: BartyCrouch not installed, download it from https://github.com/Flinesoft/BartyCrouch"
fi

Supporting Files contains all storyboards and strings files, 'Werble' is a directory in the project root containing source code and the supporting files directory.

I'm scratching my head over this one - nothing changed in the project in the interim - am I doing something silly? Thank you for any help.

Alex

@AlexGingell AlexGingell changed the title Strings that should solely go to localizable.strings are being duplicated into all storyboard .strings files Localizable strings are being mirrored into all storyboard .strings files Mar 2, 2018
@Jeehut
Copy link
Member

Jeehut commented Mar 7, 2018

This sounds like a bug. Maybe it was introduced with the feature in #67? Could you try installing BartyCrouch 3.9.0, which shouldn't have that PR merged? If that's working, the changes are high it was introduces with #67. In that case I would ask @mathebox for help...

@Jeehut
Copy link
Member

Jeehut commented Mar 8, 2018

I just reverted #67 and released version 3.10.1 – it should be available via Homebrew within the next 24 hours. Please have a look if your problem is now solved or still appears to be happening.

@AlexGingell
Copy link
Author

Thank you @Dschee - I will do exactly that and report back here.

@AlexGingell
Copy link
Author

@Dschee I can confirm that v3.10.1 appears to fix this issue. Thank you for your prompt response! ;)

@Jeehut
Copy link
Member

Jeehut commented Mar 8, 2018

Glad I could help!

@mathebox
Copy link
Contributor

mathebox commented Mar 8, 2018

I can have a look at this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants