Modul:ja-headword: Redaktələr arasındakı fərq

Silinən məzmun Əlavə edilmiş məzmun
Redaktənin izahı yoxdur
Redaktənin izahı yoxdur
Sətir 91:
-- (this category is for maintenance because many of these need attention)
local function singlekanji_term(categories, PAGENAME)
if mw.ustring.len(PAGENAME) == 1 and mw.ustring.match(PAGENAME, '[一-鿌]') then
table.insert(categories, "Japanese terms spelled with " .. PAGENAME)
table.insert(categories, "Japanese single-kanji terms")
end
end
 
Sətir 115 ⟶ 118:
 
-- check auto rom against manual and put in hidden category if they differ
if rom ~= auto_rom then table.insert(categories, "Japanese terms with romaji needing attention") end
 
-- throw an error if there is no romanization
Sətir 229 ⟶ 233:
num_readings = num_readings + 1
end
if num_readings > 1 then table.insert(categories, "Japanese words with multiple readings") end
end
 
Sətir 234 ⟶ 239:
local function extra_categorization(categories, PAGENAME, katakana_category)
-- if PAGENAME is hiragana, put in that category, same for katakana (but do it at the end)
if detect_kana_script(PAGENAME) == 'hira' then table.insert(categories, "Yapon hiragana") end
if detect_kana_script(PAGENAME) == 'kata' then table.insert(katakana_category, "Yapon katakana") end
if mw.ustring.find(PAGENAME, "[^" .. Japanese_scripts_range .. "]") and mw.ustring.find(PAGENAME, '[' .. Japanese_scripts_range .. ']') then
table.insert(categories, "Yapon terms written in multiple scripts") end
Sətir 258 ⟶ 265:
if tr == "in" then table.insert(inflections, {label = "intransitive"}) end
if tr == "both" then table.insert(inflections, {label = "transitive and intransitive"}) end
else
table.insert(categories, "Japanese verbs without transitivity")
end
 
Sətir 264 ⟶ 273:
conjugation = aliases[conjugation] or conjugation
if conjugation ~= "" then
if conjugation == "1" then table.insert(inflections, {label = "godan conjugation"}); table.insert(categories, "Japanese type 1 verbs") end
if conjugation == "2" then table.insert(inflections, {label = "ichidan conjugation"}); table.insert(categories, "Japanese type 2 verbs") end
if conjugation == "3" then
-- hidden temporary maintenance category
Sətir 312 ⟶ 323:
if infl == "nari" or infl == "なり" then table.insert(inflections, {label = "-nari inflection"}); table.insert(categories, "Japanese なり-nari adjectives") end
if infl == "tari" or infl == "たり" then table.insert(inflections, {label = "-tari inflection"}); table.insert(categories, "Japanese たり-tari adjectives") end
end
end
 
pos_functions["nouns"] = function(args, inflections, categories)
table.insert(categories, "Japanese nouns")
-- the counter (classifier) parameter, only relevant for nouns
local counter = args["count"] or ""
if counter ~= "" then
if counter == "-" then table.insert(inflections, {label = "uncountable"}) else table.insert(inflections, {label = "counter", counter}) end
end
end
Sətir 337 ⟶ 357:
 
-- add certain "inflections" and categories for adjectives, verbs, or nouns
if pos_functions[poscat] then
pos_functions[poscat](args, inflections, categories)
else
table.insert(categories, "Japanese " .. poscat)
end
 
-- sort out all the kanas and do the romanization business