MediaWiki talk:Gadget-TranslationAdder-Data.js

Kurdish
Can you add:
 * sdh: 'Kurdish/Southern Kurdish',
 * lki: 'Kurdish/Laki',

under ckb please? Thanks.--Calak (talk) 13:49, 12 August 2018 (UTC)
 * , I'm unfamiliar with the syntax of this gadget. I may break something. Asking or  instead. --Vahag (talk) 13:59, 12 August 2018 (UTC)
 * Thanks. you pinged them.--Calak (talk) 14:02, 12 August 2018 (UTC)
 * Ok, I've added them. Let me know if there are any problems. - -sche (discuss) 20:27, 12 August 2018 (UTC)

Edit access
I need edit access to this page, how do I get it and why my rights have been taken away? --Anatoli T. (обсудить/вклад) 07:38, 25 April 2019 (UTC)
 * That's because in August 2018 edit rights for JavaScript pages in the MediaWiki namespace was restricted to a newly created user group, interface administrators, separate from sysops. See . — Eru·tuon 21:53, 25 April 2019 (UTC)
 * Thanks, are you able to give me rights? As it says, it could be done on request from admins. I am an admin and I need to edit it, please. Who else needs to be notified/asked? --Anatoli T. (обсудить/вклад) 22:16, 25 April 2019 (UTC)
 * You have to ask a Bureaucrat, apparently. ? Chignon – Пучок 22:28, 25 April 2019 (UTC)

Arabic-script corrections

 * Hi. Thanks for the latest additions to script corrections! I am sure Urdu could use the same treatment (for now) as Persian. WT:UR TR

I'm not a big fan of the names for some of the letters, though.


 * 1) kaf/keheh: Arabic  is called "kāf" and the Persian equivalent  is called "kâf". How about calling them "arabicKaf" and "persianKaf"?
 * 2) yeh/farsiYeh: Arabic  is called "yāʾ" (with a ʾ symbol at the end but no "h") and the Persian equivalent  is called "ye". How about calling them "arabicYa" and "persianYe"?
 * 3) alefMaksura: Let's call the Arabic letter  "alifMaqsura", which looks more Arabic - from the standard transliteration of . --Anatoli T. (обсудить/вклад) 05:29, 12 May 2020 (UTC)
 * Yeah, I simply used the Unicode names, which are odd. I have no objection to renaming them. — Eru·tuon 05:32, 12 May 2020 (UTC)
 * Heh, about Urdu, my script assigned it the same replacements as Persian, but I read too hastily to notice when I was adding  and the rest. Thanks for correcting that. — Eru·tuon 22:41, 12 May 2020 (UTC)
 * No worries. Thanks for this new function. Perhaps this method should be used for many other things, not just the translation adder. E.g. I have just corrected the Russian entry, which had a Latin "i" on the Ukrainian cognate . --Anatoli T. (обсудить/вклад) 23:00, 12 May 2020 (UTC)

Three Languages To Add
Here are the following languages I would like to have added:


 * hrx: Hunsrik (with masculine, feminine and neuter)
 * lb: Luxembourgish (with masculine, feminine and neuter)
 * pms: Piedmontese (with masculine and feminine)

Thanks for reading. --Apisite (talk) 06:49, 2 October 2020 (UTC)
 * I have tried in . I am no longer sure it's the right place. : could you please help? --Anatoli T. (обсудить/вклад) 10:26, 2 October 2020 (UTC)
 * You forgot the neuter for Hunsrik, but thanks anyway. --Apisite (talk) 10:28, 2 October 2020 (UTC)
 * I've added the neuter. It seems to take a while, even after a hard refresh. --Anatoli T. (обсудить/вклад) 10:37, 2 October 2020 (UTC)
 * That's right, this JavaScript page is loaded by ResourceLoader, and such JavaScript and CSS pages (except for your personal JavaScript and CSS) isn't immediately updated and sent to users by the server, and there's no way I know of to force it, unlike with templates and modules. It usually takes a few minutes for changes to be seen. — Eru·tuon 18:12, 2 October 2020 (UTC)


 * If you have the time, add Ladin (lld), Lombard (lmo) and Romagnol (rgn), which may have two genders, masculine (m) and feminine (f). --Apisite (talk) 10:11, 6 October 2020 (UTC)
 * Done. --Anatoli T. (обсудить/вклад) 22:42, 6 October 2020 (UTC)
 * Could you add Friulian (fur)? It has two genders, masculine (m) and feminine (f), as well. --Apisite (talk) 05:54, 13 December 2020 (UTC)
 * ✅. You need to give a full list and if they have a Wiktionary. Since most languages also have plural genders, like masc. plural, feminine plural. I've modelled on some others. --Anatoli T. (обсудить/вклад) 06:04, 13 December 2020 (UTC)

