Closed
Bug 449487
Opened 18 years ago
Closed 17 years ago
Create AMO initialization script
Categories
(Webtools Graveyard :: Verbatim, defect)
Webtools Graveyard
Verbatim
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: clouserw, Assigned: wenzel)
References
Details
We need a script to setup a fresh AMO checkout for verbatim. I'd like to be able to run this per-locale on demand from a web page. For example, when we add a new locale it would be nice to have this run from a single click just for that locale. In my head the script is something like:
foreach $locale in /locale/:
- run `python /scripts/convert/amo2po.py --template=$locale/LC_MESSAGES/messages.po --input=en_US/LC_MESSAGES/messages.po --output=$locale/LC_MESSAGES/verbatim.combined.po`
- rename $locale/LC_MESSAGES/messages.po to $locale/LC_MESSAGES/messages.po.orig (so verbatim doesn't try to edit it; bug 449350)
- foreach $page in /locale/$locale/pages/
- run `python /translate/convert/html2po.py --input=$page.thtml --output=$page.po`
| Reporter | ||
Updated•18 years ago
|
Assignee: nobody → clouserw
| Reporter | ||
Comment 1•17 years ago
|
||
This became a function in the amodemo.py script from bug 449488. It's not complete because it doesn't handle /pages/ yet but it does work for the .po files.
| Assignee | ||
Comment 2•17 years ago
|
||
I'll work on getting the pages/*.thtml files converted to .po and back.
Assignee: clouserw → fwenzel
Status: NEW → ASSIGNED
| Reporter | ||
Comment 3•17 years ago
|
||
I think bug 449484 blocks this
| Assignee | ||
Comment 4•17 years ago
|
||
Thanks. Unless we use htmltidy like I suggest in bug 449353 comment 2? I understand that would alter our pages when converting back, but -- if tidy lives up to its promises -- it would do so in a good way.
| Assignee | ||
Updated•17 years ago
|
| Assignee | ||
Comment 5•17 years ago
|
||
Committed as revision 12097 to the Pootle trunk. This uses HTMLTidy to do the heavy lifting.
What it does do is generate .po files from the existing pages in en_US. What it does not do is take existing, localized, pages under consideration.
For initializing a language, that is fine (which is why I am closing this bug). But for updating from SVN, this will become vital. We need to be able to allow merging existing, translated .thtml files into the .po file created from the en_US template using this script.
I'll file a new bug for this.
Status: ASSIGNED → RESOLVED
Closed: 17 years ago
Resolution: --- → FIXED
Updated•10 years ago
|
Product: Webtools → Webtools Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•