View it! Tool/localization instructions

From Meta, a Wikimedia project coordination wiki

Steps[edit]

Please note that to prevent mistakes or abuse, changes are not automatic. Let us know if you've made an update that still needs to be deployed.

To help us make View it! multilingual:

  1. Visit View it! Tool/localization.json
  2. To make a change/correction to an existing language, simply edit the fields for that language's entry. You might want to discuss your change if someone else preferred a different wording.
  3. For a new language, copy the existing JSON notation for a language entry, for example:
    "en": {
    "label": "View",
    "description": "View images related to this article"
    },
  4. Follow these guidelines when adding/updating languages in the JSON:
    • Specify the language using its language code at the top of the entry (e.g. "en" for English, "es" for Spanish, etc.)
    • "label" and "description" can be changed to any value, per your local language community's preference. It does not need to be a translation of the English.
      • The "label" value controls what text goes in the tab. (Currently "View" in English.)
      • The "description" value controls the helpful tooltip that appears if a user hovers over the tab.
    • Languages should appear in Latin alphabetical order. Do not just place a new language at the top or bottom unless that is where it goes alphabetically.
    • If the new language you are adding is at the end, for valid JSON syntax, you must ensure the comma format is preserved. That is, add a final comma to the previous final language entry, and do not include a final comma (unlike the example code above) for the new language you are adding. (Ending list items in JSON arrays do not have commas.)
  5. Hit "Publish changes" and let us know to update the user script.

Example[edit]

View it! Tool localization.json page
Editing screen for View it! Tool localization.json
Translation (Swedish) added to View it! Tool localization.json
View it! Tool localization.json after saving new translation