Jump to content

Template:ja-add

From Wiktionary, the free dictionary

A variant of {{ja-see}}, used if there is already a ==Japanese== section and you want to add new words/readings to it.

Uses the add function of Module:ja-new.

How to use

[edit]
  1. Click the "[ edit ]" link on the Japanese L2 header.
  2. Replace all text in the edit window with {{subst:ja-add|...}}.
  3. Preview and save.

The parameters are the same as {{ja-new}} except that you don't need to take care of |en= and |ref=.

What the template does

[edit]

The template gets the content of the current page and extracts its Japanese section (including the following "----" if present). Then it checks the L3 headers of the Japanese section. If there are multiple Etymology sections, a new Etymology section (automatically numbered) is generated with {{ja-new}}. Otherwise the existing sections (except ===Kanji===) are increased one level and grouped under ===Etymology 1===, and the new word/reading is generated as ===Etymology 2===. Finally, if there is only a ===Kanji=== section, the new word/reading is generated by simply calling {{ja-new}}, with the POS headers on L3. The new content is inserted before ===References=== if there is one, or otherwise at the very end of the ==Japanese== section (before the potential "----").[note 1] Finally, the new Japanese section with new content inserted is substituted for the template and replaces the previous one.

If the Korean-related parameters are used, the Korean section is simply inserted after the Japanese section.[note 2]

Notes
  1. ^ after any category links or templates (this may be undesirable)
  2. ^ this may break the alphabetic order if there is any language between J and K, or result in two Korean sections if there is already one