Wiktionary talk:Votes/2010-09/Language codes in templates

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

I think the wording needs to be much clearer. I certainly won't vote 'support' for something that's highly ambiguous. FWIW I'd support it if the template recognize lang=Portuguese instead of lang=pt, but it signals for AutoFormat (or another bot) to change it to lang=pt. Per mine and DCDuring's points made on the Beer Parlour. Mglovesfun (talk) 17:16, 22 September 2010 (UTC)

If AutoFormat, ot other bot owner voluntaries for that job, I too would [reword the vote and] support your suggestion. How the wording "When any template has its behavior affected by a parameter that specifies a language, requiring this parameter to be the language code, never the language name.", accompanied by an explanation of the context, is ambiguous? Do you have any suggestion for a similar wording or vote? --Daniel. 22:52, 22 September 2010 (UTC)
I don't understand what the vote means, either. Are we requiring that templates accept language codes (while also allowing them to support language names)? Are we requiring that templates accept only language codes (and that they break in some unspecified way if they receive a language name instead)? Are we requiring that users supply language codes (such that it's a policy violation to type lang=Italian in an entry)? Are we just generally endorsing the use of language codes, without intending any specific policy consequences of that endorsement? —RuakhTALK 23:42, 22 September 2010 (UTC)

Necessity of codes[edit]

Why do we need the editor to use any language codes at all? We can use bots to create templates (eg {{l2c:Spanish}}) to generate codes (eg es). All templates could therefore accept language names. For topical cats, we could have a template like {{topical cat|Birds|lang=English}} to generate the right category (although I think we shouldn't even use the codes in cats either). There would cleanup work with language names (misspellings & alternate names), but much of this could be automated, and we do some of this cleanup already. And the added burden is probably less than making editors learn language codes. --Bequw τ 21:25, 26 September 2010 (UTC)

Word. —RuakhTALK 22:49, 26 September 2010 (UTC)
And incidentally, that sort of approach might make it easier to handle those cases where WMF language codes don't match real language codes, and where we therefore want to use one code in lang= attributes and a different code in interproject links. Template:ln2c:Spanish can just be es, but Template:ln2c:Cantonese can be something like {{#ifeq:{{{1}}}|WMF|zh-yue|yue}} (such that {{ln2c:Cantonese|WMF}} produces zh-yue, but {{ln2c:Cantonese}} or {{ln2c:Cantonese|ISO}} produces yue). It would be mostly transparent to entry-editors, though template-editors would need to understand the issue to know which to use. —RuakhTALK 23:22, 26 September 2010 (UTC)
You might have to dumb it down a bit for people like me (in this case, me). Mglovesfun (talk) 23:25, 26 September 2010 (UTC)
We have a bunch of templates (eg {{fro}}) that give us language name given a code. Lets make another set of templates (at least equal to the number of language code templates we have) that do the reverse. We'd have to prefix them l2c: or ln2c: so they don't get in the way of other templates. That way, if a template needs to use a language code (eg with topical categories) it can take as a parameter from the editor the language name, and do the lookup itself. Ruakh expands nicely on the idea, but a basic template like {{l2c:Spanish}} could literally just have the text "es". That help? --Bequw τ 23:53, 26 September 2010 (UTC)