Preferred way to translate a large text that's part of the software

Preferred way to translate a large text that's part of the software

On lib.reviews I have a couple of large pages, like https://lib.reviews/terms and soon an FAQ. What's the preferred way of translating these via translatewiki.net?

  • Dumping the whole text in a single message
  • Splitting it into many small messages (which honestly I would prefer not to do because it'd be very cumbersome to maintain)
  • Creating a page and using the page translation feature
  • Something else / not appropriate for translatewiki.net?

If the answer is "page translation", is there a recommended way to normalize the HTML to remove MediaWiki-specific classes and such?

Eloquence (talk)19:40, 29 October 2016

Large translation units won't appeal some translators (lack of time/interest) and are harder to translate/review/mantain. On the other hand, some texts are meaningfull in its entireness and should be translated carefully and consistently (like terms and conditions, legal stuff). FAQs is a group of loose questions. So I wouldn't doubt about them: split the FAQ into translation units. Don't know for sure about li.reviews terms.

Macofe (talk)00:26, 31 October 2016
 

Eloquence, did you choose what to do here? It's ok to load your terms page from some l10n file on your repository, preferably with at most one paragraph per message. This is what OpenStreetMap.org does.

On hte other hand, you could of course embed your website text from a MediaWiki wiki powered by Translate, and that would take care of the translations with whatever formatting you want (this is rather easy e.g. in Wordpress with the wiki-embed extension, but there are probably fancier ways too).

Nemo (talk)15:37, 20 May 2017

I don't have a good solution yet, no; thanks for the poke & sorry for late response. Splitting the content into messages seems problematic from a long term maintenance perspective (I'd like to keep it simple to modify the original). Unless I come up with something better, I'll probably set up Translate on freeculture.org which seems at least more user-friendly & powerful than asking people to submit a pull-request.

Eloquence (talk)01:09, 2 August 2017

Thanks for the update. IMHO if it's a single page we can just translate it here and see how it goes. Is it generated from files in the same repository and same format?

Nemo (talk)10:03, 2 August 2017

There are two pages right now, FAQ and Terms, and they're stored as Handlebars templates which are rendered server-side. In practice this means HTML without the header and footer; see the terms of use for example. If we use page translation, it would be fairly straightforward to sync the rendered HTML of the whole page from TWN (minus MediaWiki cruft) on a regular basis.

Eloquence (talk)21:58, 2 August 2017

Ah ok. Yes, it would be straightforward to use page translation, with the content of each p tag as translation unit. If we don't add anything else to the translatable page, then the translation pages will only have the expected HTML as content.

I would just go for it and put them up as subpages of Translating:Lib.reviews. We don't have a good way to import the existing translations but we could also just freeze the translation of the unneeded languages until we figure it out.

Nemo (talk)06:26, 3 August 2017

That sounds good, will poke at that later today.

Eloquence (talk)20:24, 3 August 2017
 

I've imported the two pages now:

I've also marked the page content with <translate> tags. I'm unsure about the best way to mark up the page and whether these docs are still accurate; other pages here like How to translate appear to use a whole tag for the entire page, so I haven't manually segmented it beyond excluding the <languages/> tag at the beginning. Please let me know if that works. If so, can you mark the pages for translation?

Eloquence (talk)07:53, 4 August 2017

This is acceptable, but I thought you would want to preserve your own HTML (for instance the IDs): it would be ok to paste your HTML as is and add a translate tag inside each p tag, I think.

Nemo (talk)07:57, 4 August 2017

Excellent point re: the IDs; it's indeed best to keep these stable across translations. Beyond that I think I should be able to transform the MediaWiki output (mostly by stripping any extraneous stuff I don't need automatically) on import. I've added the IDs and excluded the relevant HTML from translation. Does that look reasonable to you?

Eloquence (talk)00:17, 5 August 2017