Template talk:nb...

From Wiktionary, the free dictionary
Jump to navigation Jump to search

Edits to the template[edit]

@ShakespeareFan00: what issue are you trying to fix with your edits to this template (and {{...}})? (Also pinging @Erutuon in case they can assist.) — SGconlaw (talk) 11:15, 16 January 2021 (UTC)Reply

forespeak was claiming a misnested SPAN tag. If I escape or nowiki the brackets in this template and {{...}} so that the parser cannot possibly see the use of this template as link syntax., it fixes it for that entry. However, if I do escape the brackets, then a number of other entires apparently generate mis-nested CITE tags in a number of entires using these templates. ShakespeareFan00 (talk) 11:26, 16 January 2021 (UTC)Reply
One of the underlying problems is that some of the parameters used in {{quote}} and related templates apparently assume that they will get plain-text, or a text string without embedded links (even unintended ones [like this].) {{nb...}} and {{...}} also use the title parameter of a SPAN. Due to this a SPAN construction is trying to be placed inside the title= paramater of another span, That will not work, hence the implementation of inline on {{...}}. A longer term stable fix for this template and or it's wider usages would be greatly appreciated..

12:36, 16 January 2021 (UTC)

In that case, hopefully either @Benwing2 or @Erutuon can look into it, as such programming is beyond me. — SGconlaw (talk) 14:55, 16 January 2021 (UTC)Reply
More specfically -
[https://books.google.com/books?id=twtOAAAAcAAJ&pg=RA3-PA12-IA1 {{nb...|after the Ordre of the Alphabet. The First Nomber Noteth the Chapter, and the Seconde the Verse.}}]
</syntaxhihglight>

Is in effect generating..
<syntaxhighlight lang=html>
[https://books.google.com/books?id=twtOAAAAcAAJ&pg=RA3-PA12-IA1 <span class="q-hellip-sp">&nbsp;</span><span class="q-hellip-b">[</span><span title="after the Ordre of the Alphabet. The First Nomber Noteth the Chapter, and the Seconde the Verse."></span><span class="q-hellip-b">]</span><span class="q-hellip-b"></span>]

which in turn generates ..

<p><a rel="nofollow" class="external text" href="https://books.google.com/books?id=twtOAAAAcAAJ&amp;pg=RA3-PA12-IA1"><span class="q-hellip-sp">&#160;</span><span class="q-hellip-b">[</span><span title="after the Ordre of the Alphabet. The First Nomber Noteth the Chapter, and the Seconde the Verse."></span><span class="q-hellip-b"></span></a><span class="q-hellip-b"></span>]
</p>

which is mis-parsed, It's treating the first ] it sees as the end of the link, not the second one which would be the correct termination. ShakespeareFan00 (talk) 16:30, 17 January 2021 (UTC)Reply

@ShakespeareFan00: Understand that your revert broke an external link before reverting. J3133 (talk) 07:56, 22 January 2021 (UTC)Reply

Specfic diff please, And perhaps you'd also like to explain why the changes YOU made, caused even more lint-errors to appear https://en.wiktionary.org/wiki/Special:LintErrors/html5-misnesting?namespace=0 when the version I reveretd to did not.

Which SPECFIC page and external links broke? ShakespeareFan00 (talk) 10:30, 22 January 2021 (UTC)Reply

@ShakespeareFan00: Lint errors are not visible nor break anything. J3133 (talk) 10:38, 22 January 2021 (UTC)Reply
I'm sorry, I expect you to actually answer the question I asked. Which SPECFIC page and external links broke?, so that the other contributors here can actually fix the REAL underlying problem, as opposed to the symptomatic one in this template.ShakespeareFan00 (talk) 10:48, 22 January 2021 (UTC)Reply
@ShakespeareFan00: I expect you to stop bothering other contributors on this fuss of a “problem” you made. J3133 (talk) 10:51, 22 January 2021 (UTC)Reply
(Sigh) Either you don't actually understand WHY the "problem" existsed, or you are not assuming good faith. I don't have time to continue with this, and will be carefully reverting and removing any changes I made related to this. Perhaps someone else can come up with a more stable long-term solution?
See also User_talk:ShakespeareFan00#Edits_to_quotation_templates_–_please_stop_temporarily and Template_talk:RQ:Homer_Chapman_IliadsShakespeareFan00 (talk) 11:11, 22 January 2021 (UTC)Reply
@ShakespeareFan00: By reading these discussions I see that no one had a problem with the templates until you came and then were asked to stop editing the templates. J3133 (talk) 11:26, 22 January 2021 (UTC)Reply

I've now reverted nearly all of my good faith efforts to repair the Lint-Errors that result from use of this or the related {{...}} template. ( I don't have objections to the edits concerned being carefully reinstated, if the intended fixes are deemed by consensus to have been reasonable.)

No-one had a problem with these templates previously, because the mal-formed HTML generated by certain wiki-text uses (I've explained why elsewhere in linked talk pages) was being cleaned up internally by the old parser (sometimes not as effectively as it could be) or by a browser. However, the new parser and some more recent browsers are less tolerant of the mal-formed HTML construction that certain (mis)uses of wkitext generate. Special:LintErrors identifies these, including the issue resulting from the interaction of this template with others. Whilst this mal-formed HTML doesn't necessarily result in visible glitches, there is no ongoing certainty that the wiki-text parser or HTML standard will continue to support mal-formed constructions indefinitely. Thus LintErrors that are identified need to be removed, to ensure pages will not be broken in the future. ShakespeareFan00 (talk) 12:30, 22 January 2021 (UTC)Reply

Replacement of square brackets with &#91; and &#93;[edit]

@Sgconlaw Re your edit summary: why would it cause problems elsewhere if [ is merely a form of [, equivalent to it (and ] of ])? J3133 (talk) 11:17, 22 January 2021 (UTC)Reply

I’ve tried it before. I am not sure why but it breaks stuff in quotation templates. Copy the template to a sandbox and try it. — SGconlaw (talk) 11:26, 22 January 2021 (UTC)Reply
@Sgconlaw: A template that uses [ and ] instead could be created and used where it works until the problems are fixed. J3133 (talk) 11:31, 22 January 2021 (UTC)Reply
Not sure what you’re proposing. If it doesn’t work in this template at the moment, it won’t work in any other template, so it’s better to wait and see if @Benwing2 can figure out what’s wrong and fix it. — SGconlaw (talk) 11:36, 22 January 2021 (UTC)Reply
@Sgconlaw: Compare:
[ and ] (does not work (] is outside the link)):
&#91; and &#93; (works):
J3133 (talk) 11:41, 22 January 2021 (UTC)Reply
@J3133: see {{nb.../sandbox}} and {{nb.../testcases}}. The markups that create problems are:
  • Example 2: {{quote-book}} and other quotation templates are supposed to unitalicize the brackets and ellipsis in titles, but are unable to recognize them if they are replaced by &#91; and &#93;.
  • Example 3: |title=Just Testing:{{nb...|[...] A Book about How to Carry out Tests}}, that is, the addition of "[...]" within {{nb...}}, breaks {{quote-book}}.
SGconlaw (talk) 12:21, 22 January 2021 (UTC)Reply
One minor fix that would help immensely is fixing the module that de-italicizes, so that it recognizes &#91; and &#93; as [ ] and &hellip as ... ShakespeareFan00 (talk) 12:35, 22 January 2021 (UTC)Reply
@Sgconlaw: &#91;...&#93; (example 4) could be used instead of [...] (example 3). J3133 (talk) 13:34, 22 January 2021 (UTC)Reply
@J3133: thanks, that's a good workaround. — SGconlaw (talk) 13:38, 22 January 2021 (UTC)Reply
Or to be really sure &#91;&hellip;&93; with all of it escaped in the simplest case. ShakespeareFan00 (talk) 15:16, 22 January 2021 (UTC)Reply


A question. Are the brackets generated by this template always going to be de-italicsed? ShakespeareFan00 (talk) 13:26, 22 January 2021 (UTC)Reply
@ShakespeareFan00: the intent is only if they appear in titles, which are already italicized. I'm not sure if they ought to be deitalicized elsewhere; can't think of any other situations at the moment. — SGconlaw (talk) 13:38, 22 January 2021 (UTC)Reply
See the current sandbox. And if the difference between this template and {{...}} is a matter of spacing surely that's a use for Templatestyles? ShakespeareFan00 (talk) 15:16, 22 January 2021 (UTC)Reply
Also do you know anyone that writes LUA code? Another answer to this would be for a Module version of this to call into the deitlicization routine itself. Then it wouldn't need 3 templates doing broadly the same thing, namley {{...}} {{nb...}} and {{sqbrace}} ShakespeareFan00 (talk) 15:26, 22 January 2021 (UTC)Reply
Also see - Module:italics/documentation, the relevant module can't necessarily "see" the brackets if they are inside wikitext generated from a template as evidenced by the test cases that were added over 2 years ago. (Maybe the relevant module isn't fully expanding the template output before processing the string to be de-italicized?) ShakespeareFan00 (talk) 12:40, 22 January 2021 (UTC)Reply

Visual distinction needed from normal ellipsis[edit]

It would be helpful for there to be some visual distinction between the ellipsis displayed by {{nb...}} and that displayed by {{...}}, which displays what is customary. {{nb...}} allows a viewer to see by hovering what is omitted, whereas {{...}} does not. If the content of {{nb...}} is worth having in the entry, then viewers need to be enticed (or tricked!) into hovering. It would take a casual user some time to stumble upon the difference, if indeed such user ever would. Perhaps different (curly?) brackets would suffice, but anything different would help. DCDuring (talk) 00:23, 17 March 2023 (UTC)Reply

@DCDuring: I believe both templates have that feature. — Sgconlaw (talk) 22:50, 5 September 2023 (UTC)Reply
Then users of both templates might benefit from some visual distinction between ellipsis with tooltips and ellipsis without. DCDuring (talk) 12:17, 6 September 2023 (UTC)Reply