Template talk:En

Latest comment: 1 year ago by Anomalocaris in topic Won't wrap multiple blocks

Untitled

edit

Apart from seeming thoroughly pointless, on the English Wikipedia, every use of it I have found is mistaken: people generally assume that it redirects to something like {{en icon}}, [ (in English) ]. As (eg) {{it}} and {{fr}} do just that [ (in Italian), (in French) ], I would suggest that this does the same. —Ian Spackman 22:36, 8 December 2006 (UTC)Reply

I'm currently using WP:AWB to replace instances of {{fr}} with calls to {{fr icon}}, specifically so that {{fr}} can act the same as {{de}} does (providing a link to the French Wikipedia, for fr). I'm doing the same to several other similar templates at the same time. — OwenBlacker (Talk) 20:33, 21 October 2007 (UTC)Reply

Edit request on 18 August 2013

edit

Add

{{subst:Tfm|En icon|heading=Ar and En|type=inline}}

Lfdder (talk) 00:22, 18 August 2013 (UTC)Reply

  Done --Redrose64 (talk) 07:50, 18 August 2013 (UTC)Reply

Edit request on 20 February 2014

edit

Replace

{{being deleted}}

with a less confusing notice, such as

{{tmbox|type=move|text=This template is only for use in File namespace, when moving files between here and Commons.}}

I don't know which type would be more appropriate: move, delete, notice, style or content.

This template was discussed at Wikipedia:Templates for discussion/Log/2013 August 18#Template:En and closed as delete. This was then disputed. The resolution was to keep the template for use only in File space. There was no real consensus on what the template should contain, so it was left as is, with the deletion notice. This sparked a question at Wikipedia talk:Templates for discussion#TFM in limbo, prompting this edit request to avoid future confusion. —PC-XT+ 11:39, 20 February 2014 (UTC)Reply

  Not done: please make your requested changes to the template's sandbox first; see WP:TESTCASES. Once this is done and looks good, I'll request the protection level on this template lowered to   Template editor so that I can process this request. — {{U|Technical 13}} (tec) 13:38, 20 February 2014 (UTC)Reply
There's not even any testcases here. — Lfdder (talk) 16:44, 20 February 2014 (UTC)Reply

I've added the new notice to the doc subpage. {{being deleted}} can simply be removed from the template. — Lfdder (talk) 16:44, 20 February 2014 (UTC)Reply

  Done I've replaced {{Being deleted}} with {{Tmbox|type=move|text=This template is only for use in File namespace when moving files between here and Commons.}}{{U|Technical 13}} (tec) 17:42, 20 February 2014 (UTC)Reply
So now we have two of the same. — Lfdder (talk) 18:21, 20 February 2014 (UTC)Reply
@Technical 13: please address this. — Lfdder (talk) 21:30, 20 February 2014 (UTC)Reply

Followup edit request

edit
Changes are in the sandbox

By the same reasoning as the above edits, I have removed/replaced all transclusions of this template in many namespaces. The sandbox should remove non-commons usage and add namespace detection. —PC-XT+ 05:48, 23 February 2014 (UTC)Reply