Sama languages
Anatoli, here's the list of languages to list under Sama:


 * ssb – Southern Sama
 * sml – Central Sama
 * sse – Balangingi Sama
 * slm – Pangutaran Sama

Sami languages coming up next. --Apisite (talk) 02:38, 8 December 2021 (UTC)
 * Already done in - Cham, Sama, Sami. Please check if anything is still missing. --Anatoli T. (обсудить/вклад) 03:24, 8 December 2021 (UTC)


 * Couldn't the Sama languages be sorted like this?

//Sama sse: 'Sama/Balangingi Sama', sml: 'Sama/Central Sama', slm: 'Sama/Pangutaran Sama', ssb: 'Sama/Southern Sama',


 * Again, thanks, Anatoli. --Apisite (talk) 04:24, 8 December 2021 (UTC)
 * Thanks again, Anatoli. --Apisite (talk) 04:25, 8 December 2021 (UTC)

Anatoli, couldn't this be done? //Sami sia: 'Sami/Akkala Sami', smn: 'Sami/Inari Sami', sjk: 'Sami/Kemi Sami', sjd: 'Sami/Kildin Sami', smj: 'Sami/Lule Sami', sme: 'Sami/Northern Sami', sma: 'Sami/Southern Sami', sje: 'Sami/Pite Sami', sms: 'Sami/Skolt Sami', sjt: 'Sami/Ter Sami', sju: 'Sami/Ume Sami',

Thanks for your help. --Apisite (talk) 04:00, 8 December 2021 (UTC)

I sorted the language names almost alphabetically, Anatoli. --Apisite (talk) 04:18, 8 December 2021 (UTC)

Eastern Lawa and Western Lawa
Anatoli, here are the Eastern Lawa and Western Lawa languages.

//Lawa lwl: 'Lawa/Eastern Lawa', lcp: 'Lawa/Western Lawa',

Thanks for listening. --Apisite (talk) 08:28, 9 December 2021 (UTC)

Greater Bai Languages
Anatoli, here are the Greater Bai languages.

//Bai bca: 'Bai/Central Bai', bfc: 'Bai/Northern Bai', bfs: 'Bai/Southern Bai', lay: 'Bai/Lama Bai',

Also, the Laki Kurdish line is under the Lawa lines. --Apisite (talk) 11:58, 9 December 2021 (UTC)

Roglai Languages
Anatoli, here are the two Roglai languages:

//Roglai rog: 'Roglai/Northern Roglai', rgs: 'Roglai/Southern Roglai', roc: 'Roglai/Cacgia Roglai'

At your service. --Apisite (talk) 02:20, 11 December 2021 (UTC)

P.S. They are Chamic languages as well. --Apisite (talk) 02:21, 11 December 2021 (UTC)

What could we do about the language name Cacgia Roglai? --Apisite (talk) 02:32, 11 December 2021 (UTC) Moved from MediaWiki talk:Gadget-TranslationAdder-Data.js.

Anatoli, the Southern Roglai language (rgs) is of the Chamic family of languages (cmc) like Northern Roglai. --Apisite (talk) 02:27, 11 December 2021 (UTC) Don't forget the Cacgia Roglai language (roc) as well. --Apisite (talk) 02:29, 11 December 2021 (UTC)


 * Hi. I am not enjoying adding new codes regularly. I've added the code as you have provided. --Anatoli T. (обсудить/вклад) 02:35, 11 December 2021 (UTC)

Interwiki links for "fa-ira" and "fa-cls"
@Benwing2, @Sameerhameedy, @Theknightwho, @Erutuon:

Hi. I lost track where I asked for this last time, so asking the same question again. We still have the issue with Interwiki links for "fa-ira" and "fa-cls" codes. Adding wiktprefix: "fa" doesn't seem to have any effect. Only "fa" and "prs" work as expected.


 * 1)  with "fa" ✅
 * 2)  with "fa-ira" ❌
 * 3)  with "fa-cls" ❌
 * 4)  with "prs" ✅

