Opened 10 years ago

Closed 10 years ago

#2304 closed enhancement (fixed)

Split the default English i18n parameter in Potlatch out to a YAML file so we can have a machine-readable version of canonical UI messages

Reported by: avar Owned by: richard@…
Priority: major Milestone:
Component: potlatch (flash editor) Version:
Keywords: Cc:

Description

Potlatch needs to split the default English i18n parameter in Potlatch out to a YAML file so we can have a machine-readable version of canonical UI messages. This is required so that we don't have to manually track down translation strings in Potlatch's source and add them to the wiki so that they can be translated via the ad-hoc i18n template.

Attached is a patch that shows the sort of internal changes that need to happen. The English language strings that are removed from the source then need to be added to an English localised.yaml like other languages have, currently there isn't one.

If this is done we can easily add Potlatch to a better i18n system like Translatewiki.

Attachments (2)

potlatch-iText.patch (1.2 KB) - added by avar 10 years ago.
Incomplete patch showing the modifications that need to be done. But they need to happen for all iText() calls
pl-i18n-err.png (94.9 KB) - added by avar 10 years ago.
Potlatch finally loaded the Maximize message after Maximizing & Un-Maximizing

Download all attachments as: .zip

Change History (5)

Changed 10 years ago by avar

Attachment: potlatch-iText.patch added

Incomplete patch showing the modifications that need to be done. But they need to happen for all iText() calls

comment:1 Changed 10 years ago by Richard

I agree this would be a useful enhancement, but in the absence of any sudden influx of Potlatch 1 developers, I don't see it as a higher priority than working on Potlatch 2.

Changed 10 years ago by avar

Attachment: pl-i18n-err.png added

Potlatch finally loaded the Maximize message after Maximizing & Un-Maximizing

comment:2 Changed 10 years ago by avar

So I've implemented this in a bunch of commits, most notably [17775].

But it broke everything, or rather exposed the breakage that was already there.

When Potlatch starts up it seems to output some messages with iText before it actually *loads* them from the server, i.e. before it calls loadPresets(). Since English isn't hardcoded in the UI anymore those messages will just get "I18N ERR" in the current trunk.

However if you click around in the UI and cause something to re-draw you'll get the message you wanted, e.g. here: attachment:pl-i18n-err.png

Before I maximized & un-maximized the "Maximize window" message was also displayed as "I18N ERR".

So Potlatch needs to change to re-draw the UI after it has loaded i18n, or load i18n before it draws the UI.

If that's all unpossible I can just implement a hack to shuffle the hardcodings into the ActionScript? code from the YAML file and restore the status quo.

But as is I've broken Potlatch in trunk. Just revert it if there's not some really silly redrawUI() function I'm missing.

comment:3 Changed 10 years ago by Richard

Resolution: fixed
Status: newclosed
Note: See TracTickets for help on using tickets.