Merge existing, translated .thtml pages into en_US template

RESOLVED FIXED

Status

RESOLVED FIXED
9 years ago
3 years ago

People

(Reporter: wenzel, Unassigned)

Tracking

Details

(Reporter)

Description

9 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.
(Reporter)

Comment 1

9 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

9 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
(Reporter)

Comment 3

9 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: http://viewvc.svn.mozilla.org/vc/addons/trunk/site/app/locale/en_US/pages/

Comment 4

7 years ago
Fred,

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

Comment 5

7 years ago
I don't know -- Wil?
Anything in zamboni is.  We can call this fixed.
Status: NEW → RESOLVED
Last Resolved: 7 years ago
Resolution: --- → FIXED
(Assignee)

Updated

3 years ago
Product: Webtools → Webtools Graveyard
You need to log in before you can comment on or make changes to this bug.