Jump to content

සැකිල්ල:ja-add/documentation

Wiktionary වෙතින්
Documentation for සැකිල්ල:ja-add. [edit]
This page contains usage information, categories, interwiki links and other content describing the template.

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.

  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

[සංස්කරණය]

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


"https://si.wiktionary.org/w/index.php?title=සැකිල්ල:ja-add/documentation&oldid=167928" වෙතින් සම්ප්‍රවේශනය කෙරිණි