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

Error! No Localizable.strings file found for output. #11

Closed
UtkuDalmaz opened this issue May 16, 2016 · 9 comments
Closed

Error! No Localizable.strings file found for output. #11

UtkuDalmaz opened this issue May 16, 2016 · 9 comments

Comments

@UtkuDalmaz
Copy link

Hello,

Why am i getting "Error! No Localizable.strings file found for output." ?

I use

if which bartycrouch > /dev/null; then
    # Incrementally update all Storyboards/XIBs strings files
    bartycrouch interfaces -p "$PROJECT_DIR"

    # Add new keys to Localizable.strings files from NSLocalizedString in code
    bartycrouch code -p "$PROJECT_DIR" -l "$PROJECT_DIR" -a
else
    echo "warning: BartyCrouch not installed, download it from https://github.com/Flinesoft/BartyCrouch"
fi

Incrementally updated keys of file '/Users/utkudalmaz/Developer/Jemiyet/Jemiyett/tr-TR.lproj/LaunchScreen.strings'.
BartyCrouch: Successfully updated strings file(s) of Storyboard or XIB file.
Incrementally updated keys of file '/Users/utkudalmaz/Developer/Jemiyet/Jemiyett/tr-TR.lproj/Main.strings'.
BartyCrouch: Successfully updated strings file(s) of Storyboard or XIB file.
Error! No Localizable.strings file found for output.
Command /bin/sh failed with exit code 64

@UtkuDalmaz
Copy link
Author

Sorry i fixed it

@dakeshi
Copy link

dakeshi commented Jun 24, 2016

Did you fix it? I got the same issue in Xcode 7.3.1.

Error! No Localizable.strings file found for output.

I install it using brew command and insert run script in my project.
Why do I still get this error?

@Jeehut
Copy link
Member

Jeehut commented Jun 24, 2016

I think the problem was that he had this line in the build script:

bartycrouch code -p "$PROJECT_DIR" -l "$PROJECT_DIR" -a

This line expects to find a Localizable.strings file somewhere within the specified project in a localized directory (something like 'en.lproj/'). The fix is to add a Localizable.strings file to the project and click the localize button in Xcode.

If you don't need the feature for adding localization keys from code but instead only want to opt for the Storyboards/XIBs localization, then simply remove the quoted line from the build script and it should work as is.

@dakeshi
Copy link

dakeshi commented Jun 27, 2016

@Dschee Thank you for your feedback.
If I'd seen comments in the run script, I'd have known what the problem is.
There is no NSLocalizedString codes in my project.
After removing that line of code you mentioned in the run script, the warnings is disappeared.

@Jeehut
Copy link
Member

Jeehut commented Jul 2, 2016

I'm reopening this issue since people still seem to face it (see #27) and although it can be seen as a "user error" I still think we can do something about it. For example the easiest improvement would be to provide a better error message which points out what to do to fix this.

@derick182: Please note that when using the -p command you need to provide an absolute path to the directory you want it to search within – so instead of / please provide something like /Users/Derick/Projects/MyProject/Sources. This is documented here.

@eirikvaa
Copy link

I realize that this issue has been closed for quite some time now. I just upgraded to the latest version of BartyCrouch, and even though I have several Localizable.strings files, I still get the following error message:

Error! No input files found.
Error! No *.strings file found for output.
To fix this, please add a Localizable.strings file to your project and click the localize button for the file in Xcode. Custom names for your *.strings file do also work. Alternatively remove the line beginning with bartycrouch code in your build script to remove this feature entirely if you don't need it. See #11 for further information.

For reference, this is my run script:

if which bartycrouch > /dev/null; then
    # Incrementally update all Storyboards/XIBs strings files
    bartycrouch interfaces -p "$PROJECT_DIR/$PROJECT_NAME"

    # Add new keys to Localizable.strings files from NSLocalizedString in code
    # -k: use un-localized value as default value for translation.
    # -s: sort by keys
    # -a: only add keys
    # -c: override comments
    bartycrouch code -p "$PROJECT_DIR/$PROJECT_NAME" -l "$PROJECT_DIR" -a -s -k -c

else
    echo "warning: BartyCrouch not installed, download it from https://github.com/Flinesoft/BartyCrouch"
fi

@Jeehut
Copy link
Member

Jeehut commented Mar 8, 2018

@eirikvaa You're right, this still is an issue. I've just tracked it down to this commit. So, the issue was introduced by @mathebox in #67. Will revert that for now.

@Jeehut Jeehut reopened this Mar 8, 2018
@Jeehut
Copy link
Member

Jeehut commented Mar 8, 2018

I just reverted the commit and released version 3.10.1. This is hopefully fixed again.

@Jeehut
Copy link
Member

Jeehut commented Mar 12, 2018

Please also note that there's now a new option named --custom-localizable-name documented here if you have a Strings file with a different name than Localizable.strings.

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

No branches or pull requests

4 participants