Template talk:Dual fluency request

Latest comment: 6 months ago by Mathglot in topic Suggested enhancement for param language

Template: Duflu

edit

08:10, 26 July 2006 Kusma (talk · contribs · blocks · protections · deletions · page moves · rights · RfA) (rm autosig: potentially confusing/annoying, not necessary since cut and pasted anyway) The fact is that the template needs to be substituted, and the user needs to sign it with four tildas (~~~~). So I thought that, if this is the case, an autosig function in the template (which would not require the user to add four tildas) would be just fine, so why should be removed, and why would it be confusing? I don't understand! Myrtone () 08:26, 3 August 2006 (UTC)Reply

First, templates typically don't have autosigs, so having some with autosig will be odd. Second, The template is usually cut and pasted from {{cleanup-translation}}, so the tildes don't have to be typed. I find it nice that I see where the signature will go and know that if I add comments after the template, they won't go after my signature. Kusma (討論) 08:45, 3 August 2006 (UTC)Reply
edit

Hello, I'd like to request addition of a new, optional parameter to provide a link to the original article name in the original, foreign language in the generated content.

Currently, invocation of Duflu looks like this:

{{subst:Duflu |pg=Nuclear submarine |Language=French |Comments=yadda. }}~~~~

which generates a section like this:

====[[Nuclear submarine]]====
The initial language of this article was French. yadda. /sig/


The new invocation of Duflu including new param orig= might then look like this:

{{subst:Duflu |pg=Nuclear submarine |Language=French |orig=Sous-marin nucléaire |Comments=yadda. }}~~~~


I see two possible presentations of the new invocation, and I'm not sure which I like better. They are as follows:

Link underlies the language name

====[[Nuclear submarine]]====
The initial language of this article was [[:fr:Sous-marin nucléaire|French]]. yadda. /sig/


Link underlies the foreign article name

====[[Nuclear submarine]]====
The original French article is [[:fr:Sous-marin nucléaire]]. yadda. /sig/

I realize there's an issue with obtaining the lang-code 'fr', but it doesn't seem insurmountable. If a lookup is too unwieldy, I think people who are desirous of and motivated to use the new version would hardly object to an additional parameter to provide the lang code, which would in that case be required if a value for the optional param was supplied. Mathglot (talk) 08:33, 18 February 2017 (UTC)Reply

Or even, just require the new param to provide it, i.e., orig=:fr:Sous-marin nucléaire and then we don't need a lookup, or a second param. Mathglot (talk) 22:10, 18 February 2017 (UTC)Reply
Listed the request at WP:RT, to hopefully attract some eyeballs. Mathglot (talk) 22:34, 18 February 2017 (UTC)Reply
  Done with the second wording you suggested. It does require the language tag before the article name, as you said. Let me know if that works or if you want any more changes. --104.32.161.189 (talk) 06:01, 23 February 2017 (UTC)Reply
Thanks, User:104.32.161.189, it's looking good. I've put up a little demo at Wikipedia talk:PNT and invited users to comment here. Mathglot (talk) 10:29, 25 February 2017 (UTC)Reply
Just FYI, I included the first colon of the interwiki link in the template. That's why on your examples it is showing that first colon in the links (fr:Sous-marin nucléaire instead of fr:Sous-marin nucléaire). You can just leave off that first colon (write it as orig=fr:Sous-marin nucléaire instead of orig=:fr:Sous-marin nucléaire). It's not a huge deal, as the link works either way, but I thought you should know. --104.32.161.189 (talk) 20:09, 26 February 2017 (UTC) — Preceding unsigned comment added by 2605:E000:4E04:5800:10FF:C21:197E:B56A (talk) Reply
That's a nice tweak, thanks. Mathglot (talk) 10:59, 27 February 2017 (UTC)Reply
edit

A change is coming soon, that will automate creation of the link to the foreign article, as is already the case with {{Needtrans}}. The upshot of this is that param |orig=, currently an optional param, will become unnecessary, because its value will be calculated automatically by the template using information available at WikiData and emitted in the output even if param |orig= is not provided. There is an edge case where a foreign article exists, but WikiData doesn't yet have a link to it for some reason, and in those cases param |orig= might still be useful. So maybe we should keep the param around as an override for those cases, although a better solution is simply to go to WikiData and add the link. Feedback on whether we should remove or keep param |orig= would be appreciated. Mathglot (talk) 22:12, 7 March 2024 (UTC)Reply

  Done. Use of |orig= is now optional, and discouraged. Use it only when you want to override the foreign article linked via Wikidata, or to provide a foreign link if the English article is not yet connected to Wikidata. Mathglot (talk) 03:29, 23 March 2024 (UTC)Reply
Use of |orig= is now optional, but should be dropped, and removed from the doc. Mathglot (talk) 00:00, 20 April 2024 (UTC)Reply

Suggested enhancement for param language

edit

The documentation specifies that the full language name (Spanish, French, etc.) should be used for param |language= but it's clear from a glance at WP:PNT that some users supply the ISO-639 2-letter code ('es', 'fr', etc.) instead. The template should be enhanced to accept the ISO-639 code as well (but without documenting it). The {{Translation request}} template already does this. Mathglot (talk) 03:33, 23 March 2024 (UTC)Reply

This is an ongoing problem. Here are a few actual recent examples at WP:PNT which suffer from this issue resulting from the failure to interpret a lang-code instead of a language name:
Making the code more robust would have avoided all of these. Mathglot (talk) 00:06, 12 May 2024 (UTC)Reply
At least one of those diffs is a Twinkle diff. If you're interested, we could make a ticket for Twinkle to show a warning if the language code is only two characters long. Or is it easier to just fix the template? –Novem Linguae (talk) 08:53, 12 May 2024 (UTC)Reply
Thanks; I imagined it might be, but wasn't sure. While not really a 'fix', in that it is operating to spec currently, I think the template should be upgraded to handle this, so Twinkle shouldn't have to. However, I'm about to be away with spotty wi-fi for a few weeks, so it may have to wait a bit, unless someone else wishes to tackle it. It's a pretty easy upgrade, just stealing from the other template. (As a side issue, it would be nice if the Html comment with the template name in it identified it as a Twinkle invocation, but that's a separate issue.) Mathglot (talk) 08:59, 12 May 2024 (UTC)Reply
it would be nice if the Html comment with the template name in it identified it as a Twinkle invocation. I think I added the HTML comment with the template name because that's standard practice for subst-d templates. I don't think we usually add HTML comments about being placed by Twinkle though. The easiest way to tell if something came from Twinkle is to look for "Tags: Twinkle" in the diff or in Special:History. Enjoy your travels. –Novem Linguae (talk) 09:03, 12 May 2024 (UTC)Reply
Ah, right; thanks! Mathglot (talk) 09:43, 12 May 2024 (UTC)Reply