Module talk:headword

Definition from Wiktionary, the free dictionary
Jump to: navigation, search

Edit request[edit]

[1] (it is tested) --Z 14:22, 26 April 2013 (UTC)

Not done until it is discussed more widely and the issues with the current template have been worked out. This edit affects thousands of pages, and I currently have no guarantee that it will work. "it is tested" is not good enough. —CodeCat 14:28, 26 April 2013 (UTC)
But why did you implemented your own change which, as you said, has issues and affected many pages without any disccussion? Btw, I intentionally created it as a subpage of the module so that other people can also work on it. --Z 14:40, 26 April 2013 (UTC)
The difference is that I am working to fix all of those issues right at this moment. And what benefit does allowing many people to work on such a critical template have? The fact that you continue to make changes to Module:links makes me very hesitant to use that module. I would rather use something that is stable, mature, well-understood, and not subject to many revisions. That is one of the reasons why I don't feel comfortable making your changes, they change too much and I don't have any guarantees that they will not break something badly. With code that I write myself I do have that guarantee to a significant degree, because I do understand the code that I write. The fact that even my own code still causes problems should be enough of a reason to reject someone else's code that I don't know anything about. —CodeCat 14:50, 26 April 2013 (UTC)
Ok, I see. Except this part: "I would rather use something that is stable, mature, well-understood, and not subject to many revisions. ... I don't have any guarantees that they will not break something badly", Module:links is tested and is widely used. --Z 15:16, 26 April 2013 (UTC)

Italicized Tamil when it shouldn't be[edit]

E.g. on அக்கினி. Also when in {{l}}. --Ivan Štambuk (talk) 02:19, 8 August 2013 (UTC)

I don't see italics on that page anywhere...? —CodeCat 11:01, 8 August 2013 (UTC)
In the headword line, I've tried in three different browsers and in shows in italics. --Ivan Štambuk (talk) 18:28, 8 August 2013 (UTC)
The headword line displays in regular style for me. Maybe you need to refresh your CSS? If you have Firefox, can you go to the page and press ctrl+shift+I to open the document inspector. Then click on the headword, and see what styles it assigns to it in the bottom right. —CodeCat 20:11, 8 August 2013 (UTC)
Italic for me as well. --Vahag (talk) 20:51, 8 August 2013 (UTC)
Normal for me. --Z 21:07, 8 August 2013 (UTC)
I'm not sure, but it could be a Windows-only problem. --Ivan Štambuk (talk) 06:13, 9 August 2013 (UTC)

Overriding manual translit[edit]

Overriding manual transliteration does not work for this module. --Vahag (talk) 17:02, 30 August 2013 (UTC)

It is broken again. --Vahag (talk) 12:41, 13 January 2014 (UTC)
Where is it broken? —CodeCat 14:44, 13 January 2014 (UTC)
I noticed override isn't working here. {{t}} and {{l}} are fine. --Vahag (talk) 15:00, 13 January 2014 (UTC)
I'm not sure what's wrong with the entry. Is the transliteration not correct? —CodeCat 15:06, 13 January 2014 (UTC)
The manual transliteration is not correct. It uses a deprecated scheme. There are thousands such entries, found in Category:Terms with manual transliterations different from the automated ones/hy. Overriding the old manual transliteration is necessary here. Until recently {{head}} used to do that and put the entry into the category I mentioned. But now it does neither. --Vahag (talk) 15:18, 13 January 2014 (UTC)
I don't think it was done by a recent change. I'm looking through older revisions of the module but I don't see any code that could override it. I don't think it's actually broken, it was just never done in the first place. —CodeCat 16:23, 13 January 2014 (UTC)
Hmmm, now that I think about it, maybe it was never implemented. {{hy-noun}} “overrides” manual transliteration not because it's a feature of {{head}}, but because I used to supply transliteration as its first parameter and {{head}} requires tr= for transliteration, so my wrong transliterations are effectively ignored. --Vahag (talk) 17:19, 13 January 2014 (UTC)
If we want this overriding to work, we really need to put it somewhere that all templates and modules can/will use it. But it's kind of kludgey right now, there's a list of languages in the module itself... not really the nicest way to do it. I do have some ideas for now to improve it, but it would need to wait a bit until some current changes have been fully done. We're in the middle of a reorganisation with Module:languages right now. —CodeCat 17:23, 13 January 2014 (UTC)
The current list of languages with override_translit is here: Module:links. --Anatoli (обсудить/вклад) 21:57, 13 January 2014 (UTC)
I think once the changes have settled down a bit, we can look at how to incorporate transliterations into Module:languages more directly. Then we wouldn't need the "transliterate" function in Module:script utilities anymore. —CodeCat 22:42, 13 January 2014 (UTC)

