Merge existing, translated .thtml pages into en_US template



10 years ago
3 years ago


(Reporter: wenzel, Unassigned)


Firefox Tracking Flags

(Not tracked)




10 years ago
In AMO, we have a number of HTML pages that are committed in English first, then a localizer takes them, translates the relevant text content inside, then commits the file to their own locale directory.

In bug 449487, I wrote some initialization code that takes each of these English "template pages", cleans up the markup, then generates a .po file of it with html2po. This works well.

We need to figure out what to do with existing, translated pages though. Ideally, we would clean up, then extract strings, as well, and then match up the English with the other language strings in a common .po file.

This is interesting but not vital for initializing a language, where we can get away with generating empty templates.

But when updating from SVN, it is possible that someone changed the translated HTML file, and we need to put that into the .po file somehow. Otherwise, any changes made in Pootle will always overwrite the resulting .thtml file, and there will be no way to use the existing .thtml files, or to edit these files directly in SVN, and get that data into Pootle.

Comment 1

10 years ago
CCing some people who may have input. I am interested in both, comments on the workflow, and comments on the technical feasibility of matching up strings from a localized file with the same file structure, but in English.

Comment 2

10 years ago
Some notes:

* The overwriting of thtml files is not bad if you want PO to be the reference for the translations.  If it makes sense to add additional info to the thtml that is language specific then its hard.

* Emergency local editing of the thtml with an associated PO change would also be OK.

* I'd avoid continual regeneration via html2po -t en xx xx-po even though it would work to bring in thtml changes.

* Maybe some Makefile like check that can determine if change in thtml are newer then the PO file?

Knowing the current possibilities in thtml might help give some further comments

Comment 3

10 years ago
Dwayne, thanks for your helpful input! I will probably discuss the ".po as reference" question at the Localizer work week this week.

It sounds to me like you are right avoiding repeated thtml -> .po transitions.

(In reply to comment #2)
> Knowing the current possibilities in thtml might help give some further
> comments

The files can contain %s that'll get replaced by the website as appropriate. Other than that, they are plain HTML snippets (i.e. without header or footer). If you'd like to take a look:

I've not been looking into AMO for years now, but I think I heard this is resolved. Is it?

Comment 5

7 years ago
I don't know -- Wil?
Anything in zamboni is.  We can call this fixed.
Last Resolved: 7 years ago
Resolution: --- → FIXED
Product: Webtools → Webtools Graveyard
You need to log in before you can comment on or make changes to this bug.