MediaWiki talk:Gadget-TranslationAdder-Data.js
Kurdish
[edit]@Vahagn Petrosyan: Can you add:
- sdh: 'Kurdish/Southern Kurdish',
- lki: 'Kurdish/Laki',
under ckb please? Thanks.--Calak (talk) 13:49, 12 August 2018 (UTC)
- @Calak, I'm unfamiliar with the syntax of this gadget. I may break something. Asking @Wyang or @-sche 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)
- Thanks. you pinged them.--Calak (talk) 14:02, 12 August 2018 (UTC)
Edit access
[edit]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)
- @Atitarev: 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 Wiktionary:Beer parlour/2018/August § Editing of sitewide CSS/JS is only possible for interface administrators from now. — Eru·tuon 21:53, 25 April 2019 (UTC)
- @Erutuon 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. @Chuck Entz? Chignon – Пучок 22:28, 25 April 2019 (UTC)
- @Erutuon 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)
Arabic-script corrections
[edit]@Erutuon: 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.
- kaf/keheh: Arabic ك (k) is called "kāf" and the Persian equivalent ک is called "kâf". How about calling them "arabicKaf" and "persianKaf"?
- yeh/farsiYeh: Arabic ي (y) 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"?
- alefMaksura: Let's call the Arabic letter ى "alifMaqsura", which looks more Arabic - from the standard transliteration of أَلِف مَقْصُورَة (ʔalif maqṣūra). --Anatoli T. (обсудить/вклад) 05:29, 12 May 2020 (UTC)
- @Atitarev: 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
ota
and the rest. Thanks for correcting that. — Eru·tuon 22:41, 12 May 2020 (UTC)- @Erutuon: 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 ны́не (nýne), which had a Latin "i" on the Ukrainian cognate ни́ні (nýni). --Anatoli T. (обсудить/вклад) 23:00, 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
Three Languages To Add
[edit]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)
- @Apisite: I have tried in diff. I am no longer sure it's the right place. @Erutuon: could you please help? --Anatoli T. (обсудить/вклад) 10:26, 2 October 2020 (UTC)
- @Atitarev: You forgot the neuter for Hunsrik, but thanks anyway. --Apisite (talk) 10:28, 2 October 2020 (UTC)
- @Apisite: I've added the neuter. It seems to take a while, even after a hard refresh. --Anatoli T. (обсудить/вклад) 10:37, 2 October 2020 (UTC)
- @Atitarev: 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)
- @Apisite: I've added the neuter. It seems to take a while, even after a hard refresh. --Anatoli T. (обсудить/вклад) 10:37, 2 October 2020 (UTC)
- @Atitarev 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)
- @Apisite: Done. --Anatoli T. (обсудить/вклад) 22:42, 6 October 2020 (UTC)
- @Atitarev Could you add Friulian (fur)? It has two genders, masculine (m) and feminine (f), as well. --Apisite (talk) 05:54, 13 December 2020 (UTC)
- @Apisite: Done. 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)
- @Atitarev 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)
Sama languages
[edit]@Atitarev 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)
- @Apisite: Already done in diff - Cham, Sama, Sami. Please check if anything is still missing. --Anatoli T. (обсудить/вклад) 03:24, 8 December 2021 (UTC)
- @Atitarev: 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)
- @Atitarev: Thanks again, Anatoli. --Apisite (talk) 04:25, 8 December 2021 (UTC)
@Atitarev: 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)
@Atitarev: I sorted the language names almost alphabetically, Anatoli. --Apisite (talk) 04:18, 8 December 2021 (UTC)
Eastern Lawa and Western Lawa
[edit]@Atitarev 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
[edit]@Atitarev 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
[edit]@Atitarev 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)
@Atitarev P.S. They are Chamic languages as well. --Apisite (talk) 02:21, 11 December 2021 (UTC)
@Atitarev 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.
@Atitarev 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) @Atitarev Don't forget the Cacgia Roglai language (roc) as well. --Apisite (talk) 02:29, 11 December 2021 (UTC)
- @Apisite: 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"
[edit]@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.
- بَحْث (fa) with "fa" ✅
- بَحْث (fa) (bahs) with "fa-ira" ❌
- بَحْث (fa) (bahs) with "fa-cls" ❌
- بَحْث (fa) (bahs) with "prs" ✅
Is that doable?
Compare also with 討論/讨论 (zh) (tǎolùn) or diskusjon (no) 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 diff 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
[edit]@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#L-1764 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 diff I added مالِیاتدَهَنْدِه (mâliyât-dahande), which doesn't have an entry at fa:wikt but it has used
{{t+}}
rather than{{t}}
. Which module is responsible for checking{{t+}}
vs{{t}}
? 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#L-1873 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
importScript
function in User:Benwing2/common.js. You can do debugging usingconsole.log
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
?debug=true
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
fa-ira
rather thanfa
. Sorry! - The issue is that it is trying to establish the existence on fawiktionary of the title
<strong class="error"><span class="scribunto-error" id="mw-scribunto-error-c24d210a">Lua error in Module:languages/errorGetBy at [[Module:languages/errorGetBy#L-16|line 16]]: Please specify a language code; the value "fa-ira" is not valid (see [[Wiktionary:List of languages]]).</span></strong>
. So we need some way of telling it thatfa-ira
should map tofa
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#L-2046 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)
- @Atitarev Please try now. Benwing2 (talk) 01:16, 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)
- @This, that and the other This line: MediaWiki:Gadget-TranslationAdder-Data.js#L-2046 Benwing2 (talk) 01:09, 13 November 2023 (UTC)
- I did some quick debugging and wasn't able to identify an issue. The script correctly used
- @Atitarev OK, I found the code in MediaWiki:Gadget-TranslationAdder-Data.js#L-1873 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: 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)
- @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)
- @Atitarev The use of
More codes to nest under Chinese
[edit]@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?
cnp
(Northern Pinghua)csp
(Southern Pinghua)ltc
(Middle Chinese)och
(Old Chinese)wxa
(Waxiang)zhx-lui
(Leizhou Min)zhx-sht
(Shaozhou Tuhua)
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.
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. @Wpi, Justinrleung. Theknightwho (talk) 12:24, 13 February 2024 (UTC)
- Added those codes. — SURJECTION / T / C / L / 12:37, 13 February 2024 (UTC)
- @Surjection Would it please be possible to add Sichuanese (
zhx-sic
)? Theknightwho (talk) 19:38, 27 February 2024 (UTC)- Done — SURJECTION / T / C / L / 19:40, 27 February 2024 (UTC)
- @Surjection Would it please be possible to add Sichuanese (
Yokuts
[edit]A couple of changes for the Yokuts languages:
- I've standardised the codes to start with
yok
, as per the macrolanguage:nai-bvy
→yok-bvy
nai-dly
→yok-dly
nai-gsy
→yok-gsy
nai-kry
→yok-kry
nai-nvy
→yok-nvy
nai-ply
→yok-ply
nai-svy
→yok-svy
nai-tky
→yok-tky
- Gashowu (
yok-gsy
) is missing from the list anyway, so should be added.
Pinging @Surjection and @Erutuon. Theknightwho (talk) 18:12, 1 March 2024 (UTC)
- Done — Eru·tuon 19:23, 1 March 2024 (UTC)
Conversion of Min Nan to a family
[edit]Hi, could we please do the following re languages under the Chinese header?
- Add Hokkien (
nan-hbl
) and Hainanese (nan-hnm
). - Change the codes of Teochew (
zhx-teo
→nan-tws
) and Leizhou Min (zhx-lui
→nan-luh
).
Thanks. Pinging @Surjection and @Erutuon. Theknightwho (talk) 20:23, 3 March 2024 (UTC)
- Done — 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
nan-luh
notzhx-luh
. - 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)
- Done, and added some other plausible (?) aliases for these languages. — Eru·tuon 22:46, 5 March 2024 (UTC)
- @Erutuon Sorry, you've made a typo with the Leizhou Min code in the data: it's