Variants of an inflection[edit]

Is there any support for variants of one inflection? I.e. (neuter variant1/variant2). --Njardarlogar (talk) 13:16, 1 December 2013 (UTC)

You can use "or", like {{head}} allows. —CodeCat 14:32, 1 December 2013 (UTC)
1 extra character versus 4. If there are e.g. 4 inflections with a variant, that's 16 extra characters compared to 4. Not ideal. --Njardarlogar (talk) 15:03, 1 December 2013 (UTC)
Then show four inflections with variants in a declension table below. The headword line isn't made of rubber. --Vahag (talk) 15:08, 1 December 2013 (UTC)
Which is why I want to limit the number of extra characters: so that the information will fit. Tables are more complicated to make and maintain; and they are unnecessary for languages with limited inflection. --Njardarlogar (talk) 15:39, 1 December 2013 (UTC)
The syntax {'neuter', '[[variant1]]/[[variant2]]'} seems to work, so that is an alternative. --Njardarlogar (talk) 15:42, 1 December 2013 (UTC)
Just because it works doesn't mean it's desirable to do it... —CodeCat 16:23, 1 December 2013 (UTC)
Is it likely to become invalid syntax in the future? If not, I don't see the big issue. Nope, it's not desirable. --Njardarlogar (talk) 16:41, 1 December 2013 (UTC)
It's not likely to become invalid, but it does obscure the semantics (in template/module terms). That is, the module itself isn't able to "see" that there are really two words there, unless it decides to piece apart the whole thing (splitting the [[ ]] and / ). For the short term it's not a huge problem, but it can give problems in the long term if we ever want to change things. For example, we could decide, later on, that we want to show something else instead of "or". If you use "or" now, then that's easy to do, but not when you put it all into one parameter. Being more explicit about what you mean and not so explicit about what you want to see is good practice in templates/modules, as well as in web pages generally. —CodeCat 16:55, 1 December 2013 (UTC)
What about adding support for arrays? Are slashes frowned upon? I noted that the documentation already talks about using links in the argument (the voorbeelden example), so introducing two of them doesn't seem that terribly revolutionary; even if not the same. --Njardarlogar (talk) 13:10, 7 December 2013 (UTC)
I've thought of using arrays/tables but they're not supported in templates, so there would be no gain in that respect anyway. You'd still need to use "or" to signal to {{head}} that you want both terms to be in the same array. —CodeCat 14:25, 7 December 2013 (UTC)


How do you set the sorting key in templates? E.g {{vi-noun}} or {{cmn-noun}}, so that entries don't get into Category:Sort key tracking/needed, set in Module:utilities? --Anatoli (обсудить/вклад) 04:09, 3 April 2014 (UTC)

@Atitarev That category is added if the sort key was specified, but it didn't match the automatically generated one. I don't know if we still need it though... the main purpose was so that we could find out which languages still needed auto-generation rules, and which entries had sort= parameters that needed to be removed. —CodeCat 12:50, 8 April 2014 (UTC)
{{cmn-noun}} should sort Mandarin nouns by "pint" (hopefully), as it says on the first line, {{vi-noun}} by the term itself, if it's in Roman script or the Roman spelling of the Han character term. How can the automatically generated sort key be changed, is any change required to the templates? --Anatoli (обсудить/вклад) 13:32, 8 April 2014 (UTC)
{{head}} has a sort= parameter, so if the templates use {{head}}, then they can just use that. —CodeCat 14:01, 8 April 2014 (UTC)

linking to same page when it's an inflected form[edit]

At [[bonefish]], {{en-noun|bonefish|bonefishes}} displays

''plural'' <span class="form-of lang-en plural-form-of"><b class="Latn" lang="en"><strong class="selflink">bonefish</strong></b></span>

rather than the expected

''plural'' <span class="form-of lang-en plural-form-of"><b class="Latn" lang="en">bonefish</b></span>

as it used to. I guess line 120 here —

