genstrings

Use genstrings with a folder-structured project for localization

爷,独闯天下 提交于 2019-12-24 10:28:46
问题 In an iOS Project with folders containing *.m files, similar to packages, one will have to run genstrings -o en.lproj *.m for each folder and match the relative en.lproj path. Is there a command that will do the drill down from the root folder? 回答1: You can concatenate all of the *.m files into one file and then call the genstrings on that. I.E: find . -name "*.m" -exec cat {} >> all.txt \; 回答2: In Greenwich we use find piped to xargs . You can see how that's done here, but it's basically:

genstrings does not work with macro for NSLocalizedString

核能气质少年 提交于 2019-12-10 11:11:00
问题 I would like to shorten "NSLocalizedString" to "_" so I'm using macro _(x) NSLocalizedString(@x, @__FILE__) . But now, when I want to generate strings for localization with find . -name \*.m | xargs genstrings it generates nothing. Any help? 回答1: You can tell genstrings to look for a different function by using the '-s' argument: genstring -s MyFunctionName .... However , MyFunctionName must follow the same naming and argument conventions as one of the built in NSLocalizeString macros. In

genstrings does not work with macro for NSLocalizedString

 ̄綄美尐妖づ 提交于 2019-12-06 05:00:45
I would like to shorten "NSLocalizedString" to "_" so I'm using macro _(x) NSLocalizedString(@x, @__FILE__) . But now, when I want to generate strings for localization with find . -name \*.m | xargs genstrings it generates nothing. Any help? You can tell genstrings to look for a different function by using the '-s' argument: genstring -s MyFunctionName .... However , MyFunctionName must follow the same naming and argument conventions as one of the built in NSLocalizeString macros. In your case, you can not just specify the string key, you must also specify the documentation string. In fact,

Is there an easy way to merge Localizable.strings files?

北城余情 提交于 2019-11-30 02:01:08
Problem: Using genstrings to create Localizable.strings files from a project. A few weeks later, some things changed and I run genstrings again. 75% of the new file is already in the old file. How could I merge the new file with the old file, so that the old file contains all of those 25% new key-value-pairs? I just found the Localization Suite . Incredible powerful tool for free. I tried it on my project and it just works. Lacks documentation though. I recommend Localizable Strings Merge too. I use it on my projects and it really a simple to use and powerful software. I recently found a free

Is there an easy way to merge Localizable.strings files?

百般思念 提交于 2019-11-28 22:54:35
问题 Problem: Using genstrings to create Localizable.strings files from a project. A few weeks later, some things changed and I run genstrings again. 75% of the new file is already in the old file. How could I merge the new file with the old file, so that the old file contains all of those 25% new key-value-pairs? 回答1: I just found the Localization Suite. Incredible powerful tool for free. I tried it on my project and it just works. Lacks documentation though. 回答2: I recommend Localizable Strings