Is that doable?

Compare also with or  where "cmn" joins well with zh:wikt and "nb" with no:wikt. Is something wrong with these codes still? Anatoli T. (обсудить/вклад) 02:18, 10 November 2023 (UTC)


 * @Benwing2: Thanks for but it seems not enough. Anatoli T. (обсудить/вклад) 02:58, 10 November 2023 (UTC)
 * @Benwing2: Oh no, it did the trick, thank you!! Anatoli T. (обсудить/вклад) 02:59, 10 November 2023 (UTC)

Character replacement required for new language codes
@Erutuon:

Hi, I can't remember, which module is responsible for replacing incorrect characters, such as Arabic and  with Persian  and, when adding translations. We now need to extend it to the codes: "prs" (Dari), "fa-cls" (Classical Persian) and "fa-ira" (Iranian Persian). Could you please point me in the right direction or extend it for these codes? FYI: @Sameerhameedy, @Benwing2. Anatoli T. (обсудить/вклад) 22:15, 12 November 2023 (UTC)


 * @Atitarev It looks to be here: MediaWiki:Gadget-TranslationAdder-Data.js Benwing2 (talk) 22:29, 12 November 2023 (UTC)
 * @Benwing2: Thank you! I will try extending the handling
 * Sorry but I keep finding flaws with these codes. In I added, which doesn't have an entry at fa:wikt but it has used  rather than . Which module is responsible for checking  vs ? Anatoli T. (обсудить/вклад) 22:35, 12 November 2023 (UTC)
 * @Atitarev The use of t+ vs. t is done by bot; specifically by User:Rukhabot, operated by User:Ruakh. It doesn't run that often but still does occasionally. Are you saying the translation adder automatically added t+ instead of t? That is strange if so. Benwing2 (talk) 22:40, 12 November 2023 (UTC)
 * @Benwing2: It does actually. Try adding a gibberish vs an actual word in for a language, which has its own Wiktionary and the word exists in that Wiktionary. @Ruakh added that functionality too. Anatoli T. (обсудить/вклад) 22:43, 12 November 2023 (UTC)
 * @Benwing2: Also, User:Rukhabot needs to be aware of the code changes and mappings (e.g. fa-cls->fa), so it doesn't remove the links :) Anatoli T. (обсудить/вклад) 22:46, 12 November 2023 (UTC)
 * @Atitarev OK, I found the code in MediaWiki:Gadget-TranslationAdder-Data.js but I'm not sure what's going wrong. User:Erutuon or User:This, that and the other, can you give me some pointers in how to debug JavaScript? How do I insert print statements into the code to see what's going on and do the equivalent of previewing a page without saving the gadget? Is that possible, or do I have to create a sandbox gadget? Benwing2 (talk) 22:54, 12 November 2023 (UTC)
 * @Benwing2 Gosh, this brings back memories of when I used to maintain Twinkle on Wikipedia. Debugging gadgets was rather difficult then, and probably remains so.
 * Well, you can fork the gadget in your userspace, and include it using the  function in User:Benwing2/common.js. You can do debugging using   calls, which will dump the relevant variable(s) to your browser's developer tools console (Ctrl+Shift+I).
 * Alternatively, there is an interactive debugger in the developer tools as well (in Chrome it's on the Sources tab), where you can set breakpoints and the like. This is often easier to use if you add   to the end of the URL of the Wiktionary page you are viewing. This would save you having to fork the gadget and repeatedly edit it. This, that and the other (talk) 00:32, 13 November 2023 (UTC)
 * I did some quick debugging and wasn't able to identify an issue. The script correctly used t rasther than t+ for . This, that and the other (talk) 00:53, 13 November 2023 (UTC)
 * @This, that and the other:
 * Thanks, yes, it will work fine with "fa" مالِیات‌دَهَنْدِه but need to extent the same to work with "fa-ira"/"fa-cls"/"prs". Anatoli T. (обсудить/вклад) 00:59, 13 November 2023 (UTC)
 * Whoops, I see the code used was  rather than  . Sorry!
 * The issue is that it is trying to establish the existence on fawiktionary of the title . So we need some way of telling it that   should map to   for the purpose of title normalisation? @Atitarev This, that and the other (talk) 01:06, 13 November 2023 (UTC)
 * I can come back to this later but I need to move onto other tasks now. This, that and the other (talk) 01:07, 13 November 2023 (UTC)
 * @This, that and the other Aha, the call to getByCode needs to accept etymology languages. Benwing2 (talk) 01:07, 13 November 2023 (UTC)
 * @This, that and the other This line: MediaWiki:Gadget-TranslationAdder-Data.js Benwing2 (talk) 01:09, 13 November 2023 (UTC)
 * Also a couple of places in MediaWiki:Gadget-TranslationAdder.js. Let me see if I can fix. Benwing2 (talk) 01:09, 13 November 2023 (UTC)
 * @Atitarev Please try now. Benwing2 (talk) 01:16, 13 November 2023 (UTC)
 * @Benwing2: Perfect, thank you! Anatoli T. (обсудить/вклад) 01:23, 13 November 2023 (UTC)

More codes to nest under Chinese
@Erutuon @Benwing2 @-sche @Surjection Having discussed this with the Chinese editors on Discord, could we please nest a few more languages under the Chinese header? Three of these (Northern/Southern Pinghua and Leizhou Min) are pretty new additions, while Waxiang and Shaozhou Tuhua are divergent lects which we have very low coverage of, so they've essentially just been overlooked.
 * (Northern Pinghua)
 * (Southern Pinghua)
 * (Middle Chinese)
 * (Old Chinese)
 * (Waxiang)
 * (Leizhou Min)
 * (Shaozhou Tuhua)

The consensus is that Middle and Old Chinese translations should not be entered, as they should go under Literary (aka Classical) Chinese, so I've added a feature to Module:translations that throws an error explaining this. However, it would still be useful to nest them under Chinese, since if someone tries to add them with the translation-adder in a large list of translations, they're more likely to spot the error message if it's grouped with all the other Chinese languages, instead of hundreds of entries away where they might miss it. . Theknightwho (talk) 12:24, 13 February 2024 (UTC)


 * Added those codes. &mdash; S URJECTION / T / C / L / 12:37, 13 February 2024 (UTC)
 * @Surjection Would it please be possible to add Sichuanese ? Theknightwho (talk) 19:38, 27 February 2024 (UTC)
 * ✅ &mdash; S URJECTION / T / C / L / 19:40, 27 February 2024 (UTC)

Yokuts
A couple of changes for the Yokuts languages: Pinging @Surjection and @Erutuon. Theknightwho (talk) 18:12, 1 March 2024 (UTC)
 * 1) I've standardised the codes to start with , as per the macrolanguage:
 * 2) *  &rarr;
 * 3) *  &rarr;
 * 4) *  &rarr;
 * 5) *  &rarr;
 * 6) *  &rarr;
 * 7) *  &rarr;
 * 8) *  &rarr;
 * 9) *  &rarr;
 * 10) Gashowu  is missing from the list anyway, so should be added.
 * ✅ — Eru·tuon 19:23, 1 March 2024 (UTC)

