Jump to content

User talk:Trappist the monk

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

CS1This user is responsible for those
CS1 error messages (help).
Comments are welcome. If your comments are about my work on a particular article, please make
them at the article's talk page so that everyone who has an interest in the article may participate.

Macedonian Wikipedia DOI numbers issue

[edit]

Dear Trappist the monk, the Macedonian Wikipedia uses the English modules and any change in those may cause the Macedonian version to stop running, right now we have an issue as I can identify with the DOI numerals which crash the function and report errors in the coding. As I'm not a coder and we don't have the technical know how to fix this issue will you be kind to spare some of your precious time to see if there is a solution to this issue. The whole Macedonian community will be grateful. As an example I will point you out to this article on the Macedonian Wikipedia mk:Мајкелсон-Морлиев обид. Thank you for any help, have a great day Инокентиј (talk) 12:10, 5 December 2024 (UTC)[reply]

Your 02:32, 2 December 2024 edit is the cause of the breakage.
This 11:05, 9 August 2024 edit by User:Bjankuloski06 also broke the Module suite.
You should revert mk:Module:Citation/CS1/Identifiers back to the 11:54, 23 January 2023 version by User:Ehrlich91.
To upgrade the cs1|2 module suite, all modules must be updated at the same time. Best practice is to import the entire live version of the English suite to sandboxen at mk.wiki. Tweak those sandboxen as necessary (translations, etc), test the sandboxen to make sure nothing is broken, and only then, update your live cs1|2 module suite from the sandboxen.
When I looked at the article source for mk:Мајкелсон-Морлиев обид I noticed stuff like this:
  • {{Наведено списание|last1=Michelson |first1=Albert A. |last2=Morley |first2=Edward W. |title=On a method of making the wave-length of sodium light the actual and practical standard of length|journal=American Journal of Science |volume=34 |year=1887 |pages=427–430 |doi=10. 2475/ajs. s3-34. 204. 427 |doi-broken-date=2024-12-02 |url=http://www. ajsonline. org/content/s3-34/204/427. full. pdf+html }}
  • {{Наведено списание|last1=Michelson |first1=A. A. |last2=Pease |first2=F. G. |last3=Pearson |first3=F. |title=Results of repetition of the Michelson–Morley experiment|journal=Journal of the Optical Society of America|volume=18|issue=3|year=1929|page=181|bibcode = 1929JOSA. . . 18. . 181M|doi=10. 1364/josa. 18. 000181|doi-broken-date=2024-12-02 }}
Note the extra spaces following the dots in |doi=, |url=, and |bibcode=. Those spaces must not be there. The extraneous spaces were added at this 19:35, 30 October 2015 edit by Bjankuloski06.
Trappist the monk (talk) 15:07, 5 December 2024 (UTC)[reply]

Thank you for your time will enact the change as you have suggested soon. Best Инокентиј (talk) 14:12, 8 December 2024 (UTC)[reply]

Feedback wanted for Module:Wikt-lang/sandbox

[edit]

Hey Trappist, would you mind taking a look at Module:Wikt-lang/sandbox and Module:Lang/sandbox2 (changes; testcases - the difference in /testcases results are because Lang wraps in a title attribute). I've re-wrote Wikt-lang and it now uses Module:Lang to handle all language code, italic, html wrapping logic. I've had to edit Lang in two places to allow it to work. Any feedback welcomed. Gonnym (talk) 11:15, 6 December 2024 (UTC)[reply]

All that I have done is look at your proposed change in Module:Lang/sandbox2 at Lines 489–497. {{lang}}, {{langx}}, {{transliteration}}, and the various {{lang|fn=...}} functions should never have access to the Wiktionary-specific language tags. If we at en.wiki decide to adopt some or all of Wiktionary's private use tags, those tags can (should) be added to Module:Lang/data.
I hacked a (far from perfect) module in my sandbox so that I could see how wikt-lang's language data compared to Lang's data. The code creates four tables that can be viewed in the debug console.
It seems to me that if wikt-lang is going to utilize lang in some form, module:lang should have a separate entry point for wikt-lang; Module:Wikt-lang/data should be loaded there, not in get_ietf_parts(). When fetching language names, wikt-lang must query its own Module:Wikt-lang/data before it attempts to query Module:Lang/data.
Wiktionary has a number of nonstandard language tags (cel-pro, gmw-ecg, zle-ort, etc). None of these are valid IETF language tags:
cel-procel is Celtic languages; pro is an invalid extlang (but is a language tag for unrelated Old Provençal)
gmw-ecggmw is West Germanic languages; ecg is an invalid extlang
zle-ortzle is East Slavic languages; ort is an invalid extlang (but is a language tag for unrelated Adivasi Oriya)
Module:Lang does not support extlangs because there are none currently defined that don't have preferred primary language tags. For the tool tip, wikt-lang should use the name from Wikt-lang/data and strip extlangs from those language tags that have them; module:lang must not create invalid lang= html attributes.
Trappist the monk (talk) 18:39, 6 December 2024 (UTC)[reply]
You should use Module:Wikt-lang/data/sandbox, not the live version (I tried fixing the language tags similar to how you've done the private tags). Regarding the language tags, there are two things here that the language tags do, one is wrap the text, so it doesn't matter what Wiktionary does over there (which is why I converted it to use Lang). The second, is generating a page name link. Only languages which aren't defined or are different from Lang, need to have their information in the /data module.
I'll take a look at your suggestion of adding an entry for Wikt-lang. Gonnym (talk) 02:24, 9 December 2024 (UTC)[reply]
Ok, so I've modified the code a bit. The logic is as follows:
  • Module:Lang handles the HTML tag of the display text, and the English Wikipedia language categorization.
  • Module:Wikt-lang handles the Wiktionary link.
That means that:
  • If a language code exists on both and the language name is the same, nothing needs to be done.
  • If a language code exists on both but the language name is different, then the language name needs to be added to Module:Wikt-lang/data.
  • If a language code does not exist on English Wikipedia, it should be added to Module:Lang/data so proper wrapping and categorization can happen here.
Module:Wikt-lang/comparison has a table with the differences. There are currently only 6 private codes that aren't in Module:Lang/data. Gonnym (talk) 12:26, 9 December 2024 (UTC)[reply]
I haven't looked at the code but I have looked at Module talk:Wikt-lang/testcases. Every test fails and not necessarily in ways expected from a code rewrite.
If a language code exists on both but the language name is different, then the language name needs to be added to Module:Wikt-lang/data. Why? If the editors at Wiktionary prefer Penobscot over Eastern Abnaki, why add Eastern Abnaki to Module:Wikt-lang/data?
Trappist the monk (talk) 14:48, 9 December 2024 (UTC)[reply]
You created wikt_lang() in Module:Lang/sandbox2 at lines 1892–1901. I assume that you mean to call that function from Module:Wikt-lang/sandbox. If so, the function and its exports should be renamed to _wikt_lang(); leading underscore identifies functions that are, or can be, called from other modules. In the comment at line 1967 (if retained) should read -- entry point for {{Wikt-lang}}; template name is hyphenated.
Trappist the monk (talk) 15:29, 9 December 2024 (UTC)[reply]
If a language code exists on both but the language name is different, then the language name needs to be added to Module:Wikt-lang/data. Why? If the editors at Wiktionary prefer Penobscot over Eastern Abnaki, why add Eastern Abnaki to Module:Wikt-lang/data?
The name added to Module:Wikt-lang/data/sandbox isn't Eastern Abnaki, it's Penobscot (the name used at Wiktionary) (as can be seen in the code). Gonnym (talk) 15:56, 9 December 2024 (UTC)[reply]
Because Module:Wikt-lang/data, and Module:Wikt-lang/data/sandbox, already have Penobscot, I assumed that you meant to add Eastern Abnaki. If that is not what you meant, how does Module:Wikt-lang/sandbox know that a wikitionary language name for some particular code is different from Module:Lang's language name for the same code? Surely there isn't yet another ~/data module that holds wikitionary-preferred language names?
Trappist the monk (talk) 16:36, 9 December 2024 (UTC)[reply]
It doesn't know and doesn't need to know. Line 81 is the place where the Wiktionary language name is set. I get the language name back from Lang and unless there is a language override, it uses it. Gonnym (talk) 17:30, 9 December 2024 (UTC)[reply]
We must not be communicating. You wrote: If a language code exists on both but the language name is different, then the language name needs to be added to Module:Wikt-lang/data. I understand that to mean:
  • :IF: Module:Lang/data has language tag aaq :AND:
  • :IF: Module:Wikt-lang/data has language tag aaq :AND:
  • :IF: Module:Lang/data language for aaq (Eastern Abnaki) :NOT_EQ: Module:Wikt-lang/data language-name for aaq (Penobscot) :THEN:
  • :DO: add a language name to Module:Wikt-lang/data :END:
That makes no sense to me. Both ~/data modules have the language tag but each tag refers to a different name, so why do we need to add a language name to Module:Wikt-lang/data (which already has a name)?
Trappist the monk (talk) 23:48, 9 December 2024 (UTC)[reply]
Your third point is incorrect. If the language code exists on both but the language name is different (at Wiktionary) and not currently set, then it needs to be added to the module. Gonnym (talk) 09:44, 10 December 2024 (UTC)[reply]