Closed
Bug 492823
Opened 15 years ago
Closed 15 years ago
Change localization to use English strings as msgid's (for gettext)
Categories
(Websites Graveyard :: mozillaservice.org, defect)
Tracking
(Not tracked)
VERIFIED
FIXED
1.0
People
(Reporter: stas, Assigned: stas)
Details
Attachments
(3 files)
73.95 KB,
patch
|
ozten
:
review+
|
Details | Diff | Splinter Review |
30.68 KB,
text/plain
|
Details | |
1.36 KB,
patch
|
Details | Diff | Splinter Review |
No description provided.
Attachment #377229 -
Flags: review?(ozten.bugs)
Assignee | ||
Comment 1•15 years ago
|
||
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.
Comment 2•15 years ago
|
||
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?
Comment 3•15 years ago
|
||
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 4•15 years ago
|
||
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.
Attachment #377229 -
Flags: review?(ozten.bugs) → review+
Assignee | ||
Comment 5•15 years ago
|
||
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.
Assignee | ||
Comment 6•15 years ago
|
||
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".
Assignee | ||
Comment 7•15 years ago
|
||
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?
Assignee: nobody → stas
Comment 8•15 years ago
|
||
Stas great work. Closing bug.
Status: NEW → RESOLVED
Closed: 15 years ago
Resolution: --- → FIXED
Updated•15 years ago
|
Target Milestone: --- → 1.0
You need to log in
before you can comment on or make changes to this bug.
Description
•