Template talk:Lang

(Redirected from Module talk:Lang/doc)
Latest comment: 8 days ago by Antiquistik in topic Code for Anatolian languages

WikiProject iconLanguages Template‑class
WikiProject iconThis template is within the scope of WikiProject Languages, a collaborative effort to improve the coverage of languages on Wikipedia. If you would like to participate, please visit the project page, where you can join the discussion and see a list of open tasks.
TemplateThis template does not require a rating on Wikipedia's content assessment scale.

Foreign-language article titles edit

31 August 2021 (UTC)

Samaritan edit

{{lang|smp|example}} (the code for Samaritan Hebrew language) adds a page to Category:Articles containing Samaritan-language text but Samaritan language redirects to Samaritan Aramaic language sam. Error (talk) 01:22, 18 January 2024 (UTC)Reply

  Fixed. The redirect was pointing to the wrong page (per https://iso639-3.sil.org/code/smp at least). – Jonesey95 (talk) 14:34, 18 January 2024 (UTC)Reply
Now Category:Articles containing Samaritan-language text points to a disambiguation page. It shouldn't. --Error (talk) 16:22, 19 January 2024 (UTC)Reply
I reverted a good-faith change to that redirect. "xxx language" redirects, where "xxx" matches the ISO name, always point to the article for that language. – Jonesey95 (talk) 17:47, 19 January 2024 (UTC)Reply
In Module:Language/data/iana languages, searching for "Samaritan", I find: ["sam"] = {"Samaritan Aramaic"}, ["smp"] = {"Samaritan"} – This module contains data taken directly from a local copy of an IANA language-subtag-registry file, and is supposed to be kept in sync with that external site.
That external site apparently makes Samaritan Hebrew the primary topic for "Samaritan", by simply calling it that, rather than "Samaritan Hebrew".
I see, Category:Articles containing Samaritan Aramaic-language text. Category:Articles containing Samaritan Hebrew-language text. Hmm.
Samaritan Aramaic language was the primary topic for Samaritan language for 17 12 years, until Jonesey95 changed that.
Just two articles currently link to "Samaritan language", though – Salbit and ‎George Nicholl.
Not sure I'm comfortable with letting a third-party website decide whether the term "Samaritan language" has a primary topic or is ambiguous, though. – wbm1058 (talk) 20:08, 19 January 2024 (UTC)Reply
I'm not sure why a category red link was pasted above; the relevant category is Category:Articles containing Samaritan-language text. In my experience, articles about languages are all either called "XXX language", or a redirect exists at "XXX language" pointing to the article name that the English Wikipedia has decided upon. This lang template/module set uses the ISO and IANA files to map language codes to language names; those language names are used for the relevant categories. In the case that the OP posted about, the redirect was pointing to the wrong place, so I fixed it. Since, as you say, there are minimal links to both pages, it should be fine to have {{for}} links at the top of each of the language pages; I have added those. [Edited to add: Since we call it "Samaritan Hebrew" here, as does Ethnologue, a reputable language source, maybe the lang templates should override the default "Samaritan" with "Samaritan Hebrew", which would free up "Samaritan language" to be a disambuiguation page. I don't know how to do that override.] – Jonesey95 (talk) 22:50, 19 January 2024 (UTC)Reply
Easily enough done if and when the editors here can figure out, and clearly state, what it is that they want. Thus far, that has not happened. This discussion was originally at Module talk:Language § Samaritan. I'm not inclined to change anything until there is at least a minimal consensus, clearly stated, to override ISO 639-3/IANA or repoint the redirect.
Trappist the monk (talk) 23:10, 19 January 2024 (UTC)Reply
OK, so ["smp"] = "Samaritan Hebrew", -- to match en.wiki article title: Samaritan Hebrew.
Now, Category:Articles containing Samaritan-language text says: Error: Samaritan is not a valid ISO 639 or IETF language name. Please see Template talk:Lang for assistance.
Go figure. Have you figured out what we want yet? wbm1058 (talk) 02:53, 20 January 2024 (UTC)Reply
That follows logically from the diff. I guess that's what we want then. The next step was to create Category:Articles containing Samaritan Hebrew-language text. I have restored and spruced up the disambiguation page at Samaritan language and marked the old category for deletion. I think this may be resolved. – Jonesey95 (talk) 05:21, 20 January 2024 (UTC)Reply
Very good, thanks. You figured it out for me. Category:Articles containing Samaritan-language text history-merged to Category:Articles containing Samaritan Hebrew-language text and deleted. – wbm1058 (talk) 14:12, 20 January 2024 (UTC)Reply