part = m_links.full_link(not parts.nolink and part.term or nil, part.alt or (parts.nolink and part.term or nil), lang,, "bold",, {genders = part.genders, tr = "-"}, FULLPAGENAME)

— should be modified somehow to fix this. Or maybe something else should.​—msh210 (talk) 05:44, 8 April 2014 (UTC)

The "selflink" part is added by the software itself. It's done whenever someone links to the current page, like here: Module talk:headword. —CodeCat 12:48, 8 April 2014 (UTC)
I was aware of that. But that's only if {{en-noun}} generates a link, which it shouldn't and didn't use to.​—msh210 (talk) 17:39, 8 April 2014 (UTC)
I'm not sure if I understand. I don't see a link anywhere in the code you showed above. In fact the wiki software is explicitly preventing a link to the same page from being created. —CodeCat 17:41, 8 April 2014 (UTC)
The <strong class="selflink">bonefish</strong> is the effect of the template's presenting the plural form as a wikilink: the software realizes the link would be to the same page and makes it strong (boldfaced) instead. That's what I meant by "{{en-noun}} generates a link": it generates a link for the plural form, which, in this case because the plural form matches the pagename, it shouldn't and the software converts to boldface. (Have some Madeira, m'dear.)​—msh210 (talk) 03:56, 9 April 2014 (UTC)
{{en-noun}} always used to do this. --WikiTiki89 18:20, 8 April 2014 (UTC)
My memory misserves me! Looking at [2] at least, it seems you're right. Thanks for the correction. So I'm wrong that the template's doing different form what it used to: but I think it should. I suppose that's a discussion for the BP, though, not here.​—msh210 (talk) 03:56, 9 April 2014 (UTC)

Continued discussion at [[Wiktionary:Beer parlour/2014/June#boldfaced forms of invariant lemmata in headword lines]].​—msh210 (talk) 17:39, 11 June 2014 (UTC)

I am not sure if the discussion in the beer parlour reached any conclusion. I tried a simple fix to avoid a bolded selflink. I think it works fine. --Vriullop (talk) 14:18, 29 July 2014 (UTC)
The discussion did reach a conclusion. The solution is to modify the CSS, not the module. The module is fine. —CodeCat 14:26, 29 July 2014 (UTC)
Sorry, I was confused because it has not been done till right now. Thanks. --Vriullop (talk) 15:27, 29 July 2014 (UTC)
@Vriullop Is it fixed now? —CodeCat 15:52, 29 July 2014 (UTC)
Yes. The two words of bonefish are identical now with Firefox. Before, the second one was extra bolded. --Vriullop (talk) 18:31, 29 July 2014 (UTC)

"transliteration needed" for Serbo-Croatian Cyrillic headwords[edit]

This obnoxious message now appears in the headwords, but it shouldn't (e.g. on имати, оданост). --Ivan Štambuk (talk) 15:48, 6 October 2014 (UTC)

See the GP discussion. —CodeCat 15:50, 6 October 2014 (UTC)


Would it be natural for this module to filter out duplicates? Right now, it happily displays

  • fruppic tense WADIWU or WADIWU

rather than

  • fruppic tense WADIWU.

--Njardarlogar (talk) 10:50, 18 December 2014 (UTC)


Please add

["th"] = true,

to notranslit to leave transliteration blank in Thai headword. --Octahedron80 (talk) 06:10, 24 February 2016 (UTC)

I've added but it's still attempting to autotransliterate. See the current strange behaviour at สร้าง. The pronunciation section shows the correct transliteration - "sâang", the headword shows "srâang" (it's wrong). --Anatoli T. (обсудить/вклад) 06:30, 24 February 2016 (UTC)
Problem gone. If you still see on some page, purge it. :) --Octahedron80 (talk) 06:46, 24 February 2016 (UTC)


Can you create this module in tg wiktionary. And another ru modules. Please :-). And thanks заранее ToJack (talk) 13:52, 3 February 2017 (UTC)

Edit request[edit]

@Erutuon When the edit request for Module:links has been done, please remove lines 287-289, and replace line 281 with:

                                tr = part.translit or (not (parts.enable_auto_translit or data.inflections.enable_auto_translit) and "-" or nil),
                                accel = parts.accel or partaccel,

CodeCat 12:50, 20 August 2017 (UTC)

Yes check.svg DoneEru·tuon 18:10, 20 August 2017 (UTC)