Module talk:la-nominal
Add topicAppearance
Latest comment: 2 years ago by Esszet in topic Change breaks title
Change breaks title
[edit]Hi all,
I think this change: https://en.wiktionary.org/w/index.php?title=Module%3Ala-nominal&type=revision&diff=66239055&oldid=62391877
breaks the title generation regarding singular / plural only because apparent_decl
is not in scope in that function. As an example, Belgium no longer shows "singular only".
@Esszet: Do you agree this is an error and could provide a fix? Folko23 (talk) 09:10, 24 August 2022 (UTC)
- @Theknightwho: I tried to add
if not apparent_decl
, but then it creates issues with entries like grates. Mind giving us a hand? Esszet (talk) 01:58, 25 August 2022 (UTC)- @Esszet: I don't think you can safely access
apparent_decl
at all at this place in the code: It's a variable assigned during evaluation of the single propses, i.e. it is assigned multiple times in some words, for example when a noun consists of a declined base part and a declined suffix. It's possible that the base word is not irregular while the suffix is irregular or indeclinable. And sinceconstruct_title
is run for the end result only, it would only access the value of the last props. What's the original issue that your change is trying to solve? Folko23 (talk) 08:00, 25 August 2022 (UTC)
- @Esszet: I don't think you can safely access
- In entries like that, “Singular only” is redundant, it already says “Only used in the nominative and accusative singular”. Esszet (talk) 11:53, 25 August 2022 (UTC)
- Tagging @Benwing2, who knows this module much better than I do. Theknightwho (talk) 13:31, 25 August 2022 (UTC)
- @Esszet, Theknightwho, Folko23 @Esszet you cannot access a local variable of one function in another function; this doesn't work at all. Also you cannot say
if not apparent_decl == "indecl"
; this is syntactically wrong, and you should sayif apparent_decl ~= "indecl"
. Please consult [1] to learn more about Lua and programming in general, and [2] for the reference manual for Lua as it's used in WIktionary. I have reverted your code because it simply can't work as-is, and I don't understand what the actual issue is. Benwing2 (talk) 03:13, 27 August 2022 (UTC)- OK, I see your comment above about redundancy. I think it's fine if you reverse the two statements so it says first "singular only" then "only used in the nominative and accusative singular", what do you think? Benwing2 (talk) 03:15, 27 August 2022 (UTC)
- Also, something is wrong with the grātēs entry, because the headword says it's fem pl with genitive grātium but the declension says it's singular-only without a genitive. Which is correct? Benwing2 (talk) 03:17, 27 August 2022 (UTC)
- I'm sorry, i don't know much about coding, and I thought it would be an easy fix. It doesn't need to say "singular only" at all, that's already covered in "only used in..." As for grātēs specifically, I looked through the history, and it is indeed plural only, it was messed up when someone made it indeclinable, a setting that defaults to singular only. Let's use ir instead. Esszet (talk) 03:55, 27 August 2022 (UTC)
- @Esszet, Theknightwho, Folko23 @Esszet you cannot access a local variable of one function in another function; this doesn't work at all. Also you cannot say