Jump to content

Template talk:Nihongo

Page contents not supported in other languages.
From Wikipedia, the free encyclopedia
(Redirected from Module talk:Nihongo/doc)

Any support for square brackets?

[edit]

Any support for square brackets to use within parentheses? —  AjaxSmack  14:09, 11 March 2024 (UTC)[reply]

What support do you think is required? Inputs to the template may include square brackets. Always give a real-life example of what you think does not work.
Trappist the monk (talk) 14:26, 11 March 2024 (UTC)[reply]
Just the standard (if not universal) use of square brackets for nested parentheticals. It's come up in edits I've made in the past, but I don't remember where. I usually just avoid this template when I'm writing and recast the sentence when I'm editing. Here's a hypothetical case though: "The bowed legs of the table (despite the Japanese name sabi-wabi (寂び侘び)) are neither subdued nor austere." While in this case I would replace the parentheses (brackets) with commas, in other cases it won't work, like in "The 45 cm (1.5-shaku ()) flute is an integral part of the orchestra." AjaxSmack  00:03, 12 March 2024 (UTC)[reply]
First off, if you are going to use this template, use it correctly. Above you wrote:
  • {{Nihongo|''sabi-wabi''|寂び侘び}}sabi-wabi (寂び侘び)
  • {{Nihongo|''shaku''|}}shaku ()
You should have written:
  • {{Nihongo||寂び侘び|sabi-wabi}}sabi-wabi (寂び侘び)
  • {{Nihongo|||shaku}}shaku ()
Yeah, the renderings look the same but in fact they aren't; cf:
  • ''sabi-wabi''<span style="font-weight: normal"> (<span title="Japanese-language text"><span lang="ja">寂び侘び</span></span>)</span>
  • <span title="Hepburn transliteration"><i lang="ja-Latn">sabi-wabi</i></span><span style="font-weight: normal"> (<span title="Japanese-language text"><span lang="ja">寂び侘び</span></span>)</span>
Pretty sure that we could add a parameter, |use-square-brackets=yes (default case no) or some such, that would cause Module:Nihongo to render square brackets instead of parentheses.
Trappist the monk (talk) 00:55, 12 March 2024 (UTC)[reply]
Thanks for the usage tip. Such arcanity is why I usually avoid this template.  AjaxSmack  03:32, 12 March 2024 (UTC)[reply]

Support for kanji and kana?

[edit]

Is there any way to get this template display kanji and kana in separate fields. Many plants in Japanese use both katakana and kanji depending on the context (e.g. "Called seri (セリ; ) in Japanese, it is..." from Oenanthe javanica.) Cf. {{zh}} where you can get things like 台灣國; 台湾国; Tâi-oân-kok; ㄉㄞˊㄨㄢˊㄍㆦㆻ. —  AjaxSmack  17:54, 22 August 2024 (UTC)[reply]

Comes the editor who, in another discussion on this page, wrote: Such arcanity is why I usually avoid this template. Asking for yet more arcanity?
I can imagine new parameters. If any one of them is present, the value assigned to the second positional parameter would be ignored – the second positional parameter would still be required so that the third positional parameter works. Apparently there are three Japanese writing systems. If we are to consider this, is it worth supporting all of them?
katakana|kana=; ISO 15924 script Kana
kanji|kanji=; ISO 15924 script Hani
hiragana|hira=; ISO 15924 script Hira
If we do this what should the rendering look like when more than one of these script specific texts are used in a {{nihongo}} template?
Trappist the monk (talk) 20:07, 22 August 2024 (UTC)[reply]
Thanks for your time on this. "Comes the editor ... Asking for yet more "arcanity"?" Touché. The kind of arcanity I was referring to is how {{nihongo}} operates quite differently from other similar language templates. Adding optional features, while technically arcane, does not require all users to know these.
"[T]he value assigned to the second positional parameter would be ignored – the second positional parameter would still be required..." Like this: {{nihongo|seri|​|kana=セリ|kanji=芹}}seri (katakana: セリ; kanji: ), or do you mean there'd actually need to be text in the second positional parameter?
"[I]s it worth supporting all of them?" Well, they're already supported; it's a matter of being able to provide them separately so that they could be labeled.
"If we do this what should the rendering look like..." I'm not sure what you mean. Do you mean should they be labeled or should they be in a certain order or...? I am an interloper from the world of {{zh}} where linked labels, unlinked labels, no labels and reordering parameters are all possible.  AjaxSmack  00:08, 15 September 2024 (UTC)[reply]
{{lang}} was created 25 January 2005; {{nihongo}} was created 9 October 2005‎; {{lang-zh}} was created (as {{zh}}?) 18 September 2009‎; all by different editors so you should not be surprised that they all operate differently.
Yeah, like that mostly
{{nihongo|seri||kana=セリ|5=kanji=芹|lead=yes}}
might render something like this:
seri (katakana: セリ; kanji: )
without |lead=
{{nihongo|seri||kana=セリ|5=kanji=芹}}
might render something like this:
seri (セリ; )
Not what I meant. What I'm asking is: should we support all three writing systems with three separate parameters: |kata=<katakana text>, |kanji=<kanji text>, |hira=<hiragana text>?
Labeling is linked to |lead= so it is important that whatever ordering we choose, it should be consistent, labeling or no.
Trappist the monk (talk) 14:43, 15 September 2024 (UTC)[reply]
So I've hacked Module:Nihongo/sandbox to use |kana= and |kanji=:
  • {{nihongo/sandbox|seri|some stuff that gets ignored|kana=セリ|kanji=|lead=yes}} – ignores whatever is in {{{2}}}
    seri (Japanese: some stuff that gets ignored)
  • {{nihongo/sandbox|seri||kana=セリ|kanji=|lead=yes}} – ignores empty {{{2}}}
    error: {{nihongo}}: Japanese or romaji text required (help)
  • {{nihongo/sandbox|seri||kana=セリ|kanji=}} – kana and kanji no lead
    error: {{nihongo}}: Japanese or romaji text required (help)
  • {{nihongo/sandbox|seri||kana=セリ|lead=yes}} – kana
    error: {{nihongo}}: Japanese or romaji text required (help)
  • {{nihongo/sandbox|seri||kana=セリ}} – kana no lead
    error: {{nihongo}}: Japanese or romaji text required (help)
  • {{nihongo/sandbox|seri||kanji=|lead=yes}} – kanji
    error: {{nihongo}}: Japanese or romaji text required (help)
  • {{nihongo/sandbox|seri||kanji=}} – kanji no lead
    error: {{nihongo}}: Japanese or romaji text required (help)