Conversion of Min Nan to a family
Hi, could we please do the following re languages under the Chinese header? Thanks. Pinging @Surjection and @Erutuon. Theknightwho (talk) 20:23, 3 March 2024 (UTC)
 * 1) Add Hokkien  and Hainanese.
 * 2) Change the codes of Teochew (  &rarr;  ) and Leizhou Min (  &rarr;  ).
 * ✅ — Eru·tuon 01:54, 4 March 2024 (UTC)
 * @Erutuon Sorry, you've made a typo with the Leizhou Min code in the data: it's  not.
 * Also, the Teochew code seems to be used elsewhere in the code (though I'm not sure what that part does), so it'll need to be changed there as well. Thanks! Theknightwho (talk) 19:08, 5 March 2024 (UTC)
 * Ah, I've just checked: it's the part that automatically corrects aliases to the canonical code. So on top of changing over the Teochew code, it's worth adding the old codes for Teochew and Leizhou Min as aliases. Theknightwho (talk) 19:10, 5 March 2024 (UTC)
 * ✅, and added some other plausible (?) aliases for these languages. — Eru·tuon 22:46, 5 March 2024 (UTC)
 * ✅, and added some other plausible (?) aliases for these languages. — Eru·tuon 22:46, 5 March 2024 (UTC)