I'd like to start this by saying that translatable apihelp messages are great.
Some people think that all people who write software know English, and don't understand why should they be translated at all. This notion is incorrect. I heard from numerous people that they use the API for developing gadgets, and who happily use the translations of Apihelp in Special:ApiSandbox into their language—it's easier for them than to read the API documentation in English. So thanks, @Anomie, for making it possible.
That said, these messages are probably read by fewer people than other user interface messages. Hence, it should be a lower priority to translate them than to translate other messages in core and extensions, which are actually seen by end users who read and edit the wikis. Apihelp messages are useful only to the developers and there are fewer developers than editors.
To actually help translators at translatewiki to do this, Apihelp messages should be separated from other user interface messages. This was already done for core MediaWiki, as well as for several extensions: UniversalLanguageSelector, Translate, ContentTranslation, Echo, Flow, and FlaggedRevisions.
This should be done for all extensions. In particular, this should be done for Wikibase, which has hundreds of apihelp messages, but there are many other extensions that need this.
This requires careful and substantial work, but the process is well-known and there are existing examples. I am therefore marking it as #Easy. This involves:
- In the extension's Git repository:
-- Under the extension's i18n/ directory, create the api/ directory.
-- In this directory, create en.json and qqq.json files.
-- Find API-related messages. Usually their keys begin with `apihelp-*`, `apierror-*`, or `apiwarn-*`
-- Copy all the API messages from en.json and qqq.json in the i18n/ directory to en.json and qqq.json in the i18n/api/ directory and delete them from the original files.
-- If the extension has extension.json, edit this file and add `"i18n/api"` to MessagesDirs.
-- If the extension has no extension.json, edit its main PHP initialization file (called //ExtensionName//.php) and add the api directory to MessagesDirs. [[ https://gerrit.wikimedia.org/r/#/c/mediawiki/extensions/CirrusSearch/+/474164/4/CirrusSearch.php | See the example from CirrusSearch ]].
-- If the extension has Gruntfile.js and it has a `banana` section, then:
--- If you edited extension.json earlier, edit Gruntfile.js in a way that reads MessageDirs from extension.json. [[ https://gerrit.wikimedia.org/r/#/c/mediawiki/extensions/AbuseFilter/+/420371/12/Gruntfile.js | See the example from AbuseFilter ]].
--- If there is no extensions.json, add `api: 'i18n/api/'` in the `banana` section.
- In the translatewiki Git repository:
-- Split the extension configuration in these files:
--- groups/MediaWiki/mediawiki-extensions.txt
--- groups/MediaWiki/ExtensionsAgg.yaml
--- groups/MediaWiki/Wikimedia*Agg.yaml (could be WikimediaMainAgg.yaml, WikimediaAdvancedAgg.yaml, etc.)
-- Notes:
--- The new API group name will be "ext-//extensionname//-api".
--- The group with the messages for users will be "ext-//extensionname//-user" or "ext-//extensionname//-interface".
--- Reuse the extension's description message for the aggregate group's description field. The description message usually has the name "//extensionname//-desc". For example, for TimedMediaHandler the description value in the YAML file is: `description: '{{Special:MyLanguage/MediaWiki:Timedmediahandler-desc/en}}'`. Please check that this message actually exists on translatewiki by going to the page MediaWiki://extensionname//-desc/en ([[ https://translatewiki.net/wiki/MediaWiki:Timedmediahandler-desc/en | example ]]).
--- Create a new aggregate group "ext-//extensionname//", including the main extension and the API messages using "ext-//extensionname//-*"
--- Put the API messages group to groups/MediaWiki/WikimediaTechnicalAgg.yaml.
--- Change the entry of the old message group in the aggregate groups files to the new group name. For example, if "ext-scribunto" appeared in WikimediaTechnicalAgg.yaml, the entry must be changed to "ext-scribunto-user".
--- If the previously defined message group has optional or ignored messages and api* messages appear there, move them to the new api group.
Examples:
- For the extensions repositories:
-- [[ https://gerrit.wikimedia.org/r/#/c/367021/ | UniversalLanguageSelector ]]
-- [[ https://gerrit.wikimedia.org/r/#/c/325753/ | Echo ]]
- For the translatewiki repositiory:
-- [[ https://gerrit.wikimedia.org/r/#/c/367022/ | UniversalLanguageSelector ]]
-- [[ https://gerrit.wikimedia.org/r/#/c/325754/ | Echo ]]
This is it. Existing translations will be migrated automatically.
See more links to patches in the checklist toward the end of the task description.
The impact for the extensions' developers will be that they'll have to add new apihelp/apierror/apiwarn messages to the i18n/api/en.json and i18n/api/qqq.json files, instead of i18n/en.json and i18n/qqq.json. As far as I can tell, nobody complained about having to do this with Echo, Flow, Translate, etc.
The impact for the translators will be that the cryptic, highly technical, and rarely-seen translatable messages in the "Extensions Used by Wikimedia" group will be separated. As of August 2018, there are more than 1900 such API messages.
----
Checklist:
//This checklist was written semi-manually. It is probably not complete, but it does include some of the larger and more important extensions. Once many of these are done, some more will be added.//
[x] AbuseFilter ([[ https://gerrit.wikimedia.org/r/#/c/mediawiki/extensions/AbuseFilter/+/420371/ | patch ]])
[ ] AntiSpoof (@Amire80)
[ ] Babel
[ ] BetaFeatures
[ ] Bounce Handler
[ ] CategoryTree
[ ] CentralAuth (@MarcoAurelio - task: T214983)
[ ] CentralNotice
[x] CheckUser @Zoranzoki21
[x] CirrusSearch @rafidaslam ([[ https://gerrit.wikimedia.org/r/474164 | patch ]])
[ ] Cite
[ ] ConfirmEdit
[x] ContentTranslation ([[ https://gerrit.wikimedia.org/r/#/c/mediawiki/extensions/ContentTranslation/+/232699/ | patch ]])
[x] Echo ([[ https://gerrit.wikimedia.org/r/#/c/mediawiki/extensions/Echo/+/325753/ | patch ]])
[ ] Example (@Amire80, [[ https://gerrit.wikimedia.org/r/#/c/mediawiki/extensions/examples/+/485742/ | patch ]])
[ ] ExtensionDistributor
[ ] FeaturedFeeds
[x] Flow ([[ https://gerrit.wikimedia.org/r/#/c/mediawiki/extensions/Flow/+/289064/ | patch ]])
[v] Gadgets (@Zoranzoki21, [[ https://gerrit.wikimedia.org/r/#/c/mediawiki/extensions/Gadgets/+/485517/ | patch ]])
[ ] GeoData
[ ] GettingStarted
[ ] GlobalBlocking
[ ] GlobalPreferences (@Amire80)
[ ] GlobalUsage (@Zoranzoki21)
[ ] Graph
[v] JADE (Amir, [[ https://gerrit.wikimedia.org/r/#/c/mediawiki/extensions/JADE/+/478402/ | patch ]])
[ ] JsonConfig
[ ] Kartographer
[ ] Linter
[ ] MassMessage
[v] MobileFrontend (@Amire80, [[ https://gerrit.wikimedia.org/r/#/c/mediawiki/extensions/MobileFrontend/+/485711/ | patch ]])
[ ] Newsletter
[ ] OATHAuth
[ ] OAuth
[ ] ORES
[ ] PageAssessments
[ ] PageViewInfo
[ ] ParsoidBatchApi
[ ] ProofreadPage
[ ] PropertySuggester
[ ] ReadingLists
[x] Scribunto @rafidaslam ([[ https://gerrit.wikimedia.org/r/#/c/mediawiki/extensions/Scribunto/+/475083/ | patch ]])
[ ] SecurePoll
[ ] SiteMatrix
[ ] SpamBlacklist @MarcoAurelio (cf. T214367)
[ ] TextExtracts
[x] Thanks @rafidaslam ([[ https://gerrit.wikimedia.org/r/#/c/mediawiki/extensions/Thanks/+/475022/ | patch ]])
[x] TemplateData
[x] TimedMediaHandler ([[ https://gerrit.wikimedia.org/r/#/c/mediawiki/extensions/TimedMediaHandler/+/452429/ | patch ]])
[x] TitleBlacklist @Zoranzoki21
[x] Translate
[x] UniversalLanguageSelector ([[ https://gerrit.wikimedia.org/r/#/c/367021/ | patch ]])
[x] Upload Wizard (@Zoranzoki21, [[ https://gerrit.wikimedia.org/r/#/c/mediawiki/extensions/UploadWizard/+/481280/ | patch ]])
[x] UrlShortener (@Zoranzoki21, [[ https://gerrit.wikimedia.org/r/#/c/mediawiki/extensions/UrlShortener/+/481282/ | patch ]])
[x] VisualEditor ([[ https://gerrit.wikimedia.org/r/#/c/mediawiki/extensions/VisualEditor/+/462826/ | patch ]])
[x] Wikibase Client ([[ https://gerrit.wikimedia.org/r/#/c/mediawiki/extensions/Wikibase/+/462153/ | patch ]])
[v] Wikibase Lexeme (Amir, [[ https://gerrit.wikimedia.org/r/#/c/mediawiki/extensions/WikibaseLexeme/+/487053/ | patch ]])
[ ] Wikibase Quality
[ ] Wikibase Quality Constraints
[x] Wikibase Repo ([[ https://gerrit.wikimedia.org/r/#/c/mediawiki/extensions/Wikibase/+/460554/ | patch ]])
[x] Wikilove @Zoranzoki21 ([[ https://gerrit.wikimedia.org/r/474314 | patch ]])
----
A somewhat related task: {T167762}.