I need to rewrite what I've done so that I can incorporate |hira=
Trappist the monk (talk) 22:31, 15 September 2024 (UTC)[reply]

Why are the romanizations huge?

[edit]

Looking at an article like Hikikomori, the term "Hikikomori" is in a significantly larger font size than surrounding text, which looks really unprofessional. Is there a good reason for this? (I'm on Safari on a Mac, in case that matters.) Toadspike [Talk] 21:04, 6 November 2024 (UTC)[reply]

For {{nihongo}}, the ordering of parameters is:
{{Nihongo|<english>|<kanji/kana>|<rōmaji>|<extra>
That mess at the start of Hikikomori is:
{{nihongo||ひきこもり {{lang|en|or}} 引きこもり| '''Hikikomori'''| {{small|[[Literal translation|lit.]]&nbsp;}}"pulling inward, being confined"|lead=yes}}
Hikikomori (Japanese: ひきこもり or 引きこもり, lit. "pulling inward, being confined")
<span title="Hepburn transliteration"><i lang="ja-Latn">'''Hikikomori'''</i></span><span style="font-weight: normal"> ([[Japanese language|Japanese]]: <span lang="ja">ひきこもり <span title="English-language text"><span lang="en">or</span></span> 引きこもり</span>, <span style="font-size:85%;">[[Literal translation|lit.]]&nbsp;</span>"pulling inward, being confined")</span>
In the final rendering, 'Hikikomori' is marked up as ja-Latn. There have been times when editors have complained that {{nihongo}} or it underlying Module:Lang is doing something funny with fonts. Neither of these apply fonts; that is the responsibility of your browser
Does what you are seeing look like this:
<i lang="ja">'''Hikikomori'''</i>
Hikikomori
With my browser (chrome win 10), 'Hikikomori' isin the above example is rendered with a finer slightly smaller font. Some browsers don't properly distinguish between the lang="ja" and lang="ja-Latn" html attributes.
Also, the gloss in <extra> should be using single quotes.
Trappist the monk (talk) 23:52, 6 November 2024 (UTC)[reply]
Thanks for the explanation. If I understand correctly, we're sticking with this because it's correct markup, and browsers just happen to display it in an ugly way? Toadspike [Talk] 09:35, 7 November 2024 (UTC)[reply]
Yes.
Trappist the monk (talk) 14:21, 7 November 2024 (UTC)[reply]

Comma and semicolon separator

[edit]

I request a method to specify the separator used between the Japanese text and extra parameter for use in the lead paragraphs, as it currently is not possible. take the following text:

Satoru Iwata (Japanese: 岩田 聡, Hepburn: Iwata Satoru, December 6, 1959 – July 11, 2015) was ...

the correct formatting would be with a semicolon, not a comma, after the Hepburn romanization and before the date.

Satoru Iwata (Japanese: 岩田 聡, Hepburn: Iwata Satoru; December 6, 1959 – July 11, 2015) was ...

one simply option would be to automatically change it to a semicolon whenever |lead=yes is passed. Juwan (talk) 16:47, 6 December 2024 (UTC)[reply]