PC-XT, one of us is confused. I've synced the sandbox with the live template (which should alway be done before you start hacking in on the code) and am wondering if you would be so kind as to make your changes to that. I think you are missing the fact that the code that it appeared you wanted removed isn't in the template anymore. Lfdder, perhaps you could chime in here as well and we can get this template properly situated to everyone's needs. Thanks. — {{U|Technical 13}} (tec) 14:22, 23 February 2014 (UTC)Reply
Getting the notice removed/replaced was a stepping stone. It said that this tpl's getting deleted, which is/was no longer true. This tpl's only meant for use in descriptions of files copied over from Commons. This latest change is for getting rid of {{en icon}} and displaying an 'error' that this template should only ever be used in the File namespace in all other instances. There is (as far as I can tell) consensus for these changes (see PC-XT's explanation and the links at the top of this thread). — Lfdder (talk) 14:37, 23 February 2014 (UTC)Reply
Yes, the first edit was simply to remove the notice, not handle the File namespace. I pasted the template into the sandbox, then edited it. Are you saying I should have substituted it in the first edit, before making changes? (I used sandbox diff to compare, and didn't think to make an extra first edit.) The main links are: TfD, File namespace discussion and template followup discussion including this sandbox. Sorry for the confusion. —PC-XT+ 21:15, 23 February 2014 (UTC)Reply
Also note that the other two templates in that last discussion, ({{ar}} and {{de}},) were deleted and WP:SALTed. This one was only spared for use in File namespace because of its relationship with Commons, which has a similar template. We felt an error was in order, and this is more informative than the red template name. (The commons version has a different error handling method, using categories, but so far nobody has suggested that such is needed, here, though it could easily be added.) Suggested testcases: try it on some Files (preview) to see no change between sandbox and current version, then try it anywhere else for the error message from the sandbox. —PC-XT+ 21:43, 23 February 2014 (UTC)Reply

I understand if template editors would like to have an RfC or something, to better define the sandbox before making the edit. It could consider such questions as how closely we want to support the commons template, what we want the error message to be in other namespaces (possibly allowing the text to be visible, for instance), whether we should have a second message for empty content instead of simply allowing the display of {{{1}}}, or possibly other matters that may rise. Or, would it be better to make the requests in smaller stages, so template editors can easily see what is changing? (This has 2 changes in it. We could separate them into two edit requests, if it would simplify things...) —PC-XT+ 11:33, 26 February 2014 (UTC)Reply

I've changed the tpl in the sandbox to use Module:Namespace detect and set up some testcases. @Technical 13: what do you think? — Lfdder (talk) 12:12, 26 February 2014 (UTC)Reply
  Done{{U|Technical 13}} (tec) 15:53, 26 February 2014 (UTC)Reply
Thanks. You need to purge the tpl for the doc changes to take effect. — Lfdder (talk) 16:05, 26 February 2014 (UTC)Reply
Never mind, it seems us peasants can also purge. — Lfdder (talk) 19:19, 26 February 2014 (UTC)Reply
Any user can WP:PURGE a page. There's been a "[purge]" link at the top of template doc boxes since 18 March 2009 - longer than I've been around. --Redrose64 (talk) 19:51, 26 February 2014 (UTC)Reply
I can't purge fully-protected templates. — Lfdder (talk) 19:55, 26 February 2014 (UTC)Reply
Yes you can; Redrose64a (talk · contribs) has just tried it, and if they can do it, so can any user who is not blocked. Please note that a WP:PURGE is not the same as editing a page and saving it - that's a WP:NULLEDIT. --Redrose64 (talk) 20:09, 26 February 2014 (UTC)Reply
Right then, whatever it is, I can't apply doc changes to fully-protected templates. — Lfdder (talk) 20:11, 26 February 2014 (UTC)Reply
I really don't see why not. The prot level of a template is not inherited by its doc page; and if IP editors (and Redrose64a) can go to a full-prot template, click the "[edit]" link at the top of the green documentation box, edit the doc page, save it, return to the template, click the "[purge]" link at the top of the green documentation box and see an update, there's no reason why you should not be able to do the same. The only difference between the purge action for IPs and for logged-in users is that when an IP clicks the "[purge]" link at the top of the doc page, the purge isn't actioned immediately - instead they get an extra page which reads:
Clear the cache of this page?
Yes
Purging a page clears the cache and forces the most current revision to appear.
But once that "Yes" button is clicked, there is no difference from any registered user. --Redrose64 (talk) 21:10, 26 February 2014 (UTC)Reply
It seems I can apply some changes, but, for example, I've subst'ed Template:Arabicnav in the doc of Template:Lang-ar, but it's still transcluded. — Lfdder (talk) 21:57, 26 February 2014 (UTC)Reply
It's possible that your computer is showing a locally-cached copy. Try a WP:BYPASS; in Firefox, for example, this is Ctrl+F5 --Redrose64 (talk) 23:21, 26 February 2014 (UTC)Reply

I did try that earlier; no dice. Anyway, it's fixed itself now. Thanks for looking into it. — Lfdder (talk) 00:07, 27 February 2014 (UTC)Reply

Import markup from Commons

edit

Please apply my sandbox edit. It imports Commons’ markup, which provides consistent layout with the Commons version, and (more importantly) helps CommonsMetadata to extract the description itself, so the “English:” text doesn’t appear in the extracted metadata. Thanks in advance, —Tacsipacsi (talk) 21:48, 18 December 2019 (UTC)Reply

  Done DannyS712 (talk) 22:07, 18 December 2019 (UTC)Reply

Template-protected edit request on 9 May 2020

edit

Replace Wikipedia:Templates for discussion/Log/2020 May 2#File namespace language templates with Wikipedia:Templates for discussion/Log/2020 May 9#File namespace language templates, the discussion has been relisted. TheTVExpert (talk) 15:00, 9 May 2020 (UTC)Reply

  Done --Redrose64 🌹 (talk) 15:11, 9 May 2020 (UTC)Reply

When to use

edit

The usage instructions should explain when and where this template should be used. By my count, it is used on 3482 File pages in English Wikipedia, meaning that the overwhelming majority of File pages do not use it. Should they? If not, when is it called for? More specifically, if it is intended that any Wiki editor who thinks, "This file might be moved to commons someday" should slap this template into the file, where does it go? If {{Information}} is used, is {{En}} to be used with the description parameter only, or with some others as well? If one expects that the template is to assist human editors, it doesn't matter much, but if one expects that there are automated processes that do something with it, it could matter a lot. —Anomalocaris (talk) 06:36, 4 June 2023 (UTC)Reply

Primarily, it's a Commons template, see c:Template:En, where it's for wrapping English-language text in file descriptions (because Commons is multi-lingual). As to why it's here, sometimes a commons file that is heavily used here is copied here, with the {{information}} template copied verbatim. Thus, any templates that might be used inside that will also need to be mirrored here. --Redrose64 🌹 (talk) 09:04, 4 June 2023 (UTC)Reply
Redrose64: OK ... for what it's worth, I've removed all transclusions of this template from English Wikipedia outside File space except for 3 User .js pages and one Help Desk archive in Wikipedia space where the user was asking a question about why the template displayed badly. —Anomalocaris (talk) 09:49, 4 June 2023 (UTC)Reply

Won't wrap multiple blocks

edit

A recent version of File:Katagalugan dialects.png had this template wrapping 5 {{legend}} templates, causing missing end tag for <p>. I fixed it by having it wrap each template individually, which eliminated the lint error but looked terrible, so I modified it to wrap only the first template. The real fix is to make it so it can wrap multiple blocks without generating lint errors. —Anomalocaris (talk) 06:44, 4 June 2023 (UTC)Reply

Postscript: c:File:Katagalugan.png has this template wrapping only one legend template, with the remaining English-language legends not specifically marked. —Anomalocaris (talk) 09:58, 4 June 2023 (UTC)Reply

There are two main kinds of HTML element: block and inline (the p element is a special case, which I will come to later). A block element (also known as flow content) may enclose both kinds (as well as plain text), but may only be enclosed by other block elements. An inline element (also known as phrasing content) may be enclosed by either kind, but may itself only enclose other inline elements and plain text. Consider {{en}} and {{legend}} separately.
  • Usage such as {{en|Some text}} emits the markup
    English: <span lang="en">Some text</span>
    
    This is plain text plus a span element, snd span is an inline element.
  • Usage such as {{legend|red|2=Some text}} emits the markup
    <div class="legend"><span class="legend-color mw-no-invert" style="background-color:red; color:black;">&nbsp;</span>&nbsp;Some text</div>
    
    This a span element plus plain text all wrapped in a div element, snd div is a block element.
So putting {{legend}} inside {{en}} is putting a block element inside an inline element, which is not permitted. To make it possible for {{en}} to enclose a block element such as {{legend}}, we would need to change the <span>...</span> inside {{en}} to a block element such as <div>...</div>, which would bring about far more problems than it solves, since it would then not be possible to use it inline.
By contrast, putting {{en}} inside {{legend}} is putting an inline element inside a block element, which is permitted.
Regarding <p>: I noted that it's a special case, in that it doesn't behave like any other HTML element. Seen from the outside, it's a block element and can only be used where a block element is permitted; but seen from the inside, it's an inline element, and may only contain inline elements and plain text. Indeed, if you try to put any type of block element, whether <div>...</div>, <table>...</table>, <ul>...</ul> or even another <p> inside a p element, that will force an implicit closing </p> tag at the point where the block element begins. So a {{legend}}, being a div element, will terminate any <p> in which it is placed.
There are two possible fixes to the problem at File:Katagalugan dialects.png: (i) alter it so that instead of five instances of {{legend}} being enclosed by one instance of {{en}}, you instead have five instances of {{legend}} each enclosing one instance of {{en}}, as in
|Description=
{{legend|#DC8A9B|2={{en|Northern Tagalog dialects: Bataan (Bataan & Zambales), and Bulacan (Bulacan & Nueva Ecija)}} }}
{{legend|#CF657C|2={{en|Central Tagalog dialects: Manila/[[:en:Filipino language|Standard Tagalog or Filipino]] (Metro Manila), and Tanay-Paete (Rizal & Laguna).}} }}
{{legend|#A41B3C|2={{en|Southern Tagalog dialects: Batangas (Batangas, Cavite, & Oriental Mindoro), Tayabas (Quezon, Aurora, Camarines Norte, & Camarines Sur), and Lubang (Occidental Mindoro).}} }}
{{legend|#560F20|2={{en|Marinduque dialects (Marinduque).}} }}
{{legend|#F3D1D9|2={{en|Outer-tagalosphere/Other unclassified dialects.}} }}
or (ii) simply remove the {{en| and its balancing }} leaving the rest untouched. --Redrose64 🌹 (talk) 10:20, 4 June 2023 (UTC)Reply
As for c:File:Katagalugan.png, the way that it uses {{en}} is also incorrect, as is its use of {{tgl}} for the same reasons. It does however use {{nds}} correctly. --Redrose64 🌹 (talk) 12:46, 4 June 2023 (UTC)Reply

Redrose64: On English Wikipedia, {{en}} can wrap {{legend}} without lint error. Behold:

Markup Expansion Display
{{en|{{legend|pink|2=en wraps legend}}}} English: <div lang="en"><templatestyles src="Legend/styles.css" /><div class="legend"><span class="legend-color mw-no-invert" style="background-color:pink; color:black;"> </span> en wraps legend</div></div> English:
  en wraps legend
{{legend|pink|2={{en|legend wraps en}}}} <templatestyles src="Legend/styles.css" /><div class="legend"><span class="legend-color mw-no-invert" style="background-color:pink; color:black;"> </span> English: <span lang="en">legend wraps en</span></div>
  English: legend wraps en

There is no need to modify File:Katagalugan dialects.png to avoid lint errors, as it is already lint-free, and there are no lint errors in English Wikipedia in File namespace right now, with almost 4,000 file pages transcluding {{en}}. —Anomalocaris (talk) 20:07, 4 June 2023 (UTC)Reply