Localizable.strings corrupted?

后端 未结 6 1441
情歌与酒
情歌与酒 2021-02-03 22:08

I\'m trying to include the internationalization of my application, and only for testing purposes I added a simple line in the file Localizable.string.

This is my whole f

相关标签:
6条回答
  • 2021-02-03 22:28

    In my case, it was like this:

    /* Comment for Very Long Sentence */
    "Very Long Sentence Very Long Sentence Very Long Sentence Very Long Sentence " =;
    "Very Long Sentence Very Long Sentence Very Long Sentence Very Long Sentence ";
    

    (Notice the ' = ; ' instead of ' = ' at the end of the first line)

    Hope it helps someone...

    0 讨论(0)
  • 2021-02-03 22:36

    I've made a little script to check whole folders .strings files using plutil.

    https://github.com/CarlesEstevadeordal/check_strings

    0 讨论(0)
  • 2021-02-03 22:37

    You can verify your Localizable.strings file with this script:

    https://github.com/dcordero/Rubustrings

    0 讨论(0)
  • 2021-02-03 22:39

    If this is your whole file, add a semicolon at the end. Change it to:

    "Test locale" = "Test locale";

    0 讨论(0)
  • 2021-02-03 22:40

    In my case it was brackets inside string — I needed to add slash before \".

    0 讨论(0)
  • 2021-02-03 22:46

    To get more detailed informations you can use the Property List utility from the command line:

    plutil -lint <your_strings_file>.strings
    

    the -lint switch is for checking the syntax. If you have an error you'll get line number and more informations, and in general better directions on how to fix the issue.

    0 讨论(0)
提交回复
热议问题