「モジュール:ja-headword」の版間の差分

削除された内容 追加された内容
漢字表記語の仮名表記
読み仮名に「する」を付けるかどうかはページ名に合わせる。
 
150行目:
 
-- go through args and build inflections by finding whatever kanas were given to us
local function find_inflections(args, data, PAGENAME, conj, suru_in_pagename)
local detect_result = detect_kana_script(PAGENAME)
local function romanization(auto_rom)
219行目:
 
-- かな表記をtranslitとする。
if data.pos_category == "動詞" and conj == "する" and not suru_in_pagename then
table.insert(data.translits, allkana[i] .. "する")
else
244行目:
local reki = args["hhira"] or args["reki"] or ""
if reki ~= "" then
if data.pos_category == "動詞" and conj == "する" and not suru_in_pagename then
table.insert(data.inflections, {label = "歴史的仮名遣い", "[[" .. reki .. "]][[する]]"})
else
318行目:
local head = args["head"] or mw.ustring.gsub(PAGENAME, "[" .. kanji_range .. "]", '[[%0]]')
 
local suru_in_pagename = false
if poscat == "動詞" and conj == "する" then
local base, count = head:gsub("する$", "")
if count == 1 then
suru_in_pagename = true
require("Module:debug").track("ja-headword/suru in pagename")
end
340 ⟶ 342行目:
find_kanji(args, PAGENAME, data)
if data.pos_category == "動詞" and conj == "する" and not suru_in_pagename then
for i, v in ipairs(data.kanji) do
data.kanji[i] = "[[" .. v .. "]]する"
349 ⟶ 351行目:
kyu = nil
else
if data.pos_category == "動詞" and conj == "する" and not suru_in_pagename then
table.insert(data.inflections, {label = "旧字体", "[[" .. kyu .. "]][[する]]"})
else
357 ⟶ 359行目:
if shin ~= "" then
if data.pos_category == "動詞" and conj == "する" and not suru_in_pagename then
table.insert(data.inflections, {label = "新字体", "[[" .. shin .. "]][[する]]"})
else
376 ⟶ 378行目:
-- sort out all the kanas and do the romanization business
find_inflections(args, data, PAGENAME, conj, suru_in_pagename)
 
---------------------------------------------------------------------------------