Translating WMDE's attribution generator

Translating WMDE's attribution generator

Hi everyone,

at Wikimedia Deutschland, we have recently launched the "Lizenzhinweisgenerator" (German for "Attribution Generator"). It helps to create correct attributions for Wikipedia and Wikimedia Commons pictures. At the moment, it's only available in German. We will provide an English version soon, but there are further request(s) from the Wikimedia Communities to translate it to other languages. I thought Translatewiki would be the environment to do so. The text files to be translate are on Github, most of them html, one is a json file.

Now my questions are: Generally, is Translatewiki suited to translate the files? Is it easy to export the files back from here to Github/our webspace? What needs to be done from my (our) side? Could someone support me with that?

Best and cheers,

Cornelius Kibelka (WMDE) (talk)10:00, 25 May 2016

At the moment we do not support HTML files.

To be enabled on translatewiki.net you have to fill the usual requirements such as ensuring that provided translations will be used and reach users in timely manner and providing message documentation for contextual information.

Nike (talk)10:48, 25 May 2016

That's a pity, as 4 of the 5 file are html files. Any workaround for that?

We fulfil the usual requirements, as it is in our highest interest to have the tool translate. Message documentation for contextual information will be provided, of course.

Cornelius Kibelka (WMDE) (talk)11:13, 25 May 2016

Can't you convert them to a set of .json files (or .po+.mo if you don't like json)?

Liuxinyu970226 (talk)11:27, 25 May 2016

Well, the idea of all this was to make the re-import as easy as possible.

Cornelius Kibelka (WMDE) (talk)11:40, 25 May 2016

There are tools that can be integrated in the build process to extract Gettet pot files (maybe json as well, I haven't researched) and rebuild the translated html files.

One idea is to forgo having the html files as primary format and use some templating system or static file generator system to generate the html files from the json files. Something like this would be easy to write for a programmer as well.

Alternatively you could write a FileFormatSupport class for your HTML format, but I am afraid it wouldn't be very re-usable and would have maintenance costs.

Nike (talk)14:19, 27 May 2016
 

Cornelius, did you find some library suitable for your needs to load the (translated) text from files?

Nemo (talk)15:42, 20 May 2017