Jump to content

User talk:Trappist the monk/Archive 13

Page contents not supported in other languages.
From Wikipedia, the free encyclopedia


Template:ISO 639 name

[edit]

Hey, just want to verify with you, can Module:ISO 639 name handle what Template:ISO 639 name and its sub templates (such as Template:ISO 639 name aa) do? I would like to TfD the sub templates if so. --Gonnym (talk) 08:55, 10 August 2020 (UTC)[reply]

There are four testcases pages:
Template:ISO 639 name/testcases1
Template:ISO 639 name/testcases2
Template:ISO 639 name/testcases3
Template:ISO 639 name/testcases4
These currently use the {{ISO 639 name/sandbox}} which uses Module:ISO 639 name/sandbox. The module sandbox is, I think, and improved version of Module:ISO 639 name.
If you are expecting {{ISO 639 name/sandbox}} to return the same values for non-ISO 639 'codes' as some the existing templates do, you shall be disappointed. IETF language tags are not ISO 639 codes so the ~/sandbox returns an error message. The same is true when given a language name because again, a language name is not an ISO 639 code.
The module sandbox has a new function iso_639() that attempts to return either the code or the language name depending on what it is given (still working on this so these may or may not be working when you read this):
{{#invoke:ISO 639 name/sandbox|iso_639|Navajo}} → nv
{{#invoke:ISO 639 name/sandbox|iso_639|nv}} → Navajo
Trappist the monk (talk) 14:22, 10 August 2020 (UTC)[reply]
Looking at the testcases and the templates, "Arabic" which isn't supported, is used by Template:ISO 639 name Arabic which redirects to Template:ISO 639 name ar which is. Similarly, Template:ISO 639 name ja-Latn an IETF tag redirects to Template:ISO 639 name ja which is supported. So it would seem that what's needed is to replace usages of redirected templates with the target template to fix these issues. Do you happen to have a list of the unsupported templates? If so, I can use AWB to fix these usages. --Gonnym (talk) 22:04, 10 August 2020 (UTC)[reply]
No list. And, it isn't immediately obvious how to make such a list. Both of intitle:"ISO 639 name" insource:/#[Rr][Ee][Dd][Ii][Rr][Ee][Cc][Tt]/ and insource:/#[Rr][Ee][Dd][Ii][Rr][Ee][Cc][Tt]/ prefix:"ISO 639 name" searches return nothing.
Special:PrefixIndex/Template:ISO 639 name (alas) won't show redirects only (they can be hidden ...). I suppose one might take that list and make a lua module. This appears to be a start:
function p.redirect()
	local data = {
		'ISO 639 name Arabic',
		'ISO 639 name AR',
		'ISO 639 name ar',
		'ISO 639 name ja-Latn',
	}
	local redirects = {};
	local name;
	
	for _, v in ipairs (data) do
		name = 'Template:' .. v
		if mw.title.new (name).isRedirect then
			table.insert (redirects, name);
		end
	end
	
	return mw.dumpObject (redirects)
end
— Preceding unsigned comment added by Trappist the monk (talkcontribs) 23:00, 10 August 2020 (UTC)[reply]
I've tried checking in Template:ISO 639 name if the page calling it is using a redirect template, and if so, add the page to the category, but it isn't working. Have any ideas on how it could work? --Gonnym (talk) 23:44, 10 August 2020 (UTC)[reply]
You reverted yourself with the edit summary nevermind, that works. Does it? Don't you want the names of the templates that are redirects? Why would you want the names of the articles that use those redirects? Article names seems to be what Category:Pages using ISO 639 name redirect templates is collecting.
Trappist the monk (talk) 00:10, 11 August 2020 (UTC)[reply]
I needed the redirect templates to get the pages so I can replace the parameter used in these articles to a correct ISO 639 one, so this method also works. The only problem is that I have to manually go over ~1200 articles ({{Cleanup translation}}, {{Rough translation}} and {{ISO 639 name}} transclusions) and do with AWB an empty save which takes a lot of time since it stops me every few seconds. Do you have a bot that can do this faster? --Gonnym (talk) 00:16, 11 August 2020 (UTC)[reply]
If you can give me a list of articles, I have a null-edit bot task. Of course, you can just let the job queue take its course because there is no hurry.
Trappist the monk (talk) 00:28, 11 August 2020 (UTC)[reply]
I know there is a bug that sometimes takes forever for the queue to work. It's been 7 hours and it still didn't start. Anyways, if you have time, I created a list of pages here.— Preceding unsigned comment added by Gonnym (talkcontribs) 07:50, 11 August 2020 (UTC)[reply]
Done. These didn't get done because they are protected:
Template:ISO 639 name
Template:ISO 639 name cs
Template:ISO 639 name el
Template:ISO 639 name en
Template:ISO 639 name grc
Template:ISO 639 name ja
Template:ISO 639 name ko-Hang
Template:ISO 639 name pt
Template:ISO 639 name ro
These didn't get done because:
La verdad sospechosa – has a {{bots}} or related template because of copyright violation investigation
User:JDrewniak (WMF)/wiktionaryDefinitionInSearchResults.js – is a personal javascript page
Trappist the monk (talk) 11:24, 11 August 2020 (UTC)[reply]
Thanks! Fixed usages on all pages except one user page and Wikipedia:Template index/Redirect language codes – code sort. I think it's fine now to TFD the set and fine tune if successful. --Gonnym (talk) 12:40, 11 August 2020 (UTC)[reply]
@Gonnym: I have updated {{ISO 639 name}} to use Module:ISO 639 name. The update included function name changes. I think that I have found and fixed all of the templates that were temporarily broken because of the function name changes. I have also updated Template:ISO 639 name/doc and {{ISO 639 name/doc/row}}. You're redirect-detection code remains in {{ISO 639 name}}; it is the reason that the Western Frisian category link is broken on the ~/doc page.
So where to now? Figuring out where all of those 1100-ish templates in Category:ISO 639 name from code templates are transcluded looks like it will be painful. We might want to add some sort of category mechanism to those templates that would categorize their use: Category:ISO 639 name templates with valid codes for proper ISO 639-1, -2, -3, or -5 codes and Category:ISO 639 name templates with invalid codes for all others. But that isn't really easy. We could replace the plain-text language name in the templates with a call to {{ISO 639 name|<code-from-template-name>}} – relatively easy to accomplish with AWB. That gives us a test of all of the 'codes' being used; Module:ISO 639 name will categorize the 'errors' (IETF-like language tags, proper names, etc) so those can be fixed where they appear in article space (and perhaps in other namespaces). Once that is done, Special:WhatLinksHere/Template:ISO 639 name will list where the template is transcluded so instances of {{ISO 639 name <code>}} can be replaced with direct calls to {{ISO 639 name|<code>}}.
All of this is, of course, predicated on a successful outcome at WP:TfD. Have I over-thought this? Under-thought this?
Trappist the monk (talk) 16:56, 13 August 2020 (UTC)[reply]
Great job! I think you exactly-thought this. I'll be nominating these templates today as I got another editor to help with his bot for tagging all these. Then we can do what you suggested with changing the template plain text so catch errors and see where they are used and once we're done with that we can convert the template to use the module directly. I believe the tracking category I added has done what it needed doing as I fixed the calls I could find, so I can remove it (unless I'm mistaken?). --Gonnym (talk) 09:14, 14 August 2020 (UTC)[reply]
Created nomination at Wikipedia:Templates for discussion/Log/2020 August 14#Template:ISO 639 name aa. --Gonnym (talk) 09:41, 14 August 2020 (UTC)[reply]
We might not need to edit all templates to find out if they are valid ISOs. Template:ISO 639 name conversion template doc which is transcluded on these templates has an if check to produce an EL. We can use the same logic to check if the ISO is valid or not. --Gonnym (talk) 11:13, 14 August 2020 (UTC)[reply]
What is needed is a list of where the {{ISO 639 name <code>}} templates are used so that they can be properly replaced. Special:WhatLinksHere/Template:ISO 639 name conversion template doc lists only templates and a handful of other namespace uses. Error checking is handled by the module and will be reported in Category:ISO 639 name template errors. The errors that I expect to catch are likely to be the IETF-language-tags and those MediaWiki second level domain name codes misused as ISO 639 codes.
Yesterday I created an AWB script that gets the language code from the template name, writes the appropriate {{ISO 639 name|<code>}} template, and comments out the plain-text language name. I need to rework it a bit to account for the tagging that is being added.
Trappist the monk (talk) 11:36, 14 August 2020 (UTC)[reply]
While reading on the discussion links you posted over at CfD, I noticed that the category Category:Articles containing Germanic-language text is empty and it text says that it is populated by {{Lang}} and it gives two examples: {{Lang|gem|text in Germanic language here}} and {{Lang-gem|text in Germanic language here}} but those place the article in Category:Articles with text from the Germanic languages collective and Category:Articles containing Proto-Germanic-language text (which itself is a bit problematic that two almost identical uses lead to different tracking results, but that's for another day). Was "Germanic-language text" an old category? The only place I can see which could have used it is Template:ISO 639 name/doc/row. If this is an old unused category, do you have any idea how we can find if there are more of those? --Gonnym (talk) 15:59, 18 August 2020 (UTC)[reply]
Yeah, old. It was created as Category:Articles containing Germanic language text (no hyphen) 28 May 2013. The rendering of the text on that cat page depends upon {{Category articles containing non-English-language text}}, {{Category articles containing non-English-language text/core}}, and {{Category articles containing non-English-language text/inner core}}. These templates are a mess. The {{lang}} and {{lang-gem}} issues that you note plus off to the right the is a box that says 'This category is indirectly triggered by the templates' and lists {{ISO 639 name gem}} which is not true; none of the {{ISO 639 name ...}} templates categorize. I suspect that once the {{ISO 639 name ...}} TfD is put to bed, these three templates should be rewritten; Module:Lang/documentor tool might be a good place to start.
Trappist the monk (talk) 16:39, 18 August 2020 (UTC)[reply]

Hi. I don't know what you moved but now files like File:Schuman Declaration.ogg are displaying an error. © Tbhotch (en-3). 15:54, 14 August 2020 (UTC)[reply]

Proofreader

[edit]

In your edit of Template:Proofreader needed you kept it using the module, while I changed a few months ago Template:Proofreader category and Template:Proofreader category 2 to use the media wiki language magic word. I'm assuming these should use the same style, right? --Gonnym (talk) 15:45, 15 August 2020 (UTC)[reply]

Yeah, languages supported by Media Wiki seems the better choice for {{proofreader needed}}. That template used to use the {{#ifexist:}} parser function to look for one of the now WP:TfD'd {{ISO 639 name <code>}} templates. My 25 October 2018‎ edit switched it to use Module:ISO 639 name which has a replacement function for {{#ifexist:}} (then: iso_639_name_exists(), now: iso_639_code_exists()). There isn't an equivalent facility for the #language: magic word. I can think of a couple of ways around that limitation:
{{#ifeq:{{#language:{{{2|}}}}}|{{{2|}}}|not supported|supported}}
Replacing {{{2|}}} with real and not-real language codes as a test:
{{#ifeq:{{#language:de}}|de|not supported|supported}}
supported
{{#ifeq:{{#language:notacode}}|notacode|not supported|supported}}
not supported
This also looks like it will work (probably not the better solution):
{{#if:{{#invoke:LuaCall|main|lang={{{2|}}}|mw.language.fetchLanguageName(lang)}}|supported|not supported}}
{{#if:{{#invoke:LuaCall|main|lang=de|mw.language.fetchLanguageName(lang)}}|supported|not supported}}
supported
{{#if:{{#invoke:LuaCall|main|lang=notacode|mw.language.fetchLanguageName(lang)}}|supported|not supported}}
not supported
You can make the change or I can, it matters not to me.
Trappist the monk (talk) 22:31, 15 August 2020 (UTC)[reply]
If you can, I'd appreciate it. --Gonnym (talk) 08:30, 16 August 2020 (UTC)[reply]

Final uses in other templates

[edit]

I found that Template:Rough translation and Template:Cleanup translation still need to be updated to use new style as they call "ISO 639 name x". Verifying with you, the fix for these templates is just to replace {{ISO 639 name {{{1}}}}} with {{ISO 639 name|{{{1}}}}}? Also somewhat related, Template:Lang2iso has its own ISO database. --Gonnym (talk) 14:38, 24 August 2020 (UTC)[reply]

As long as x in {{ISO 639 name x}} is a valid ISO 639-1, -2, -3, -5 code (not an IETF language tag) then the fix is: {{ISO 639 name x}}{{ISO 639 name|x}}
The likely fix for {{lang2iso}} is {{#invoke:ISO 639 name|iso_639_name_to_code|<name>}}. But, {{lang2iso}} has about 6600 transclusions so some testing is warranted before we just replace all with the module invoke. I'll do that.
Trappist the monk (talk) 15:08, 24 August 2020 (UTC)[reply]
Another lost usage at Template:Category articles containing non-English-language text/core. Should {{#if:{{{2|}}}|{{{2}}}|{{#ifexist:Template:ISO 639 code {{{1|}}}|{{ISO 639 code {{{1|}}}}}|}}}} be {{#if:{{{2|}}}|{{{2}}}|{{#if: {{#invoke:ISO 639 name|iso_639_code_exists|{{{1}}}}}|{{ISO 639 name|{{{1}}}}} }} }}? --Gonnym (talk) 15:13, 25 August 2020 (UTC)[reply]
Apparently there are only two Template:ISO 639 code ... templates (search) so it isn't really clear to me why that bit of code is still there. ~/inner core evaluates {{{2}}} for length and when 2, uses {{iso639-1}} to create a link to Library of Congress or when 3 uses the ISO639-3 interwiki mapping to link to sil.org. So, all of that being said, I suspect that it might be best to add a function to Module:ISO 639 name: iso_639_name_exists(). If we do that then, in ~/core we write:
{{#if:{{{2|}}}|{{{2}}}|{{#if: {{#invoke:ISO 639 name|iso_639_name_exists|{{{1}}}}}|{{#invoke:ISO 639 name|iso_639_name_to_code|{{{1}}}}} }} }}
TfD the two {{ISO 639 code ...}} templates and we might want to consider revising {{ISO 639-1}}.
What am I missing?
Trappist the monk (talk) 15:57, 25 August 2020 (UTC)[reply]
Yeah, TfD those 2 lone templates is a good idea. What should they be replaced with? {{#invoke:ISO 639 name|iso_639_name_to_code|{{{1}}}}} or {{Lang2iso}}? --Gonnym (talk) 16:46, 25 August 2020 (UTC)[reply]
Replace them with nothing. At:
Category:Articles containing German-language text change:
{{Category articles containing non-English language text|German}}{{Category articles containing non-English language text|German|de}}
Category:Articles containing Mohawk-language text change:
{{Category articles containing non-English language text|Mohawk||moh}}{{Category articles containing non-English language text|Mohawk|moh}}
Then in {{Category articles containing non-English-language text/core}} replace:
{{#if:{{{2|}}}|{{{2}}}|{{#ifexist:Template:ISO 639 code {{{1|}}}|{{ISO 639 code {{{1|}}}}}|}}}}{{{2|}}}
Right?
Trappist the monk (talk) 17:05, 25 August 2020 (UTC)[reply]
Ok, TfD and updated the code. --Gonnym (talk) 17:27, 25 August 2020 (UTC)[reply]

crude lang2iso tests

[edit]

Nothing overly surprising here. I'm inclined to update the template to use the module and fix what needs fixing. Of the templates that use {{lang2iso}}, these appear to be the mode used:

Clearly, since {{lang2iso}} has about 6600 transclusions, not all instances of the above make use of it.

aa aa aa Afar
ab ab ab Abkhazian
ae ae ae Avestan
af af af Afrikaans
ain ain ain Ainu
ak ak ak Akan
aln aln aln Gheg Albanian
als gsw gsw Tosk Albanian
am am am Amharic
an an an Aragonese
ang error: old english not found in ISO 639-1, -2, -2B, -3, -5 list (help) error: old english not found in ISO 639-1, -2, -2B, -3, -5 list (help) Old English
ar ar ar Arabic
arc error: aramaic not found in ISO 639-1, -2, -2B, -3, -5 list (help) error: aramaic not found in ISO 639-1, -2, -2B, -3, -5 list (help) Official Aramaic Aramaic is en.wiki preferred name
arn arn arn Mapudungun
arz error: egyptian spoken arabic not found in ISO 639-1, -2, -2B, -3, -5 list (help) error: egyptian spoken arabic not found in ISO 639-1, -2, -2B, -3, -5 list (help) Egyptian Arabic
as as as Assamese
ast ast ast Asturian
av error: avar not found in ISO 639-1, -2, -2B, -3, -5 list (help) error: avar not found in ISO 639-1, -2, -2B, -3, -5 list (help) Avaric
av av av Avaric
av av av Avaric
avk avk avk Kotava
ay ay ay Aymara
az az az Azerbaijani
az error: azeri not found in ISO 639-1, -2, -2B, -3, -5 list (help) error: azeri not found in ISO 639-1, -2, -2B, -3, -5 list (help) Azerbaijani Azeri redirects to Azerbaijanis (the people)
ba ba ba Bashkir
bar bar bar Bavarian
bcc bcc bcc Southern Balochi
bcl error: central bicolano not found in ISO 639-1, -2, -2B, -3, -5 list (help) error: central bicolano not found in ISO 639-1, -2, -2B, -3, -5 list (help) Central Bikol central bicolano is a redirect to Central Bikol
be be be Belarusian
bg bg bg Bulgarian
bh error: bihari not found in ISO 639-1, -2, -2B, -3, -5 list (help) error: bihari not found in ISO 639-1, -2, -2B, -3, -5 list (help) Bihari languages ISO 639-2 collective; not an individual language code
bi bi bi Bislama
bm bm bm Bambara
bn bn bn Bengali
bo bo bo Standard Tibetan
bpy error: bishnupriya manipuri not found in ISO 639-1, -2, -2B, -3, -5 list (help) error: bishnupriya manipuri not found in ISO 639-1, -2, -2B, -3, -5 list (help) Bishnupriya
br br br Breton
bs bs bs Bosnian
bto error: iriga bicolano not found in ISO 639-1, -2, -2B, -3, -5 list (help) error: iriga bicolano not found in ISO 639-1, -2, -2B, -3, -5 list (help) Rinconada Bikol iriga bicolano is a redirect to Rinconada Bikol
bug bug bug Buginese
bxr error: buryat (russia) not found in ISO 639-1, -2, -2B, -3, -5 list (help) error: buryat (russia) not found in ISO 639-1, -2, -2B, -3, -5 list (help) Russia Buriat buryat (russia) is a redirect to Buryat
ca ca ca Catalan
cdo cdo cdo Min Dong Chinese
ce ce ce Chechen
ceb ceb ceb Cebuano
ch ch ch Chamorro
cho cho cho Choctaw
chr chr chr Cherokee
chy chy chy Cheyenne
co co co Corsican
cop cop cop Coptic
cr cr cr Cree
crh crh crh Crimean Tatar
cs cs cs Czech
csb csb csb Kashubian
cu cu cu Church Slavic
cv cv cv Chuvash
cy cy cy Welsh
da da da Danish
de de de German
deva error: devanāgarī not found in ISO 639-1, -2, -2B, -3, -5 list (help) error: devanāgarī not found in ISO 639-1, -2, -2B, -3, -5 list (help) error: deva not found in ISO 639-1, -2, -2B, -3, -5 list (help) script, not a language
deva error: devanagari not found in ISO 639-1, -2, -2B, -3, -5 list (help) error: devanagari not found in ISO 639-1, -2, -2B, -3, -5 list (help) error: deva not found in ISO 639-1, -2, -2B, -3, -5 list (help) script, not a language
deva error: devanagiri not found in ISO 639-1, -2, -2B, -3, -5 list (help) error: devanagiri not found in ISO 639-1, -2, -2B, -3, -5 list (help) error: deva not found in ISO 639-1, -2, -2B, -3, -5 list (help) script, not a language
deva error: devangari not found in ISO 639-1, -2, -2B, -3, -5 list (help) error: devangari not found in ISO 639-1, -2, -2B, -3, -5 list (help) error: deva not found in ISO 639-1, -2, -2B, -3, -5 list (help) script, not a language
diq zza zza Dimli
dsb dsb dsb Lower Sorbian
dv dv dv Dhivehi
dz dz dz Dzongkha
ee ee ee Ewe
el el el Greek
eml error: emilian-romagnol not found in ISO 639-1, -2, -2B, -3, -5 list (help) error: emilian-romagnol not found in ISO 639-1, -2, -2B, -3, -5 list (help) Emiliano-Romagnolo not an ISO 639 language name; two related languages with codes egl and rgn
en en en English
eo eo eo Esperanto
es es es Spanish
et et et Estonian
eu eu eu Basque
ext ext ext Extremaduran
fa fa fa Persian
fa error: farsi not found in ISO 639-1, -2, -2B, -3, -5 list (help) error: farsi not found in ISO 639-1, -2, -2B, -3, -5 list (help) Persian not an ISO 639 language name; redirect to Persian
ff ff ff Fulah
fi fi fi Finnish
fil fil fil Filipino
fj fj fj Fijian
fo fo fo Faroese
fr fr fr French
frc frc frc Cajun French
frp error: franco-provençal not found in ISO 639-1, -2, -2B, -3, -5 list (help) error: franco-provençal not found in ISO 639-1, -2, -2B, -3, -5 list (help) Arpitan variant of alternate ISO 639-3 name Francoprovençal
frr error: north frisian not found in ISO 639-1, -2, -2B, -3, -5 list (help) error: north frisian not found in ISO 639-1, -2, -2B, -3, -5 list (help) Northern Frisian
fur fur fur Friulian
fy error: frisian not found in ISO 639-1, -2, -2B, -3, -5 list (help) error: frisian not found in ISO 639-1, -2, -2B, -3, -5 list (help) Western Frisian
fy fy fy Western Frisian
ga ga ga Irish
gaa gaa gaa Ga
gag gag gag Gagauz
gan gan gan Gan Chinese
gan error: gan chineese not found in ISO 639-1, -2, -2B, -3, -5 list (help) error: gan chineese not found in ISO 639-1, -2, -2B, -3, -5 list (help) Gan Chinese someone can't spell
gd gd gd Scottish Gaelic
gl gl gl Galician
glk glk glk Gilaki
gmh error: middle high german not found in ISO 639-1, -2, -2B, -3, -5 list (help) error: middle high german not found in ISO 639-1, -2, -2B, -3, -5 list (help) Middle High German
gn error: guaraní not found in ISO 639-1, -2, -2B, -3, -5 list (help) error: guaraní not found in ISO 639-1, -2, -2B, -3, -5 list (help) Guarani diacritic
got got got Gothic
grc error: ancient greek not found in ISO 639-1, -2, -2B, -3, -5 list (help) error: ancient greek not found in ISO 639-1, -2, -2B, -3, -5 list (help) Ancient Greek
gsw gsw gsw Swiss German
gu gu gu Gujarati
gv gv gv Manx
ha ha ha Hausa
hans error: simplified chinese not found in ISO 639-1, -2, -2B, -3, -5 list (help) error: simplified chinese not found in ISO 639-1, -2, -2B, -3, -5 list (help) error: hans not found in ISO 639-1, -2, -2B, -3, -5 list (help) script, not a language name
hant error: traditional chinese not found in ISO 639-1, -2, -2B, -3, -5 list (help) error: traditional chinese not found in ISO 639-1, -2, -2B, -3, -5 list (help) error: hant not found in ISO 639-1, -2, -2B, -3, -5 list (help) script, not a language name
hak hak hak Hakka Chinese
haw haw haw Hawaiian
he he he Hebrew
hi hi hi Hindi
hif hif hif Fiji Hindi
hil hil hil Hiligaynon
ho ho ho Hiri Motu
hr hr hr Croatian
hsb hsb hsb Upper Sorbian
ht ht ht Haitian Creole
hu hu hu Hungarian
hy hy hy Armenian
hz hz hz Herero
ia error: interlingua not found in ISO 639-1, -2, -2B, -3, -5 list (help) error: interlingua not found in ISO 639-1, -2, -2B, -3, -5 list (help) Interlingua interlingua (international auxiliary language association); disambiguators required
id id id Indonesian
ie ie ie Interlingue
ig ig ig Igbo
ii ii ii Sichuan Yi
ik error: inupiak not found in ISO 639-1, -2, -2B, -3, -5 list (help) error: inupiak not found in ISO 639-1, -2, -2B, -3, -5 list (help) Inupiaq not an ISO 639 language name; redirects to Inupiaq
ik ik ik Inupiaq
ilo ilo ilo Iloko
inh inh inh Ingush
io io io Ido
is is is Icelandic
it it it Italian
iu iu iu Inuktitut
ja ja ja Japanese
jbo jbo jbo Lojban
jut jut jut Jutish
jv jv jv Javanese
ka ka ka Georgian
kaa kaa kaa Kara-Kalpak
kar error: karen not found in ISO 639-1, -2, -2B, -3, -5 list (help) error: karen not found in ISO 639-1, -2, -2B, -3, -5 list (help) Karen languages ISO 639-2 collective; not an individual language name
kab kab kab Kabyle
kg kg kg Kongo
ki ki ki Kikuyu
kj kj kj Kuanyama
kj kj kj Kuanyama
kk kk kk Kazakh
kl kl kl Kalaallisut
kl kl kl Kalaallisut
km km km Khmer
kn kn kn Kannada
ko ko ko Korean
kr kr kr Kanuri
kri kri kri Krio
krj krj krj Kinaray-A
ks ks ks Kashmiri
ksh ksh ksh Kölsch
ku ku ku Kurdish
kv kv kv Komi
kw kw kw Cornish
ky ky ky Kirghiz
la la la Latin
lad lad lad Ladino
lb lb lb Luxembourgish
lbe lbe lbe Lak
lez lez lez Lezghian
lfn lfn lfn Lingua Franca Nova
lg lg lg Ganda
li li li Limburgan
lij lij lij Ligurian
lld lld lld Ladin
lmo lmo lmo Lombard
ln ln ln Lingala
lo lo lo Lao
loz loz loz Lozi
lt lt lt Lithuanian
lu lu lu Luba-Katanga
lv lv lv Latvian
lzz lzz lzz Laz
mad mad mad Madurese
mai mai mai Maithili
mc error: murcian not found in ISO 639-1, -2, -2B, -3, -5 list (help) error: murcian not found in ISO 639-1, -2, -2B, -3, -5 list (help) error: mc not found in ISO 639-1, -2, -2B, -3, -5 list (help) not an ISO 639 language name; not an ISO 639-1 language code
mdf mdf mdf Moksha
mg mg mg Malagasy
mh mh mh Marshallese
mi error: māori not found in ISO 639-1, -2, -2B, -3, -5 list (help) error: māori not found in ISO 639-1, -2, -2B, -3, -5 list (help) Maori diacritic
mi mi mi Maori
mk mk mk Macedonian
ml ml ml Malayalam
mn mn mn Mongolian
mni mni mni Manipuri
mo ro ro Moldavian mo is retired
mr mr mr Marathi
ms msa msa Malay
ms error: malaysian not found in ISO 639-1, -2, -2B, -3, -5 list (help) error: malaysian not found in ISO 639-1, -2, -2B, -3, -5 list (help) Malay not an ISO 639 language name; Malasian language suggests zsm Standard Malay
mt mt mt Maltese
mus mus mus Creek
mwl mwl mwl Mirandese
my my my Burmese
myv myv myv Erzya
mzn mzn mzn Mazanderani
na na na Nauru
nah nah nah Nahuatl languages
nap nap nap Neapolitan
nb nb nb Norwegian Bokmål
nb error: norwegian bokmal not found in ISO 639-1, -2, -2B, -3, -5 list (help) error: norwegian bokmal not found in ISO 639-1, -2, -2B, -3, -5 list (help) Norwegian Bokmål diacritic
nb error: bokmal not found in ISO 639-1, -2, -2B, -3, -5 list (help) error: bokmal not found in ISO 639-1, -2, -2B, -3, -5 list (help) Norwegian Bokmål diacritic
no no no Norwegian
nd nd nd North Ndebele
nds nds nds Low German
ne nep nep Nepali
new error: newar / nepal bhasa not found in ISO 639-1, -2, -2B, -3, -5 list (help) error: newar / nepal bhasa not found in ISO 639-1, -2, -2B, -3, -5 list (help) Nepal Bhasa Newar is en.wiki preferred name
ng error: owambo not found in ISO 639-1, -2, -2B, -3, -5 list (help) error: owambo not found in ISO 639-1, -2, -2B, -3, -5 list (help) Ndonga redirects to Ovambo which describes multiple related languages
ng ng ng Ndonga
niu niu niu Niuean
nl nl nl Dutch
nn error: norwegian (nynorsk) not found in ISO 639-1, -2, -2B, -3, -5 list (help) error: norwegian (nynorsk) not found in ISO 639-1, -2, -2B, -3, -5 list (help) Norwegian Nynorsk variant of ISO 639-2 nynorsk, norwegian
nn nn nn Norwegian Nynorsk
nn error: nynorsk not found in ISO 639-1, -2, -2B, -3, -5 list (help) error: nynorsk not found in ISO 639-1, -2, -2B, -3, -5 list (help) Norwegian Nynorsk
non non non Old Norse
nov nov nov Novial
nr nr nr South Ndebele
nrm nrm nrm Narom
nso nso nso Pedi
nv nv nv Navajo
ny ny ny Nyanja
oc error: occitan not found in ISO 639-1, -2, -2B, -3, -5 list (help) error: occitan not found in ISO 639-1, -2, -2B, -3, -5 list (help) Occitan occitan (post 1500), disambiguation required
och error: classical chinese not found in ISO 639-1, -2, -2B, -3, -5 list (help) error: classical chinese not found in ISO 639-1, -2, -2B, -3, -5 list (help) Old Chinese not an ISO 639 language name; article prefers lzh
oj oj oj Ojibwa
om om om Oromo
or ory ory Oriya
or ori ori Oriya
os os os Ossetian
pa pa pa Panjabi
pa pa pa Panjabi
pag pag pag Pangasinan
pam pam pam Pampanga
pap pap pap Papiamento
pdc pdc pdc Pennsylvania German
pdt pdt pdt Plautdietsch
pfl pfl pfl Pfaelzisch
pi pi pi Pali
pi error: pāli not found in ISO 639-1, -2, -2B, -3, -5 list (help) error: pāli not found in ISO 639-1, -2, -2B, -3, -5 list (help) Pali diacritic
pih pih pih Pitcairn-Norfolk
pl pl pl Polish
plm plm plm Palembang not an ISO 639 language name; not an ISO 639 language code; article prefers mui
pms pms pms Piedmontese
pnt pnt pnt Pontic
pra error: prakrit not found in ISO 639-1, -2, -2B, -3, -5 list (help) error: prakrit not found in ISO 639-1, -2, -2B, -3, -5 list (help) Prakrit languages ISO 639-2 collective; not an individual language code
ps ps ps Pushto
pt pt pt Portuguese
qu qu qu Quechua
rif rif rif Tarifit
rm error: raeto-romance not found in ISO 639-1, -2, -2B, -3, -5 list (help) error: raeto-romance not found in ISO 639-1, -2, -2B, -3, -5 list (help) Romansh not an ISO 639 language name
rm error: rhaeto-romance not found in ISO 639-1, -2, -2B, -3, -5 list (help) error: rhaeto-romance not found in ISO 639-1, -2, -2B, -3, -5 list (help) Romansh not an ISO 639 language name
rmy rmy rmy Vlax Romani
rn error: kirundi not found in ISO 639-1, -2, -2B, -3, -5 list (help) error: kirundi not found in ISO 639-1, -2, -2B, -3, -5 list (help) Rundi en.wiki preferred spelling
ro ro ro Romanian
roh rm rm Romansh
ru ru ru Russian
ruq ro ro Megleno Romanian
rw rw rw Kinyarwanda
sa sa sa Sanskrit
sah sah sah Yakut
sc sc sc Sardinian
scn scn scn Sicilian
sco sco sco Scots
sd sd sd Sindhi
sdc sc sc Sassarese Sardinian
se se se Northern Sami
sei sei sei Seri
sg sg sg Sango
sh sh sh Serbo-Croatian
shi shi shi Tachelhit
si si si Sinhala
si si si Sinhala
simple error: simple english not found in ISO 639-1, -2, -2B, -3, -5 list (help) error: simple english not found in ISO 639-1, -2, -2B, -3, -5 list (help) error: simple not found in ISO 639-1, -2, -2B, -3, -5 list (help) not an ISO 639 language name; MediaWiki second-level domain name for simple.wikipedia.org
sk sk sk Slovak
sl error: slovene not found in ISO 639-1, -2, -2B, -3, -5 list (help) error: slovene not found in ISO 639-1, -2, -2B, -3, -5 list (help) Slovenian en.wiki preferred spelling
sl sl sl Slovenian
sm sm sm Samoan
sma sma sma Southern Sami
sn sn sn Shona
so so so Somali
sq sq sq Albanian
sr sr sr Serbian
srn srn srn Sranan Tongo
ss ss ss Swati
st st st Sotho
st st st Sotho
stq error: saterland frisian not found in ISO 639-1, -2, -2B, -3, -5 list (help) error: saterland frisian not found in ISO 639-1, -2, -2B, -3, -5 list (help) Saterfriesisch en.wiki preferred name
su su su Sundanese
sv sv sv Swedish
sw swa swa Swahili
szl szl szl Silesian
ta ta ta Tamil
te te te Telugu
tet tet tet Tetum
tg tg tg Tajik
th th th Thai
ti ti ti Tigrinya
tk tk tk Turkmen
tl tl tl Tagalog
tlh tlh tlh Klingon
tlh error: klingonese not found in ISO 639-1, -2, -2B, -3, -5 list (help) error: klingonese not found in ISO 639-1, -2, -2B, -3, -5 list (help) Klingon redirect to Klingon
tn tn tn Tswana
to error: tonga not found in ISO 639-1, -2, -2B, -3, -5 list (help) error: tonga not found in ISO 639-1, -2, -2B, -3, -5 list (help) Tongan Tongan is en.wiki preferred name
tpi tpi tpi Tok Pisin
tr tr tr Turkish
ts ts ts Tsonga
tt tt tt Tatar
tum tum tum Tumbuka
tw tw tw Twi
ty ty ty Tahitian
tyv error: tyvan not found in ISO 639-1, -2, -2B, -3, -5 list (help) error: tyvan not found in ISO 639-1, -2, -2B, -3, -5 list (help) Tuvinian not an ISO 639 language name; redirects to Tuvan
tzm error: central morocco tamazight not found in ISO 639-1, -2, -2B, -3, -5 list (help) error: central morocco tamazight not found in ISO 639-1, -2, -2B, -3, -5 list (help) Central Atlas Tamazight redirects to Central Atlas Tamazight
udm udm udm Udmurt
ug ug ug Uighur
uk uk uk Ukrainian
ur ur ur Urdu
uz uz uz Uzbek
ve ve ve Venda
vec vec vec Venetian
vi vi vi Vietnamese
vls vls vls Vlaams
vo vo vo Volapük
vo error: volapuk not found in ISO 639-1, -2, -2B, -3, -5 list (help) error: volapuk not found in ISO 639-1, -2, -2B, -3, -5 list (help) Volapük diacritic
vrm error: värmlandic not found in ISO 639-1, -2, -2B, -3, -5 list (help) error: värmlandic not found in ISO 639-1, -2, -2B, -3, -5 list (help) error: vrm not found in ISO 639-1, -2, -2B, -3, -5 list (help) not an ISO 639 language name; not an ISO 639 language code
wa wa wa Walloon
war war war Waray
wo wo wo Wolof
wuu wuu wuu Wu Chinese
xal xal xal Kalmyk
xh xh xh Xhosa
xmf xmf xmf Mingrelian
ydd ydd ydd Eastern Yiddish
yi yi yi Yiddish
yo yo yo Yoruba
yue error: cantonese not found in ISO 639-1, -2, -2B, -3, -5 list (help) error: cantonese not found in ISO 639-1, -2, -2B, -3, -5 list (help) Yue Chinese not an ISO 639 language name; article suggest yue also used at Yue Chinese
za za za Zhuang
zea zea zea Zeeuws
zh zh zh Chinese
zu zu zu Zulu

Trappist the monk (talk) 19:12, 24 August 2020 (UTC)[reply]

comparison {{lang2iso}} against {{#invoke:ISO 639 name|iso_639_name_to_code|<name>}}
Expected? lang2iso iso_639_name_to_code Language name comment
als gsw gsw Tosk Albanian lang2iso is wrong; alemannic is Alemannic German ISO 639-2, -3 code gsw
diq zza zza Dimli dimli is an exact match for one of the names associated with ISO 639-2 zza; ISO 639-2, -3 name for diq is 'Dimli (individual language)'
nb nb nb Norwegian Bokmål bug: override namelists are searched first; norwegian bokmål overrides ISO 639-2 primary 'Bokmål, Norwegian'
ne nep nep Nepali nepali is an exact match for ISO 639-2 nep; ISO 639-1 ne is 'Nepali (macrolanguage)'
st st st Sotho ISO 639-2 override list to override 'Sotho, Southern' has code sot; ISO 639-1 st is 'Southern Sotho' for consistency should be overridden to 'Sotho'; ISO 639-3 'Southern Sotho' is overridden to 'Sotho
sw swa swa Swahili exact match for ISO 639-2 swa; ISO 639-1 (sw), -3 (swa) name is 'Swahili (macrolanguage)'
ms msa msa Malay exact match for ISO 639-2 may(B) and msa(T); ISO 639-1, -3 name is 'malay (macrolanguage)'
or ory ory Oriya exact match for ISO 639-3 ory; ISO 639-1 name is 'odia (macrolanguage)'
or ori ori Oriya exact match for ISO 639-2 ori; ISO 639-1 or and -3 ori name is 'oriya (macrolanguage)'; ISO 639-3 ory name is 'oriya (individual language)'
roh rm rm Romansh exact match for ISO 639-1 rm and ISO 639-2, 3 roh
ruq ro ro Megleno Romanian lang2iso is wrong; there are two #switch cases for romanian: | romanian=ro precedes | romanian=ruq
sdc sc sc Sassarese Sardinian lang2iso is wrong; there are two #switch cases for sardinian: | sardinian=sc precedes | sardinian=sdc

Why are the above not producing the same result? And assuming both are correct, does it matter for the output? Template doc says it returns a two letter language code, but some of its return values are three letters, so I'm not sure what is going on there. Maybe it prefers to return a two letter language code if available, if not then it returns a three letter one? --Gonnym (talk) 09:30, 25 August 2020 (UTC)[reply]

I've added explanations to your table. There is a disclaimer in the module doc about the usefulness of iso_639_name_to_code(): <language name> must exactly match the name in the data tables.
The bug is that the code searches all of the override tables before searching the individual parts. It should search override 1 then part 1, override 2 then part 2, ... I'll fix that and add 'Sotho' as a part 1 override.
Trappist the monk (talk) 11:29, 25 August 2020 (UTC)[reply]
So to change the template, it should go from {{safesubst<noinclude/>:#switch: {{safesubst<noinclude/>:lc:{{{1}}}}} to {{#invoke:ISO 639 name|iso_639_name_to_code|{{{1}}}}? Is the safesubst needed? is the lowercase needed or does the module handle this? --Gonnym (talk) 10:07, 27 August 2020 (UTC)[reply]
Using {{ISO 639 name}} as a model, it would seem that this is what you want:
{{safesubst:<noinclude />#invoke:ISO 639 name|iso_639_name_to_code}}
The module converts all input to lowercase.
Trappist the monk (talk) 11:38, 27 August 2020 (UTC)[reply]

@Trappist the monk and Gonnym: is the above anything to do with why the non-existent Category:Wikipedia articles needing cleanup after translation from hu is now filling up? --BrownHairedGirl (talk) • (contribs) 23:20, 24 August 2020 (UTC) See also Category:Wikipedia_articles_needing_cleanup_after_translation_from_de, Category:Wikipedia_articles_needing_cleanup_after_translation_from_it, Category:Wikipedia_articles_needing_cleanup_after_translation_from_fr etc. --BrownHairedGirl (talk) • (contribs) 23:27, 24 August 2020 (UTC)[reply]

{{rough translation}} was looking for a return from a template called {{ISO 639 name hu}} but that template no-longer exists so {{rough translation}} fell back to using the raw value i{{{1}}} in the category name. I think that this has been remedied. Editor Gonnym last edited {{rough translation}} at 0611Z; {{ISO 639 name hu}} was deleted at 2150Z, 15h39m later. The red-linked translation categories did did not start accumulating articles until after {{ISO 639 name hu}} was deleted. Your revert of Gonnym's edit was unwarranted because, as this case shows, it is not always true that what you see is the result of the last edit made to a template.
Trappist the monk (talk) 00:13, 25 August 2020 (UTC)[reply]
@Trappist the monk, I was simply trying to fix the problem. Purging the pages didn't fix anything, so I looked for the most recent changes to relevant templates. Thanks for sorting it out. --BrownHairedGirl (talk) • (contribs) 01:42, 25 August 2020 (UTC)[reply]

Additional issues

[edit]

It seems that all languages which have "Language" as part of the name, are redlinks because the name is now "Name Language language":

While this can be fixed by creating that redlink, is that the best solution?

Also, "fif" appears in Module:Language/data/iana languages but {{#invoke:ISO 639 name/sandbox|iso_639_code_to_name|link=yes|fif}} produces an error Faifi. Any idea why? --Gonnym (talk) 12:36, 26 August 2020 (UTC)[reply]

Is Category:Articles containing unknown ISO 639 language template populated by {{Lang}} as the category text says? Couldn't find it in Module:Lang. --Gonnym (talk) 13:02, 26 August 2020 (UTC)[reply]

Module:Language/data/iana languages is used only for the ISO 639-1 codes/names it contains. fif is new as of 2020-05-06 according to Change Request Documentation: 2019-041 at sil.org. The ISO 639-3 data are taken from sil.org UTF-8 Complete Code Tables Set which was last updated 2020-01-30. I notice that this file has fif but is not dated so it isn't possible to know before hand if it is time to update our data modules – the dated zip has the imprimatur of 'official'.
I'll tweak the module to properly handle names that end with 'Language'. I'll probably also tweak Module:Lang. Indus Valley Language redirects to Harappan language so that can be handled in the override data.
The wikitext version of {{lang}} did populate Category:Articles containing unknown ISO 639 language template. Because Module:Lang emits error messages and populates Category:Lang and lang-xx template errors, there was no need to also populate Category:Articles containing unknown ISO 639 language template. CfD?
Trappist the monk (talk) 13:33, 26 August 2020 (UTC)[reply]
Thanks for all above. Another few questions:
--Gonnym (talk) 15:55, 26 August 2020 (UTC)[reply]
And a few more answers:
  • this is the English Wikipedia so English names are probably best; these can be overridden to use en.wiki preferred names
  • these can be overridden to use en.wiki preferred names
  • sgn is an ISO 639-2 collective code so Sign Languages is correct; the singular form would, I think, convey a different meaning. If it becomes an issue, a redirect to the correct article is probably the correct answer
  • No knowledge about Module:Language/data/iana; you may not CfD it. WP:TfD?
With regard to overrides: just because we can doesn't mean that we should. If there is a need then, of course, override; no point in adding an override if it is never used.
Trappist the monk (talk) 16:28, 26 August 2020 (UTC)[reply]
Is the performance cost a lot for an override? --Gonnym (talk) 09:38, 27 August 2020 (UTC)[reply]
When doing code-to-name look-ups there is minimal pain; when doing name-to-code lookup, the current code must read each k/v pair in an override table (pairs()) until it stumbles upon the input name. Large tables take longer. I have thought about modifying Module:Language/data/ISO 639 name to code/make so that it includes override data in Module:Language/data/ISO 639 name to code. Doing that would change the laborious name-search to a simple lookup.
Trappist the monk (talk) 11:23, 27 August 2020 (UTC)[reply]
I see. Well, your idea for the refactor sounds good, so it can wait til whenever you do that. Is the dab fixes not being done also for the same reasons? --Gonnym (talk) 12:22, 27 August 2020 (UTC)[reply]
Partly; if there isn't a need ... Additionally, the dab list is complicated so is a pain to figure out. For example:
{{#invoke:ISO 639 name/sandbox|iso_639_code_to_name|link=yes|amy}}Ami – probably override to Marranj language
{{#invoke:ISO 639 name/sandbox|iso_639_code_to_name|link=yes|hbo}}Ancient Hebrew – no clearly obvious article as a link target
{{#invoke:ISO 639 name/sandbox|iso_639_code_to_name|link=yes|toi}}Tonga – override in the article_name{} table
I suppose that one way around the dab issue is to modify |link=: if |link=<article title> (any value that is not yes) link with that.
Trappist the monk (talk) 13:04, 27 August 2020 (UTC)[reply]
OK, then I'll document the known issues in a module subpage so at least it's somewhere editors can see. --Gonnym (talk) 13:13, 27 August 2020 (UTC)[reply]

A barnstar for you!

[edit]
The Admin's Barnstar
It is unbelievable to say that your user page does not exist, you operate a bot and are an administrator. I will present you with one of the biggest honours ever.
Cupper52 (talk) 10:03, 28 August 2020 (UTC)[reply]

Template:Category articles containing non-English-language text

[edit]
Unresolved

Template:Category articles containing non-English-language text should have a language check so unsupported (probably old) categories can be added to the error category and then CfD. Can you add one? --Gonnym (talk) 12:37, 28 August 2020 (UTC)[reply]

I'll think about that —Trappist the monk (talk) 13:46, 28 August 2020 (UTC)[reply]
Added error messaging and categorization to {{Category articles containing non-English-language text/inner core}}. For the nonce, uses Category:Lang and lang-xx template errors (695).
Trappist the monk (talk) 14:42, 28 August 2020 (UTC)[reply]
Of the categories accumulating in Category:Lang and lang-xx template errors, some are valid errors while others (most?) are ISO 639-2/B codes. These -2/B codes are not found in Module:Language/data/iana languages because the -2/T codes are preferred. The fix for these categories is to replace the -2/B code with its matching -2/T code.
Trappist the monk (talk) 15:25, 28 August 2020 (UTC)[reply]
I was wondering what the point is even in listing the other ISOs as they don't seem to do anything or appear in the text. See Category:Articles containing Korean-language text which has 5 codes but only 1 appears in the text. But if possible, we can even go further and eliminate the need to list any ISOs. If we take the the name appearing after the "containing" and before the "-language text", and pass it to the module, it should be able to give us whatever data we needed. So if we only show one parameter, we can request the ISO code by the language name. Did I miss something here? --Gonnym (talk) 18:19, 28 August 2020 (UTC)[reply]
Oh, aye, I wondered something similar though didn't pursue it as far as you did. Were it me, I think that {{Category articles containing non-English-language text/inner core}} would have one positional parameter: an IETF language tag (language tags are easily internationalized, language names not so much).
Trappist the monk (talk) 19:05, 28 August 2020 (UTC)[reply]
Could you explain the internationalization issue? {{ISO 639 name|fn=iso_639_name_to_code|Literary Chinese}} -> lzh so this already works. Or did you mean something else? --Gonnym (talk) 08:49, 29 August 2020 (UTC)[reply]
A rather large number of templates get copied from en.wiki to other-language.wikis. I suspect that it is unlikely that {{Category articles containing non-English-language text/inner core}} will be one of those, but as a general principle, because the Wikipedia community is multi-lingual, we should be in the habit of writing templates and modules with that in mind. ISO 639 language codes are standardized and international so we should use them in preference to the English names for languages.
Trappist the monk (talk) 10:06, 29 August 2020 (UTC)[reply]
Ah, I see. The problem with that is that if someone would to fix Category:Articles containing Classical Chinese-language text and remove "zh-classical" then the category won't appear in the error category, but it should as the correct category that uses that ISO is Category:Articles containing Literary Chinese-language text. So the error check isn't completely helpful. An example: Category:Articles containing Classical Gaelic-language text isn't in the error category but it's empty as the correct category is Category:Articles containing Hiberno-Scottish Gaelic-language text. --Gonnym (talk) 10:32, 29 August 2020 (UTC)[reply]
I guess I don't understand the point you are trying to make. zh-classical is not a valid IETF language tag so {{lang}} will never add Category:Articles containing Classical Chinese-language text to any article. 'Classical Chinese' is not a language name known to {{lang}}. Similarly, 'Classical Gaelic' is not a language name known to {{lang}}. Categories using the {{Category articles containing non-English-language text}} that cannot be populated by {{lang}} serve no purpose so should be CfD'd. The act of CfDing these may have some benefit. If, for example, in the eyes of en.wiki, 'Classical Gaelic' is a synonym for 'Hiberno-Scottish Gaelic', we can fix that and whatever associated redirects to get readers to the appropriate article (those decisions are outside my bailiwick). Further, because 'Classical Chinese' and 'Classical Gaelic' are not known to {{lang}} we cannot fetch a code from the name:
{{#invoke:lang|tag_from_name|Classical Chinese}}Error: language: Classical Chinese not found – ha! a bug because:
{{#invoke:lang|name_from_tag|zh-classical}}Error: unrecognized language tag: zh-classical
this tag/name pair exist in Module:Language/data/wp_languages with a group of other non-standard (mostly MediaWiki) tags
{{#invoke:lang|tag_from_name|Classical Gaelic}}Error: language: Classical Gaelic not found
So I've rambled here not really knowing what it is that I'm responding to, so, can you restate your objections?
Trappist the monk (talk) 11:27, 29 August 2020 (UTC)[reply]
I agree with what you wrote above and you seem to be agreeing with what I said, so I'll I'try and explain again. The category name should match the ISO code. We currently have categories such as the Classical Chinese and Classical Gaelic which don't match. I wanted to have a piece of code that will add them to the error category so it will be easier to find them (instead of browsing a list of 1k+ categories) and then CfD them. The code you added does not currently accomplish this. What it checks is if the user who added the template used a correct ISO code. However, that code can be correct and the category name incorrect, or both can be correct but not belonging to each other. In both of those situations the category won't appear in the error category. The only way (I see) to do this, is to check if the category name itself is correct. That is why I proposed we check if the language name in the title appears in an ISO list. That might have internationalization issues, but it's better than not being able to find these errors. Did I explain it better? --Gonnym (talk) 11:44, 29 August 2020 (UTC)[reply]
The category name should match the ISO code. No. The category name should match what en.wiki editors have determined is the appropriate name. While I would prefer that articles and categories all use the name defined in the standards, editors here don't agree. This is why we have Module:Lang/data so that Module:lang can override standardized names with en.wiki preferred names.
When you proposed the test, I did not understand that you wanted a 'language-name test'. I'll think about that.
When I first mentioned internationalization, I was referring to a rewrite of {{Category articles containing non-English-language text}} so that as input it would accept only one positional parameter, an IETF language tag from which the template would get the en.wiki sanctioned language name.
Trappist the monk (talk) 13:00, 29 August 2020 (UTC)[reply]
This is why we have Module:Lang/data so that Module:lang can override standardized names with en.wiki preferred names. - I'll correct myself. I meant that. My point was that the category name should match the category in which Module:lang places the pages using the specific code in. So if I create a category called "Articles containing Trappist-language text" and add {{Category articles containing non-English-language text|fr}}, which is a valid ISO, the page still gets placed in the error category as {{lang|fr}} does not populate the "Articles containing Trappist-language text" category. Is that more clear? --Gonnym (talk) 13:15, 29 August 2020 (UTC)[reply]

Template:Lang2iso errors

[edit]
Resolved

There are ~2.3k pages in Category:ISO 639 name template errors, almost all of them because of Template:Lang2iso which we'll need to figure out how to clear.--Gonnym (talk) 12:37, 28 August 2020 (UTC)[reply]

The instances that I checked in Category:ISO 639 name template errors (I only checked a few) used {{lang2iso|}}. We could probably use awb to change that form of the template to {{lang2iso|undetermined}} or we could change {{lang2iso}} to include |{{{1|undetermined}}}
Trappist the monk (talk) 13:46, 28 August 2020 (UTC)[reply]
Which one do you think is better? I'll note that if we add that as default to the template then we won't get the error "error: language name required" if that is important. Also, if we go AWB, can your bot help? As 2.3k is a bit too much for me to do manually. --Gonnym (talk) 11:51, 29 August 2020 (UTC)[reply]
The awb solution because that will give future editors (at least those conscientious editors who preview their edits) a chance to fix whatever they are doing before they publish. I could write a bot task to make those changes but for 2k or 3k edits it hardly seems worth it. Bot tasks take time to get through WP:BRFA. The job could be finished (using the same code) before BRFA gets started.
Trappist the monk (talk) 13:17, 29 August 2020 (UTC)[reply]

Category:Iso 639 name template errors (lower iso)

[edit]
Resolved

Template:Rough translation is placing pages in Category:Iso 639 name template errors (lower iso) but I can't seem to find where in any code this category is generated. --Gonnym (talk) 12:37, 28 August 2020 (UTC)[reply]

Bump in case you missed this before. I still cannot find this anywhere. --Gonnym (talk) 11:52, 29 August 2020 (UTC)[reply]
{{#language:{{lang2iso|{{{1}}}}}}}
When {{{1}}} is a code, not a language, then:
{{#language:{{lang2iso|ru}}}}<span style="font-size:100%;" class="error show_639_err_msgs">error: ru not found in iso 639-1, -2, -2b, -3, -5 list ([[template:iso 639 name|help]])</span>[[category:iso 639 name template errors]]
{{#language:}} returns what it gets in lowercase:
{{#language:BLAH}} → blah
The hint was the help text redlink.
Trappist the monk (talk) 13:43, 29 August 2020 (UTC)[reply]
Ok, so either Module:ISO 639 name or Module:Mw lang need a "is_name_exists" function so a language name can be checked. --Gonnym (talk) 14:40, 29 August 2020 (UTC)[reply]
No. The {{rough translation}} template documentation (which, like most template documentation, sucks) says that {{{1}}} is for the language name – doesn't say whether that name it the English-language form of the name, the exonym ... Optional {{{2}}} is (presumably, because the documentation isn't explicit about this either) the endonym. The code:
{{#language:{{lang2iso|{{{1}}}}}}}
does work when given the correct input:
{{#language:{{lang2iso|Russian}}}} → русский
I have created iso_639_name_exists() in Module:ISO 639 name and is_name() in Module:Mw lang. I should also do that for Module:Lang. I should also harmonize function names across the three modules. I'm not feeling particularly motivated to fix {{rough translation}}. I'll leave that for someone else...
Trappist the monk (talk) 21:58, 29 August 2020 (UTC)[reply]
Template talk:Lang2iso#Template-protected edit request on 30 August_2020. --Gonnym (talk) 08:32, 30 August 2020 (UTC)[reply]
And I think I fixed {{Rough translation}} to support both names and ISOs. --Gonnym (talk) 09:21, 30 August 2020 (UTC)[reply]
Good. I've answered the edit request.
Trappist the monk (talk) 10:55, 30 August 2020 (UTC)[reply]

Module:Language/name

[edit]
Resolved

Found Module:Language/name which seems to duplicate Module:ISO 639 name. Am I correct? If so, is there anything to merge or just a simple replacement? I'll TfD it based on your response.

Module:Language/name has three operating modes (functions); according to these search results, only simple() is used so instances of this module could be replaced. {{expand language}} refers to other-language Wikipedias so the {{proofreader needed}} fix ought to work. This is another of those that would benefit if I finish Module:Sandbox/trappist the monk/mw lang ...
Trappist the monk (talk) 13:46, 28 August 2020 (UTC)[reply]
Should this be replaced with {{mw lang}} or {{ISO 639 name}}? --Gonnym (talk) 11:48, 29 August 2020 (UTC)[reply]
Doesn't the answer to this question require knowledge of where the replacement is to be? If the template that uses Module:Language/name is Wikipedia specific then the answer would be {{mw lang}}. In other use cases, it might be {{lang}} or it might be {{ISO 639 name}}. Looking at that sentence, it strikes me that {{ISO 639 name}} should be renamed {{ISO 639 lang}} ...
Trappist the monk (talk) 13:05, 29 August 2020 (UTC)[reply]
Your search results above showed it was only used in Template:Expand language, so my question was regarding that. (regarding the name, probably correct, but should be a separate header to keep things clean-ish). --Gonnym (talk) 13:18, 29 August 2020 (UTC)[reply]
It was used twice. Switched both to {{Mw lang}}. Will TfD it later after the /text module TfD is over. --Gonnym (talk) 13:33, 31 August 2020 (UTC)[reply]

Module:Language/data/ISO 639-2B

[edit]

I have a question regarding Module:Language/data/ISO 639-2B, how does this relate to Module:Language/data/ISO 639-2 now? I see all of the entries of 2-B are still in the general one. --Gonnym (talk) 17:20, 31 August 2020 (UTC)[reply]

So that when desired, editors may ask iso_639_name_to_code() to return either the -2B or -2T code for a language that has both. Module:Language/data/ISO 639 name to code lists one -2 code for languages that have -2B and -2T codes. As it is right now, editors can't be expected to know which of -2B or -2T which will be returned. Here are two examples:
{{ISO 639 name|fn=iso_639_name_to_code|Albanian|2}} → sqi a -2T code
{{ISO 639 name|fn=iso_639_name_to_code|Czech|2}} → ces a -2B code
Module:Language/data/ISO 639-2 still has both because I don't want to break anything while I still haven't yet figured out how the various module functions will use the -2B module.
For Module:Language/data/ISO 639 name to code, I want to figure this out before I modify Module:Language/data/ISO 639 name to code/make to include the -2B data and the override data in the table that it creates.
Trappist the monk (talk) 17:56, 31 August 2020 (UTC)[reply]

ISO 639 error cleanup

[edit]
  1. Is it possible to add a parameter so pages like Template:ISO 639 name/doc won't show up in Category:ISO 639 name template errors? I'm trying to clear out that category and since the /doc page has an example of an error it shows up there. |hide-err= won't help here, as the /doc wants to show the error, I just don't want it to cause the page to appear in the tracking category.
  2. Template:Lang-eml is unused so valid for TfD, but I was wondering if that is even a valid code? The template error says it isn't but I'm double checking.
  3. The Template:User mo family of templates is showing an error because it can't find "mo", since "mo" is a deprecated language code of Moldovan language. I was looking at this and this and I'm wondering if these codes should still be in our files? Or maybe in a case-by-case situation? The LoC says for "mo/l" The identifiers mo and mol are deprecated, leaving ro and ron (639-2/T) and rum (639-2/B) the current language identifiers to be used for the variant of the Romanian language also known as Moldavian and Moldovan in English and moldave in French. The identifiers mo and mol will not be assigned to different items, and recordings using these identifiers will not be invalid., while for "sr" is says ISO 639-2/B code deprecated in favor of ISO 639-2/T code. What do you think?
  4. Uses of {{Lang2iso}} without a parameter are starting to appear in the category. I know it's being added via Template:Afc decline but I can't find where the template is used so I can set the default value. Can you help me locate it?

--Gonnym (talk) 13:10, 27 August 2020 (UTC)[reply]

Answers:
  1. yes; I also want to add a help link to the template doc page
  2. eml is the second level domain name for the Emilian-Romagnol Wikipedia consequently, {{#language:eml|en}} → Emiliano-Romagnolo looks like a valid ISO 639 code; it is not. TfD
  3. added mo to Module:Language/data/ISO 639 override; I'll add the other 639-2, -3 codes presently. For sr, the 639-2/B code scc doesn't appear to be used anywhere. Do you know of some place where it is used? If there is a need, scc can be added to the override
  4. Part of the difficulty is because {{Afc decline}} is normally substed? In that template, {{lang2iso}} is used to create an inter-language interwiki-link so {{Afc decline}} should properly be using the data behind {{#language}}. Time for a new template/module pair perhaps. Module:Citation/CS1 does this so I can adapt code from that to this task. I suppose it would be a parallel to {{ISO 639 name}}
Trappist the monk (talk) 14:27, 27 August 2020 (UTC)[reply]
I TfD Lang-eml. I don't know of any other deprecated codes, including sr, that are in use, but they might be. 'mo' was in the error category which is why I saw it. I'm setting |cat=no but the page is still in the error category. What am I doing wrong? --Gonnym (talk) 17:54, 27 August 2020 (UTC)[reply]
I broke it.
Trappist the monk (talk) 18:04, 27 August 2020 (UTC)[reply]
Fixed I think (sometimes the brain just doesn't work) so I think that the error handling is done for now. Nor does the brain remember stuff. In March this year I wrote Module:Sandbox/trappist the monk/mw lang. I don't remember doing that ...
Trappist the monk (talk) 19:26, 27 August 2020 (UTC)[reply]
Good job with the fast fix though :) OK, it seems this is a never-ending wack-a-mole game. Found a few more templates that still used the ISO 639 name x version and fixed the easier ones.
Template:Lang/old and Template:Lang/sandbox2 - can they be TfD?
Template:Uselanguage can you tell how to replace the code there? As a related note, it seems a very old version of that template had messed up code and placed the entire switch in the user pages such as User talk:Qbamin~enwiki. I'd guess that a majority of the transclusions of Template:Iso2lang is because of that.
--Gonnym (talk) 20:13, 27 August 2020 (UTC)[reply]
Yeah, TfD those two.
I suspect that {{Uselanguage}} can be fixed with the same tricks as you used in {{proofreader needed}}Proofreader).
Trappist the monk (talk) 23:16, 27 August 2020 (UTC)[reply]
I don't know how to get the verification if the wiki language is correct (#ifexist:Template:ISO 639 name {{{1|notarealpage}}}) to work. Proofreader doesn't have this check so it just creates an invalid link. Any ideas?
Also, it was pointed out in Wikipedia:Templates for discussion/Log/2020 August 27#Template:Lang-eml that "eml" is one of the deprecated ISOs ([1]) and that language does have a wiki article at Emilian-Romagnol language. If the template does not get deleted, then it should probably be added to the deprecated list. --Gonnym (talk) 23:35, 27 August 2020 (UTC)[reply]
This older version of {{proofreader needed}} used the {{#ifexist:Template:ISO 639 name {{{2|}}}|...|...}} construct. So, wouldn't the pertinent bit be written:
{{SAFESUBST:<noinclude />#ifeq:{{#language:{{{1|}}}|en}}|{{{1|}}}|[[Image:Information.svg|25px|alt=|link=]]Please do not contribute text in a foreign language to English Wikipedia. Your contributions are more than welcome at a [[List of Wikipedias|Wikipedia in your language]].|Please do not contribute text in {{SAFESUBST:<noinclude />#language:{{{1}}}|en}} to English Wikipedia. Your contributions are more than welcome at [[:{{{1}}}:Main Page|{{SAFESUBST:<noinclude />ISO 639 name {{{1}}}}} Wikipedia]].|}}
That is why we have TfD. Let the community have their say and we shall act accordingly.
Trappist the monk (talk) 00:05, 28 August 2020 (UTC)[reply]
I'm a bit lost here. User:Gonnym/sandbox/tests4 has a simple {{#language:{{{1|}}}}} in it.
--user sandbox deleted -
I'm not sure how checking for #ifeq:{{#language:{{{1|}}}|en}}|{{{1|}}} will work. --Gonnym (talk) 09:19, 28 August 2020 (UTC)[reply]
Maybe Module:Language/data/wp languages can help? (also, is Module:Language/name/data working correctly? Seems strange that /wp languages is used 1,150,000 pages times). --Gonnym (talk) 09:32, 28 August 2020 (UTC)[reply]
Didn't we discuss this at §Proofreader? It ain't perfect (another reason for me to finish Module:Sandbox/trappist_the_monk/mw_lang). {{#language:<lang code>}} returns the language name when <lang code> is a recognized code; when not a recognized code, returns <lang code>. With {{#ifeq:...}} we can test the returned value:
--user sandbox deleted -
The problematic one here is French though it won't break {{Uselanguage}}.
I have no reason to believe that Module:Language/name/data is not working correctly. Modules other than Module:Lang use it (Module Lang accounts for 1.1 million of those transclusions). Were it up to me I would get rid of Module:Language/data/wp languages because its provenance is unknown.
Trappist the monk (talk) 11:52, 28 August 2020 (UTC)[reply]
Completely forgot about that discussion. I (think) I fixed both Proofreader and Uselanguage. Regarding Module:Language/data/wp languages, I'm not sure how to check where its used because of the high amount of transclusions from the /data sub module. --Gonnym (talk) 12:37, 28 August 2020 (UTC)[reply]
{{mw lang}}
  • {{#if:{{mw lang|fn=is_code|1}}|supported|not supported}} → not supported
  • {{#if:{{mw lang|fn=is_code|fr}}|supported|not supported}} → supported
  • {{#if:{{mw lang|fn=is_code|French}}|supported|not supported}} → supported
  • {{#if:{{mw lang|fn=is_code|dog}}|supported|not supported}} → not supported
I've changed {{proofreader needed}} to use this template.
Trappist the monk (talk) 22:08, 28 August 2020 (UTC)[reply]
Nice! I'll update the others later today. --Gonnym (talk) 08:45, 29 August 2020 (UTC)[reply]

Category is almost clear. One more template to fix and a few more pages. Could you edit User talk:Keeper76/Archive 13 and User:JDrewniak (WMF)/wiktionaryDefinitionInSearchResults.js to remove them from the category? They are both protected so I can't. --Gonnym (talk) 00:05, 1 September 2020 (UTC)[reply]

User talk:Keeper76/Archive 13 done. Can't do the other because I don't have (or want) interface admin rights. You'll have to talk to the page owner or get an en.wiki interface admin to tweak the code. Java script is not my thing so I can't explain why {{language}} is being executed (must be or the error cat would not exist).
Trappist the monk (talk) 00:41, 1 September 2020 (UTC)[reply]
Left him a message. Only errors left now are you for talk and sandbox, so whenever you don't need those with errors feel free to fix them :) --Gonnym (talk) 16:19, 1 September 2020 (UTC)[reply]

Arbitrary break

[edit]

OK, so we've done quite a lot so far. Current issues below:

  1. Found Module:Language/text which says its meant as a replacement for all lang-x templates, which Module:Lang does. Am I correct? If so, I'll TfD it also.
  2. I'll fix the old usages of Template:Uselanguage which were incorrectly subset in articles.
  3. I'm 2/3 of the way done mapping the languages that lead to dab pages to their correct article location.

--Gonnym (talk) 12:37, 28 August 2020 (UTC)[reply]

Answers:
  1. Module:Language/text is not used so TfD because Module:Lang
  2. good
  3. been watching
Trappist the monk (talk) 13:46, 28 August 2020 (UTC)[reply]

Mind if I refactor our discussions on this page to move discussions into their separate sections? Will make it easier to find and comment (and I know this is my fault its like this:) ). --Gonnym (talk) 11:01, 29 August 2020 (UTC)[reply]

As it pleases you, so long as nothing is deleted.
Trappist the monk (talk) 11:27, 29 August 2020 (UTC)[reply]

Module:Language

[edit]
Unresolved

Correct me if I'm wrong, but I have a feeling that Module:Language and Module:Language/data are not general-language modules but instead used only for Wiktionary templates. transcludes Module:Language and what transcludes Module:Language/data show only Wiktionary templates, as does the text in the /doc of both modules. If that is the case, it should be moved to Module:Wiktionary (the current unused module there can be TfD). Am I correct here? --Gonnym (talk) 12:10, 29 August 2020 (UTC)[reply]

I think that you are probably correct that Module:Language is Wiktionary-specific. That module has a whole passel of subpages that may or may not be used by that module. I know that Module:Wiktionary was an attempt to resolve issues around italicization in {{Wiktionary}}; that process got mired in the squabble over how to represent the defined word ... A well advertised discussion is warranted if you think that this is an important issue.
Trappist the monk (talk) 14:01, 29 August 2020 (UTC)[reply]
Continuing from the above point. Seeing as how Module:ISO 639 name also serves Template:Lang2iso (so basically, "ISO 639 code"), would Module:ISO 639 be more correct? And if so, should we then move the language data modules such as Module:Language/data/ISO 639-2 to Module:ISO 639/ISO 639-2 so all related ISO 639 would be in one logical place? As currently we have three different places where we have ISO 639 related code, the name module, subpages of Language, and Module:Lang/ISO 639 synonyms. --Gonnym (talk) 16:30, 1 September 2020 (UTC)[reply]
I guess I don't have a clear sense for what should be done, if anything. Its sort of messy but it works. Almost any data module that Module:Lang, Module:ISO 639 name, and Module:Language need is there. I can imagine splitting the content so that there are separate structures for ISO 639 data modules and IANA data modules. Do we need to do that? What other language data is going to be needed in the future?
I suspect that data modules that are specific to an executable module, should be segregated as subpages of their associated executable modules. Module:Lang/data and Module:Lang/ISO 639 synonyms are already segregated for Module:Lang. Module:Language/data/ISO 639 override should probably be moved so that it is a subpage of Module:ISO 639 name.
Trappist the monk (talk) 21:16, 1 September 2020 (UTC)[reply]

Bot solving CS1 problems

[edit]

Hey there, Trappist!

Lately I've been developing a bot (using a simple find and replace pywikibot) to help solve some problems with the CS1 module in SqWiki. Currently, what it does is that:

  1. It converts English language names into universal 2 characters ISO codes, solving the "unknown language error" and aiding in i18n;
  2. It removes deprecated parameters like "ref=harv", "ref=harvnb";
  3. It removes CS1 categories added "manually" (not automatically by the module, what we talked the last time);

Now, regarding this subject, I have a few questions:

  • I'm still not totally sure what to do with 3 characters ISO code languages. Do they somehow require any kind of maintenance? Why are we tracking them? Strange question: To your knowledge/beliefs, is there any hope for "total standardization" in the future among the number of characters in ISO codes AND among some language codes used my Wikimedia (therefore removing the need for remapping and hacking)?
  • Currently the bot converts ONLY English language names into 2 characters ISO codes (those that can be converted into 2 characters, as I said, I'm not yet sure how to deal with the 3 characters ones). That's because most of our articles come from EnWiki. The ideal solution would be for it to be able to convert all language names in ALL languages into 2 characters ISO codes. Therefore it would provide maintenance even to articles coming from other languages (and maybe it could do its job even on other wikis? - Not sure if that function would be needed among other wikis). The problem is that I simply don't know how other languages are called in other languages. This is the list I used in designing the conversion: Codes for the Representation of Names of Languages. By using the same list, I can make the French and German conversion possible but that's where I stop. And I can probably fill in the Albanian list by using that template you've suggested I import before but I don't know of any way how I can fill in the remaining languages. Any thoughts on that?
  • I'm a little surprised a bot like this has not been created yet in EnWiki (to my knowledge) considering the vast amount of bots you have running here. For me, I was motivated to create it after spending countless hours just converting English language names into ISO codes to solve those errors but maybe that's not a big problem here. Anyway, the question is: Do you think this bot would be useful outside of SqWiki? Do you think it's a good thing if we globally strive to use ISO codes for languages in our Wiki communities so it helps (a bit) with i18n? I mean, of course, in communities that already rely on CS1 module for most of their citations. Or would that approach provide problems I haven't thought of yet? Of course, other fixing functions mentioned above could also be imported globally, no? The fact that there is yet no bot helping globally with CS1 module problems (I emphasize: To my knowledge) makes me think that there are problems in that approach I haven't thought of but maybe it's just that no one had found the time yet to deal with it. What do you think?
  • And lastly, what are some kind of CS1 problems (errors and maintenance) that could be fixed with a bot apart from what I'm already solving? I mean, of course a simple bot can't really put the name of a missing original title (when the translated one is there) because it goes beyond simple regex-es but maybe it can help in some other problems? Maybe the bot could go beyond using simple regex-es somehow and help even with problems like those? I'm open to brainstorming (and to learning, as I've only lately just started dealing with bot design). - Klein Muçi (talk) 13:51, 31 August 2020 (UTC)[reply]
(talk page stalker) User:BattyBot's task 25 fixes dates. The bot's description has a link to the code that it uses. – Jonesey95 (talk) 15:35, 31 August 2020 (UTC)[reply]
@Jonesey95: thank you! Apparently there are more than date fixes there. I'll give a thorough look at the code it uses to hopefully import it to my bot too. Hopefully, it won't require too many changes/adaptions. - Klein Muçi (talk) 15:47, 31 August 2020 (UTC)[reply]
Answers:
  • Hoping that WikiMedia will ever standardize on ISO 639 language codes and names is, I think, a forlorn hope. Therefore, it will always be necessary to remap and hack.
  • The Library of Congress list is a good list for ISO 639-1 and ISO 639-2 codes and names but, cs1|2 only accepts ISO 639-2 codes and names that are also supported by MediaWiki. I suspect that the English-language version of the data behind the {{#language:}} magic word is the most complete mapping of codes ↔ names at MediaWiki so I think that those data should be the data source for your bot. The ideal solution would be for it to be able to convert all language names in ALL languages into 2 characters ISO codes. Ha! Not likely. There are 100-ish ISO 639-5 codes, 7600-ish ISO 639-3 codes, 500-ish ISO 639-2 codes, but only 180-ish two-character ISO 639-1 codes. It is not possible to map all of those three-character codes to two-character codes. I have tweaked the en.wiki copy of Module:cs1 documentation support so that function lang_list() accepts |lang=<code>. With that, you can get a list of what MediaWiki thinks are the language names for the <code>'s language: Albanian in Spanish is (according to MediaWiki) albanés. This is not a perfect system. If a MediaWiki list of language names for a particular language is incomplete, MediaWiki will fall-back to some other language list (probably the English list).
  • At the moment, Category:CS1 maint: unrecognized language doesn't have many articles listed (336) – someone is keeping its count low. For such a low article-count, I don't see a need for a bot. Use your bot outside of sq.wiki? I don't know, that is really an issue for those other-language wikis. I don't see a use for it here. I do think that in cs1|2 and any other template that does anything with language names, the preferred method for communicating the name to the template should be with IETF language tags so that i18n isn't an issue. I would wish that MediaWiki would adopt such a standard but I won't hold my breath (forlorn hope that I mentioned earlier). Global bot? I think this unlikely. Perhaps if all installations of the cs1|2 module suite were identical except for what can be configured in ~/Configuration then I suppose some sort of bot is possible. Perhaps when (if) global modules/templates become a reality... I think that the only pseudo-global bot working on some facet of cs1|2 problems is IAbot and that really isn't about cs1|2 problems per se, but about deceased urls that can be coupled to an |archive-url=.
  • I don't have an answer. The missing language param category is your biggest. Maybe you can derive cues about the language from |title= by inspecting the words that make up the title; of course you don't really know if English words in |title= actually reflect the language in which the source is written ...
Trappist the monk (talk) 15:52, 31 August 2020 (UTC)[reply]
It looks like I still have a lot to study about language names and their conventions regarding corresponding codes in technical environments. I'll try to make use of your new tweaking, maybe that's exactly what I needed. (Most likely I'll be back here asking for help on how to do that exactly but I'll try it alone first. :P )
Yes, I was thinking the sames about global bots and IABot (being the only one). If global versions of CS1 modules are all updated, I think bots helping in a global scale with minor fixes could help keep the error/maint categories empty. But keeping the modules up to date globally would be the biggest challenge to overcome. Maybe I'm getting a bit too enthusiastic here but how about we start keeping track of CS1 modules in a global scale in Meta? Maybe we could notify communities en masse when a new update was coming and keep track of how that goes globally, their specific changes they would ask for, etc. Then we could talk with more confidence about global-related problems and solutions. Do you think that thing could be possible and inside your scope of interest?
Yes, that's the biggest problem in SqWiki and the first motivation for creating the bot. It was this discussion that inspired the bot. Unfortunately what's described there it's outside of my actual technical capabilities so I was forced to at least deal with the unknown languages.
Finally, can you explain me in a very short way, why do we keep track of articles using 3 character ISO codes? Maybe you already did so above, but I was bombarded with new information regarding languages and apparently I have missed this. - Klein Muçi (talk) 17:15, 31 August 2020 (UTC)[reply]
While I would like to see cs1|2 be more globally useful, I am not much interested in the bureaucracy and drama that comes from disparate user-interests bickering over some point or other. This is why I almost never participate in RfCs and other such community driven decision making.
Why do we categorize anything? Because someone might find it useful? It isn't harmful, so I don't see much point in withdrawing the categorization.
Trappist the monk (talk) 18:28, 31 August 2020 (UTC)[reply]
I fully understand what you mean. And I didn't meant to remove it. I just thought that maybe it was there in need of some attention to get some kind of fix. As always, thank you for your answers! :)) - Klein Muçi (talk) 01:47, 2 September 2020 (UTC)[reply]
[edit]

Can a fix be applied to Prakrit?

  • {{lang2iso|Prakrit}} error: Prakrit not found in ISO 639-1, -2, -2B, -3, -5 list (help) - does not work
  • {{ISO 639 name|pra}} - leads to Prakrit languages

--Gonnym (talk) 09:41, 3 September 2020 (UTC)[reply]

pra is a collective code so the proper use for {{lang2iso}} is:
{{lang2iso|Prakrit languages}} → pra
Trappist the monk (talk) 09:51, 3 September 2020 (UTC)[reply]
I know, but it's used in an infobox and the input a user used was the one without the "languages" part and the article also doesn't use it, which was why I asked. --Gonnym (talk) 09:56, 3 September 2020 (UTC)[reply]
This is about Mithila (ancient city), {{Infobox historic site}}, and {{ConvertAbbrev}}? Use Prakrit languages. I don't think that we should override the names for collective codes unless there is a very compelling reason to do so.
{{Infobox historic site}} should probably not be using {{lang2iso}} to feed {{lang}} and/or {{lang-??}} templates because similar but different data sets. Instead, the infobox should be calling {{lang}} functions so that the same data set is used throughout:
{{lang|fn=tag_from_name|Prakrit languages}} → pra
Yeah, I know, small quibble ...
I have voiced this before at some other infobox talk page: a utility that accepts native-name-of-thing with matching native-language name or native-language code that then calls Module:Lang to render native-name-of-thing appropriately. There is a first hack at that utility in Module:Lang/utilities/sandbox native_name_lang(). Infoboxen have a variety of ways that they handle native-names-of-things; that variety could/should be standardized.
Trappist the monk (talk) 11:27, 3 September 2020 (UTC)[reply]
Yes, it was regarding those pages you listed above. Looking at Module:Language/data/ISO 639-5 I am wondering if maybe we can adjust how it works to something similar to what you do in the lang_name_get function. Search for either the name or name without the word "languages". Could something like that work? Also, why are the datasets for the lang family different? --Gonnym (talk) 11:47, 3 September 2020 (UTC)[reply]
We strip parenthetical disambiguation from language names because ISO 639 disambiguators are unlikely to match any disambiguators or redirects that en.wiki has:
{{ISO 639 name|ang|raw=yes|link=yes}}English, Old (ca.450-1100)
So, yeah, we could strip languages from collective-code names but what is the very compelling reason to do so?
{{Lang}} doesn't understand either of ISO 639-2B and -5 and derives almost all of its code/name pairs from IANA's language-subtag-registry file; the mapping there is sometimes different from the ISO 639 sources. I think that in the future, {{lang}} should stop (will stop) using Module:Language/name/data which combines IANA with ISO 639-3 and Module:Language/data/wp languages so that {{lang}} relies solely on the IANA data – after all, the primary purpose of {{lang}} is correct html markup and html specifies the IANA data.
Trappist the monk (talk) 13:07, 3 September 2020 (UTC)[reply]

Removal of protection and redirect

[edit]

Sir the account " Divya Agarwal " has been redirected to another page and protected. She is a notable actress . I want to create a proper web page for her. Since you are a administrator it's my humble request that you either delete or remove protection from this page. Thank you Rjidindiana (talk) 09:07, 7 September 2020 (UTC)[reply]

Before it can be done there needs to be an article to replace the redirect. See WP:YFA for how to do that. If the article is accepted, editors who accept your draft can help you with the redirect and protection issues.
Trappist the monk (talk) 10:06, 7 September 2020 (UTC)[reply]

Sir I do have the article ready to replace but the problem is that an article already exists of that name which has no details. It is also protected because of which I cannot make edits. If the new draft which can be replaced is accepted it be issued in my username and not "Divya Agarwal". That's why I am requesting you to delete this page. Kindly help Rjidindiana (talk) 14:12, 7 September 2020 (UTC)[reply]

Also the page 'Divya Agarwal' was created by someone else and later some people made unnecessary edits. Rjidindiana (talk) 14:14, 7 September 2020 (UTC)[reply]

If your sandboxed article is accepted, work with the editors who accepted it to see that it is moved out of your sandbox to the proper title.
Trappist the monk (talk) 16:11, 7 September 2020 (UTC)[reply]

General formatting script

[edit]

Hi, Trappist the monk, I need your help regarding a script. You know general formatting script changes crore/lakhs to million, but about Indian articles, it's not preferable. I derived a script from this see User:Empire AS/General formatting.js. However, I wanted to remove the changing of crores into millions. I've tried to do it manually, but I know nothing about developing scripts. Can you tell me what to remove or add to just remove this units changing? Thank you. Waiting for your reply. --Empire AS Talk! 02:13, 5 September 2020 (UTC)[reply]

Empire AS, it is a false statement that crore is preferred. See WP:COMMONALITY. --Izno (talk) 13:53, 6 September 2020 (UTC)[reply]
Izno, Indian articles should have crore and lakhs in them. See [2] and MOS:INDIA also. Empire AS Talk! 02:44, 7 September 2020 (UTC)[reply]
You know general formatting script changes crore/lakhs to million... Actually, I don't know that; what make you think that I do? I don't know why you are asking this question of me, I am not the author of that script. Shouldn't questions about a particular be directed to the author of the script?
Trappist the monk (talk) 16:59, 6 September 2020 (UTC)[reply]
Trappist the monk, The script author isn't active for a while. As you replied me on the talk page of MOSNUM dates script, therefore, I thought that you would know about it too.I came here as I think that you may know how to correct a script and know how to remove that units changing. That's all. Thank you. Empire AS Talk! 02:50, 7 September 2020 (UTC)[reply]
The correct person to help you with that script is the script's author. It does not make sense to me that there would be two versions of the script that do markedly different things. Because others will be using the unmodified script, it is best to get assistance from the script's author. Failing that, perhaps discuss at WP:IANB.
Trappist the monk (talk) 10:24, 7 September 2020 (UTC)[reply]
Trappist the monk, I'll not say it's my work but derivatived from original script. The 2 scripts will work the same except changing units. And the work is so tiny, that only the you have to tell me only section that should be removed that works of changing? Thank you. Empire AS Talk! 11:28, 7 September 2020 (UTC)[reply]
But that's the problem, isn't it? The two scripts will not work the same way because your script will be different. You visit an article and use your script to modify the article (retaining crore/lakhs). Then someone else comes along and uses the original script and modifies the article again (converting crore/lakhs). If the original script doesn't do the right thing, talk to the script's author and get the original script repaired else you and others will find yourselves repairing articles that shouldn't need repairing.
Trappist the monk (talk) 16:06, 7 September 2020 (UTC)[reply]
Trappist the monk, Original script does the right. Because, million is preferred over crore in many articles but, in South Asia, crore should be used. Okay, I'll ask the author to help if they can. Thank you. Empire AS Talk! 02:07, 8 September 2020 (UTC)[reply]

Dʰéǵʰōm

[edit]

I fixed my error on this page; it was simply a typo, and I smacked myself for not using the Show Preview button. I also sent another reply by ping, but in case that doesn't work because you don't have a regular user page, have sent this one too. You can just delete it otherwise.) The page should now look the same as before I touched it.

Ira
Ira Leviton (talk) 20:03, 13 September 2020 (UTC)[reply]