Page MenuHomePhabricator

How to correctly add missing keys to i18n json files
Closed, InvalidPublicBUG REPORT

Description

When a key is missing from a different language i18n json file, should we just look up the translation and add it directly or is there a specific process to follow?

Steps to Reproduce:

1-change language to marathi
2-search for "indian"
3-select the first article
4-select the gallery icon

Actual Results:

You should see the word "ABOUT" (in English instead of Marathi).

Screen Shot 2020-02-13 at 00.25.49.png (1×608 px, 260 KB)

In the file Gallery.js, the key being passed in this case is:

i18n.i18n('softkey-about')

But that key does not exist in mr.json.

Expected Results:

Ideally the app would display "About" in Marathi, yes? According to Google Translate that's "बद्दल".

My question is: when I come across a missing key, should I look up the translation and add directly?

Event Timeline

eamedina updated the task description. (Show Details)

@eamedina: Hi, I don't know which software this is about when looking at the steps to reproduce. Probably this is about KaiOS-Wikipedia-app?

There is a process to translate strings via translatewiki.net, see https://www.mediawiki.org/wiki/Help:Extension:Translate and https://www.mediawiki.org/wiki/Help:Extension:Translate/Translation_example . https://translatewiki.net/wiki/Translating:WikimediaMobile mentions KaiOS (though no contact info) so I'd think this piece of software has been added to translatewiki.net.

My question is: when I come across a missing key, should I look up the translation and add directly?

Do you speak Marathi? If you do, feel free to set the correct translation (the Translation memory already proposes three strings actually used for translating this string) on https://translatewiki.net/w/i.php?title=Special:Translate&showMessage=wikipedia-kaios-softkey-about&group=wikimedia-mobile-wikipedia-kaios-strings&language=mr&action=translate (or https://translatewiki.net/w/i.php?title=Special:Translate&showMessage=wikipedia-kaios-gallery-about-header&group=wikimedia-mobile-wikipedia-kaios-strings&language=mr&action=translate ?).

@eamedina: Hi, I don't know which software this is about when looking at the steps to reproduce. Probably this is about KaiOS-Wikipedia-app?

@Aklapper Thanks for the information and yes, this is correct.

@eamedina in the case of missing key, feel free to add it through traslatewiki.net (you will need to register account for that) or wait until the community does

SBisson subscribed.

I hope the answer above helps.

In the code, we manage ONLY i18n/en.json and i18n/qqq.json. All other i18n files are maintained in translatewiki.net. Feel free to create an account and contribute for languages you actually know. Looking up words with google translate is generally discouraged.

Wonderful, thank you @SBisson @Aklapper @hueitan for all the informative replies. Certainly learned something from this thread, will take a look at translatewiki.net 👍