Registering an extension fork – partial message key collision

Registering an extension fork – partial message key collision

Edited by author.
Last edit: 18:29, 31 August 2022

Hi, in the coming days I will be applying to register mw:Extension:MediaUploader on Translatewiki. There's a catch, though – MediaUploader is a fork of mw:Extension:UploadWizard. I have renamed the vast majority of messages inherited from UploadWizard (and changed them as well), but there are still a few messages that have to keep their old keys for technical reasons. For example, I want to maintain backward compatibility with UploadWizard's user preferences and edit tags. Thus, MediaUploader has to use the same preference and tag keys, which in turn means that MediaWiki will force me to use the same message keys as UploadWizard. This is not a problem for users, because the two extensions cannot be installed side-by-side, but if I understand correctly the mechanisms of Translatewiki, it will be a problem here.

Is there any way around this issue?

Ostrzyciel (talk)18:29, 31 August 2022

Hi, any updates on this? I have been thinking about this myself a bit, and the only solution I can think of would be to prefix the colliding messages on translatewiki.net, but not in the extension. So, for example, UploadWizard would keep its tag-uploadwizard message here, but MediaUploader would be assigned mediauploader-tag-uploadwizard, which would be mapped to tag-uploadwizard during translatewiki.net -> code repository migration.

I have no idea if this is possible or not.

Ostrzyciel (talk)16:13, 4 September 2022

Hi, sorry for the late reply. You can prefix message with "prefix = mediaupload-" in https://gerrit.wikimedia.org/r/plugins/gitiles/translatewiki/+/refs/heads/master/groups/MediaWiki/mediawiki-extensions.txt, see exisiting lines there.

I would suggest to send a patch for register of the new extension with the prefix lines for the message keys with collision.

I will review the patch.

Raymond07:40, 5 September 2022

Ah, that would solve it, thank you! I will submit a request to register the extension soon.

Ostrzyciel (talk)13:25, 6 September 2022