Template talk:Nihongo-Dev

From Wikipedia, the free encyclopedia

Contents

[edit] Important Notice

This template is in development. It should not be used on any encyclopedic article, for it may change without notice at any time.

[edit] Base version

Based directly on the copied version of Template:nihongo from 17 August. Foreign language version links removed, category commented out. Should be restored if this is copied to main version.

[edit] Undocumented usage

Since I didn't know how to put this all into the usage panel, I'll just describe it here.

{{nihongo-Dev|english|kanji|romaji|extra|extra2|type}}

type is a named variable that has (currently) the following possible values (and yes, the double-quotation marks are part of the value):

  • "qmark" produces a question mark, identical to existing template behavior.
  • "text" replaces the question mark with the text Help
  • "both" replaces the question mark with the text Help? (just as an alternative)
  • "none" removes the question mark and leaves nothing. useful if you are using a dozen Japanese words on a screen and the author thinks all those blue question marks are annoying. Only the first could be marked, and proceeding ones left blank.

For example:

{{nihongo-Dev|'''English'''|邦字|type="none"}} produces :

English (邦字).

(Version as of writing this: English (邦字) )


{{nihongo-Dev|'''English'''|邦字|Romaji|||"both"}} produces :

English (邦字 RomajiHelp?).

(Version as of writing this: English (邦字 RomajiHelp?) )


Also, notice the suppressed italics behavior in the tests below.

[edit] Some basic, unorganized, tests

This is copied from Tsuji's sandbox:

Note: These tests are not subst: therefore behavior may change if edited. refer to versions listed on timestamps to view expected behavior.

default (no 6th field used, default behavior):

English (Kanji Romaji?, Extra) Extra2


all (6) fields filled, named variable 6th:

English (Kanji Romaji?, Extra) Extra2

English (Kanji RomajiHelp, Extra) Extra2

English (Kanji RomajiHelp?, Extra) Extra2

English (Kanji Romaji, Extra) Extra2


all (6) fields filled, un-named variable 6th:

English (Kanji Romaji?, Extra) Extra2

English (Kanji RomajiHelp, Extra) Extra2

English (Kanji RomajiHelp?, Extra) Extra2

English (Kanji Romaji, Extra) Extra2


not all fields filled, named variable:

English (Kanji Romaji?)

English (Kanji RomajiHelp)

English (Kanji RomajiHelp?)

English (Kanji Romaji)


blank fields used. unnamed variable 6th:

English (Kanji Romaji?)

English (Kanji RomajiHelp)

English (Kanji RomajiHelp?)

English (Kanji Romaji)


Italics test (there are italics tags on either side of this template usage).

English (Kanji RomajiHelp, Extra) Extra2


Note:All ^observed behavior consistent as of 06:11, 18 August 2006 (UTC)

testing for abberant behavior.

empty 6th field:

English (Kanji Romaji?, Extra) Extra2

named empty 6th field:

English (Kanji Romaji?, Extra) Extra2

un-named parameter in the wrong place (this shouldn't work):

English (Kanji Romaji?, "text")

named parameter out of order:

English (Kanji RomajiHelp, Extra)

bad value for nemed parameter:

English (Kanji Romaji?, Extra) Extra2

This chunk of results is consistent as of 06:31, 18 August 2006 (UTC)


using extra parameters:

English (Kanji RomajiHelp?, Extra) Extra2

using 6th paramater and then named parameter: (Note: 6th parameter takes precedence over named)

English (Kanji RomajiHelp?, Extra) Extra2

using named parameter first, then 6th parameter: (Note: 6th parameter takes precedence over named)

English (Kanji RomajiHelp?, Extra) Extra2

using named parameter twice: (Note: second usage of named parameter takes precedence)

English (Kanji RomajiHelp, Extra) Extra2

These results are tested at 03:00, 19 August 2006 (UTC)


Preceding three four sections, signed --Tsuji 06:53, 18 August 2006 (UTC)

[edit] Span ID's

I'm not sure if my changes appropriately allow for user customization options that might be accomplished though span ID tagging used in the current Template:Nihongo. I have to leave that to a more knowlegable person. =) --Tsuji 07:01, 18 August 2006 (UTC)