Page MenuHomePhabricator

Move translation strings into portal-specific keys
Closed, ResolvedPublic

Description

During our Google Summer of Code effort to update the Wikimedia portals, we've realized that many of the translations for the Portals project are actually specific to Wikipedia, and need to be moved into the portal specific keys in the translations in order to be translated for other portals.

The following top-level keys in the Wikimedia Portals project:

{
	"language-button-text": "Read Wikipedia in your language",
	"footer-description": "Wikipedia is hosted by the Wikimedia Foundation, a non-profit organization that also hosts a range of other projects.",
	"footer-donate": "You can support our work with a donation.",
	"app-links": {
		"title": "Download Wikipedia for Android or iOS",
		"description": "Save your favorite articles to read offline, sync your reading lists across devices and customize your reading experience with the official Wikipedia app.",
		"google-store": "Google Play Store",
		"apple-store": "Apple App Store",
		"url": "https://en.wikipedia.org/wiki/List_of_Wikipedia_mobile_applications"
	},
	"search-input-label": "Search Wikipedia",
}

Needs to be changed into something portal specific, like this:

{
        "wiki": {
         	"language-button-text": "Read Wikipedia in your language",
	        "footer-description": "Wikipedia is hosted by the Wikimedia Foundation, a non-profit organization that also hosts a range of other projects.",
	        "app-links": {
		        "title": "Download Wikipedia for Android or iOS",
		        "description": "Save your favorite articles to read offline, sync your reading lists across devices and customize your reading experience with the official Wikipedia app.",
		        "google-store": "Google Play Store",
		        "apple-store": "Apple App Store",
		        "url": "https://en.wikipedia.org/wiki/List_of_Wikipedia_mobile_applications"
	        },
	        "search-input-label": "Search Wikipedia",
         }

}

They can then be added for translation for the other portal pages (when necessary, the app-links will be for Wikipedia only, probably...).

Open Question

@Nikerabbit Can these translation strings be "moved" without loosing the existing translations? Is there an automated way to achieve this?

Event Timeline

Is this intra-file rename only (and not moving stuff from one set of files to another)? If so, we can coordinate so that you rename en.json (and qqq if needed by CI) and I rename all translations using ReplaceText extension.

Is this intra-file rename only (and not moving stuff from one set of files to another)? If so, we can coordinate so that you rename en.json (and qqq if needed by CI) and I rename all translations using ReplaceText extension.

Yes, this is intra-file only. That sounds great! I'll prepare the en.json and qqq.json files in that case and we'll take it from there :)

Change 697451 had a related patch set uploaded (by Jdrewniak; author: Jdrewniak):

[wikimedia/portals@master] Reorganize l10n messages to be more portal specific

https://gerrit.wikimedia.org/r/697451

I probably should have put a [WIP] tag on that patch :P
@Nikerabbit , since it's merged, would you have time this week to move the pages on-wiki? The portals are deployed on Monday's so we have plenty of time to test, but if you're busy, I can revert the patch and we can formally schedule some time.

It's not actually merged yet, but feel free to do it when it is convenient. Tomorrow I will do the regular exports, so if it's before then, translations would be updated as part of it without extra work for me.

Change 697451 merged by Jdrewniak:

[wikimedia/portals@master] Reorganize l10n messages to be more portal specific

https://gerrit.wikimedia.org/r/697451

It's not actually merged yet, but feel free to do it when it is convenient. Tomorrow I will do the regular exports, so if it's before then, translations would be updated as part of it without extra work for me.

Ok (sorry it got a bit busy late last week) I just did the portal deploy for this week and I merged the patch afterwards.

Jdrewniak claimed this task.

perfect! thank you!