Technical changes concerning wiki translations

Discuss and coordinate development of mainline and user-made content translations.

Moderators: Forum Moderators, Developers

Post Reply
User avatar
shadowm
Site Administrator
Posts: 6420
Joined: November 14th, 2006, 5:54 pm
Location: Chile
Contact:

Technical changes concerning wiki translations

Post by shadowm » August 10th, 2017, 7:56 am

Hi,

Unfortunately, since Gna.org is finally dead for good, we no longer have a translations mailing list, so the closest venue for discussing this with our translators I could think of besides spamming every single active translator/maintainer I could find on the wiki, was this forum section.

As you may have noticed, Wesnoth.org got a wholesale redesign around July 18th. Since then I’ve been working on various bits and bobs, both on the design side and the site’s various back-end components. One thing that had been bothering me for a while and which I deliberately postponed until yesterday is the fact that the wiki pages with a translation box use the ugliest possible format for them, but also, there are multiple of them (which can be tracked by looking for the template they use for the table’s style parameters), all separate, all with different contents, and all would need to be updated together in order to make any structure or style changes to them.

Thus, after wasting almost all of yesterday trying to force MediaWiki’s DPL extension to obey me (it didn’t — there are some border-case conflicts with ParserFunctions it seems), I still managed to come up with a slightly more brute-force approach to solving this problem that will hopefully work without introducing any performance regressions in the wiki’s parser engine (if you find any, do tell me ASAP).
You can see the new template in action on the Play page, and if you check the page’s source you’ll see that it all works with that single template inclusion without needing any page-specific parameters at all. Clean, and simple, and hopefully it also looks better than what we had before.

However, this does create some new (necessary) technical constraints, and brings to light a couple of existing issues:
  1. The list of supported languages for the entire wiki needs to be defined in the template. For technical reasons, I’ve restricted edits for the template and the accompanying auxiliary template to wiki administrators since it’s a pretty frail piece of machinery that might break in non-obvious ways if you start messing around with anything that isn’t raw content (e.g. line breaks and whitespace in general). Here’s the list of supported translations as of this writing, with their respective language codes (which serve as the last path component in the page titles) and their labels (displayed on the translations bar):

    Code: Select all

    {{TranslationsHelper|de|Deutsch}}
    {{TranslationsHelper|es|Español}}
    {{TranslationsHelper|et|Eesti}}
    {{TranslationsHelper|fr|Français}}
    {{TranslationsHelper|hu|Magyar}}
    {{TranslationsHelper|it|Italiano}}
    {{TranslationsHelper|ja|日本語}}
    {{TranslationsHelper|la|Latina}}
    {{TranslationsHelper|pl|Polski}}
    {{TranslationsHelper|pt|Português}}
    {{TranslationsHelper|pt_BR|Português do Brasil}}
    {{TranslationsHelper|ru|Русский}}
    {{TranslationsHelper|sv|Svenska}}
    {{TranslationsHelper|ukr|Українська}}
    {{TranslationsHelper|vi|TiếngViệt}}
    {{TranslationsHelper|zh-Hans|简体中文}}
  2. This brings me to the next point. While checking for existing translations, I noticed that there are some orphaned pages, such as Play/ukr (which isn’t anymore, so you’ll have to tell me if it should be unlinked again), and Download/ua which I presume is also Ukrainian, since .ua is the ASCII TLD for Ukraine. I also noticed some inconsistencies both within the wiki and with regards to mainline Wesnoth involving the language codes used for the page names. For example, it seems people are using zh-Hans for a Chinese variant, while the game itself uses zh_CN (with an underscore) and there are orphaned pages that use zh-CN (with a hyphen). Ukrainian has a similar issue, using ukr while the game uses uk. This is all a bit confusing but it is a point that needs to be settled so that the new Translations template can get it right.
  3. It’s worth clarifying that, no matter what you do, if your translation exists and the page suffix matches one from the list above, the template will include it on the translations bar. The only way to avoid that (e.g. for WIP pages) is to rename the page to something that will not be recognized (e.g. Play/es-WIP) or, preferably, move it to your user page’s subnamespace (e.g. User:Shadowmaster/Play/es).
  4. Finally, it is evident in some cases (Play and Download in particular) that the translated versions have drifted behind the official English text. This is not exactly ideal for some of the most important bits of documentation meant for newcomers and prospective players, regardless of the fact that the English text is already beyond subpar in many cases. It would be nice to have some reassurance that translators will eventually have a look at those, but I understand that they already have a lot of work to do due to the new campaign in 1.13.x and the upcoming 1.14 release*. Still, I feel it’s a point worth discussing.
I would like to have some assistance from the language maintainers with solving the issues and deciding on some guidelines to follow in the future. You may notice I already added my own to the template’s documentation, but in reality they are just a proposal and as a speaker of only two languages I’m not the best person to decide how to deal with each individual situation.

Also, if I missed a language that is already in use somewhere in the wiki, make sure to tell me as well.

* Please, do not ask me questions about mainline’s development status or schedule. I haven’t been involved with any of that since March last year and I can’t dedicate any time to Wesnoth right now beyond the site redesign and system administration tasks.
Author of the unofficial UtBS sequels Invasion from the Unknown and After the Storm.
Elsewhere: shadowmBlogFollow me on Twitter

User avatar
GunChleoc
Translator
Posts: 430
Joined: September 28th, 2012, 7:35 am
Contact:

Re: Technical changes concerning wiki translations

Post by GunChleoc » August 10th, 2017, 9:28 am

Thanks for cleaning this up!

Regarding 2., uk should be used as the language code for Ukranian.

The Chinese issue is a bit more complicated - I guess we have some historical baggage here. China uses Simplified Chinese as their standard writing system, while Taiwan uses Traditional Chinese. I think the codes for the writing systems (zh-Hans, zh-Hant) came in later, so the country codes are still in wise use. I'd say just pick the variant that is less work for you, Chinese speakers will be used to it.

Post Reply