Created attachment 377229 [details] [diff] [review] Use English strings inside gettext's _() function
Created attachment 377231 [details] New messages.po After applying the patch from comment #0, you can run web/applications/locale/extract-po.sh as many times you want, and it will give you a PO file like this one.
This looks really good, thanks for your help! Some questions: I had put comments into the previous messages.po, to explain what %1$s was, etc. How do I do this now?
Once I change some copy and rerun extra, I see that I have two strings (old and new). Running the process in the README.txt, this merges into other locales. The locale get's a new string that hasn't been translated. Is this the processes for updates down the road? Should I manually delete the old string before merging? Do I need to manually delete the old string from all the locale po files?
Comment on attachment 377229 [details] [diff] [review] Use English strings inside gettext's _() function Please commit your patch! Thanks for the great work. I'll have some follow up questions, so I understand the tooling around this processes.
Patch from comment #0 committed in r25675. I'm trying to figure out how to add comments to the PO file automatically, thus leaving the bug open.
Created attachment 377312 [details] [diff] [review] Example of how to add comments OK, got it. Adding comments is easy. You'll just have to modify the extract-po.sh script to use the "--add-comments" option to xgettext. Then, gettext will automatically pick up any PHP comments preceding _() function calls. I attach a working example of such a comment for one of the strings. If there are other, non-l10n-related comments in the PHP that shouldn't be picked up by gettext, you can use for example "--add-comments=L10N" in extract-po.sh and then begin each l10n-comment with "L10N".
Patch landed (see comment 5), stage displays correctly English strings instead of ids and I chatted with Austin on IRC about the next steps and preparing the PO files for localization with msginit, as well as updating them if necessary with msgmerge. Can we close this bug now?
Stas great work. Closing bug.