Template talk:Nihongo

Latest comment: 4 days ago by Imaginatorium in topic sometimes italicizes stuff

Footnote option

edit

Would it be reasonable to add an option to display the Japanese text in a footnote? I’m thinking as another option like |lead=footnote. This would be good for lead sentences that are overburdened by the lengthy parenthetical, like at Kyoto Animation arson attack.  HTGS (talk) 21:35, 19 October 2025 (UTC)Reply

{{nihongo foot}}?
Trappist the monk (talk) 21:40, 19 October 2025 (UTC)Reply
Thank you!  HTGS (talk) 21:53, 19 October 2025 (UTC)Reply

Incorrect ipa

edit

The character ひ is using incorrect ipa ç in place of h. Please look into the matter.

Thanks Siddhu Talreja (talk) 08:46, 24 October 2025 (UTC)Reply

{{Nihongo}} has nothing to do with IPA. While IPA information may be placed in either of the |extra= and |extra2= parameters, this template does nothing with those parameters except to display whatever is given in them. If you are finding an improper phonetic notation for a particular character, you must raise the issue at the article's talk page; {{Nihongo}} is not the source of your issue.
If you wish to raise an issue about something somewhere in the vastness of en.wiki, always report where and under what conditions others may see the issue; be precise.
Trappist the monk (talk) 11:53, 24 October 2025 (UTC)Reply
Thanks for guiding. Sorry for the inconvenience Siddhu Talreja (talk) 17:44, 24 October 2025 (UTC)Reply
edit

{{Lang-zh}} has an optional parameter links=no to suppress links when labels are shown. I propose adding this parameter also to {{Nihongo}} to suppress links on the labels generated by its optional parameter lead=yes; it should be ignored if lead=no or omitted altogether. ‐⁠‑🌀⁠SilSinnAL982100💬 17:05, 1 December 2025 (UTC)Reply

sometimes italicizes stuff

edit

these templates (ie, this one & the other nihongo* templates in `## see also`) as used on List of Japanese typographic symbols cause some really ugly italicization like 「」 or even worse . I think this may be because the {{lang}} template is a little overeager with italicizing latin text, so the `italic=unset` parameter should be provided to that template wherever it is used; but I haven't actually looked at anything. rokke (talk) 08:27, 21 February 2026 (UTC)Reply

Yes, this really is bad. Japanese text, actually, in the real world, not the fantasy world of "software standards" cannot be italicised; there is no such thing as an italic あ, for example. But the <i> tag mindlessly slopes things, which it should never be allowed to do. It's also mildly amusing that on this page (List of Japanese typographic symbols) the separate top and bottom halves of a kana repetition sign actually get broken, because the tops and bottoms do not line up. Imaginatorium (talk) 13:03, 21 February 2026 (UTC)Reply
I tried |italic=unset in the sandbox of {{Nihongo2}} and it removed the italics indeed: Template:Nihongo2/testcases. I wonder if it is possible to make template {{lang}} do it automatically, the way it already does with kanji and kana? Can we add CJK Symbols and Punctuation to the detection logic of Module:Lang? —⁠andrybak (talk) 13:16, 21 February 2026 (UTC)Reply
U+300C: LEFT CORNER BRACKET (「) and U+300D: RIGHT CORNER BRACKET (」) are punctuation characters. For the purpose of determining whether the <text> passed to {{lang}} is Latn or not, all punctuation is treated as if it is Latn because for {{lang}} to assert that the given <text> is Latn, all characters in <text> must be Latn or punctuation. This can be demonstrated:
{{lang|ja|!!}}!!
Because there is nothing else in the <text>, the ambiguous punctuation is presumed to be Latn. If we add text that is not Latn:
{{lang|ja|「書」}}「書」
If a fix is to be made to {{nihongo2}}, perhaps the fix should be to use {{langr}} instead of {{lang}}:
{{langr|ja|「」}}「」
Alternatively, at List of Japanese typographic symbols, you might replace:
style="font-size: 2em;" | {{nihongo2|「」}}
with:
{{langr|ja|「」|size=2em}}「」
Trappist the monk (talk) 15:39, 21 February 2026 (UTC)Reply
You say: "...the ambiguous punctuation is presumed to be Latn..."; but this is an error. The punctuation is unambiguously not Latin. So at some level or other the definition of "ambiguous punctuation" or "punctuation" needs to be changed. Where is it specified that 「 for example is "possibly latin punctuation"? Imaginatorium (talk) 17:29, 21 February 2026 (UTC)Reply
Module:Lang gets most of its data from Module:Unicode data/scripts. Module:Lang is currently Unicode v16 data so U+300C and U+300D are included at line 494 (U+3008–U+3020) where they are assigned the script Zyyy (it is the same for v17). Zyyy as a script tag originates from ISO 15924 which is used by IANA and by Unicode. In Module:Lang/data/iana scripts at line 225, IANA includes Zyyy as 'Code for undetermined script'; see the IANA language-subtag-registry file. At Unicode, Zyyy is mapped to the alias 'Common' at https://www.unicode.org/Public/16.0.0/ucd/PropertyValueAliases.txt and at https://unicode.org/iso15924/iso15924-codes.html. At https://www.unicode.org/Public/16.0.0/ucd/Scripts.txt, U+300C and U+300D are defined as:
300C          ; Common # Ps       LEFT CORNER BRACKET
300D          ; Common # Pe       RIGHT CORNER BRACKET
The comment (#et seq.) categorizes U+300C as Ps (opening punctuation of a pair) and U+300D as Pe (closing punctuation); see Table 12. General_Category Values at Unicode. This is no different from U+201C: LEFT DOUBLE QUOTATION MARK (“) and U+201D: RIGHT DOUBLE QUOTATION MARK (”); both of which I regularly find in Japanese text in en.wiki articles (usually in cs1|2 |title= parameters because that is where I spend most of my gnoming time).
Module:Lang treats characters of unknown script (Zyyy) as Latn because that is all that it knows about the character. While my description above indicates that U+300C and U+300D are punctuation characters, Module:Lang does not know that they are punctuation characters so defaults to rendering a string of Zyyy punctuation characters as if it were Latn script (italic) – any non-Latn character will cause Module:Lang to render all of the characters in an upright style. There are workarounds that have been described above.
Trappist the monk (talk) 23:40, 21 February 2026 (UTC)Reply
Long time ago, but a followup... When I wrote "This is an error" above, I really meant it. Do I understand correctly that basically all the Unicode-related standards simply do not classify punctuation characters as belonging to a script? In that case the script discrimination has to be moved down to somewhere under WP control, and it looks like that should mean "Module:Lang". You say it
treats characters of unknown script (Zyyy) as Latn", and now this is an error. It should only treat any script as "Latn" if there is evidence for it being Latin. This would only mean (I think) that any string consisting entirely of punctuation (or "non-letter" characters in Roman text) would not get sloped, where previously it did get sloped. Would this be a problem? Imaginatorium (talk) 07:46, 11 June 2026 (UTC)Reply