netbe / Babelish

Chaotically confused, like Babel
http://netbe.github.io/Babelish
MIT License
253 stars 84 forks source link

Choose which source file to extract comments from if they differ #98

Open tylerjames opened 7 years ago

tylerjames commented 7 years ago

First: This tool is great. I hate strings files and handling localization on iOS, it's absurdly bad, but this is making it a bit better.

I have English and Japanese strings files. My English file contains my (the developer) comments. The Japanese file contains some comments added by the translator, or at least the person responsible for sorting out the translation.

When I run: babelish strings2csv

It extracts the comments only from the second file. If anything I'd prefer it to extract the comments from the first file, ideally though it would get both and put them in different columns.

Is there any way to specify which comments to use or use both?

netbe commented 7 years ago

@tylerjames I never had this case, but I would expect the comments to be the same on both files since strings files are usually manipulated by developers.

Besides if you take genstrings command it will populate both files with same comment from NSLocalizableString(, comment: ).

That said a feature could be to merge the comments or as you said specify which file to extract it from.

tylerjames commented 7 years ago

Hi,

Yeah I realize this is probably a pretty edge case. I should really get my translation guy to keep his comments separate.

I might be able to just switch the order of the en and ja files and have it pull comments from the English.