Template talk:'s
This is the talk page for discussing improvements to the 's template. |
|
Template:'s is permanently protected from editing because it is a heavily used or highly visible template. Substantial changes should first be proposed and discussed here on this page. If the proposal is uncontroversial or has been discussed and is supported by consensus, editors may use {{edit template-protected}} to notify an administrator or template editor to make the requested edit. Usually, any contributor may edit the template's documentation to add usage notes or categories.
Any contributor may edit the template's sandbox. This template does not have a testcases subpage. You can create the testcases subpage here. |
Delete?
editAs this is now unused (except in examples), should a request to delete this be submitted so that it doesn't get confused with the standard solution at {{'}}. At the very least, I think that this one should probably be marked with the {{tdeprecated}} tag. --- Barek (talk • contribs) - 16:49, 10 September 2008 (UTC)
- Comment: Over the past several months, this template has begun to get used in various articles ... so no point deprecating it now that it's in use again. --- Barek (talk • contribs) - 19:50, 29 January 2009 (UTC)
Line break
editI was surprised to see my browser insert a line break between an italicized ship name and this template. Shouldn't they keep together? This was at USS Indianapolis (CA-35), although obviously your browser is unlikely to break lines at the same place mine does. Kendall-K1 (talk) 04:48, 31 July 2015 (UTC)
- It's a useless, unnecessary template. For the reason you describe, I remove all instances of it when I encounter it and replace it with
's
. By using HTML instead of the template, it also reduces processing overhead on the server. — QuicksilverT @ 14:55, 11 August 2015 (UTC)
- Thanks, will do. I see that Template:' has been fixed to keep with the previous text, but that doesn't seem to always work for me. Kendall-K1 (talk) 16:39, 11 August 2015 (UTC)
‍
editThe {{'}}
template already contains ‍
. Is there a reason that this template also begins with ‍
?
{{'}}
produces:<span class="nowrap" style="padding-left:0.1em;">'</span>
{{'s}}
produces:<span class="nowrap" style="padding-left:0.1em;">'s</span>
Strange
editI just noticed this template for the first time because it was used in DYK. It renders really strange !!! Try saving the page and look at the HTML. It produces the following Unicode: e2 80 8d e2 80 8d e2 80 8a 27 e2 80 8b e2 80 8d 73. That is: ZERO WIDTH JOINER, ZERO WIDTH JOINER, HSP (whatever that is ???), ', ZERO WIDTH SPACE, ZERO WIDTH JOINER, s. The product of this strange combination does not honor the CSS I have set (wrong font and font size). I checked, and it does this wherever it is used. Does anyone know what is going on ? And is the template really worth the trouble? 80.132.94.160 (talk) 02:58, 11 December 2015 (UTC)
- Found HSP. It's "HAIR SPACE", uhm. 80.132.94.160 (talk) 03:02, 11 December 2015 (UTC)
- You might want to read the previous sections in this talk page. Kendall-K1 (talk) 03:07, 11 December 2015 (UTC)
- I did. That explains the redundant ZWJs but not the rest of the strange behavior. 80.132.94.160 (talk) 03:11, 11 December 2015 (UTC)
- OMFG, 5955 transclusions. I guess deletion of this template is not an option. Does anyone know a template-wizard who could fix it? 80.132.94.160 (talk) 03:18, 11 December 2015 (UTC)
- I did. That explains the redundant ZWJs but not the rest of the strange behavior. 80.132.94.160 (talk) 03:11, 11 December 2015 (UTC)
- You might want to read the previous sections in this talk page. Kendall-K1 (talk) 03:07, 11 December 2015 (UTC)
- Taking out the ZERO WIDTH SPACE after the ' fixes the CSS problem. I have no idea where the ZWS is coming from in the first place,it is neither in this template nor in template '. 80.132.94.160 (talk) 03:31, 11 December 2015 (UTC)
- I suggest deprecation followed by a bot to nuke all uses. It doesn't seem to do what it claims to, and no one knows what it's good for. Kendall-K1 (talk) 04:01, 11 December 2015 (UTC)
- This template was created long ago to provide a simple solution for adding possessives to italicised words. Sometimes writing ''Test'''s does not play well in the wikicode. However, there is an issue with "Test" and " 's " line-wrapping separately, which is why I added the zero-width joiners. For some bizarre reason, what worked when I added them no longer does, which makes no sense, but I've removed the zero-width joiners from both this and the " ' " template. I do not know where the HSP and ZWS is coming from, but I do believe deleting these templates would not be the best option. — Huntster (t @ c) 04:21, 11 December 2015 (UTC)
- The hair space character is the first character in the
{{'}}
template's transclusion and is there so that the apostrophe isn't too close to a preceding tall character, compare:- T' (
''T'''
) - T' (
''T''{{'}}
)
- T' (
- I am not sure why the zero-width space is the last character in the
{{'}}
transclusion, but that is what allows line-breaks. So, when this template was:‍{{'}}‍s
- the final transclusion was (invisible characters in parentheses):
‍‍(hsp)'(zws)‍s
- Were it up to me I would suggest this might be the correct form for
{{'s}}
:‍ '‍s
- I have a mockup of this in
{{'s/sandbox}}
:- T's (
''T''{{'s/sandbox}}
- T's (
- Here is a test. All words are separated with
{{'s/sandbox}}
except the first which is has a space after{{'s/sandbox}}
. The string should only break between the first and second words:- Lorem's Ipsum'sDolor'sSit'sAmet'sConsectetur'sAdipisicing'sElit'sSed'sDo'sEiusmod'sTempor'sIncididunt'sUt'sLabore'sEt'sDolore'sMagna'sAliqua'sUt'sEnim'sAd'sMinim'sVeniam'sQuis'sNostrud'sExercitation'sUllamco'sLaboris'sNisi'sUt'sAliquip'sEx'sEa'sCommodo'sConsequat'sDuis'sAute'sIrure'sDolor'sIn
- —Trappist the monk (talk) 13:29, 11 December 2015 (UTC)
- I've removed both instances of
‍
from{{'s/sandbox}}
so that the transclusion is just: 's
- The above test still works
- —Trappist the monk (talk) 14:41, 11 December 2015 (UTC)
- Thank you Trappist, I learned something. But for me your test does break before the 's. I am using Firefox. 80.132.105.11 (talk) 15:20, 11 December 2015 (UTC)
- Though it does not trigger that CSS bug. 80.132.105.11 (talk) 15:25, 11 December 2015 (UTC)
- What CSS bug? This template hasn't used CSS since 2008 (removed at this edit).
- I've restored the leading
‍
to{{'s/sandbox}}
so the transclusion is now:‍ 's
- The Lorem'sIpsum's test above works in Google. Does it work in Firefox? Anyone using browsers where it doesn't work?
- —Trappist the monk (talk) 15:43, 11 December 2015 (UTC)
- As I described above, the 's did not honor the User-CSS I have set. The s was rendering in the wrong font, which was fixed when I removed the ZWS. This is probably very specific to my setup, and fixed anyway. But it still breaks before the 's even if I disable User-CSS. I just tested in IE11 and it also breaks. 80.132.105.11 (talk) 16:00, 11 December 2015 (UTC)
- @Trappist the monk:, @80.132.105.11: As discussed below, the template should be changed to
 's
, thus, why don't you try it on the sandbox. Lordtobi (✉) 15:51, 11 December 2015 (UTC)- Why did you modify my test?
- @Trappist the monk:, @80.132.105.11: As discussed below, the template should be changed to
- As I described above, the 's did not honor the User-CSS I have set. The s was rendering in the wrong font, which was fixed when I removed the ZWS. This is probably very specific to my setup, and fixed anyway. But it still breaks before the 's even if I disable User-CSS. I just tested in IE11 and it also breaks. 80.132.105.11 (talk) 16:00, 11 December 2015 (UTC)
- I've restored the leading
- What CSS bug? This template hasn't used CSS since 2008 (removed at this edit).
- I've removed both instances of
- The hair space character is the first character in the
- I've changed
{{'s/sandbox}}
to use the suggested 's
. This works for me on chrome. Other browsers? You should see:- Lorem's
- Ipsum'sDolor'sSit's ... [unbroken string of text running beyond the right side of the page] ... Irure'sDolor'sIn
- —Trappist the monk (talk) 16:18, 11 December 2015 (UTC)
- I broke up the example because it went right out of the screen (Google Chrome), which Wikipedia couldn't seem to handle correctly and thus cut it, since it should also work normally. Lordtobi (✉) 16:33, 11 December 2015 (UTC)
- I don't really understand what it is that you just wrote. Yes, the example does run off the right side of the screen – that was intentional. Viewing this page in chrome on both XT and Win7 machines, that is what I see. Do you have a better way of testing this template?
- I broke up the example because it went right out of the screen (Google Chrome), which Wikipedia couldn't seem to handle correctly and thus cut it, since it should also work normally. Lordtobi (✉) 16:33, 11 December 2015 (UTC)
- I've changed
- I just tested it in Microsoft Edge, and the example seems to work just fine, just that it does not go out the page, which is, however, prohibited by the browser, as it adjusts all the texts, not just that one. Lordtobi (✉) 16:37, 11 December 2015 (UTC)
(undent) The whole stuff is about making it go out of the page. :) For me it still breaks the line before 's in FF42 and IE11. 80.132.105.11 (talk) 16:46, 11 December 2015 (UTC)
- I've change the sandbox so the transclusion is:
<span class="nowrap" style="padding-left:0.1em;">'s</span>
- For me, the Lorem'sIpsum's test still works and this test still works:
- T' (
''T'''
) - T' (
''T''{{'/sandbox}}
)
- T' (
- —Trappist the monk (talk) 17:11, 11 December 2015 (UTC)
- Hey, that works in FF and IE. 80.132.105.11 (talk) 17:25, 11 December 2015 (UTC)
- Well, well, but it is not the point to make it run off the page, so that's nonsense. Lordtobi (✉) 17:32, 11 December 2015 (UTC)
- But it is. The purpose of the test is to prove that
{{'s/sandbox}}
, when followed by a non-space character, does not cause inappropriate wrapping which was the complaint that caused the introduction of the‍
. Running the test off the edge of the screen makes it so that you and others reading this page don't have to adjust the window width to see that inappropriate line-breaks do not occur. Apparently in Firefox and IE, the test line was breaking inappropriately at the hair space character. A browser should never break the possessive form of a word at the apostrophe-s which puts those characters at the beginning of a new line. So:- This:
- the line's
- break
- or this:
- the
- line's break
- but not this:
- the line
- 's break
- This:
- —Trappist the monk (talk) 17:59, 11 December 2015 (UTC)
- But it is. The purpose of the test is to prove that
- Well, well, but it is not the point to make it run off the page, so that's nonsense. Lordtobi (✉) 17:32, 11 December 2015 (UTC)
- Hey, that works in FF and IE. 80.132.105.11 (talk) 17:25, 11 December 2015 (UTC)
- Trappist: Looks to me like the sandbox version is working correctly; when you feel confident in it going live, I see no reason to not proceed, and to update {{'}} and {{`}} as well. — Huntster (t @ c) 21:06, 11 December 2015 (UTC)
- @Huntster: Since Trappist is not responding, I'd like to say that it is a great solution and should go live as soon as possible, wrapping it up:
- —Thanks, Lordtobi (✉) 21:11, 21 December 2015 (UTC)
- Trappist: Looks to me like the sandbox version is working correctly; when you feel confident in it going live, I see no reason to not proceed, and to update {{'}} and {{`}} as well. — Huntster (t @ c) 21:06, 11 December 2015 (UTC)
Suggested change
edit- Since the {{'}} template still uses zero width spaces, I'd suggest to 1) Turn the {{'}} template into
'
, which produces the apostrophe just fine without any complications, then 2) Make the {{`}} template redirect to {{'}}, since it does the exact same thing, and 3) Make this template independent by turning it into's
, which also works fine. (1 and 2 have also been stated on the {{'}} talkpage) Lordtobi (✉) 08:09, 11 December 2015 (UTC)- That sounds good. It seems to me that proper kerning is the browser's job. I understand that many browsers are incapable of doing this right, but adding our own HSP guarantees that it will be impossible for a correctly behaving browser to do the kerning itself. Making these templates simply insert their corresponding characters with no extra space or space-like characters would be fine. Kendall-K1 (talk) 12:19, 11 December 2015 (UTC)
- For maximum compatiblity, I'd suggest to turn {{'}} into
 '
(  being the hair space [as Trappist mentioned above] and ' the apostrophe) and {{'s}} either into{{'}}s
(dependent) or into 's
(independent). Then, again, {{`}} should redirect to {{'}}, since it produces the same character, so that those are covered as well and that there is no need for to make a bot do it. Lordtobi (✉) 14:14, 11 December 2015 (UTC)- That would be incompatible with any browser that does kerning correctly. But I don't know if such browsers actually exist. I know mine doesn't. Kendall-K1 (talk) 16:24, 11 December 2015 (UTC)
- I don't know such a browser either, for anything else, the
 
hair space should do it, just like it did before, this time without any possible cite errors. Lordtobi (✉) 16:29, 11 December 2015 (UTC)
- I don't know such a browser either, for anything else, the
- That would be incompatible with any browser that does kerning correctly. But I don't know if such browsers actually exist. I know mine doesn't. Kendall-K1 (talk) 16:24, 11 December 2015 (UTC)
- For maximum compatiblity, I'd suggest to turn {{'}} into
- That sounds good. It seems to me that proper kerning is the browser's job. I understand that many browsers are incapable of doing this right, but adding our own HSP guarantees that it will be impossible for a correctly behaving browser to do the kerning itself. Making these templates simply insert their corresponding characters with no extra space or space-like characters would be fine. Kendall-K1 (talk) 12:19, 11 December 2015 (UTC)
Does the apostrophe actually cross the T for anyone? >>> T's <<< It doesn't for me. Although it should work like Trappist describes it works in Chrome, it is probably not worth the trouble when many browsers don't support it. 80.132.105.11 (talk) 17:05, 11 December 2015 (UTC)