[Mediawiki-i18n] Advice on migrating and renaming translation keys

Niklas Laxström niklas.laxstrom at gmail.com
Sun Aug 6 13:49:03 UTC 2017

2017-07-20 22:33 GMT+03:00 Jon Robson <jrobson at wikimedia.org>:

> MinervaNeue contains various message keys prefixed with mobile-frontend-
> https://github.com/wikimedia/mediawiki-skins-MinervaNeue/
> blob/master/i18n/en.json
> I'd like to move away from this as it's confusing.
> Nemo pointed out that when Cologne Blue was moved out of core no messages
> were renamed.. but then none of those were prefixed.
> My concern is that leaving these message keys in Minerva adds confusion
> and inconsistency for developers and translators about where the messages
> are used and sourced from. It also means that new developers are likely to
> prefix new message keys with mobile-frontend- and that will lead to
> unnecessary review.
> My preference would be to take the short term pain of renaming all message
> keys from `mobile-frontend-` to `minerva-` for the long term happiness.
> Is there any strong reason not to do this?
As a general rule of thumb, renaming message keys that are in use is
disruptive and should be avoided.

To rename message keys, you should coordinate with translatewiki.net
maintainers. Raymond takes care of MediaWiki core and extensions. The
ideal[#] process is:
1) make a patch to rename message keys in en.json and qqq.json (optionally
also all language files, though this is not necessary)
2) when that patch is merged by translatewiki.net maintainer, before the
next sync to translatewiki.net all the translations are renamed in
translatewiki.net (with a bot or Special:Replacetext) to preserve
translation histories
3) a full export[*] is made to update translation files (which will
automatically update per the renames) and pushed to the repository

[#] For future, there is a feature request to automatically detect and
handle renames (within a repository) during the synchronization to
[*] Regular export skip languages with no recent edits to speed up the
process. Full export unconditionally exports all languages that meet the
export threshold.

There are other considerations such as local customizations of those
messages in the wikis, which I skipped in this explanation.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.wikimedia.org/pipermail/mediawiki-i18n/attachments/20170806/f3506391/attachment.html>

More information about the Mediawiki-i18n mailing list