Template talk:Translation request

(Redirected from Template talk:Translation request/sandbox)
Latest comment: 6 months ago by Mathglot in topic Italics and non-Latin scripts

Request NOT to delete

edit

The suggestion of the speedy deletion of Template:Needtrans is bewildering. The rationale is that it's a duplicate of Template:Translation and that the template is note being used. The nominator is very much mistaken on both counts. The other template in question does not even resemble Template:Needtrans and besides, the template is used extensively on Pages needing translation into English. Deleting this template would seriously disrupt the translation being done there.--Esprit15d • talkcontribs 13:18, 9 April 2008 (UTC)Reply

The Needtrans template is mentioned but not used as a template on Pages needing translation into English. There are no article talk pages that link to link to Template:Needtrans. A google search for the template language "The language of this article is." generates no hits. None of these show any actual use of this template. It is not clear why deleting this template would disrupt the translation being done there since it does not seem that anyone has actually used this template. GregManninLB (talk) 13:45, 9 April 2008 (UTC)Reply
Esprit15d - I removed the speedy delete template and added template documentation to clarify things. Keep up the good work. GregManninLB (talk) 14:38, 9 April 2008 (UTC)Reply

Add optional parameter for article or section

edit

Since {{Not English}} allows an optional parameter to specify whether the article or a section needs to be translated, could {{Needtrans}} have a comparable option, so that when users add {{Needtrans}} to Wikipedia:Pages needing translation into English it would be obvious whether an entire article or only a section needs to be translated? GoingBatty (talk) 04:21, 3 November 2010 (UTC)Reply

{{Needtransliteration}}

edit

We often have cases of text in a non-Latin script without accompanying transliteration, to make the text comprehensible and pronounceable.
Do we have such a template right now?
Varlaam (talk) 01:42, 12 December 2012 (UTC)Reply

Wrong wording for articles needing translation

edit

When this template is being used for articles needing translation, the entries now read "The initial language was ..." rather than the appropriate "The language of the article is ..." that used to apepar there. Largoplazo (talk) 01:20, 2 February 2021 (UTC)Reply

@Bradv: is this something you could help with?--Jac16888 Talk 16:32, 3 February 2021 (UTC)Reply
Follow-up: This was fixed in August 2023. Largoplazo (talk) 12:14, 9 September 2023 (UTC)Reply

Upgrade for robust handling of language param

edit

The template is now upgraded to handle erroneous user input in param |language=, where the user mistakenly enters an ISO lang code like es instead of a name like Spanish. The template now translates the code into the name. (I checked for short language names of 2-3 letters at List of language names and came up with four, but none are ISO codes for languages and we don't have Wikipedias for them, so fortuitous matches are not a problem, nor are they likely to be in the future.) Note that we don't bother checking str len for 2- or 3-letter codes before attempting the translation to a name, because it isn't necessary; the tradeoff is clearer wikicode vs undetectably longer execution while the #language module searches the code table in vain for a match for 'Spanish'.

About the documentation: even though |language= is explained in the /doc, the mixup users may have occasionally between ISO code vs language name is understandable, and to avoid causing even greater confusion, imho this robustness capacity is best left out of the /doc as a hidden feature. The doc says to use fully spelled out language name, and that's what they should do. (Had it been designed that way in the beginning, we'd need one less parameter, but for backwards compatibility, I don't think we should try to merge the params now.) Mathglot (talk) 21:42, 16 February 2021 (UTC)Reply

Incomplete merger from Template:Duflu

edit

The merge of this template from Template:Duflu in Special:Diff/991449905 appears to be incomplete. This template doesn't support the language of {{duflu}} which was "The language of the article is XXX". Further details can be seen at https://github.com/wikimedia-gadgets/twinkle/issues/1365. Cc Bradv. – SD0001 (talk) 12:07, 19 April 2021 (UTC)Reply

Please see WT:PNT#Proposal to undo merger of Duflu and Needtrans. Thanks, Mathglot (talk) 19:47, 25 July 2021 (UTC)Reply
The other way around--that was the language of Needtrans, and it needs to be restored to that. Duflu needs to be restored to its own status as a full template with the "was" language. I've just set the wheels in motion to have Twinkle re-establish the distinction between them. Largoplazo (talk) 20:47, 4 March 2023 (UTC)Reply
Follow-up: This was fixed in August 2023. Largoplazo (talk) 12:15, 9 September 2023 (UTC)Reply

Subst protection

edit

I added subst protection to my recent updates to the template, only because previous versions had it, but I don't actually see why we are either insisting or even recommending that it be subst'ed. It just complicates the code, without any improvement that I can see. Although substing was added once before and then removed again, subst'ing was readded most recently in this edit by Largoplazo of 17:05, 10 September 2023.

Currently, transcluding it unsubsted, we have this:

{{Needtrans|pg=Nuclear submarine|language=French}} generates:

The original article, Sous-marin nucléaire, is in French.

So why do we need subst protection?

If the template is being transcluded by some other template that itself is, or might be substed, then that would be a good reason, but afaict, it is not being transcluded by any template. I recommend we just strip out all the substing code to simplify it, and add guidance to the doc stating that it should not be substed. Thoughts? Adding Novem Linguae. (If you play with it with substed to test it, please note that it currently generates some ugly code (example) because a transcluded template, {{sitelink}}, is itself not subst-protected. This doesn't affect the argument here, or perhaps only to strengthen it, because if protection is not added to that template, the ugly code generated here goes away if you simply avoid substing it, with no loss in functionality.) Mathglot (talk) 04:08, 21 February 2024 (UTC)Reply

My role in this is mainly as a software engineer for Twinkle. Feel free to ping me if there's a consensus to change how Twinkle places this template. Will be happy to follow whatever the group decides. –Novem Linguae (talk) 04:30, 21 February 2024 (UTC)Reply
I have no idea. I don't specifically remember whether it was merely part of my attempt to replicate how it had been before the changes were made that broke the distinction between needs-translation and rough-translation or whether I was following a similar template as a model. Largoplazo (talk) 12:17, 21 February 2024 (UTC)Reply
Thanks, both, for the input on this. I'll wait a bit or maybe ping some folks (who?) and if there are no objections, I'll remove the subst-protection code. Mathglot (talk) 18:46, 21 February 2024 (UTC)Reply

Changed my mind on this. It probably doesn't matter that much either way, but may be better substed for those cases where another editor wants to reply to the original, as it makes it easier for other editors to edit the code afterwards, while preserving the initial post of the creating editor. I think it could be optional, left to editor choice, which means the code needs subst protection, so we don't need to change anything, because it already has it.. Mathglot (talk) 05:13, 8 March 2024 (UTC)Reply

Minor issue

edit

The template emits a newline protected between html comment delimiters; his is mostly to create an easily comprehensible code indentation paradigm for the template wikicode editor. The downside is that this is also in the substed version, where it isn't needed. The downside is a very tiny downside, because it has no effect on the rendered page. The perfectionist in me would like to see that Html comment removed, but not at the cost of making the template code more difficult to read. So, I'm okay with it the way it is. Mathglot (talk) 05:09, 8 March 2024 (UTC)Reply

Italics and non-Latin scripts

edit

Currently, the name of the article in the original language is italicized. This works fine for languages using Latin scripts, but I think we have a guideline somewhere that non-Latin scripts should not be italicized. Maybe there's already a template that yields a yes-no on that question, i.e., takes a language name, responds with whether it should be italicized. Or maybe can just wrap it in {{lang}} if it already knows how to do that, instead of double apostrophe italic markup. Mathglot (talk) 10:57, 5 May 2024 (UTC)Reply