Last modified: 2013-04-04 11:23:59 UTC
At the moment, to prevent translators from being able to edit content of the source language, you would blacklist * This causes a problem if you want to edit a system message (group MediaWiki), as if you edit the content via editing the article, the changes are not in the translation system If you try to add the page to the translation system, it is in it's own group Suggest a $wgTranslateWhitelist that is applied after the blacklist
Could you elaborate a bit? I assume you are using $wgTranslateBlacklist, but what kind message groups (PHP class) are you using and what is the issue you want to solve?
I have a wiki whose source language is English, so I have blacklisted translations of English as per the example in Translate.php * '*' => array( // All groups * 'en' => 'English is the source language.', * ), I still want to use Translate for translating the MediaWiki group (the wiki interface/system messages), e.g. MediaWiki:Loginprompt This is fine, until I want to modify the English version. With * blacklisted in English, it cannot be edited via Translate. If I edit the page (e.g. MediaWiki:Loginprompt ) directly, the changes are not shown in the Translate system. If I manually mark the page for translate (adding <translate></translate), then the page has it's own messages group (page-MediaWiki:Loginprompt), and then there will be entries in both the MediaWiki and page-MediaWiki.. groups As far as I can tell, it is not possible to blacklist "all except x, y, z", so I think this would be something suitable for an additional Whitelist option Or is there another trick to blacklisting the source language from translation while maintaining the ability to use the Translate system for the MediaWiki?
I'm afraid we are not supporting your use case very well. There is no per language restrictions (though we might have one for source language at some point). It looks like you mostly want to translate custom interface modifications, for which I would recommended this guide which fits better for that: https://www.mediawiki.org/wiki/Help:Extension:Translate/Unstructured_element_translation
Isn't a purpose of wgTranslateBlacklist to restrict translation of a group/language? I have implemented the basic wgTranslateWhitelist functionality which as far as I can tell/understand is the neatest way to handle this use case, see attached patch Missing: isWhitelisted function (StatsTable.php) and logic (SpecialLanguageStats.php & SpecialMessageGroupStats.php) If I finish the patch, would you implement it?
Oh, I see now that the message system is... more complicated than I thought. I still need to transclude the \en article in the main article for it to be used -> I guess the proper way would be to have some kind of hook, for whenever a "core" message is displayed in the default language, for it to use the \en version? and the original "Message definition" is still not changed even when English translation is changed or the main article. -> I hope this is not too difficult to fix
(In reply to comment #4) > If I finish the patch, would you implement it? Niklas, do you have an opinion here / could you answer this?