Difference between revisions of "Help talk:Template"

From ArchWiki
Jump to: navigation, search
(Note in 'Protected templates' section: fixed)
(Problems with Template:ic: rm closed discussion)
 
(93 intermediate revisions by 11 users not shown)
Line 1: Line 1:
==<s>Note in 'Protected templates' section</s>==
+
== Grouped Notes/Warnings/Tips and numbered parameter ==
  
I have a question regarding this note:
+
According to [[Help:Style#Notes.2C_Warnings.2C_Tips]], we should use unnumbered list to group successive Notes/Warnings/Tips into a single template. However, this can't be (easily) done when it's necessary to use numbered parameter, e.g. when some note contains URL with "=" symbol. See:
  
{{Note|If you find a non-protected template that is not a member of the Template category, '''edit it''' and correct this oversight. See the [[Template:Template]] template for details.}}
+
{{Note|1=
 +
* first note
 +
* second note
 +
}}
  
The [[:Category:Template]] was deleted, right? Or is it more a reference to the [[Template:Template]] rather than the category? In that case the term "category" is rather inappropriate...
+
-- [[User:Lahwaacz|Lahwaacz]] ([[User talk:Lahwaacz|talk]]) 08:01, 14 July 2014 (UTC)
  
-- [[User:Lahwaacz|Lahwaacz]] ([[User talk:Lahwaacz|talk]]) 21:06, 18 November 2013 (UTC)
+
:It's funny how this trick would fix that :)
  
:Uh I forgot to remove that note, thanks for reporting it, it's done now; [[Help:Template#Creation]] already mentions [[Template:Template]] in the template "template" (you know what I mean :) ) and that's enough. -- [[User:Kynikos|Kynikos]] ([[User talk:Kynikos|talk]]) 14:18, 19 November 2013 (UTC)
+
{{bc|<nowiki>
 +
{{Note|1=<nowiki>&lt;/nowiki>
 +
* first note = 1
 +
* second note = 2
 +
}}
 +
</nowiki>}}
 +
 
 +
{{Note|1=<nowiki></nowiki>
 +
* first note = 1
 +
* second note = 2
 +
}}
 +
 
 +
:However I don't think we should recommend it (too hacky), maybe this is one of the cases where the "recommended only when the solutions above are not practicable" note in [[Help:Template#HTML entities]] can be rightfully applied. Other ideas? Avoid recommending to merge stacked note templates? The problem would persist in note templates that have to start with a list anyway...
 +
:-- [[User:Kynikos|Kynikos]] ([[User talk:Kynikos|talk]]) 14:47, 15 July 2014 (UTC)
 +
 
 +
== Should administrative templates be translated? ==
 +
 
 +
I have coincidentally encountered a stub page ([[Яндекс Диск (Русский)]], now deleted) with wrong localized title, which was marked for deletion using a localized template, [[Template:Deletion (Русский)]]. This was obviously wrong, because the page was not listed under [[Special:WhatLinksHere/Template:Deletion]], which is the list which is systematically checked.
 +
 
 +
I admit that localized "administrative templates" can be useful for coordinating the effort of a translation team, and having English messages on localized pages might be considered ugly, but there are considerable downsides in splitting the [[Special:WhatLinksHere]] by language this way.
 +
 
 +
Another step deeper, maybe we should put together a list of templates that should not be translated?
 +
 
 +
-- [[User:Lahwaacz|Lahwaacz]] ([[User talk:Lahwaacz|talk]]) 19:59, 10 September 2014 (UTC)
 +
 
 +
:I think what you're saying makes sense (and a lot) only for [[Template:Deletion]]; the admins (like any other user) can't expand, merge or update articles written in languages they don't speak, right? :) What other templates were you thinking about? -- [[User:Kynikos|Kynikos]] ([[User talk:Kynikos|talk]]) 10:43, 11 September 2014 (UTC)
 +
 
 +
::True, every other [[Help:Template#Article status templates|article status template]] could be used in localized form by the maintenance team. Regardless, there will always be fragmentation of the [[Special:WhatLinksHere]]: for example when fulfilling the [[ArchWiki:requests|requests]], it is common to use English message (and template) on localized pages if the editor does not speak the language. This should be definitely considered by the translation teams.
 +
::Personally, I find it strange that [[Template:Out of date|outdated]] or [[Template:Accuracy|inaccurate]] content from English pages can be spread by translation (see [https://wiki.archlinux.org/index.php?title=Bluetooth_Mouse_(%D0%A0%D1%83%D1%81%D1%81%D0%BA%D0%B8%D0%B9)&diff=next&oldid=334522#.D0.90.D0.B2.D1.82.D0.BE.D0.BC.D0.B0.D1.82.D0.B8.D1.87.D0.B5.D1.81.D0.BA.D0.B8_.D0.BF.D0.BE.D0.B4.D0.BA.D0.BB.D1.8E.D1.87.D0.B0.D1.82.D1.8C_.D0.BC.D1.8B.D1.88.D1.8C_.D0.BF.D1.80.D0.B8_.D0.B7.D0.B0.D0.B3.D1.80.D1.83.D0.B7.D0.BA.D0.B5]).
 +
::-- [[User:Lahwaacz|Lahwaacz]] ([[User talk:Lahwaacz|talk]]) 11:36, 11 September 2014 (UTC)
 +
 
 +
:::About the first point on "fragmentation" of WLH pages, do you mean that it inevitably happens that some localized articles are marked with localized templates and some with English templates? In what cases is it possible that somebody adds a status template to an article without being able to understand its language? And if (s)he does, is that really the right thing to do? And if it is, maybe we could recommend to use the localized version of the template even if the message is then written in English?
 +
:::About the second point on template "spreading", I don't find it "strange" if it happens when somebody translates from an article that is marked with such status template: he's adding the localized template not only to remind to the team that the article contains outdated content, but also to notify all non-contributing readers about possible inaccuracies. But maybe I haven't understood what you meant exactly?
 +
:::Just to come back to the original topic, isn't it a good thing that the WLH pages for the English status templates are not (ideally) "polluted" by non-English articles? (Doesn't apply to Template:Deletion, I know)
 +
:::-- [[User:Kynikos|Kynikos]] ([[User talk:Kynikos|talk]]) 14:33, 12 September 2014 (UTC)
 +
 
 +
::::For example when fulfilling [[ArchWiki:Requests]], there is often some unique keyword or phrase to identify the relevant section, even in localized pages. Google translate can be used to ''partially'' understand the surrounding text, even if the translation is grammatically incorrect. This makes it pretty easy to mark the section with English message (translating the message from English would be risky, the grammar mistakes might alter the meaning), which I think is an improvement (any warning should be better than none). Using a localized template in this case would require checking if such template exists, and even if it does, combining localized template and English message is even more weird.
 +
::::About fragmentation and using localized ''article status templates'' generally, its advantage is that it filters out other languages in the WLH lists, but this only partial (the global list will always contain some localized pages, unless we want to create the necessary templates for each language and do some mass cleanup, and the localized lists will not point out localized pages marked with global templates). The disadvantage is that global maintenance, if only marking as outdated as per [[ArchWiki:Requests]], will be harder.
 +
::::-- [[User:Lahwaacz|Lahwaacz]] ([[User talk:Lahwaacz|talk]]) 21:51, 12 September 2014 (UTC)
 +
 
 +
:::::Ok, of course each solution has pros and cons (will we need a summary table for this issue too?): honestly I wouldn't find it too weird if a localized template had an English message, which could also be translated afterwards by somebody else. Yes, adding a localized status template requires a bit more typing, sometimes even copy-pasting if there are non-Latin chars in the language name: this could be mitigated in the future by [[Help talk:i18n#Language namespace(s) in place of suffixes?]]; I understand this could effectively discourage adding status templates to translations. On the other hand, a bot would be able to convert the templates to the proper localized versions very easily, so that's a task that could be performed periodically (it could be used to check also other templates). And yes, having a translated version for each template would be required if we enforced such a policy. Finally, let's not forget that localized templates would be more useful to casual readers than English templates.
 +
:::::-- [[User:Kynikos|Kynikos]] ([[User talk:Kynikos|talk]]) 05:03, 14 September 2014 (UTC)
 +
 
 +
::::About the template spreading, it is safe to assume that [[Template:Poor writing]] will never be translated. Instead, the translator will probably fix the English article prior to translating it, which is happening ''a lot'', even when the style issues are not marked with a template, and this is absolutely great. On the other hand, I have never noticed any other ''article status template'' being resolved during translation. Admittedly, sometimes it is best to just translate the inaccurate content along with the template, or the translator might be unable to resolve it, but in terms of statistics I think that I should have noticed at least some effort by now.
 +
::::-- [[User:Lahwaacz|Lahwaacz]] ([[User talk:Lahwaacz|talk]]) 21:51, 12 September 2014 (UTC)
 +
 
 +
:::::Well, [[Template:Poor writing]] does have a translation already with some backtransclusions, I'm not sure if you'd delete it (I wouldn't). -- [[User:Kynikos|Kynikos]] ([[User talk:Kynikos|talk]]) 05:03, 14 September 2014 (UTC)
 +
 
 +
::As the discussion about other [[Help:Template#Article status templates|article status templates]] is getting slightly off-topic, let's take a list of one item for now, [[Template:Deletion]]. How do we mark it as non-translatable? The translated versions could then be redirected to the English template and deleted when there are no backlinks. -- [[User:Lahwaacz|Lahwaacz]] ([[User talk:Lahwaacz|talk]]) 22:01, 12 September 2014 (UTC)
 +
 
 +
:::I think the [https://docs.python.org/3.4/glossary.html#term-eafp EAFP] approach is better in this case, I can think of 2 implementations:
 +
:::# Create a redirect for each Template:Deletion_(Language) title and protect them from editing with an exhaustive justification in the summary  (this solution would A) be more consistent with the usage of the other status templates and B) allow us grouping the backtransclusions of Template:Deletion by language in its WLH page).
 +
:::# Redirect the existing translations temporarily, convert them all with a bot, then delete them and finally protect all the Template:Deletion_(Language) titles from creation with an exhaustive justification in the summary.
 +
:::I prefer 1), do you agree/disagree or have additional options?
 +
:::-- [[User:Kynikos|Kynikos]] ([[User talk:Kynikos|talk]]) 05:08, 14 September 2014 (UTC)
 +
 
 +
== Workaround templates ==
 +
 
 +
Does anybody have an idea how {{ic|<nowiki>{{!}}</nowiki>}} from [https://wiki.archlinux.org/index.php?title=Multiboot_USB_drive&curid=19001&diff=381050&oldid=380767#monthly_release this edit] can work, even if [[Template:!]] doesn't exist? The other common [[mw:Category:Workaround templates]] don't work...
 +
 
 +
{{!}} {{)}} {{))}} {{(}} {{((}} {{=}}
 +
 
 +
— [[User:Kynikos|Kynikos]] ([[User talk:Kynikos|talk]]) 03:14, 6 July 2015 (UTC)
 +
 
 +
:It seems to be incorporated into the parser, commit is linked from [[mw:Template:!]]. -- [[User:Lahwaacz|Lahwaacz]] ([[User talk:Lahwaacz|talk]]) 06:31, 6 July 2015 (UTC)
 +
 
 +
::Yep, it's become an official [[mw:Help:Magic_words#Other|magic word]], do we want to document it as a supported workaround in this page? I would be in favor. — [[User:Kynikos|Kynikos]] ([[User talk:Kynikos|talk]]) 15:21, 7 July 2015 (UTC)
 +
 
 +
== Template "nowrap" ==
 +
 
 +
 
 +
I would like to ask for opinions about adding a wiki template like [https://en.wikipedia.org/wiki/Template:Nowrap Wikipedia's "nowrap"].
 +
 
 +
Although there are already some alternative solutions available for specific cases (e.g. {{ic|&amp;nbsp;}} for non-breaking space, {{ic|&amp;#8209;}} for non-breaking hyphen), the "nowrap" template (and/or other similar templates) covers additional cases.
 +
 
 +
For example, you might find one line of text presented as ending with the word {{ic|package}} and the same sentence continues in the next line, presented as starting with {{ic|(s)}}. By using the "nowrap" template on this expression, you get {{ic|package(s)}} all together, either at the end of one line or at the beginning of the next one, but never separated in 2 lines.
 +
 
 +
This is just an example. Other cases can be (more) relevant (too). Obviously, the "nowrap" template can also be used instead of (multiple) non-breaking spaces and non-breaking hyphens.
 +
 
 +
Without a "nowrap" (or similar) template, the alternatives are either to not care about these things, or to use one of the following (please note that some alternatives might be more appropriate than others):
 +
 
 +
{{bc|
 +
1=&lt;span class="nowrap"&gt;This text will not wrap.&lt;/span&gt;
 +
Some sentence... &lt;span class="nowrap"&gt;package(s)&lt;/span&gt; and the sentence continues.
 +
}}
 +
{{bc|
 +
1=&lt;span style="white-space:nowrap"&gt;This text will not wrap.&lt;/span&gt;
 +
Some sentence... &lt;span style="white-space:nowrap"&gt;package(s)&lt;/span&gt; and the sentence continues.
 +
}}
 +
 
 +
The "nowrap" template also has some "alias" (or redirection) names in Wikipedia, or we could use a new different name for this same template.
 +
 
 +
Is this kind of situation worth a template for the ArchLinux wiki? Any thoughts? [[User:Ady|Ady]] ([[User talk:Ady|talk]]) 15:39, 27 March 2016 (UTC)
 +
 
 +
:I don't know, it seems a bit overcomplicated to me... What browser are you using that wraps "package(s)" at the parenthesis? At least Firefox correctly interprets it as a single word, since I do believe that these cases should be handled by the browser. The same goes for e.g. "package-s". Can you give more examples where this template would be needed (and would be a clearly better solution than using non-breaking spaces etc.)? — [[User:Kynikos|Kynikos]] ([[User talk:Kynikos|talk]]) 06:57, 30 March 2016 (UTC)
 +
 
 +
::Hmm, perhaps I have not used the best example - I know I have seen this "package(s)" example somewhere, but currently I cannot recall where / when exactly.
 +
::I should point out that users could see an unwanted (word) wrapping, depending on the width of the wiki text area (e.g. screen resolution, web browser's zoom, fonts...).
 +
::As for "better" (or common) examples, please see [https://en.wikipedia.org/wiki/Wikipedia:NOWRAP] for brevity.
 +
::BTW, using space characters and hyphens are the (most) common word-separators in certain languages, but not in all of them (e.g. CJK languages), so a "nowrap" template might be even more helpful in some translated wiki pages than in the English ones.
 +
::I want to be clear. I am also not completely sure this type of template is "essential" for the ArchLinux wiki. It is potentially helpful; the question would be whether it is worth it. [[User:Ady|Ady]] ([[User talk:Ady|talk]]) 02:51, 31 March 2016 (UTC)
 +
 
 +
:::I see, I should have been more specific, but what I meant with "more examples" is existing samples of the ArchWiki (in any language) where such template would improve the page rendering and/or the source text. To put it in other words: after creating the template, where exactly is it going to be used?
 +
:::In general I'm against creating templates (or Categories, etc.) "just in case they come in handy one day", although in this case I admit the idea can make somewhat sense, so if you really feel you want to create the template, I won't object further, maybe somebody else will find good uses for it and we'll start appreciating its existence ^^
 +
:::— [[User:Kynikos|Kynikos]] ([[User talk:Kynikos|talk]]) 03:23, 31 March 2016 (UTC)
 +
 
 +
::::I am a contributor to other wiki sites (in addition to the ArchLinux wiki). As editor(s) of wiki text, it is usually recommended to be aware that readers might use very different setups. While I/we might not see a certain behavior in the presentation of the wiki text / page, others might.
 +
::::Although the ArchLinux wiki would not (need to) consider older versions of web browsers (or web browsers being used in non-Linux OSes), I am used to test the results of my editions with at least a couple of different setups.
 +
::::I found a [https://www.cs.tut.fi/~jkorpela/html/nobr.html web page] about word wrapping in HTML that might be of interest to (some) wiki editors. Some notes about it:
 +
::::* Most of its content mentions Internet Explorer, but it also mentions Firefox, Opera and others.
 +
::::* In theory, it is somewhat outdated (at the time of this writing, its last update was during 2013).
 +
::::* In spite of its date, I am convinced that at least some of the issues are still relevant (with potential improvements and regressions in each new version / variant of web browser).
 +
::::* The part of that web page that is relevant to our discussion here is that there are several alternative methods so to achieve the desired wrapping result, whether it is about preventing word-wrapping, imposing word-wrapping, or allowing optional wrapping at certain specific positions within an expression / word.
 +
::::Some of the simpler alternatives, (probably with a varying degree of effective results): {{ic|&amp;nbsp;}}, {{ic|&amp;#8209;}}, {{ic|&amp;#xfeff;}}, {{ic|&amp;#8288;}}, {{ic|wbc}}, and for generic wiki text, a "nowrap" (or, one of its alias names, "nobr") templates.
 +
::::The advantage of a "nowrap" template over its non-template alternatives is that it is more generic; editors can avoid having to use different tricks according to the specific character (space, hyphen, minus sign, em/en dash...) and it covers potential cases that have no alternative or that would make the source of the wiki text less-readable.
 +
::::So, without a "nowrap" template, I guess that most of the relevant cases in Latin-like languages would be covered by some non-template alternative, or by using the full "span style expression". Although perhaps there might be some cases in which a "nowrap" template would not have an alternative in Latin-like languages, I am also ''guessing'' that such (few?) cases would probably not be worth a template in the ArchLinux wiki.
 +
::::But then there are the CJK languages, in which wrapping styles / rules might be more important / complex than some form of "hyphen" and/or space characters.
 +
::::Maybe [[User:Fengchao]] and/or other members that are fluent in CJK languages might have a different / relevant perspective?
 +
::::— [[User:Ady|Ady]] ([[User talk:Ady|talk]]) 13:40, 1 April 2016 (UTC)

Latest revision as of 08:59, 4 June 2016

Grouped Notes/Warnings/Tips and numbered parameter

According to Help:Style#Notes.2C_Warnings.2C_Tips, we should use unnumbered list to group successive Notes/Warnings/Tips into a single template. However, this can't be (easily) done when it's necessary to use numbered parameter, e.g. when some note contains URL with "=" symbol. See:

Note: * first note
  • second note

-- Lahwaacz (talk) 08:01, 14 July 2014 (UTC)

It's funny how this trick would fix that :)
{{Note|1=<nowiki></nowiki>
* first note = 1
* second note = 2
}}
Note:
  • first note = 1
  • second note = 2
However I don't think we should recommend it (too hacky), maybe this is one of the cases where the "recommended only when the solutions above are not practicable" note in Help:Template#HTML entities can be rightfully applied. Other ideas? Avoid recommending to merge stacked note templates? The problem would persist in note templates that have to start with a list anyway...
-- Kynikos (talk) 14:47, 15 July 2014 (UTC)

Should administrative templates be translated?

I have coincidentally encountered a stub page (Яндекс Диск (Русский), now deleted) with wrong localized title, which was marked for deletion using a localized template, Template:Deletion (Русский). This was obviously wrong, because the page was not listed under Special:WhatLinksHere/Template:Deletion, which is the list which is systematically checked.

I admit that localized "administrative templates" can be useful for coordinating the effort of a translation team, and having English messages on localized pages might be considered ugly, but there are considerable downsides in splitting the Special:WhatLinksHere by language this way.

Another step deeper, maybe we should put together a list of templates that should not be translated?

-- Lahwaacz (talk) 19:59, 10 September 2014 (UTC)

I think what you're saying makes sense (and a lot) only for Template:Deletion; the admins (like any other user) can't expand, merge or update articles written in languages they don't speak, right? :) What other templates were you thinking about? -- Kynikos (talk) 10:43, 11 September 2014 (UTC)
True, every other article status template could be used in localized form by the maintenance team. Regardless, there will always be fragmentation of the Special:WhatLinksHere: for example when fulfilling the requests, it is common to use English message (and template) on localized pages if the editor does not speak the language. This should be definitely considered by the translation teams.
Personally, I find it strange that outdated or inaccurate content from English pages can be spread by translation (see [1]).
-- Lahwaacz (talk) 11:36, 11 September 2014 (UTC)
About the first point on "fragmentation" of WLH pages, do you mean that it inevitably happens that some localized articles are marked with localized templates and some with English templates? In what cases is it possible that somebody adds a status template to an article without being able to understand its language? And if (s)he does, is that really the right thing to do? And if it is, maybe we could recommend to use the localized version of the template even if the message is then written in English?
About the second point on template "spreading", I don't find it "strange" if it happens when somebody translates from an article that is marked with such status template: he's adding the localized template not only to remind to the team that the article contains outdated content, but also to notify all non-contributing readers about possible inaccuracies. But maybe I haven't understood what you meant exactly?
Just to come back to the original topic, isn't it a good thing that the WLH pages for the English status templates are not (ideally) "polluted" by non-English articles? (Doesn't apply to Template:Deletion, I know)
-- Kynikos (talk) 14:33, 12 September 2014 (UTC)
For example when fulfilling ArchWiki:Requests, there is often some unique keyword or phrase to identify the relevant section, even in localized pages. Google translate can be used to partially understand the surrounding text, even if the translation is grammatically incorrect. This makes it pretty easy to mark the section with English message (translating the message from English would be risky, the grammar mistakes might alter the meaning), which I think is an improvement (any warning should be better than none). Using a localized template in this case would require checking if such template exists, and even if it does, combining localized template and English message is even more weird.
About fragmentation and using localized article status templates generally, its advantage is that it filters out other languages in the WLH lists, but this only partial (the global list will always contain some localized pages, unless we want to create the necessary templates for each language and do some mass cleanup, and the localized lists will not point out localized pages marked with global templates). The disadvantage is that global maintenance, if only marking as outdated as per ArchWiki:Requests, will be harder.
-- Lahwaacz (talk) 21:51, 12 September 2014 (UTC)
Ok, of course each solution has pros and cons (will we need a summary table for this issue too?): honestly I wouldn't find it too weird if a localized template had an English message, which could also be translated afterwards by somebody else. Yes, adding a localized status template requires a bit more typing, sometimes even copy-pasting if there are non-Latin chars in the language name: this could be mitigated in the future by Help talk:i18n#Language namespace(s) in place of suffixes?; I understand this could effectively discourage adding status templates to translations. On the other hand, a bot would be able to convert the templates to the proper localized versions very easily, so that's a task that could be performed periodically (it could be used to check also other templates). And yes, having a translated version for each template would be required if we enforced such a policy. Finally, let's not forget that localized templates would be more useful to casual readers than English templates.
-- Kynikos (talk) 05:03, 14 September 2014 (UTC)
About the template spreading, it is safe to assume that Template:Poor writing will never be translated. Instead, the translator will probably fix the English article prior to translating it, which is happening a lot, even when the style issues are not marked with a template, and this is absolutely great. On the other hand, I have never noticed any other article status template being resolved during translation. Admittedly, sometimes it is best to just translate the inaccurate content along with the template, or the translator might be unable to resolve it, but in terms of statistics I think that I should have noticed at least some effort by now.
-- Lahwaacz (talk) 21:51, 12 September 2014 (UTC)
Well, Template:Poor writing does have a translation already with some backtransclusions, I'm not sure if you'd delete it (I wouldn't). -- Kynikos (talk) 05:03, 14 September 2014 (UTC)
As the discussion about other article status templates is getting slightly off-topic, let's take a list of one item for now, Template:Deletion. How do we mark it as non-translatable? The translated versions could then be redirected to the English template and deleted when there are no backlinks. -- Lahwaacz (talk) 22:01, 12 September 2014 (UTC)
I think the EAFP approach is better in this case, I can think of 2 implementations:
  1. Create a redirect for each Template:Deletion_(Language) title and protect them from editing with an exhaustive justification in the summary (this solution would A) be more consistent with the usage of the other status templates and B) allow us grouping the backtransclusions of Template:Deletion by language in its WLH page).
  2. Redirect the existing translations temporarily, convert them all with a bot, then delete them and finally protect all the Template:Deletion_(Language) titles from creation with an exhaustive justification in the summary.
I prefer 1), do you agree/disagree or have additional options?
-- Kynikos (talk) 05:08, 14 September 2014 (UTC)

Workaround templates

Does anybody have an idea how {{!}} from this edit can work, even if Template:! doesn't exist? The other common mw:Category:Workaround templates don't work...

| Template:) Template:)) Template:( Template:(( Template:=

Kynikos (talk) 03:14, 6 July 2015 (UTC)

It seems to be incorporated into the parser, commit is linked from mw:Template:!. -- Lahwaacz (talk) 06:31, 6 July 2015 (UTC)
Yep, it's become an official magic word, do we want to document it as a supported workaround in this page? I would be in favor. — Kynikos (talk) 15:21, 7 July 2015 (UTC)

Template "nowrap"

I would like to ask for opinions about adding a wiki template like Wikipedia's "nowrap".

Although there are already some alternative solutions available for specific cases (e.g. &nbsp; for non-breaking space, &#8209; for non-breaking hyphen), the "nowrap" template (and/or other similar templates) covers additional cases.

For example, you might find one line of text presented as ending with the word package and the same sentence continues in the next line, presented as starting with (s). By using the "nowrap" template on this expression, you get package(s) all together, either at the end of one line or at the beginning of the next one, but never separated in 2 lines.

This is just an example. Other cases can be (more) relevant (too). Obviously, the "nowrap" template can also be used instead of (multiple) non-breaking spaces and non-breaking hyphens.

Without a "nowrap" (or similar) template, the alternatives are either to not care about these things, or to use one of the following (please note that some alternatives might be more appropriate than others):

<span class="nowrap">This text will not wrap.</span>
Some sentence... <span class="nowrap">package(s)</span> and the sentence continues.
<span style="white-space:nowrap">This text will not wrap.</span>
Some sentence... <span style="white-space:nowrap">package(s)</span> and the sentence continues.

The "nowrap" template also has some "alias" (or redirection) names in Wikipedia, or we could use a new different name for this same template.

Is this kind of situation worth a template for the ArchLinux wiki? Any thoughts? Ady (talk) 15:39, 27 March 2016 (UTC)

I don't know, it seems a bit overcomplicated to me... What browser are you using that wraps "package(s)" at the parenthesis? At least Firefox correctly interprets it as a single word, since I do believe that these cases should be handled by the browser. The same goes for e.g. "package-s". Can you give more examples where this template would be needed (and would be a clearly better solution than using non-breaking spaces etc.)? — Kynikos (talk) 06:57, 30 March 2016 (UTC)
Hmm, perhaps I have not used the best example - I know I have seen this "package(s)" example somewhere, but currently I cannot recall where / when exactly.
I should point out that users could see an unwanted (word) wrapping, depending on the width of the wiki text area (e.g. screen resolution, web browser's zoom, fonts...).
As for "better" (or common) examples, please see [2] for brevity.
BTW, using space characters and hyphens are the (most) common word-separators in certain languages, but not in all of them (e.g. CJK languages), so a "nowrap" template might be even more helpful in some translated wiki pages than in the English ones.
I want to be clear. I am also not completely sure this type of template is "essential" for the ArchLinux wiki. It is potentially helpful; the question would be whether it is worth it. Ady (talk) 02:51, 31 March 2016 (UTC)
I see, I should have been more specific, but what I meant with "more examples" is existing samples of the ArchWiki (in any language) where such template would improve the page rendering and/or the source text. To put it in other words: after creating the template, where exactly is it going to be used?
In general I'm against creating templates (or Categories, etc.) "just in case they come in handy one day", although in this case I admit the idea can make somewhat sense, so if you really feel you want to create the template, I won't object further, maybe somebody else will find good uses for it and we'll start appreciating its existence ^^
— Kynikos (talk) 03:23, 31 March 2016 (UTC)
I am a contributor to other wiki sites (in addition to the ArchLinux wiki). As editor(s) of wiki text, it is usually recommended to be aware that readers might use very different setups. While I/we might not see a certain behavior in the presentation of the wiki text / page, others might.
Although the ArchLinux wiki would not (need to) consider older versions of web browsers (or web browsers being used in non-Linux OSes), I am used to test the results of my editions with at least a couple of different setups.
I found a web page about word wrapping in HTML that might be of interest to (some) wiki editors. Some notes about it:
  • Most of its content mentions Internet Explorer, but it also mentions Firefox, Opera and others.
  • In theory, it is somewhat outdated (at the time of this writing, its last update was during 2013).
  • In spite of its date, I am convinced that at least some of the issues are still relevant (with potential improvements and regressions in each new version / variant of web browser).
  • The part of that web page that is relevant to our discussion here is that there are several alternative methods so to achieve the desired wrapping result, whether it is about preventing word-wrapping, imposing word-wrapping, or allowing optional wrapping at certain specific positions within an expression / word.
Some of the simpler alternatives, (probably with a varying degree of effective results): &nbsp;, &#8209;, &#xfeff;, &#8288;, wbc, and for generic wiki text, a "nowrap" (or, one of its alias names, "nobr") templates.
The advantage of a "nowrap" template over its non-template alternatives is that it is more generic; editors can avoid having to use different tricks according to the specific character (space, hyphen, minus sign, em/en dash...) and it covers potential cases that have no alternative or that would make the source of the wiki text less-readable.
So, without a "nowrap" template, I guess that most of the relevant cases in Latin-like languages would be covered by some non-template alternative, or by using the full "span style expression". Although perhaps there might be some cases in which a "nowrap" template would not have an alternative in Latin-like languages, I am also guessing that such (few?) cases would probably not be worth a template in the ArchLinux wiki.
But then there are the CJK languages, in which wrapping styles / rules might be more important / complex than some form of "hyphen" and/or space characters.
Maybe User:Fengchao and/or other members that are fluent in CJK languages might have a different / relevant perspective?
Ady (talk) 13:40, 1 April 2016 (UTC)