Code Monkey home page Code Monkey logo

Comments (9)

Jeehut avatar Jeehut commented on July 28, 2024 4

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.

from bartycrouch.

Jeehut avatar Jeehut commented on July 28, 2024 1

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.

from bartycrouch.

eirikvaa avatar eirikvaa commented on July 28, 2024 1

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

from bartycrouch.

UtkuDalmaz avatar UtkuDalmaz commented on July 28, 2024

Sorry i fixed it

from bartycrouch.

dakeshi avatar dakeshi commented on July 28, 2024

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?

from bartycrouch.

dakeshi avatar dakeshi commented on July 28, 2024

@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.

from bartycrouch.

Jeehut avatar Jeehut commented on July 28, 2024

@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.

from bartycrouch.

Jeehut avatar Jeehut commented on July 28, 2024

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

from bartycrouch.

Jeehut avatar Jeehut commented on July 28, 2024

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.

from bartycrouch.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.