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

Niklas Laxström niklas.laxstrom at gmail.com
Mon Aug 14 13:25:58 UTC 2017


I should of course have given the links right away:

https://www.mediawiki.org/wiki/Internationalisation_wishlist_2017#Support_renames_when_importing_message_changes
https://phabricator.wikimedia.org/T158742

  -Niklas

2017-08-08 17:58 GMT+03:00 Jon Robson <jrobson at wikimedia.org>:

> > For future, there is a feature request to automatically detect and
> handle renames (within a repository) during the synchronization to
> translatewiki.net
>
> This does sound promising. Is there a task I can track? I'd like to do
> this rename at some point, but there is no urgency so waiting on this seems
> sensible.
>
> On Sun, Aug 6, 2017 at 8:49 AM Niklas Laxström <niklas.laxstrom at gmail.com>
> wrote:
>
>> 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
>> translatewiki.net
>> [*] 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.
>>
>>   -Niklas
>> _______________________________________________
>> Mediawiki-i18n mailing list
>> Mediawiki-i18n at lists.wikimedia.org
>> https://lists.wikimedia.org/mailman/listinfo/mediawiki-i18n
>>
> --
> Jon Robson
> Senior Software Engineer
>
> _______________________________________________
> Mediawiki-i18n mailing list
> Mediawiki-i18n at lists.wikimedia.org
> https://lists.wikimedia.org/mailman/listinfo/mediawiki-i18n
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.wikimedia.org/pipermail/mediawiki-i18n/attachments/20170814/27ffa304/attachment.html>


More information about the Mediawiki-i18n mailing list