Lang-ktz edit

returns the wrong spelling, even though the name is spelled correctly [Juǀʼhoan] at Module:Language/data/ISO 639-3. Where do I go to fix? — kwami (talk) 00:34, 21 January 2024 (UTC)Reply

Where are you seeing a misspelling? If I write:
<code>[{{lang|fn=name_from_tag|ktz}}]</code>[Juǀʼhoan]
and without the <code>...</code> tags:
[{{lang|fn=name_from_tag|ktz}}] → [Juǀʼhoan]
Where are you seeing a different spelling?
Trappist the monk (talk) 00:50, 21 January 2024 (UTC)Reply
In both. (A quick test on my system is to double click on the result. Only part of the name highlights.) — kwami (talk) 00:54, 21 January 2024 (UTC)Reply
Don't know that that is much of a test. If I double click your example and both of my examples, all eight characters are highlighted in each case.
If I examine all three examples at https://r12a.github.io/uniview/, the only difference between your example and the output from Module:Lang is the apostrophe. You use U+02BC: MODIFIER LETTER APOSTROPHE and Module:Lang uses U+0027: APOSTROPHE which is in keeping with en.wiki's preference (MOS:CURLY). Is that where the highlighting stops?
Trappist the monk (talk) 01:15, 21 January 2024 (UTC)Reply
If I double-click on the word "Don't" in Trappist's response above, only "Don" or "t" is highlighted. That does not indicate an error. – Jonesey95 (talk) 14:34, 21 January 2024 (UTC)Reply
You know? I was just going to ask about that ...
Trappist the monk (talk) 15:17, 21 January 2024 (UTC)Reply
Might be OS or some other thing dependent, but if I double click "don't" or "[Juǀ'hoan]", the whole text is highlighted for me. Gonnym (talk) 16:35, 21 January 2024 (UTC)Reply
Yes, it's OS or something dependent. For me, it's a convenient test to check if a word contains punctuation substitutes for letters. E.g. Juǀʼhoan with a click letter highlights as a word, but Ju|ʼhoan with a punctuation mark substituted does not. — kwami (talk) 19:10, 21 January 2024 (UTC)Reply
Wait, what? Earlier, you wrote: Only part of the name highlights. Now you write: Juǀʼhoan with a click letter highlights as a word. Is this not contradictory? None of the example language names, except the latter one in your most recent post, use a pipe character (U+007C: Vertical line). What am I missing? Is there still a wrong spelling issue here?
Trappist the monk (talk) 19:27, 21 January 2024 (UTC)Reply
Only part of the name highlighted because there was a punctuation substitution for proper orthography. That happens with either the click letter or the modifier apostrophe. For the whole name to highlight, all of the characters need to be letters. — kwami (talk) 19:35, 21 January 2024 (UTC)Reply
So what you are saying is that your OS objects to U+0027: APOSTROPHE (a punctuation character)? And you didn't answer my other question: Is there still a 'wrong spelling' issue here?
Trappist the monk (talk) 19:49, 21 January 2024 (UTC)Reply
It doesn't object to it, it just recognizes that it's a punctuation mark rather than a letter. Quite convenient to test whether someone used a curly quotation mark instead of IPA for ejective consonants, for example.
Yes, the spelling issue is that we use a punctuation mark for a letter. If there's consensus that we should do that, then fine; I thought it was an error. — kwami (talk) 19:54, 21 January 2024 (UTC)Reply
Ok thanks. Nothing to do here.
Trappist the monk (talk) 20:05, 21 January 2024 (UTC)Reply
Kwami, if that character should be used, you should bring it up at Wikipedia:Manual of Style. MOS:APOSTROPHE allows the following: Letters resembling apostrophes, such as the ʻokina ( ʻ – markup: ʻ), saltillo ( ꞌ – markup: ꞌ), Hebrew ayin ( ʽ – markup: ʽ) and Arabic hamza ( ʼ – markup:ʼ), should be represented by those templates or by their Unicode values. Gonnym (talk) 20:53, 21 January 2024 (UTC)Reply
That's exactly the issue.
Why would I bring it up at the MOS? That section is pretty clear already: letters should be encoded as letters. They even provide for the {hamza} template to be used for ejective consonants, which is essentially what this is. — kwami (talk) 20:55, 21 January 2024 (UTC)Reply
If the character you want to add (to me it looks like a curly apostrophes so I don't know which one it is) an ʻokina, saltillo, ayin or hamza? If it isn't one of those, it isn't essentially what this is, which is why I said that you should bring it up at the MoS page. Gonnym (talk) 21:02, 21 January 2024 (UTC)Reply
It's the hamza. — kwami (talk) 21:15, 21 January 2024 (UTC)Reply
Also, they say "such as". They're not going to list every single character. The point is that the MOS stuff about apostrophes (no curly apostrophes etc.) applies to punctuation. It doesn't require us to distort a language's orthography.
(When I said "pretty much", I meant it's arguable whether it's really an ejective in this case -- a few KS languages make a distinction between glottalized and ejective clicks -- but it's written as if it were an ejective, just as glottalized letters are in many alphabets.) — kwami (talk) 21:17, 21 January 2024 (UTC)Reply
So we're not done? Do we undo the override or keep it as it is? As far as I can tell, the override (imported from the now deleted Module:Language/data/wp_languages) has been in place for nearly a decade (since 15 April 2014). The associated article, Juǀʼhoan language, uses the curly apostrophe.
Trappist the monk (talk) 21:39, 21 January 2024 (UTC)Reply
I don't know what the consensus is here. If it's to follow the MOS, then yes, we should change it to the modifier apostrophe (the letter, not the quotation mark). If it's to use ASCII substitutions, then it's fine as is.
Personally, I think that if we use the proper Unicode characters for languages with some political clout in the US, like Hawaiian where people insist on a proper okina letter, then we should do the same for languages that don't have such clout. — kwami (talk) 23:31, 21 January 2024 (UTC)Reply
I don't have a problem with that. Given my druthers, en.wiki would follow ISO 639 naming conventions so that overrides are unnecessary. I'm not going to hold my breath for that. So, I will undo the override so that ktz uses the name as given in the IANA language-subtag-registry file: Juǀʼhoan which uses U+02BC: MODIFIER LETTER APOSTROPHE.
Trappist the monk (talk) 23:47, 21 January 2024 (UTC)Reply
And done:
<code>{{lang|fn=name_from_tag|ktz}}</code>Juǀʼhoan
Trappist the monk (talk) 23:50, 21 January 2024 (UTC)Reply
Thanks!
BTW, a couple years ago ISO was going through all their language names to treat such ASCII/Unicode issues consistently after making a few sporadic fixes. (That is, fixes for languages that had someone to speak up and make a formal request.) I don't know if it ever got anywhere. — kwami (talk) 23:51, 21 January 2024 (UTC)Reply

Forced prefixing of * edit

I've just noticed that use of codes for protolanguages, as in {{lang|cel-x-proto|...}}, forces a prepended * (indicating a construction unattested in surviving materials). This is undesirable, since in the vast majority of cases what we're going to be doing is replacing existing in-article strings with bare italics and no lang markup, like *''kal-'', with templated replacements, e.g. *{{lang|cel-x-proto|kal-}}, but this produces a double ** which has to be manually fixed. And there are apt to be tabular-data cases (interlinear glosses, etc.) in which an entire row of cells is prefixed with * and specific words or morphemes in particular cells follow this and should not each individually have * but should still have language markup. At bare minimum we need a way to suppress this "auto-*" behavior, but ideally it would be off by default and turned on only by a parameter switch, since it is unexpected, inconsistent, completely undocumented, and almost always editorially unhelpful. PS: If this does get changed, please ping me, since I will need to go fix Caledonians#Etymology and some other things to have non-templated * again.  — SMcCandlish ¢ 😼  07:35, 2 March 2024 (UTC)Reply

Two thoughts: there is some value to the asterisk symbol as unattested (especially if we tooltip the first occurrence à la {{c.}}), so could we use {{asterisk}}, or perhaps (new) {{unattested}} and have that resolve to {{asterisk}}? Alternatively, what about just using one of the many star-shaped thingies that look like asterisk, but aren't, e.g.,
(U+274B HEAVY EIGHT TEARDROP-SPOKED PROPELLER ASTERISK) (my favorite, but several more hidden in the wikicode).
Thanks, Mathglot (talk) 11:17, 2 March 2024 (UTC)Reply
Already exists but, alas, not documented:
{{lang|cel-x-proto|kal-}}*kal-
{{lang|cel-x-proto|kal-|proto=no}}kal-
{{lang-cel-x-proto|kal-}}Proto-Celtic: *kal-
{{lang-cel-x-proto|kal-|proto=no}}Proto-Celtic: kal-
Trappist the monk (talk) 15:02, 2 March 2024 (UTC)Reply

Testing bullet-asterisk interaction with proto asterisk:

  • one asterisk, to make a bullet item
  • *kal- one asterisk, followed immediately by {{lang|cel-x-proto|kal-}}
  • one asterisk to make another bullet item

Looks good. We should document Module code starting at line 791 of the Module in a new, level-4 subsection 'Proto' at Template:Lang, probably to live under section § Formatting. Mathglot (talk) 20:05, 2 March 2024 (UTC)Reply

But wait—you said in sentence 2, but this produces a double ** which has to be manually fixed, so what was your example that produced a double asterisk? It seems to be the identical code that works just above. Can you reproduce your error case below? Mathglot (talk) 20:14, 2 March 2024 (UTC)Reply

Code for Anatolian languages edit

@Trappist the monk: I need a private-use language tag for Anatolian languages. Antiquistik (talk) 20:32, 6 April 2024 (UTC)Reply

Propose one. You know the rules for making a private-use tag.
Trappist the monk (talk) 21:45, 6 April 2024 (UTC)Reply
@Trappist the monk: Does anat work? Or is it already assigned? Antiquistik (talk) 21:51, 6 April 2024 (UTC)Reply
and the rest of it?
Trappist the monk (talk) 22:01, 6 April 2024 (UTC)Reply
@Trappist the monk: I have no idea. I will need your help for that. Antiquistik (talk) 00:00, 7 April 2024 (UTC)Reply
I'm just the coder. Perhaps you can consult with WP:Languages or WP:Linguistics or some other such wikiproject.
Trappist the monk (talk) 00:07, 7 April 2024 (UTC)Reply
@Trappist the monk: Would ine-x-anatolia work? Antiquistik (talk) 17:59, 15 April 2024 (UTC)Reply
{{lang|ine-x-anatolia|text}}text
Trappist the monk (talk) 18:20, 15 April 2024 (UTC)Reply
@Trappist the monk: Thanks! Antiquistik (talk) 19:00, 15 April 2024 (UTC)Reply

Changes edit

Has something changed with this? I don't know the ins and outs of the module/template but the way it displays at 2022 Comhairle nan Eilean Siar election has changed and I'm not sure what I'd need to alter so it displays correctly. Stevie fae Scotland (talk) 13:35, 11 April 2024 (UTC)Reply

Nothing has changed in the module. Here is the history of that template in 2022 Comhairle nan Eilean Siar election:
  • at this edit, you added the template {{lang-for||Scottish Gaelic|Council of the Western Isles}}
  • at this edit, using AWB, I changed it to {{lang-for|gd||Council of the Western Isles}}
  • at this edit, I changed it to {{lang-for|gd|'''[[Comhairle nan Eilean Siar]]'''|Council of the Western Isles}}
  • at this edit, Editor Pedia9jb6l changed it to {{lang-for|gd|[[Comhairle nan Eilean Siar]]|Council of the Western Isles}}
On 10 April 2024, this edit by Editor PK2 changed {{lang-for}} from a redirect to {{Language with name/for}} to a {{lang-??}} template. That change broke the template on 2022 Comhairle nan Eilean Siar election. The editor did not explain why that change was made. Special:WhatLinksHere/Template:Lang-for indicates that there may be more articles that were broken by this edit.
I have reverted the edit at {{lang-for}}.
Trappist the monk (talk) 15:14, 11 April 2024 (UTC)Reply
Thanks very much for looking into this and for fixing it. Stevie fae Scotland (talk) 09:00, 12 April 2024 (UTC)Reply