In T361512: Wish form internationalization we added i18n to the intake form; this task is to make l10n possible.
Option 1: TranslateWiki.net
This task is not to do the actual addition of the project to TranslateWiki.net (that'll be a subsequent task created following the instructions. This is just to set things up for that to happen.
One idea is that we add the messages (without Wikimedia branding) to the CommunityRequests extension, get that approved and deployed, and then use them in the gadget. Then, any Wikimedia branding (which isn't all of the messages) can be done in the WikimediaMessages extension.
The workflow then would involve:
- Removing all i18n files from the gadget repo.
- When you want to add a new message, it'd be added in the extension and used in the gadget — so a MR on the gadget would be dependent on a patch in Gerrit, and deployment of the gadget need to be timed to happen after the next train.
- Some messages also needing changes in WikimediaMessages.
A variant of this option is to move all the messages to WikimediaMessages and not worry about CommunityRequests at this stage.
Option 2: on-wiki with the Translate extension
Create a gadget page at e.g. MediaWiki:Gadget-WishlistIntake-messages that can be marked for translation.
{ "@language": "<languages/>", "messages": { "default": { "blahblah": "<translate><!--T:1--> Do blah blah</translate>", …
This would be a wikitext page that resolves to valid JSON, and would be loaded via the API by the gadget. A working example of this is in the AddMe gadget (which also is to be merged into the intake repo, so effectively the same code can be used).
One issue with this approach is that adding new messages while in development is trickier. The dev, watch, and build scripts should be updated to push to the gadget messages page.