Wiktionary siwiktionary https://si.wiktionary.org/wiki/%E0%B7%80%E0%B7%92%E0%B6%9A%E0%B7%8A%E0%B7%82%E0%B6%B1%E0%B6%BB%E0%B7%92:%E0%B6%B8%E0%B7%94%E0%B6%BD%E0%B7%8A_%E0%B6%B4%E0%B7%92%E0%B6%A7%E0%B7%94%E0%B7%80 MediaWiki 1.48.0-wmf.5 case-sensitive මාධ්‍යය විශේෂ සාකච්ඡාව පරිශීලක පරිශීලක සාකච්ඡාව වික්ෂනරි වික්ෂනරි සාකච්ඡාව ගොනුව ගොනුව සාකච්ඡාව මාධ්‍යවිකි මාධ්‍යවිකි සාකච්ඡාව සැකිල්ල සැකිලි සාකච්ඡාව උදවු උදවු සාකච්ඡාව ප්‍රවර්ගය ප්‍රවර්ග සාකච්ඡාව TimedText TimedText talk Module Module talk Event Event talk Module:sinhala 828 5451 239282 238575 2026-11-19T04:06:02Z Lee 19 239282 Scribunto text/plain local en_utilities_module = "Module:en-utilities" local p = {} -- p stands for package local m_strutils = require("Module:en-utilities") -- ගැටළු සහගත වචන දැනට පරීක්ෂාවට ලක් කෙරෙයි local words_with_issues = { "female", "male", } local english2sinhala = {} -- සම්බන්ධ කිරීම් english2sinhala["and"] = "සහ" english2sinhala["in"] = "තුළ" -- තරමක් දිග යෙදුම් english2sinhala["Former name of"] = " සඳහා පෙර දී භාවිතා වූ නාමය" english2sinhala["former name of"] = " සඳහා පෙර දී භාවිතා වූ නාමය" english2sinhala["Alternative spelling of"] = " යන යෙදුමේ වෛකල්පික අක්ෂර වින්‍යාසයක්" english2sinhala["an alternative spelling "] = "වෛකල්පික අක්ෂර වින්‍යාසයක් " english2sinhala["Chinese simplified forms"] = "චීන සරලීකෘත ස්වරූප" english2sinhala["Initialism of"] = " යන යෙදුමේ මුලකුරු ලෙස සටහන් කළ ස්වරූපය" english2sinhala["terms inherited"] = "උරුම වූ" english2sinhala["Synonym of"] = " යන්නට සමාන අරුත් ඇති පදයක්" english2sinhala["short for"] = " යන්න කෙටි කර දක්වන ආකාරය" english2sinhala["Short for"] = " යන්න කෙටි කර දක්වන ආකාරය" english2sinhala["an article"] = "ලිපියක්" -- විකිපීඩියාව ආශ්‍රිත english2sinhala["articles"] = "ලිපි" -- ස්ථාන නාම සඳහා english2sinhala["small village"] = "කුඩා ගම්මානය" -- විශේෂ english2sinhala["the simplified"] = "සරලීකෘත" english2sinhala["related-to"] = "ආශ්‍රිත" english2sinhala["Name"] = "නාම" english2sinhala["name"] = "නාම" english2sinhala["set"] = "කුලක" english2sinhala["type"] = "වර්ග" english2sinhala["grouping"] = "කාණ්ඩ" -- සැකිලි ප්‍රවර්ග සඳහා අවශ්‍ය දත්ත english2sinhala["Auto-table"] = "ස්වයංක්‍රීය-වගු" english2sinhala["data"] = "දත්ත" english2sinhala["Data"] = "දත්ත" english2sinhala["Administration"] = "පරිපාලන" english2sinhala["Archive"] = "ලේඛනාරක්ෂණ" english2sinhala["Audio"] = "ශ්‍රව්‍ය සහාය" english2sinhala["Number"] = "සංඛ්‍යා" english2sinhala["Morphology"] = "පදිම විචාර" english2sinhala["String manipulation"] = "පෙළ හැසිරවීම්" -- english2sinhala["short forms"] = "කෙටි ස්වරූප" -- english2sinhala["derivational"] = "ව්‍යුත්පන්නක" english2sinhala["nominal"] = "නොමිනල්" -- english2sinhala["data modules"] = "දත්ත මොඩියුල" english2sinhala["Sortkey-generating"] = "සෝට්කී-ජනක" english2sinhala["Page generation"] = "පිටු ජනක" -- english2sinhala["Template"] = "සැකිල්ල" -- english2sinhala["Pronunciation"] = "උච්චාරණ" english2sinhala["Verification"] = "සත්‍යාපන" -- english2sinhala["Etymology templates"] = "නිරුක්ති සැකිලි" english2sinhala["Translation templates"] = "පරිවර්තන සැකිලි" english2sinhala["Appendix templates"] = "උපග්‍රන්ථ සැකිලි" english2sinhala["reference templates"] = "මූලාශ්‍ර සැකිලි" -- english2sinhala["poetic terms"] = "කාව්‍යමය යෙදුම්" -- english2sinhala["hanja"] = "හන්ජා" english2sinhala["hanzi"] = "හන්සු" -- english2sinhala["Character"] = "අනුලක්ෂණ" english2sinhala["symbols"] = "සංකේත" english2sinhala["clipping"] = "ක්ලිප් කිරීම" english2sinhala["roots"] = "මූල" english2sinhala["morphemes"] = "පදාණු" english2sinhala["morpheme"] = "පදාණුව" english2sinhala["punctuation marks"] = "විරාම ලක්‍ෂණ" -- english2sinhala["word"] = "වචනය" english2sinhala["words"] = "වචන" english2sinhala["syllable"] = "මාත්‍රාව" english2sinhala["syllables"] = "මාත්‍රා" -- english2sinhala["imperative"] = "විධි ක්‍රියා" english2sinhala["nominative"] = "පෙර විබත්" english2sinhala["ablative"] = "අවදි විබත්" english2sinhala["vocative"] = "අලප් විබත්" -- english2sinhala["transitive"] = "සකර්මක" english2sinhala["intransitive"] = "අකර්මක" -- english2sinhala["uncomparable"] = "සැසඳිය නොහැකි" english2sinhala["comparable"] = "සැසඳිය හැකි" -- english2sinhala["uncomparable adjectives"] = "සැසඳිය නොහැකි නාම විශේෂණ පද" english2sinhala["comparable adjectives"] = "සැසඳිය හැකි නාම විශේෂණ පද" english2sinhala["epicene adjectives"] = "උභයලිංගික නාම විශේෂණ පද" english2sinhala["transitive verbs"] = "සකර්මක ක්‍රියා පද" -- english2sinhala["first-person"] = "උත්තම පුරුෂ" english2sinhala["first person"] = "උත්තම පුරුෂ" english2sinhala["third-person"] = "අන්‍ය පුරුෂ" english2sinhala["third person"] = "අන්‍ය පුරුෂ" -- english2sinhala["gender"] = "ලිංග භේදය" english2sinhala["feminine"] = "ස්ත්‍රී ලිංග" english2sinhala["masculine"] = "පුරුෂ ලිංග" english2sinhala["female"] = "ස්ත්‍රී ලිංග" english2sinhala["male"] = "පුරුෂ ලිංග" english2sinhala["unknown-gender"] = "ලිංග භේදය නොදන්නා" english2sinhala["given names"] = "පුද්ගල නාම" english2sinhala["given name"] = "පුද්ගල නාමය" english2sinhala["female given names"] = "ස්ත්‍රී ලිංග පුද්ගල නාම" english2sinhala["male given names"] = "පුරුෂ ලිංග පුද්ගල නාම" english2sinhala["male given name"] = "පුරුෂ ලිංග පුද්ගල නාමය" english2sinhala["diminutives of "] = " සඳහා වන අල්පාර්ථ පද" english2sinhala["diminutives of male given names"] = "පුරුෂ ලිංග පුද්ගල නාම සඳහා වන අල්පාර්ථ පද" -- english2sinhala["pronoun forms"] = "සර්වනාම ස්වරූප" english2sinhala["proper noun forms"] = "සංඥා නාම පද ස්වරූප" english2sinhala["adjective forms"] = "නාම විශේෂණ පද ස්වරූප" english2sinhala["noun forms"] = "නාම පද ස්වරූප" english2sinhala["verb forms"] = "ක්‍රියා පද ස්වරූප" english2sinhala["suffix form"] = "ප්‍රත්‍ය ස්වරූපය" english2sinhala["suffix forms"] = "ප්‍රත්‍ය ස්වරූප" english2sinhala["quotation"] = "උපුටා දැක්වීම" english2sinhala["quotations"] = "උපුටා දැක්වීම්" english2sinhala["usage example"] = "භාවිත නිදර්ශනය" english2sinhala["usage examples"] = "භාවිත නිදර්ශන" english2sinhala["Wikipedia"] = "විකිපීඩියාව" english2sinhala["wikipedia"] = "විකිපීඩියාව" english2sinhala["singular"] = "ඒක වචන" english2sinhala["singula"] = "ඒක වචන" english2sinhala["plural"] = "බහුවචන" english2sinhala["plurals"] = "බහුවචන" english2sinhala["noun"] = "නාම පදය" english2sinhala["nouns"] = "නාම පද" english2sinhala["particle"] = "නිපාත පදය" english2sinhala["particles"] = "නිපාත පද" english2sinhala["verb"] = "ක්‍රියා පදය" english2sinhala["verbs"] = "ක්‍රියා පද" english2sinhala["adjective"] = "නාම විශේෂණ පදය" english2sinhala["adjectives"] = "නාම විශේෂණ පද" english2sinhala["adverb"] = "ක්‍රියා විශේෂණ පදය" english2sinhala["adverbs"] = "ක්‍රියා විශේෂණ පද" english2sinhala["prefix"] = "උපසර්ගය" english2sinhala["prefixes"] = "උපසර්ග" english2sinhala["suffix"] = "ප්‍රත්‍යය" english2sinhala["suffixes"] = "ප්‍රත්‍ය" english2sinhala["letter"] = "අකුර" english2sinhala["letters"] = "අකුරු" english2sinhala["numeral"] = "සංඛ්‍යාංකය" english2sinhala["numerals"] = "සංඛ්‍යාංක" english2sinhala["numeral symbol"] = "සංඛ්‍යාංක සංකේතය" english2sinhala["numeral symbols"] = "සංඛ්‍යාංක සංකේත" english2sinhala["numbers"] = "සංඛ්‍යාව" english2sinhala["numbers"] = "සංඛ්‍යා" english2sinhala["lemma"] = "පාඨය" english2sinhala["lemmas"] = "පාඨ" english2sinhala["pronoun"] = "සර්වනාමය" english2sinhala["pronouns"] = "සර්වනාම" english2sinhala["phrase"] = "වාක්‍ය ඛණ්ඩය" english2sinhala["phrases"] = "වාක්‍ය ඛණ්ඩ" english2sinhala["phrasebook"] = "වාක්‍ය ඛණ්ඩ පොත" english2sinhala["Geography"] = "භූගෝලවේදය" english2sinhala["geography"] = "භූගෝලවේදය" english2sinhala["Oceanography"] = "සාගරවේදය" english2sinhala["oceanography"] = "සාගරවේදය" english2sinhala["continent"] = "මහාද්වීපය" english2sinhala["Continent"] = "මහාද්වීපය" english2sinhala["continents"] = "මහාද්වීප" english2sinhala["Continents"] = "මහාද්වීප" english2sinhala["island"] = "දූපත" english2sinhala["country"] = "රට" english2sinhala["countries"] = "රටවල්" english2sinhala["language"] = "භාෂාව" english2sinhala["Language"] = "භාෂාව" english2sinhala["languages"] = "භාෂා" english2sinhala["Languages"] = "භාෂා" english2sinhala["surname"] = "පෙළපත් නාමය" english2sinhala["surnames"] = "පෙළපත් නාම" english2sinhala["proper noun"] = "සංඥා නාම පදය" english2sinhala["proper nouns"] = "සංඥා නාම පද" english2sinhala["abbreviation"] = "කෙටි යෙදුම" english2sinhala["abbreviations"] = "කෙටි යෙදුම්" english2sinhala["interjections"] = "විශ්මයාර්ථ පද" english2sinhala["misspellings"] = "අක්ෂර වින්‍යාස දෝෂ" -- -- පහත කොටසේ "terms" සඳහා "පද" යනුවෙන් භාවිතය, ගැටළු සහගත බව පෙනෙයි. -- එය "යෙදුම්" වලට මාරු කොට බලමු. -- english2sinhala["term"] = "පදය" -- english2sinhala["terms"] = "පද" -- නව ආකාරය english2sinhala["term"] = "යෙදුම" english2sinhala["terms"] = "යෙදුම්" -- english2sinhala["colle"] = "පද" english2sinhala["collective noun"] = "සමූහවාචී නාම පදය" english2sinhala["collective nouns"] = "සමූහවාචී නාම පද" english2sinhala["countable noun"] = "ගැණිය හැකි නාම පදය" english2sinhala["countable nouns"] = "ගැණිය හැකි නාම පද" english2sinhala["countable proper noun"] = "ගැණිය හැකි සංඥා නාම පදය" english2sinhala["countable proper nouns"] = "ගැණිය හැකි සංඥා නාම පද" english2sinhala["uncountable noun"] = "නොගැණිය හැකි නාම පදය" english2sinhala["uncountable nouns"] = "නොගැණිය හැකි නාම පද" english2sinhala["indeclinable nouns"] = "අව්‍යය නාම පද" english2sinhala["inflection"] = "වරනැගීම" english2sinhala["Inflection"] = "වරනැගීම" english2sinhala["inflections"] = "වරනැගීම්" english2sinhala["Inflections"] = "වරනැගීම්" english2sinhala["transliteration"] = "අක්ෂර පරිවර්තනය" english2sinhala["Transliteration"] = "අක්ෂර පරිවර්තනය" english2sinhala["transliterations"] = "අක්ෂර පරිවර්තන" english2sinhala["Transliterations"] = "අක්ෂර පරිවර්තන" english2sinhala["romanization"] = "රෝමානුකරණය" english2sinhala["romanizations"] = "රෝමානුකරණ" -- english2sinhala["entry name-generating"] = "ප්‍රවේශ නාම-ජනනය" -- english2sinhala["Entry name-generating"] = "ප්‍රවේශ නාම-ජනනය" -- english2sinhala["entry name-generatings"] = "ප්‍රවේශ නාම-ජනක" -- english2sinhala["Entry name-generatings"] = "ප්‍රවේශ නාම-ජනක" english2sinhala["Religion"] = "ආගම" english2sinhala["Buddhism"] = "බුදු දහම සහ බුද්ධාගම" english2sinhala["Places"] = "ස්ථාන" english2sinhala["places"] = "ස්ථාන" -- අක්ෂරක්‍රම english2sinhala["Cyrillic"] = "සිරිලික්" english2sinhala["Devanagari"] = "දේවනාගරි" english2sinhala["Brahmi"] = "බ්‍රාහ්මී" english2sinhala["Braille"] = "බ්‍රේල්" english2sinhala["Han"] = "හන්" english2sinhala["Hiragana"] = "හිරගනා" english2sinhala["Katakana"] = "කතකනා" english2sinhala["Flag semaphore"] = "ධජ සංඥා" -- -- [ Module:ja-see ] සඳහා english2sinhala["the hiragana spelling"] = "හිරගනා අක්ෂර වින්‍යාසය" -- භාෂා පවුල් english2sinhala["Anglic"] = "ඇන්ග්ලික්" english2sinhala["Germanic"] = "ජර්මානු" english2sinhala["Koreanic"] = "කොරියානු" english2sinhala["Indo-Aryan"] = "ඉන්දු-ආර්ය" english2sinhala["Indo-Iranian"] = "ඉන්දු-ඉරාන" english2sinhala["Middle Indo-Aryan"] = "මධ්‍යකාලීන ඉන්දු-ආර්ය" english2sinhala["Indo-European"] = "ඉන්දු-යුරෝපීය" english2sinhala["Anglo-Frisian"] = "ඇන්ග්ලෝ-ෆ්‍රිසියන්" -- භාෂා english2sinhala["Algerian Arabic"] = "ඇල්ජීරියානු අරාබි" english2sinhala["Amharic"] = "ඇම්හාරික්" english2sinhala["Ancient Greek"] = "පුරාතන ග්‍රීක" english2sinhala["Anglo-Norman"] = "ඇන්ග්ලෝ-නෝමන්" english2sinhala["Arabic"] = "අරාබි" english2sinhala["Armenian"] = "ආමේනියානු" english2sinhala["Aymara"] = "අයිමාරා" english2sinhala["Azerbaijani"] = "අසර්බයිජානි" english2sinhala["Okinawan"] = "ඔකිනවා" english2sinhala["Basque"] = "බාස්ක්" english2sinhala["Bengali"] = "බෙංගාලි" english2sinhala["Bihari"] = "බිහාරී" english2sinhala["Breton"] = "බ්‍රෙටන්" english2sinhala["Bulgarian"] = "බල්ගේරියානු" english2sinhala["Burmese"] = "බුරුම" english2sinhala["Cantonese"] = "කැන්ටනීස්" english2sinhala["Chinese"] = "චීන" english2sinhala["Min Nan"] = "මින් නන්" english2sinhala["Coptic"] = "කොප්ටික්" english2sinhala["Cornish"] = "කෝනිෂ්" english2sinhala["Czech"] = "චෙක්" english2sinhala["Danish"] = "ඩෙන්මාර්ක" english2sinhala["Dhivehi"] = "දිවෙහි" english2sinhala["Dutch"] = "ඕලන්ද" english2sinhala["Egyptian"] = "ඊජිප්තු" english2sinhala["English"] = "ඉංග්‍රීසි" english2sinhala["Old English"] = "පුරාතන ඉංග්‍රීසි" english2sinhala["Middle English"] = "මධ්‍යකාලීන ඉංග්‍රීසි" english2sinhala["Esperanto"] = "එස්පෙරාන්තො" english2sinhala["Estonian"] = "එස්තෝනියානු" english2sinhala["Finnish"] = "ෆින්ලන්ත" english2sinhala["French"] = "ප්‍රංශ" english2sinhala["Old French"] = "පුරාතන ප්‍රංශ" english2sinhala["Middle French"] = "මධ්‍යකාලීන ප්‍රංශ" english2sinhala["Georgian"] = "ජෝර්ජියානු" english2sinhala["German"] = "ජර්මානු" english2sinhala["Greek"] = "ග්‍රීක" english2sinhala["Gujarati"] = "ගුජරාටි" english2sinhala["Hebrew"] = "හීබෲ" english2sinhala["Hindi"] = "හින්දි" english2sinhala["Hungarian"] = "හංගේරියානු" english2sinhala["Icelandic"] = "අයිස්ලන්ත" english2sinhala["Indonesian"] = "ඉන්දුනීසියානු" english2sinhala["Irish"] = "අයිරිෂ්" english2sinhala["Italian"] = "ඉතාලි" english2sinhala["Japanese"] = "ජපන්" english2sinhala["Javanese"] = "ජාවා" english2sinhala["Kannada"] = "කන්නඩ" english2sinhala["Kashmiri"] = "කාෂ්මීරි" english2sinhala["Kongo"] = "කොංගෝ" english2sinhala["Korean"] = "කොරියානු" english2sinhala["Lao"] = "ලාඕ" english2sinhala["Old Latin"] = "පුරාතන ලතින්" english2sinhala["Latin"] = "ලතින්" english2sinhala["Malay"] = "මැලේ" english2sinhala["Malayalam"] = "මලයාලම්" english2sinhala["Mandarin"] = "මැන්ඩරීන්" english2sinhala["Manx"] = "මැන්ක්ස්" english2sinhala["Marathi"] = "මරාථි" english2sinhala["Mongolian"] = "මොංගෝලියානු" english2sinhala["Norwegian"] = "නෝර්වීජියානු" english2sinhala["the Netherlands"] = "නෙදර්ලන්තය" english2sinhala["Pali"] = "පාලි" english2sinhala["Persian"] = "පර්සියානු" english2sinhala["Middle Persian"] = "මධ්‍යකාලීන පර්සියානු" english2sinhala["Polish"] = "පෝලන්ත" english2sinhala["Portuguese"] = "පෘතුගීසි" english2sinhala["Prakrit"] = "ප්‍රාකෘත" english2sinhala["Helu Prakrit"] = "එළු ප්‍රාකෘත" english2sinhala["Ashokan Prakrit"] = "අශෝක ප්‍රාකෘත" english2sinhala["Epigraphic Prakrit"] = "අභිලේඛන ප්‍රාකෘත" english2sinhala["Proto-Indo-Iranian"] = "ප්‍රොටෝ-ඉන්දු-ඉරාන" english2sinhala["Proto-Italic"] = "ප්‍රොටෝ-ඉතාලිකා" english2sinhala["Proto-Indo-European"] = "ප්‍රොටෝ-ඉන්දු-යුරෝපීය" english2sinhala["Proto-Basque"] = "ප්‍රොටෝ-බාස්ක්" english2sinhala["Proto-West Germanic"] = "ප්‍රොටෝ-බටහිර ජර්මානු" english2sinhala["Proto-Germanic"] = "ප්‍රොටෝ-ජර්මානු" english2sinhala["Quechua"] = "ක්වෙච්වා" english2sinhala["Romanian"] = "රුමේනියානු" english2sinhala["Russian"] = "රුසියානු" english2sinhala["Belarusian"] = "බෙලරුසියානු" english2sinhala["Macedonian"] = "මැසඩෝනියානු" english2sinhala["Serbo-Croatian"] = "සර්බෝ-ක්‍රොඒෂියානු" english2sinhala["Sanskrit"] = "සංස්කෘත" english2sinhala["Scottish Gaelic"] = "ස්කොට්ස් ගේලික්" english2sinhala["Sindhi"] = "සින්ධි" english2sinhala["Sinhala"] = "සිංහල" english2sinhala["Sinhalese"] = "සිංහල" english2sinhala["Somali"] = "සෝමාලි" english2sinhala["Spanish"] = "ස්පාඤ්ඤ" english2sinhala["Old Spanish"] = "පුරාතන ස්පාඤ්ඤ" english2sinhala["Sundanese"] = "සුන්ඩා" english2sinhala["Swedish"] = "ස්වීඩන්" english2sinhala["Old Tamil"] = "පුරාතන දෙමළ" english2sinhala["Tamil"] = "දෙමළ" english2sinhala["Telugu"] = "තෙලිඟු" english2sinhala["Thai"] = "තායි" english2sinhala["Tibetan"] = "තිබ්බත" english2sinhala["Translingual"] = "සර්ව භාෂාමය" english2sinhala["Turkish"] = "තුර්කි" english2sinhala["Ukrainian"] = "යුක්‍රේනියානු" english2sinhala["Urdu"] = "උර්දු" english2sinhala["Uzbek"] = "උස්බෙක්" english2sinhala["Vietnamese"] = "වියට්නාම" english2sinhala["Welsh"] = "වේල්ස" english2sinhala["Yiddish"] = "යිඩිශ්" english2sinhala["Zulu"] = "සූලූ" -- රටවල් english2sinhala["Hungary"] = "හංගේරියාව" english2sinhala["Slovakia"] = "ස්ලෝවැකියාව" english2sinhala["Croatia"] = "ක්‍රොඒෂියාව" english2sinhala["Serbia"] = "සර්බියාව" english2sinhala["Afghanistan"] = "ඇෆ්ගනිස්ථානය" english2sinhala["Africa"] = "අප්‍රිකාව" english2sinhala["Algeria"] = "ඇල්ජීරියාව" english2sinhala["America"] = "ඇමෙරිකාව" english2sinhala["Armenia"] = "ආමේනියාව" english2sinhala["Asia"] = "ආසියාව" english2sinhala["South Asia"] = "දකුණු ආසියාව" english2sinhala["Australia"] = "ඕස්ට්‍රේලියාව" english2sinhala["Azerbaijan"] = "අසර්බයිජානය" english2sinhala["Bahrain"] = "බහරේනය" english2sinhala["Bangladesh"] = "බංගලිදේශය" english2sinhala["Belgium"] = "බෙල්ජියම" english2sinhala["Bhutan"] = "භූතානය" english2sinhala["Brazil"] = "බ්‍රසීලය" english2sinhala["Brunei"] = "බෲනායි" english2sinhala["Bulgaria"] = "බල්ගේරියාව" english2sinhala["Cambodia"] = "කාම්බෝජය" english2sinhala["Canada"] = "කැනඩාව" english2sinhala["Central America"] = "මධ්‍යම ඇමෙරිකාව" english2sinhala["Chile"] = "චිලී" english2sinhala["China"] = "චීනය" english2sinhala["Croatia"] = "ක්‍රොඒෂියාව" english2sinhala["Cyprus"] = "සයිප්‍රසය" english2sinhala["Denmark"] = "ඩෙන්මාර්කය" english2sinhala["Earth"] = "පෘථිවිය" english2sinhala["East Timor (Timor-Leste)"] = "නැගෙනහිර ටිමෝරය" english2sinhala["Egypt"] = "ඊජිප්තුව" english2sinhala["Europe"] = "යුරෝපය" english2sinhala["Finland"] = "ෆින්ලන්තය" english2sinhala["France"] = "ප්‍රංශය" english2sinhala["Gabon"] = "ගැබොන්" english2sinhala["Georgia"] = "ජෝජියාව" english2sinhala["Germany"] = "ජර්මනිය" english2sinhala["Ghana"] = "ඝානාව" english2sinhala["Gibraltar"] = "ජිබ්‍රෝල්ටාව" english2sinhala["Greece"] = "ග්‍රීසිය" english2sinhala["Iceland"] = "අයිස්ලන්තය" english2sinhala["India"] = "ඉන්දියාව" english2sinhala["Indonesia"] = "ඉන්දුනීසියාව" english2sinhala["Iran"] = "ඉරානය" english2sinhala["Iraq"] = "ඉරාකය" english2sinhala["Israel"] = "ඊශ්‍රායලය" english2sinhala["Italy"] = "ඉතාලිය" english2sinhala["Japan"] = "ජපානය" english2sinhala["Jordan"] = "ජෝදානය" english2sinhala["Kazakhstan"] = "කසක්ස්තානය" english2sinhala["Kuwait"] = "කුවේටය" english2sinhala["Kyrgyzstan"] = "කිර්ගිස්තානය" english2sinhala["Laos"] = "ලාඕසය" english2sinhala["Lebanon"] = "ලෙබනනය" english2sinhala["Malaysia"] = "මලයාසියාව" english2sinhala["Maldives"] = "මාලදිවයින" english2sinhala["Mongolia"] = "මොන්ගෝලියාව" english2sinhala["Myanmar"] = "මියන්මාරය" english2sinhala["Nepal"] = "නේපාලය" english2sinhala["North America"] = "උතුරු ඇමෙරිකාව" english2sinhala["North Korea"] = "උතුරු කොරියාව" english2sinhala["Oceania"] = "ඕෂනියාව" english2sinhala["Oman"] = "ඕමානය" english2sinhala["Pakistan"] = "පාකිස්ථානය" english2sinhala["Philippines"] = "පිලිපීනය" english2sinhala["Poland"] = "පෝලන්තය" english2sinhala["Portugal"] = "පෘතුගාලය" english2sinhala["Qatar"] = "කටාරය" english2sinhala["Romania"] = "රුමේනියාව" english2sinhala["Russia"] = "රුසියාව" english2sinhala["Saudi Arabia"] = "සෞදි අරාබිය" english2sinhala["Singapore"] = "සිංගප්පූරුව" english2sinhala["Spain"] = "ස්පාඤ්ඤය" english2sinhala["South America"] = "දකුණු ඇමෙරිකාව" english2sinhala["South Korea"] = "දකුණු කොරියාව" english2sinhala["Sri Lanka"] = "ශ්‍රී ලංකාව" english2sinhala["Sweden"] = "ස්වීඩනය" english2sinhala["Syria"] = "සිරියාව" english2sinhala["Tajikistan"] = "ටජිකිස්ථානය" english2sinhala["Thailand"] = "තායිලන්තය" english2sinhala["Turkey"] = "තුර්කිය" english2sinhala["Turkmenistan"] = "තුර්ක්මෙනිස්තානය" english2sinhala["Ukraine"] = "යුක්‍රේනය" english2sinhala["United Arab Emirates"] = "එක්සත් අරාබි එමීර් රාජ්‍යය" english2sinhala["Uzbekistan"] = "උස්බෙකිස්තානය" english2sinhala["Vietnam"] = "වියට්නාමය" english2sinhala["Yemen"] = "යේමනය" english2sinhala["Zambia"] = "සැම්බියාව" english2sinhala["Zimbabwe"] = "සිම්බාබ්වේ" english2sinhala["the Gambia"] = "ගැම්බියාව" english2sinhala["the United States"] = "යුනයිටඩ් ස්ටේට්ස්" english2sinhala["the world"] = "ලෝකය" local singular2plural = {} -- විශේෂ singular2plural["දත්ත"] = "දත්ත" -- singular2plural["හන්ජා"] = "හන්ජා" singular2plural["සැකිල්ල"] = "සැකිලි" singular2plural["මූලය"] = "මූල" -- singular2plural["non-lemma form"] = "ලෙමා-නොවන ස්වරූප" singular2plural["non-lemma"] = "ලෙමා-නොවන" -- singular2plural["ක්ලිප් කිරීම"] = "ක්ලිප් කිරීම්" singular2plural["පදාණුව"] = "පදාණු" singular2plural["උපුටා දැක්වීම"] = "උපුටා දැක්වීම්" singular2plural["භාවිත නිදර්ශනය"] = "භාවිත නිදර්ශන" singular2plural["අබුගිඩා"] = "අබුගිඩා" singular2plural["ජර්මානු පුරුෂ ලිංග, නාම පදය"] = "ජර්මානු පුරුෂ ලිංග, නාම පද" singular2plural["ස්පාඤ්ඤ පුරුෂ ලිංග, නාම පදය"] = "ස්පාඤ්ඤ පුරුෂ ලිංග, නාම පද" singular2plural["පුරුෂ ලිංග නාම පදය"] = "පුරුෂ ලිංග නාම පද" singular2plural["පුරුෂ ලිංග, නාම පදය"] = "පුරුෂ ලිංග, නාම පද" singular2plural["පුරුෂ ලිංග පුද්ගල නාමය"] = "පුරුෂ ලිංග පුද්ගල නාම" singular2plural["ස්ත්‍රී ලිංග, නාම පදය"] = "ස්ත්‍රී ලිංග, නාම පද" singular2plural["බහුවචනය"] = "බහුවචන" singular2plural["නාම පදය"] = "නාම පද" singular2plural["නිපාත පදය"] = "නිපාත පද" singular2plural["ක්‍රියා පදය"] = "ක්‍රියා පද" singular2plural["නාම විශේෂණ පදය"] = "නාම විශේෂණ පද" singular2plural["ක්‍රියා විශේෂණ පදය"] = "ක්‍රියා විශේෂණ පද" singular2plural["ප්‍රත්‍ය ස්වරූපය"] = "ප්‍රත්‍ය ස්වරූප" singular2plural["ප්‍රත්‍යය"] = "ප්‍රත්‍ය" singular2plural["අකුර"] = "අකුරු" singular2plural["පාඨය"] = "පාඨ" singular2plural["සර්වනාමය"] = "සර්වනාම" singular2plural["මහාද්වීපය"] = "මහාද්වීප" singular2plural["දූපත"] = "දූපත්" singular2plural["රට"] = "රටවල්" singular2plural["භාෂාව"] = "භාෂා" singular2plural["පෙළපත් නාමය"] = "පෙළපත් නාම" singular2plural["සංඥා නාම පදය"] = "සංඥා නාම පද" singular2plural["කෙටි යෙදුම"] = "කෙටි යෙදුම්" singular2plural["පදය"] = "පද" singular2plural["සමූහවාචී නාම පදය"] = "සමූහවාචී නාම පද" singular2plural["ගැණිය හැකි නාම පදය"] = "ගැණිය හැකි නාම පද" singular2plural["ගැණිය හැකි සංඥා නාම පදය"] = "ගැණිය හැකි සංඥා නාම පද" singular2plural["වරනැගීම"] = "වරනැගීම්" singular2plural["සංඛ්‍යාංක සංකේතය"] = "සංඛ්‍යාංක සංකේත" singular2plural["අක්ෂර පරිවර්තනය"] = "අක්ෂර පරිවර්තන" -- singular2plural["ප්‍රවේශ නාම-ජනනය"] = "ප්‍රවේශ නාම-ජනක" local english2adjective = {} english2adjective["archaic"] = "පෞරාණික" english2adjective["dated"] = "යල් පැන ගිය" english2adjective["obsolete"] = "අභාවයට ගිය" english2adjective["List"] = "ලැයිස්තු" english2adjective["Entry name-generating"] = "ප්‍රවේශ නාම-ජනක" english2adjective["nominal"] = "නොමිනල්" english2adjective["Maintenance"] = "නඩත්තු කටයුතු" english2adjective["mixed"] = "මිශ්‍ර" english2adjective["Testcase"] = "පිරික්සුම් ආදර්ශක" english2adjective["Language and script"] = "භාෂා සහ අක්ෂරක්‍රම" english2adjective["Transliteration"] = "අක්ෂර පරිවර්තන" english2adjective["Transliteration testcases"] = "අක්ෂර පරිවර්තන පිරික්සුම් ආදර්ශක" english2adjective["Utility"] = "උපයෝගිතා" english2adjective["Headword-line"] = "යොමු වචන පේළි" english2adjective["Language-specific utility"] = "භාෂාවක් හා සබැඳි උපයෝගිතා" -- function p.hello( frame ) return "Hello, world!" end function p.sinhala_adjective( word ) -- require('Module:debug').track("sinhala.sinhala adjective.word = " .. word) local sinhala_word = p.sinhala( word ) -- require('Module:debug').track("sinhala.sinhala adjective.direct translation = " .. word) -- සටහන: නාම විශේෂණය සඳහා කළ යුතු විශේෂ යමක් පවතියි ද? local adjective = p.adjective( word ) if adjective ~= nil then -- require('Module:debug').track("sinhala.sinhala adjective.adjective = " .. adjective) sinhala_word = adjective end -- return sinhala_word end function p.search_adjective( word ) local sinhala_word = nil -- require('Module:debug').track("sinhala.search adjective.word = " .. word) local trans = english2adjective[word] if trans ~= nil then -- require('Module:debug').track("sinhala.adjective.trans = " .. trans) sinhala_word = trans end return sinhala_word end function p.adjective( word ) -- -- ගැටළු සඳහා පරීක්ෂාව -- for _,v in pairs(words_with_issues) do -- if v == word then -- error("පරීක්ෂාවට ලක්වෙන ස්ථානයකි.") -- -- do something -- break -- end -- end -- require('Module:debug').track("sinhala.adjective.word = " .. word) -- දත්ත ලැයිස්තුව මුලින්ම පරික්ෂාකර බලන්න local adjective = p.search_adjective( word ) if adjective ~= nil then -- require('Module:debug').track("sinhala.adjective.adjective = " .. adjective) return adjective end -- බොහෝවිට නාම විශේෂණ ස්වරූපය වන්නේ බහු වචනය නේ ද? local sinhala_plural = p.sinhala_plural( word ) if sinhala_plural ~= nil then -- require('Module:debug').track("sinhala.adjective.sinhala plural = " .. sinhala_plural) return sinhala_plural end local plural = p.plural( word ) if plural ~= nil then -- require('Module:debug').track("sinhala.adjective.plural = " .. plural) return plural end -- නොදන්නා වචන සඳහා ඉංග්‍රීසි වචනයම ලබා දෙන්න return word end function p.sinhala_plural( word ) local sinhala_word = p.sinhala( word ) return p.plural( sinhala_word ) end function p.sinhala( word ) -- -- ගැටළු සඳහා පරීක්ෂාව -- for _,v in pairs(words_with_issues) do -- if v == word then -- error("පරීක්ෂාවට ලක්වෙන ස්ථානයකි.") -- -- do something -- break -- end -- end local trans = english2sinhala[word] -- දත්ත ලැයිස්තුව මුලින්ම පරික්ෂාකර බලන්න if trans ~= nil then return trans end -- නොදන්නා වචන සඳහා ඉංග්‍රීසි වචනයම ලබා දෙන්න return word end function p.search_plural( word ) local result = nil if word ~= nil then -- require('Module:debug').track("sinhala.search plural.word = " .. word) local plural_word = singular2plural[word] -- දත්ත ලැයිස්තුව මුලින්ම පරික්ෂාකර බලන්න if plural_word ~= nil then -- require('Module:debug').track("sinhala.search plural.plural word = " .. plural_word) return plural_word end end return result end function p.plural( word ) if word ~= nil then local result = p.search_plural( word ) if result ~= nil then return result end -- ලතින් අකුරු නොවේ නම් බොහෝ විට සිංහල වචනයක් විය හැකිය. -- require('Module:debug').track("sinhala.plural.word = " .. word) if not string.find(word, "%a$") then return word end -- නොදන්නා වචන සඳහා ඉංග්‍රීසි ආකාරයේ වචනයම ලබා දෙන්න return m_strutils.pluralize(word) -- if word:find("x$") then -- return word .. "es" -- else -- return word .. "s" -- end end return word end local function pluralize(...) pluralize = require(en_utilities_module).pluralize return pluralize(...) end function p.sinhala_pluralize( word ) if word ~= nil then local result = p.search_plural( word ) if result ~= nil then return result end -- නොදන්නා වචන සඳහා ඉංග්‍රීසි ආකාරයේ වචනයම ලබා දෙන්න return pluralize( word ) end return word end return p 9pp2xcmic60ykcwt08bmviokfcsqski 239283 239282 2026-11-19T04:08:56Z Lee 19 239283 Scribunto text/plain local en_utilities_module = "Module:en-utilities" local p = {} -- p stands for package local m_strutils = require("Module:en-utilities") -- ගැටළු සහගත වචන දැනට පරීක්ෂාවට ලක් කෙරෙයි local words_with_issues = { "female", "male", } local english2sinhala = {} -- සම්බන්ධ කිරීම් english2sinhala["and"] = "සහ" english2sinhala["in"] = "තුළ" -- තරමක් දිග යෙදුම් english2sinhala["Former name of"] = " සඳහා පෙර දී භාවිතා වූ නාමය" english2sinhala["former name of"] = " සඳහා පෙර දී භාවිතා වූ නාමය" english2sinhala["Alternative spelling of"] = " යන යෙදුමේ වෛකල්පික අක්ෂර වින්‍යාසයක්" english2sinhala["an alternative spelling "] = "වෛකල්පික අක්ෂර වින්‍යාසයක් " english2sinhala["Chinese simplified forms"] = "චීන සරලීකෘත ස්වරූප" english2sinhala["Initialism of"] = " යන යෙදුමේ මුලකුරු ලෙස සටහන් කළ ස්වරූපය" english2sinhala["terms inherited"] = "උරුම වූ" english2sinhala["Synonym of"] = " යන්නට සමාන අරුත් ඇති පදයක්" english2sinhala["short for"] = " යන්න කෙටි කර දක්වන ආකාරය" english2sinhala["Short for"] = " යන්න කෙටි කර දක්වන ආකාරය" english2sinhala["an article"] = "ලිපියක්" -- විකිපීඩියාව ආශ්‍රිත english2sinhala["articles"] = "ලිපි" -- ස්ථාන නාම සඳහා english2sinhala["small village"] = "කුඩා ගම්මානය" -- විශේෂ english2sinhala["the simplified"] = "සරලීකෘත" english2sinhala["related-to"] = "ආශ්‍රිත" english2sinhala["Name"] = "නාම" english2sinhala["name"] = "නාම" english2sinhala["set"] = "කුලක" english2sinhala["type"] = "වර්ග" english2sinhala["grouping"] = "කාණ්ඩ" -- සැකිලි ප්‍රවර්ග සඳහා අවශ්‍ය දත්ත english2sinhala["Auto-table"] = "ස්වයංක්‍රීය-වගු" english2sinhala["data"] = "දත්ත" english2sinhala["Data"] = "දත්ත" english2sinhala["Administration"] = "පරිපාලන" english2sinhala["Archive"] = "ලේඛනාරක්ෂණ" english2sinhala["Audio"] = "ශ්‍රව්‍ය සහාය" english2sinhala["Number"] = "සංඛ්‍යා" english2sinhala["Morphology"] = "පදිම විචාර" english2sinhala["String manipulation"] = "පෙළ හැසිරවීම්" -- english2sinhala["short forms"] = "කෙටි ස්වරූප" -- english2sinhala["derivational"] = "ව්‍යුත්පන්නක" english2sinhala["nominal"] = "නොමිනල්" -- english2sinhala["data modules"] = "දත්ත මොඩියුල" english2sinhala["Sortkey-generating"] = "සෝට්කී-ජනක" english2sinhala["Page generation"] = "පිටු ජනක" -- english2sinhala["Template"] = "සැකිල්ල" -- english2sinhala["Pronunciation"] = "උච්චාරණ" english2sinhala["Verification"] = "සත්‍යාපන" -- english2sinhala["Etymology templates"] = "නිරුක්ති සැකිලි" english2sinhala["Translation templates"] = "පරිවර්තන සැකිලි" english2sinhala["Appendix templates"] = "උපග්‍රන්ථ සැකිලි" english2sinhala["reference templates"] = "මූලාශ්‍ර සැකිලි" -- english2sinhala["poetic terms"] = "කාව්‍යමය යෙදුම්" -- english2sinhala["hanja"] = "හන්ජා" english2sinhala["hanzi"] = "හන්සු" -- english2sinhala["Character"] = "අනුලක්ෂණ" english2sinhala["symbols"] = "සංකේත" english2sinhala["clipping"] = "ක්ලිප් කිරීම" english2sinhala["roots"] = "මූල" english2sinhala["morphemes"] = "පදාණු" english2sinhala["morpheme"] = "පදාණුව" english2sinhala["punctuation marks"] = "විරාම ලක්‍ෂණ" -- english2sinhala["word"] = "වචනය" english2sinhala["words"] = "වචන" english2sinhala["syllables"] = "මාත්‍රා" -- english2sinhala["imperative"] = "විධි ක්‍රියා" english2sinhala["nominative"] = "පෙර විබත්" english2sinhala["ablative"] = "අවදි විබත්" english2sinhala["vocative"] = "අලප් විබත්" -- english2sinhala["transitive"] = "සකර්මක" english2sinhala["intransitive"] = "අකර්මක" -- english2sinhala["uncomparable"] = "සැසඳිය නොහැකි" english2sinhala["comparable"] = "සැසඳිය හැකි" -- english2sinhala["uncomparable adjectives"] = "සැසඳිය නොහැකි නාම විශේෂණ පද" english2sinhala["comparable adjectives"] = "සැසඳිය හැකි නාම විශේෂණ පද" english2sinhala["epicene adjectives"] = "උභයලිංගික නාම විශේෂණ පද" english2sinhala["transitive verbs"] = "සකර්මක ක්‍රියා පද" -- english2sinhala["first-person"] = "උත්තම පුරුෂ" english2sinhala["first person"] = "උත්තම පුරුෂ" english2sinhala["third-person"] = "අන්‍ය පුරුෂ" english2sinhala["third person"] = "අන්‍ය පුරුෂ" -- english2sinhala["gender"] = "ලිංග භේදය" english2sinhala["feminine"] = "ස්ත්‍රී ලිංග" english2sinhala["masculine"] = "පුරුෂ ලිංග" english2sinhala["female"] = "ස්ත්‍රී ලිංග" english2sinhala["male"] = "පුරුෂ ලිංග" english2sinhala["unknown-gender"] = "ලිංග භේදය නොදන්නා" english2sinhala["given names"] = "පුද්ගල නාම" english2sinhala["given name"] = "පුද්ගල නාමය" english2sinhala["female given names"] = "ස්ත්‍රී ලිංග පුද්ගල නාම" english2sinhala["male given names"] = "පුරුෂ ලිංග පුද්ගල නාම" english2sinhala["male given name"] = "පුරුෂ ලිංග පුද්ගල නාමය" english2sinhala["diminutives of "] = " සඳහා වන අල්පාර්ථ පද" english2sinhala["diminutives of male given names"] = "පුරුෂ ලිංග පුද්ගල නාම සඳහා වන අල්පාර්ථ පද" -- english2sinhala["pronoun forms"] = "සර්වනාම ස්වරූප" english2sinhala["proper noun forms"] = "සංඥා නාම පද ස්වරූප" english2sinhala["adjective forms"] = "නාම විශේෂණ පද ස්වරූප" english2sinhala["noun forms"] = "නාම පද ස්වරූප" english2sinhala["verb forms"] = "ක්‍රියා පද ස්වරූප" english2sinhala["suffix form"] = "ප්‍රත්‍ය ස්වරූපය" english2sinhala["suffix forms"] = "ප්‍රත්‍ය ස්වරූප" english2sinhala["quotation"] = "උපුටා දැක්වීම" english2sinhala["quotations"] = "උපුටා දැක්වීම්" english2sinhala["usage example"] = "භාවිත නිදර්ශනය" english2sinhala["usage examples"] = "භාවිත නිදර්ශන" english2sinhala["Wikipedia"] = "විකිපීඩියාව" english2sinhala["wikipedia"] = "විකිපීඩියාව" english2sinhala["singular"] = "ඒක වචන" english2sinhala["singula"] = "ඒක වචන" english2sinhala["plural"] = "බහුවචන" english2sinhala["plurals"] = "බහුවචන" english2sinhala["noun"] = "නාම පදය" english2sinhala["nouns"] = "නාම පද" english2sinhala["particle"] = "නිපාත පදය" english2sinhala["particles"] = "නිපාත පද" english2sinhala["verb"] = "ක්‍රියා පදය" english2sinhala["verbs"] = "ක්‍රියා පද" english2sinhala["adjective"] = "නාම විශේෂණ පදය" english2sinhala["adjectives"] = "නාම විශේෂණ පද" english2sinhala["adverb"] = "ක්‍රියා විශේෂණ පදය" english2sinhala["adverbs"] = "ක්‍රියා විශේෂණ පද" english2sinhala["prefix"] = "උපසර්ගය" english2sinhala["prefixes"] = "උපසර්ග" english2sinhala["suffix"] = "ප්‍රත්‍යය" english2sinhala["suffixes"] = "ප්‍රත්‍ය" english2sinhala["letter"] = "අකුර" english2sinhala["letters"] = "අකුරු" english2sinhala["numeral"] = "සංඛ්‍යාංකය" english2sinhala["numerals"] = "සංඛ්‍යාංක" english2sinhala["numeral symbol"] = "සංඛ්‍යාංක සංකේතය" english2sinhala["numeral symbols"] = "සංඛ්‍යාංක සංකේත" english2sinhala["numbers"] = "සංඛ්‍යාව" english2sinhala["numbers"] = "සංඛ්‍යා" english2sinhala["lemma"] = "පාඨය" english2sinhala["lemmas"] = "පාඨ" english2sinhala["pronoun"] = "සර්වනාමය" english2sinhala["pronouns"] = "සර්වනාම" english2sinhala["phrase"] = "වාක්‍ය ඛණ්ඩය" english2sinhala["phrases"] = "වාක්‍ය ඛණ්ඩ" english2sinhala["phrasebook"] = "වාක්‍ය ඛණ්ඩ පොත" english2sinhala["Geography"] = "භූගෝලවේදය" english2sinhala["geography"] = "භූගෝලවේදය" english2sinhala["Oceanography"] = "සාගරවේදය" english2sinhala["oceanography"] = "සාගරවේදය" english2sinhala["continent"] = "මහාද්වීපය" english2sinhala["Continent"] = "මහාද්වීපය" english2sinhala["continents"] = "මහාද්වීප" english2sinhala["Continents"] = "මහාද්වීප" english2sinhala["island"] = "දූපත" english2sinhala["country"] = "රට" english2sinhala["countries"] = "රටවල්" english2sinhala["language"] = "භාෂාව" english2sinhala["Language"] = "භාෂාව" english2sinhala["languages"] = "භාෂා" english2sinhala["Languages"] = "භාෂා" english2sinhala["surname"] = "පෙළපත් නාමය" english2sinhala["surnames"] = "පෙළපත් නාම" english2sinhala["proper noun"] = "සංඥා නාම පදය" english2sinhala["proper nouns"] = "සංඥා නාම පද" english2sinhala["abbreviation"] = "කෙටි යෙදුම" english2sinhala["abbreviations"] = "කෙටි යෙදුම්" english2sinhala["interjections"] = "විශ්මයාර්ථ පද" english2sinhala["misspellings"] = "අක්ෂර වින්‍යාස දෝෂ" -- -- පහත කොටසේ "terms" සඳහා "පද" යනුවෙන් භාවිතය, ගැටළු සහගත බව පෙනෙයි. -- එය "යෙදුම්" වලට මාරු කොට බලමු. -- english2sinhala["term"] = "පදය" -- english2sinhala["terms"] = "පද" -- නව ආකාරය english2sinhala["term"] = "යෙදුම" english2sinhala["terms"] = "යෙදුම්" -- english2sinhala["colle"] = "පද" english2sinhala["collective noun"] = "සමූහවාචී නාම පදය" english2sinhala["collective nouns"] = "සමූහවාචී නාම පද" english2sinhala["countable noun"] = "ගැණිය හැකි නාම පදය" english2sinhala["countable nouns"] = "ගැණිය හැකි නාම පද" english2sinhala["countable proper noun"] = "ගැණිය හැකි සංඥා නාම පදය" english2sinhala["countable proper nouns"] = "ගැණිය හැකි සංඥා නාම පද" english2sinhala["uncountable noun"] = "නොගැණිය හැකි නාම පදය" english2sinhala["uncountable nouns"] = "නොගැණිය හැකි නාම පද" english2sinhala["indeclinable nouns"] = "අව්‍යය නාම පද" english2sinhala["inflection"] = "වරනැගීම" english2sinhala["Inflection"] = "වරනැගීම" english2sinhala["inflections"] = "වරනැගීම්" english2sinhala["Inflections"] = "වරනැගීම්" english2sinhala["transliteration"] = "අක්ෂර පරිවර්තනය" english2sinhala["Transliteration"] = "අක්ෂර පරිවර්තනය" english2sinhala["transliterations"] = "අක්ෂර පරිවර්තන" english2sinhala["Transliterations"] = "අක්ෂර පරිවර්තන" english2sinhala["romanization"] = "රෝමානුකරණය" english2sinhala["romanizations"] = "රෝමානුකරණ" -- english2sinhala["entry name-generating"] = "ප්‍රවේශ නාම-ජනනය" -- english2sinhala["Entry name-generating"] = "ප්‍රවේශ නාම-ජනනය" -- english2sinhala["entry name-generatings"] = "ප්‍රවේශ නාම-ජනක" -- english2sinhala["Entry name-generatings"] = "ප්‍රවේශ නාම-ජනක" english2sinhala["Religion"] = "ආගම" english2sinhala["Buddhism"] = "බුදු දහම සහ බුද්ධාගම" english2sinhala["Places"] = "ස්ථාන" english2sinhala["places"] = "ස්ථාන" -- අක්ෂරක්‍රම english2sinhala["Cyrillic"] = "සිරිලික්" english2sinhala["Devanagari"] = "දේවනාගරි" english2sinhala["Brahmi"] = "බ්‍රාහ්මී" english2sinhala["Braille"] = "බ්‍රේල්" english2sinhala["Han"] = "හන්" english2sinhala["Hiragana"] = "හිරගනා" english2sinhala["Katakana"] = "කතකනා" english2sinhala["Flag semaphore"] = "ධජ සංඥා" -- -- [ Module:ja-see ] සඳහා english2sinhala["the hiragana spelling"] = "හිරගනා අක්ෂර වින්‍යාසය" -- භාෂා පවුල් english2sinhala["Anglic"] = "ඇන්ග්ලික්" english2sinhala["Germanic"] = "ජර්මානු" english2sinhala["Koreanic"] = "කොරියානු" english2sinhala["Indo-Aryan"] = "ඉන්දු-ආර්ය" english2sinhala["Indo-Iranian"] = "ඉන්දු-ඉරාන" english2sinhala["Middle Indo-Aryan"] = "මධ්‍යකාලීන ඉන්දු-ආර්ය" english2sinhala["Indo-European"] = "ඉන්දු-යුරෝපීය" english2sinhala["Anglo-Frisian"] = "ඇන්ග්ලෝ-ෆ්‍රිසියන්" -- භාෂා english2sinhala["Algerian Arabic"] = "ඇල්ජීරියානු අරාබි" english2sinhala["Amharic"] = "ඇම්හාරික්" english2sinhala["Ancient Greek"] = "පුරාතන ග්‍රීක" english2sinhala["Anglo-Norman"] = "ඇන්ග්ලෝ-නෝමන්" english2sinhala["Arabic"] = "අරාබි" english2sinhala["Armenian"] = "ආමේනියානු" english2sinhala["Aymara"] = "අයිමාරා" english2sinhala["Azerbaijani"] = "අසර්බයිජානි" english2sinhala["Okinawan"] = "ඔකිනවා" english2sinhala["Basque"] = "බාස්ක්" english2sinhala["Bengali"] = "බෙංගාලි" english2sinhala["Bihari"] = "බිහාරී" english2sinhala["Breton"] = "බ්‍රෙටන්" english2sinhala["Bulgarian"] = "බල්ගේරියානු" english2sinhala["Burmese"] = "බුරුම" english2sinhala["Cantonese"] = "කැන්ටනීස්" english2sinhala["Chinese"] = "චීන" english2sinhala["Min Nan"] = "මින් නන්" english2sinhala["Coptic"] = "කොප්ටික්" english2sinhala["Cornish"] = "කෝනිෂ්" english2sinhala["Czech"] = "චෙක්" english2sinhala["Danish"] = "ඩෙන්මාර්ක" english2sinhala["Dhivehi"] = "දිවෙහි" english2sinhala["Dutch"] = "ඕලන්ද" english2sinhala["Egyptian"] = "ඊජිප්තු" english2sinhala["English"] = "ඉංග්‍රීසි" english2sinhala["Old English"] = "පුරාතන ඉංග්‍රීසි" english2sinhala["Middle English"] = "මධ්‍යකාලීන ඉංග්‍රීසි" english2sinhala["Esperanto"] = "එස්පෙරාන්තො" english2sinhala["Estonian"] = "එස්තෝනියානු" english2sinhala["Finnish"] = "ෆින්ලන්ත" english2sinhala["French"] = "ප්‍රංශ" english2sinhala["Old French"] = "පුරාතන ප්‍රංශ" english2sinhala["Middle French"] = "මධ්‍යකාලීන ප්‍රංශ" english2sinhala["Georgian"] = "ජෝර්ජියානු" english2sinhala["German"] = "ජර්මානු" english2sinhala["Greek"] = "ග්‍රීක" english2sinhala["Gujarati"] = "ගුජරාටි" english2sinhala["Hebrew"] = "හීබෲ" english2sinhala["Hindi"] = "හින්දි" english2sinhala["Hungarian"] = "හංගේරියානු" english2sinhala["Icelandic"] = "අයිස්ලන්ත" english2sinhala["Indonesian"] = "ඉන්දුනීසියානු" english2sinhala["Irish"] = "අයිරිෂ්" english2sinhala["Italian"] = "ඉතාලි" english2sinhala["Japanese"] = "ජපන්" english2sinhala["Javanese"] = "ජාවා" english2sinhala["Kannada"] = "කන්නඩ" english2sinhala["Kashmiri"] = "කාෂ්මීරි" english2sinhala["Kongo"] = "කොංගෝ" english2sinhala["Korean"] = "කොරියානු" english2sinhala["Lao"] = "ලාඕ" english2sinhala["Old Latin"] = "පුරාතන ලතින්" english2sinhala["Latin"] = "ලතින්" english2sinhala["Malay"] = "මැලේ" english2sinhala["Malayalam"] = "මලයාලම්" english2sinhala["Mandarin"] = "මැන්ඩරීන්" english2sinhala["Manx"] = "මැන්ක්ස්" english2sinhala["Marathi"] = "මරාථි" english2sinhala["Mongolian"] = "මොංගෝලියානු" english2sinhala["Norwegian"] = "නෝර්වීජියානු" english2sinhala["the Netherlands"] = "නෙදර්ලන්තය" english2sinhala["Pali"] = "පාලි" english2sinhala["Persian"] = "පර්සියානු" english2sinhala["Middle Persian"] = "මධ්‍යකාලීන පර්සියානු" english2sinhala["Polish"] = "පෝලන්ත" english2sinhala["Portuguese"] = "පෘතුගීසි" english2sinhala["Prakrit"] = "ප්‍රාකෘත" english2sinhala["Helu Prakrit"] = "එළු ප්‍රාකෘත" english2sinhala["Ashokan Prakrit"] = "අශෝක ප්‍රාකෘත" english2sinhala["Epigraphic Prakrit"] = "අභිලේඛන ප්‍රාකෘත" english2sinhala["Proto-Indo-Iranian"] = "ප්‍රොටෝ-ඉන්දු-ඉරාන" english2sinhala["Proto-Italic"] = "ප්‍රොටෝ-ඉතාලිකා" english2sinhala["Proto-Indo-European"] = "ප්‍රොටෝ-ඉන්දු-යුරෝපීය" english2sinhala["Proto-Basque"] = "ප්‍රොටෝ-බාස්ක්" english2sinhala["Proto-West Germanic"] = "ප්‍රොටෝ-බටහිර ජර්මානු" english2sinhala["Proto-Germanic"] = "ප්‍රොටෝ-ජර්මානු" english2sinhala["Quechua"] = "ක්වෙච්වා" english2sinhala["Romanian"] = "රුමේනියානු" english2sinhala["Russian"] = "රුසියානු" english2sinhala["Belarusian"] = "බෙලරුසියානු" english2sinhala["Macedonian"] = "මැසඩෝනියානු" english2sinhala["Serbo-Croatian"] = "සර්බෝ-ක්‍රොඒෂියානු" english2sinhala["Sanskrit"] = "සංස්කෘත" english2sinhala["Scottish Gaelic"] = "ස්කොට්ස් ගේලික්" english2sinhala["Sindhi"] = "සින්ධි" english2sinhala["Sinhala"] = "සිංහල" english2sinhala["Sinhalese"] = "සිංහල" english2sinhala["Somali"] = "සෝමාලි" english2sinhala["Spanish"] = "ස්පාඤ්ඤ" english2sinhala["Old Spanish"] = "පුරාතන ස්පාඤ්ඤ" english2sinhala["Sundanese"] = "සුන්ඩා" english2sinhala["Swedish"] = "ස්වීඩන්" english2sinhala["Old Tamil"] = "පුරාතන දෙමළ" english2sinhala["Tamil"] = "දෙමළ" english2sinhala["Telugu"] = "තෙලිඟු" english2sinhala["Thai"] = "තායි" english2sinhala["Tibetan"] = "තිබ්බත" english2sinhala["Translingual"] = "සර්ව භාෂාමය" english2sinhala["Turkish"] = "තුර්කි" english2sinhala["Ukrainian"] = "යුක්‍රේනියානු" english2sinhala["Urdu"] = "උර්දු" english2sinhala["Uzbek"] = "උස්බෙක්" english2sinhala["Vietnamese"] = "වියට්නාම" english2sinhala["Welsh"] = "වේල්ස" english2sinhala["Yiddish"] = "යිඩිශ්" english2sinhala["Zulu"] = "සූලූ" -- රටවල් english2sinhala["Hungary"] = "හංගේරියාව" english2sinhala["Slovakia"] = "ස්ලෝවැකියාව" english2sinhala["Croatia"] = "ක්‍රොඒෂියාව" english2sinhala["Serbia"] = "සර්බියාව" english2sinhala["Afghanistan"] = "ඇෆ්ගනිස්ථානය" english2sinhala["Africa"] = "අප්‍රිකාව" english2sinhala["Algeria"] = "ඇල්ජීරියාව" english2sinhala["America"] = "ඇමෙරිකාව" english2sinhala["Armenia"] = "ආමේනියාව" english2sinhala["Asia"] = "ආසියාව" english2sinhala["South Asia"] = "දකුණු ආසියාව" english2sinhala["Australia"] = "ඕස්ට්‍රේලියාව" english2sinhala["Azerbaijan"] = "අසර්බයිජානය" english2sinhala["Bahrain"] = "බහරේනය" english2sinhala["Bangladesh"] = "බංගලිදේශය" english2sinhala["Belgium"] = "බෙල්ජියම" english2sinhala["Bhutan"] = "භූතානය" english2sinhala["Brazil"] = "බ්‍රසීලය" english2sinhala["Brunei"] = "බෲනායි" english2sinhala["Bulgaria"] = "බල්ගේරියාව" english2sinhala["Cambodia"] = "කාම්බෝජය" english2sinhala["Canada"] = "කැනඩාව" english2sinhala["Central America"] = "මධ්‍යම ඇමෙරිකාව" english2sinhala["Chile"] = "චිලී" english2sinhala["China"] = "චීනය" english2sinhala["Croatia"] = "ක්‍රොඒෂියාව" english2sinhala["Cyprus"] = "සයිප්‍රසය" english2sinhala["Denmark"] = "ඩෙන්මාර්කය" english2sinhala["Earth"] = "පෘථිවිය" english2sinhala["East Timor (Timor-Leste)"] = "නැගෙනහිර ටිමෝරය" english2sinhala["Egypt"] = "ඊජිප්තුව" english2sinhala["Europe"] = "යුරෝපය" english2sinhala["Finland"] = "ෆින්ලන්තය" english2sinhala["France"] = "ප්‍රංශය" english2sinhala["Gabon"] = "ගැබොන්" english2sinhala["Georgia"] = "ජෝජියාව" english2sinhala["Germany"] = "ජර්මනිය" english2sinhala["Ghana"] = "ඝානාව" english2sinhala["Gibraltar"] = "ජිබ්‍රෝල්ටාව" english2sinhala["Greece"] = "ග්‍රීසිය" english2sinhala["Iceland"] = "අයිස්ලන්තය" english2sinhala["India"] = "ඉන්දියාව" english2sinhala["Indonesia"] = "ඉන්දුනීසියාව" english2sinhala["Iran"] = "ඉරානය" english2sinhala["Iraq"] = "ඉරාකය" english2sinhala["Israel"] = "ඊශ්‍රායලය" english2sinhala["Italy"] = "ඉතාලිය" english2sinhala["Japan"] = "ජපානය" english2sinhala["Jordan"] = "ජෝදානය" english2sinhala["Kazakhstan"] = "කසක්ස්තානය" english2sinhala["Kuwait"] = "කුවේටය" english2sinhala["Kyrgyzstan"] = "කිර්ගිස්තානය" english2sinhala["Laos"] = "ලාඕසය" english2sinhala["Lebanon"] = "ලෙබනනය" english2sinhala["Malaysia"] = "මලයාසියාව" english2sinhala["Maldives"] = "මාලදිවයින" english2sinhala["Mongolia"] = "මොන්ගෝලියාව" english2sinhala["Myanmar"] = "මියන්මාරය" english2sinhala["Nepal"] = "නේපාලය" english2sinhala["North America"] = "උතුරු ඇමෙරිකාව" english2sinhala["North Korea"] = "උතුරු කොරියාව" english2sinhala["Oceania"] = "ඕෂනියාව" english2sinhala["Oman"] = "ඕමානය" english2sinhala["Pakistan"] = "පාකිස්ථානය" english2sinhala["Philippines"] = "පිලිපීනය" english2sinhala["Poland"] = "පෝලන්තය" english2sinhala["Portugal"] = "පෘතුගාලය" english2sinhala["Qatar"] = "කටාරය" english2sinhala["Romania"] = "රුමේනියාව" english2sinhala["Russia"] = "රුසියාව" english2sinhala["Saudi Arabia"] = "සෞදි අරාබිය" english2sinhala["Singapore"] = "සිංගප්පූරුව" english2sinhala["Spain"] = "ස්පාඤ්ඤය" english2sinhala["South America"] = "දකුණු ඇමෙරිකාව" english2sinhala["South Korea"] = "දකුණු කොරියාව" english2sinhala["Sri Lanka"] = "ශ්‍රී ලංකාව" english2sinhala["Sweden"] = "ස්වීඩනය" english2sinhala["Syria"] = "සිරියාව" english2sinhala["Tajikistan"] = "ටජිකිස්ථානය" english2sinhala["Thailand"] = "තායිලන්තය" english2sinhala["Turkey"] = "තුර්කිය" english2sinhala["Turkmenistan"] = "තුර්ක්මෙනිස්තානය" english2sinhala["Ukraine"] = "යුක්‍රේනය" english2sinhala["United Arab Emirates"] = "එක්සත් අරාබි එමීර් රාජ්‍යය" english2sinhala["Uzbekistan"] = "උස්බෙකිස්තානය" english2sinhala["Vietnam"] = "වියට්නාමය" english2sinhala["Yemen"] = "යේමනය" english2sinhala["Zambia"] = "සැම්බියාව" english2sinhala["Zimbabwe"] = "සිම්බාබ්වේ" english2sinhala["the Gambia"] = "ගැම්බියාව" english2sinhala["the United States"] = "යුනයිටඩ් ස්ටේට්ස්" english2sinhala["the world"] = "ලෝකය" local singular2plural = {} -- විශේෂ singular2plural["දත්ත"] = "දත්ත" -- singular2plural["හන්ජා"] = "හන්ජා" singular2plural["සැකිල්ල"] = "සැකිලි" singular2plural["මූලය"] = "මූල" -- singular2plural["non-lemma form"] = "ලෙමා-නොවන ස්වරූප" singular2plural["non-lemma"] = "ලෙමා-නොවන" -- singular2plural["ක්ලිප් කිරීම"] = "ක්ලිප් කිරීම්" singular2plural["පදාණුව"] = "පදාණු" singular2plural["උපුටා දැක්වීම"] = "උපුටා දැක්වීම්" singular2plural["භාවිත නිදර්ශනය"] = "භාවිත නිදර්ශන" singular2plural["අබුගිඩා"] = "අබුගිඩා" singular2plural["ජර්මානු පුරුෂ ලිංග, නාම පදය"] = "ජර්මානු පුරුෂ ලිංග, නාම පද" singular2plural["ස්පාඤ්ඤ පුරුෂ ලිංග, නාම පදය"] = "ස්පාඤ්ඤ පුරුෂ ලිංග, නාම පද" singular2plural["පුරුෂ ලිංග නාම පදය"] = "පුරුෂ ලිංග නාම පද" singular2plural["පුරුෂ ලිංග, නාම පදය"] = "පුරුෂ ලිංග, නාම පද" singular2plural["පුරුෂ ලිංග පුද්ගල නාමය"] = "පුරුෂ ලිංග පුද්ගල නාම" singular2plural["ස්ත්‍රී ලිංග, නාම පදය"] = "ස්ත්‍රී ලිංග, නාම පද" singular2plural["බහුවචනය"] = "බහුවචන" singular2plural["නාම පදය"] = "නාම පද" singular2plural["නිපාත පදය"] = "නිපාත පද" singular2plural["ක්‍රියා පදය"] = "ක්‍රියා පද" singular2plural["නාම විශේෂණ පදය"] = "නාම විශේෂණ පද" singular2plural["ක්‍රියා විශේෂණ පදය"] = "ක්‍රියා විශේෂණ පද" singular2plural["ප්‍රත්‍ය ස්වරූපය"] = "ප්‍රත්‍ය ස්වරූප" singular2plural["ප්‍රත්‍යය"] = "ප්‍රත්‍ය" singular2plural["අකුර"] = "අකුරු" singular2plural["පාඨය"] = "පාඨ" singular2plural["සර්වනාමය"] = "සර්වනාම" singular2plural["මහාද්වීපය"] = "මහාද්වීප" singular2plural["දූපත"] = "දූපත්" singular2plural["රට"] = "රටවල්" singular2plural["භාෂාව"] = "භාෂා" singular2plural["පෙළපත් නාමය"] = "පෙළපත් නාම" singular2plural["සංඥා නාම පදය"] = "සංඥා නාම පද" singular2plural["කෙටි යෙදුම"] = "කෙටි යෙදුම්" singular2plural["පදය"] = "පද" singular2plural["සමූහවාචී නාම පදය"] = "සමූහවාචී නාම පද" singular2plural["ගැණිය හැකි නාම පදය"] = "ගැණිය හැකි නාම පද" singular2plural["ගැණිය හැකි සංඥා නාම පදය"] = "ගැණිය හැකි සංඥා නාම පද" singular2plural["වරනැගීම"] = "වරනැගීම්" singular2plural["සංඛ්‍යාංක සංකේතය"] = "සංඛ්‍යාංක සංකේත" singular2plural["අක්ෂර පරිවර්තනය"] = "අක්ෂර පරිවර්තන" -- singular2plural["ප්‍රවේශ නාම-ජනනය"] = "ප්‍රවේශ නාම-ජනක" local english2adjective = {} english2adjective["archaic"] = "පෞරාණික" english2adjective["dated"] = "යල් පැන ගිය" english2adjective["obsolete"] = "අභාවයට ගිය" english2adjective["List"] = "ලැයිස්තු" english2adjective["Entry name-generating"] = "ප්‍රවේශ නාම-ජනක" english2adjective["nominal"] = "නොමිනල්" english2adjective["Maintenance"] = "නඩත්තු කටයුතු" english2adjective["mixed"] = "මිශ්‍ර" english2adjective["Testcase"] = "පිරික්සුම් ආදර්ශක" english2adjective["Language and script"] = "භාෂා සහ අක්ෂරක්‍රම" english2adjective["Transliteration"] = "අක්ෂර පරිවර්තන" english2adjective["Transliteration testcases"] = "අක්ෂර පරිවර්තන පිරික්සුම් ආදර්ශක" english2adjective["Utility"] = "උපයෝගිතා" english2adjective["Headword-line"] = "යොමු වචන පේළි" english2adjective["Language-specific utility"] = "භාෂාවක් හා සබැඳි උපයෝගිතා" english2adjective["syllable"] = "මාත්‍රා" -- function p.hello( frame ) return "Hello, world!" end function p.sinhala_adjective( word ) -- require('Module:debug').track("sinhala.sinhala adjective.word = " .. word) local sinhala_word = p.sinhala( word ) -- require('Module:debug').track("sinhala.sinhala adjective.direct translation = " .. word) -- සටහන: නාම විශේෂණය සඳහා කළ යුතු විශේෂ යමක් පවතියි ද? local adjective = p.adjective( word ) if adjective ~= nil then -- require('Module:debug').track("sinhala.sinhala adjective.adjective = " .. adjective) sinhala_word = adjective end -- return sinhala_word end function p.search_adjective( word ) local sinhala_word = nil -- require('Module:debug').track("sinhala.search adjective.word = " .. word) local trans = english2adjective[word] if trans ~= nil then -- require('Module:debug').track("sinhala.adjective.trans = " .. trans) sinhala_word = trans end return sinhala_word end function p.adjective( word ) -- -- ගැටළු සඳහා පරීක්ෂාව -- for _,v in pairs(words_with_issues) do -- if v == word then -- error("පරීක්ෂාවට ලක්වෙන ස්ථානයකි.") -- -- do something -- break -- end -- end -- require('Module:debug').track("sinhala.adjective.word = " .. word) -- දත්ත ලැයිස්තුව මුලින්ම පරික්ෂාකර බලන්න local adjective = p.search_adjective( word ) if adjective ~= nil then -- require('Module:debug').track("sinhala.adjective.adjective = " .. adjective) return adjective end -- බොහෝවිට නාම විශේෂණ ස්වරූපය වන්නේ බහු වචනය නේ ද? local sinhala_plural = p.sinhala_plural( word ) if sinhala_plural ~= nil then -- require('Module:debug').track("sinhala.adjective.sinhala plural = " .. sinhala_plural) return sinhala_plural end local plural = p.plural( word ) if plural ~= nil then -- require('Module:debug').track("sinhala.adjective.plural = " .. plural) return plural end -- නොදන්නා වචන සඳහා ඉංග්‍රීසි වචනයම ලබා දෙන්න return word end function p.sinhala_plural( word ) local sinhala_word = p.sinhala( word ) return p.plural( sinhala_word ) end function p.sinhala( word ) -- -- ගැටළු සඳහා පරීක්ෂාව -- for _,v in pairs(words_with_issues) do -- if v == word then -- error("පරීක්ෂාවට ලක්වෙන ස්ථානයකි.") -- -- do something -- break -- end -- end local trans = english2sinhala[word] -- දත්ත ලැයිස්තුව මුලින්ම පරික්ෂාකර බලන්න if trans ~= nil then return trans end -- නොදන්නා වචන සඳහා ඉංග්‍රීසි වචනයම ලබා දෙන්න return word end function p.search_plural( word ) local result = nil if word ~= nil then -- require('Module:debug').track("sinhala.search plural.word = " .. word) local plural_word = singular2plural[word] -- දත්ත ලැයිස්තුව මුලින්ම පරික්ෂාකර බලන්න if plural_word ~= nil then -- require('Module:debug').track("sinhala.search plural.plural word = " .. plural_word) return plural_word end end return result end function p.plural( word ) if word ~= nil then local result = p.search_plural( word ) if result ~= nil then return result end -- ලතින් අකුරු නොවේ නම් බොහෝ විට සිංහල වචනයක් විය හැකිය. -- require('Module:debug').track("sinhala.plural.word = " .. word) if not string.find(word, "%a$") then return word end -- නොදන්නා වචන සඳහා ඉංග්‍රීසි ආකාරයේ වචනයම ලබා දෙන්න return m_strutils.pluralize(word) -- if word:find("x$") then -- return word .. "es" -- else -- return word .. "s" -- end end return word end local function pluralize(...) pluralize = require(en_utilities_module).pluralize return pluralize(...) end function p.sinhala_pluralize( word ) if word ~= nil then local result = p.search_plural( word ) if result ~= nil then return result end -- නොදන්නා වචන සඳහා ඉංග්‍රීසි ආකාරයේ වචනයම ලබා දෙන්න return pluralize( word ) end return word end return p l3obx2512v2qjhkc81wtrtvg9p92814 ප්‍රවර්ග සාකච්ඡාව:East Circassian මොඩියුල 15 17829 239289 62136 2026-11-19T04:13:11Z Lee 19 Lee විසින් [[ප්‍රවර්ග සාකච්ඡාව:Kabardian මොඩියුල]] සිට [[ප්‍රවර්ග සාකච්ඡාව:East Circassian මොඩියුල]] වෙත පිටුව ගෙන යන ලදී 48813 wikitext text/x-wiki {| class="wikitable" ! oldid || date/time || username || edit summary |---- | 67432909 || 2022-06-20T08:14:18Z || WingerBot || <nowiki>use {{auto cat}}, remove extraneous {{catfix}}/TOC templates (manually assisted)</nowiki> |---- | 28298889 || 2014-08-08T00:03:56Z || MewBot || <nowiki>tempcatboiler > poscatboiler</nowiki> |---- | 27595532 || 2014-07-11T23:17:14Z || MewBot || <nowiki>Bot-created wanted category</nowiki> |} itg9bjossql0a6ed0l6bmz86u4n9zjx ප්‍රවර්ගය:East Circassian මොඩියුල 14 17830 239287 62297 2026-11-19T04:13:10Z Lee 19 Lee විසින් [[ප්‍රවර්ගය:Kabardian මොඩියුල]] සිට [[ප්‍රවර්ගය:East Circassian මොඩියුල]] වෙත පිටුව ගෙන යන ලදී 62297 wikitext text/x-wiki {{auto cat}} [[en:Category:Kabardian modules]] 6zjx4kgnj1kjl9fre4u8j25nnpxhaeo ප්‍රවර්ග සාකච්ඡාව:East Circassian යොමු වචන පේළි සැකිලි 15 19796 239293 56618 2026-11-19T04:13:17Z Lee 19 Lee විසින් [[ප්‍රවර්ග සාකච්ඡාව:Kabardian යොමු වචන පේළි සැකිලි]] සිට [[ප්‍රවර්ග සාකච්ඡාව:East Circassian යොමු වචන පේළි සැකිලි]] වෙත පිටුව ගෙන යන ලදී 51721 wikitext text/x-wiki {| class="wikitable" ! oldid || date/time || username || edit summary |---- | 67428528 || 2022-06-20T06:55:32Z || WingerBot || <nowiki>use {{auto cat}}, remove extraneous {{catfix}}/TOC templates (manually assisted)</nowiki> |---- | 28298027 || 2014-08-07T23:49:46Z || MewBot || <nowiki>tempcatboiler > poscatboiler</nowiki> |---- | 21740877 || 2013-08-18T19:31:03Z || Vahagn Petrosyan || <nowiki>Created page with "{{tempcatboiler|kbd|headword-line}}"</nowiki> |} ol70615cr3pvnh05j8a7wniyocovlrs ප්‍රවර්ගය:East Circassian යොමු වචන පේළි සැකිලි 14 19797 239291 58202 2026-11-19T04:13:16Z Lee 19 Lee විසින් [[ප්‍රවර්ගය:Kabardian යොමු වචන පේළි සැකිලි]] සිට [[ප්‍රවර්ගය:East Circassian යොමු වචන පේළි සැකිලි]] වෙත පිටුව ගෙන යන ලදී 58202 wikitext text/x-wiki {{auto cat}} [[en:Category:Kabardian headword-line templates]] mcelmjgvsjq1bv78114jd4jldod55bu ප්‍රවර්ග සාකච්ඡාව:East Circassian සැකිලි 15 25590 239297 70192 2026-11-19T04:13:21Z Lee 19 Lee විසින් [[ප්‍රවර්ග සාකච්ඡාව:Kabardian සැකිලි]] සිට [[ප්‍රවර්ග සාකච්ඡාව:East Circassian සැකිලි]] වෙත පිටුව ගෙන යන ලදී 66392 wikitext text/x-wiki {| class="wikitable" ! oldid || date/time || username || edit summary |---- | 67428529 || 2022-06-20T06:55:33Z || WingerBot || <nowiki>use {{auto cat}}, remove extraneous {{catfix}}/TOC templates (manually assisted)</nowiki> |---- | 47077099 || 2017-07-22T17:56:34Z || JAnDbot || <nowiki>Bot: Cleaning up old interwiki links</nowiki> |---- | 34309599 || 2015-09-01T16:02:01Z || MalafayaBot || <nowiki>Bot: Adding [[pt:Categoria:!Predefinição (Cabardino)]], [[ru:Категория:Шаблоны/kbd]]</nowiki> |---- | 28298030 || 2014-08-07T23:49:49Z || MewBot || <nowiki>tempcatboiler > poscatboiler</nowiki> |---- | 26974909 || 2014-06-02T00:50:22Z || MewBot || <nowiki>Added explicit name to root category</nowiki> |---- | 21740923 || 2013-08-18T19:34:55Z || Vahagn Petrosyan || <nowiki>Created page with "{{tempcatboiler|kbd}}"</nowiki> |} 2bu36qz15g88k7ya1fwjrt8z4u6hxpu ප්‍රවර්ගය:East Circassian සැකිලි 14 25591 239295 74261 2026-11-19T04:13:21Z Lee 19 Lee විසින් [[ප්‍රවර්ගය:Kabardian සැකිලි]] සිට [[ප්‍රවර්ගය:East Circassian සැකිලි]] වෙත පිටුව ගෙන යන ලදී 74261 wikitext text/x-wiki {{auto cat}} [[en:Category:Kabardian templates]] bqhwi6gf70nt2rgh8gkhu3bxfzcgfxo සැකිල්ල:my-IPA 10 137853 239281 222784 2026-11-19T03:51:51Z Lee 19 ප්‍රවර්ගය:බුරුම යෙදුම්, ස්වරශාස්ත්‍ර හෝඩි උච්චාරණ සහිත 239281 wikitext text/x-wiki <includeonly>{{#invoke:my-pron|make}} [[ප්‍රවර්ගය:බුරුම යෙදුම්, ස්වරශාස්ත්‍ර හෝඩි උච්චාරණ සහිත]]</includeonly><noinclude>{{documentation}}</noinclude> rb6153tf9pzqixrsu7tvpduj7sxsx12 Module:category tree/lexical properties 828 140299 239284 227479 2026-06-05T22:02:57Z en>Juwan 0 239284 Scribunto text/plain local labels = {} local raw_categories = {} local handlers = {} local raw_handlers = {} local insert = table.insert local ucfirst = require("Module:string utilities").ucfirst ----------------------------------------------------------------------------- -- -- -- LABELS -- -- -- ----------------------------------------------------------------------------- labels["terms by lexical property"] = { description = "{{{langname}}} terms categorized by properties relating to spelling, pronunciation or meaning.", umbrella_parents = "Fundamental", parents = {{name = "{{{langcat}}}", raw = true}} } labels["autohyponyms"] = { description = "{{{langname}}} terms that have at least two meanings, one of which is a hyponym of the other.", parents = {"terms by lexical property"}, } labels["contranyms"] = { description = "{{{langname}}} terms that have two opposite meanings.", parents = {"terms by lexical property"}, } labels["double negatives"] = { description = "{{{langname}}} terms which include a [[double negative]], either etymologically or in a definition.", parents = {"terms by lexical property"}, } labels["heteronyms"] = { description = "{{{langname}}} terms that have different meanings depending on their etymology and/or on how they are pronounced.", parents = {"terms by lexical property"}, } labels["nuqtaless forms"] = { description = "{{{langname}}} terms that are spelled without a [[nuqta]].", parents = {"terms by orthographic property"}, } labels["unhamzated forms"] = { description = "{{{langname}}} terms that are spelled without a [[hamza]].", parents = {"terms by orthographic property"}, } labels["palindromes"] = { description = "{{{langname}}} terms whose characters are read equally both from left to right and vice versa, normally ignoring spaces, [[diacritic]]s and punctuation.", parents = {"terms by their sequences of characters"}, } labels["pleonastic compounds"] = { description = "{{{langname}}} compound terms where the head is a hyponym of its other part and whose other part is its synonym.", parents = {"terms by lexical property", "compound terms"}, } labels["pleonastic compound adjectives"] = { description = "{{{langname}}} compound adjectives where the head is a hyponym of its other part and whose other part is its synonym.", breadcrumb = "adjectives", parents = {{name = "pleonastic compounds", sort = "adjectives"}, "compound adjectives"}, } labels["pleonastic compound nouns"] = { description = "{{{langname}}} compound nouns where the head is a hyponym of its other part and where the head is the synonym for the whole.", breadcrumb = "nouns", parents = {{name = "pleonastic compounds", sort = "nouns"}, "compound nouns"}, } labels["pronunciation spellings"] = { description = "{{{langname}}} terms spelled to represent a pronunciation, often a nonstandard one.", parents = {"terms by orthographic property"}, } labels["tautophrases"] = { description = "{{{langname}}} phrases that repeat the same idea or concept using the same words.", parents = {"terms by lexical property"}, } labels["terms by orthographic property"] = { description = "{{{langname}}} terms categorized by properties relating to [[orthography]] or [[spelling]].", breadcrumb = "by orthographic property", parents = {{name = "terms by lexical property", sort = "orthographic property"}}, } labels["calculator words"] = { description = "{{{langname}}} terms that can be spelled on a [[seven-segment]] display, as found on pocket calculators, by turning numbers upside-down.", parents = {"terms by orthographic property"}, } labels["words spelled without vowels"] = { description = "{{{langname}}} words spelled without vowels.", additional = "The letters counted as vowels may differ from language to language but typically include the conventional written vowels (''a'' ''e'' ''i'' ''o'' ''u'' ''y''), and may include other less common letters representing vowels (e.g. ''æ'', ''œ'', ''ø''). Terms in this category may contain vowel sounds in their pronunciation.", parents = {"terms by their sequences of characters"}, } labels["words by number of letters"] = { description = "{{{langname}}} words categorized by number of letters.", parents = {"terms by orthographic property"}, } labels["abbreviations by number of letters"] = { description = "{{{langname}}} abbreviations categorized by number of letters.", parents = {"terms by orthographic property"}, } labels["roots by number of letters"] = { description = "{{{langname}}} {{lg|roots}} categorized by number of letters.", breadcrumb = "by number of letters", parents = { {name = "roots", sort = "number of letters"}, "terms by orthographic property" }, } labels["roots by shape"] = { description = "{{{langname}}} {{lg|roots}} categorized by their shape.", breadcrumb = "by shape", parents = { {name = "roots", sort = "shape"}, "terms by lexical property" }, } labels["words by number of syllables"] = { description = "{{{langname}}} words categorized by number of syllables.", parents = {"terms by phonemic property"}, } labels["terms by their individual characters"] = { description = "{{{langname}}} terms categorized by whether they include certain individual characters.", breadcrumb = "by their individual characters", parents = {{name = "terms by orthographic property", sort = "individual characters"}}, } labels["terms by their sequences of characters"] = { description = "{{{langname}}} terms categorized by whether they include certain sequences of characters.", breadcrumb = "by their sequences of characters", parents = {{name = "terms by orthographic property", sort = "sequences of characters"}}, } labels["terms with consecutive instances of the same letter"] = { description = "{{{langname}}} words categorized by the number of consecutive instances of the same letter they contain.", breadcrumb = "consecutive instances of the same letter", parents = {{name = "terms by orthographic property", sort = "consecutive instances of the same letter"}}, } labels["terms containing italics"] = { description = "{{{langname}}} terms containing [[italics]].", breadcrumb = "containing italics", parents = {{name = "terms by orthographic property", sort = "containing italics"}}, } labels["terms containing Roman numerals"] = { description = "{{{langname}}} terms containing [[Roman numeral]]s.", breadcrumb = "containing Roman numbers", parents = {{name = "terms by orthographic property", sort = "containing Roman numbers"}, {name = "terms spelled with numbers", sort = "Roman numerals"}}, } labels["terms with mixed convergence"] = { description = "{{{langname}}} terms where the spelling represents a variant pronunciation that differs from (one of) the current standard pronunciation(s).", breadcrumb = "with mixed convergence", parents = {{name = "terms by orthographic property", sort = "mixed convergence"}, "terms by phonemic property"}, } labels["terms with homophones"] = { description = "{{{langname}}} terms that have one or more [[homophones]]: other terms that are pronounced in the same way but spelled differently.", breadcrumb = "with homophones", parents = {{name = "terms by lexical property", sort = "homophones"}}, } labels["terms with honorific transposition"] = { description = "{{{langname}}} compound terms where the written order of the elements is reversed due to [[honorific transposition]].", breadcrumb = "with honorific transposition", parents = {{name = "terms by orthographic property", sort = "honorific transposition"}}, } labels["terms where the adjective follows the noun"] = { description = "{{{langname}}} terms where the adjective follows the noun. These adjectives within these terms are sometimes referred to as postpositive or postnominal adjectives.", breadcrumb = "adjective follows the noun", parents = {{name = "terms by lexical property", sort = "adjective follows the noun"}}, } labels["terms written in foreign scripts"] = { description = "{{{langname}}} terms that are written in a different, non-native script.", breadcrumb = "written in foreign scripts", parents = {{name = "terms by orthographic property", sort = "written in foreign scripts"}}, } labels["terms written in multiple scripts"] = { description = "{{{langname}}} terms that are written using more than one script.", breadcrumb = "written in multiple scripts", parents = {{name = "terms by orthographic property", sort = "written in multiple scripts"}}, } labels["terms by phonemic property"] = { description = "{{{langname}}} terms categorized by properties relating to [[pronunciation]] and [[phonemics]].", breadcrumb = "by phonemic property", parents = {{name = "terms by lexical property", sort = "phonemic property"}}, } -- Add 'umbrella_parents' key if not already present. for _, data in pairs(labels) do if not data.umbrella_parents then data.umbrella_parents = "Terms by lexical property subcategories by language" end end ----------------------------------------------------------------------------- -- -- -- RAW CATEGORIES -- -- -- ----------------------------------------------------------------------------- raw_categories["Terms by lexical property subcategories by language"] = { breadcrumb = "subcategories", description = "Umbrella categories covering topics related to terms categorized by their lexical properties, such as palindromes and number of letters or syllables in a word.", additional = "{{{umbrella_meta_msg}}}", parents = { {name = "terms by lexical property", is_label = true, sort = " "}, "Umbrella metacategories", }, } for _, v in ipairs{ {"words", "letters"}, {"abbreviations", "letters"}, {"roots", "letters"}, {"words", "syllables"} } do raw_categories[("%s by number of %s subcategories by language"):format(ucfirst(v[1]), v[2])] = { breadcrumb = "subcategories", description = ( "Umbrella categories covering topics related to %s categorized by their number of %s.") :format(v[1], v[2] ), additional = "{{{umbrella_meta_msg}}}", parents = { {name = ("%s by number of %s"):format(v[1], v[2]), is_label = true, sort = " "}, "Umbrella metacategories", }, } end raw_categories["Terms with consecutive instances of the same letter subcategories by language"] = { breadcrumb = "subcategories", description = "Umbrella categories covering topics related to terms categorized by the number of consecutive instances of the same letter they contain.", additional = "{{{umbrella_meta_msg}}}", parents = { {name = "terms with consecutive instances of the same letter", is_label = true, sort = " "}, "Umbrella metacategories", }, } raw_categories["Long words by language"] = { description = "Categories with terms that are longer than a given (per-language) threshold.", additional = "{{{umbrella_msg}}}", parents = { {name = "terms by lexical property", is_label = true, sort = " "}, }, } ----------------------------------------------------------------------------- -- -- -- HANDLERS -- -- -- ----------------------------------------------------------------------------- for _, v in ipairs{ { "words", "letter", "composed of", function(n) local pl = n == "1" and "" or "s" return ("They have meaning(s) other than their letter%s or the shape of their letter%s which are not abbreviations, numbers or symbols."):format(pl, pl) end }, {"abbreviations", "letter", "composed of"}, {"roots", "letter", "composed of"}, {"words", "syllable", "pronounced with"} } do insert(handlers, function(data) local n = data.label:match(("^([1-9]%%d*)%%-%s %s$"):format(v[2], v[1])) if not n then return end local sortkey = require("Module:category tree").numeral_sortkey(n, 2097152) return { breadcrumb = n, description = ( "{{{langname}}} %s that are %s %d %s%s.") :format(v[1], v[3], n, v[2], n == "1" and "" or "s" ), additional = v[4] and v[4](n) or nil, umbrella = { breadcrumb = ("%d %s"):format(n, v[2]), parents = { { name = ("%s by number of %ss subcategories by language") :format(ucfirst(v[1]), v[2]), sort = sortkey } }, }, parents = {{name = ("%s by number of %ss"):format(v[1], v[2]), sort = sortkey}} } end) end insert(handlers, function(data) local n = data.label:match("^terms with ([1-9]%d*) consecutive instances of the same letter$") if not (n and tonumber(n) > 2) then return end local sortkey = require("Module:category tree").numeral_sortkey(n, 2097152) return { breadcrumb = n, description = ( "{{{langname}}} terms containing %d consecutive instances of the same letter.") :format(n), umbrella = { breadcrumb = ("%d consecutive instances"):format(n), parents = { {name = "Terms with consecutive instances of the same letter subcategories by language", sort = sortkey}}, }, parents = {{name = "terms with consecutive instances of the same letter", sort = sortkey}} } end) ----------------------------------------------------------------------------- -- -- -- RAW HANDLERS -- -- -- ----------------------------------------------------------------------------- insert(raw_handlers, function(data) local langname = data.category:match("^Long (.*) words$") if langname then local lang = require("Module:languages").getByCanonicalName(langname) if not lang then return end local length_threshold = require("Module:headword/data").long_word_thresholds[lang:getCode()] if length_threshold then return { lang = lang:getCode(), description = ( "{{{langname}}} words that are " .. length_threshold .. " letters or longer." ), parents = { { name = "terms by orthographic property", lang = lang:getCode(), is_label = true }, { name = "Long words by language" }, }, } end end end) return { LABELS = labels, RAW_CATEGORIES = raw_categories, HANDLERS = handlers, RAW_HANDLERS = raw_handlers } gsz9p9sbvfri4mdkyn53l9derax2zo8 239285 239284 2026-11-19T04:10:36Z Lee 19 [[:en:Module:category_tree/lexical_properties]] වෙතින් එක් සංශෝධනයක් 239284 Scribunto text/plain local labels = {} local raw_categories = {} local handlers = {} local raw_handlers = {} local insert = table.insert local ucfirst = require("Module:string utilities").ucfirst ----------------------------------------------------------------------------- -- -- -- LABELS -- -- -- ----------------------------------------------------------------------------- labels["terms by lexical property"] = { description = "{{{langname}}} terms categorized by properties relating to spelling, pronunciation or meaning.", umbrella_parents = "Fundamental", parents = {{name = "{{{langcat}}}", raw = true}} } labels["autohyponyms"] = { description = "{{{langname}}} terms that have at least two meanings, one of which is a hyponym of the other.", parents = {"terms by lexical property"}, } labels["contranyms"] = { description = "{{{langname}}} terms that have two opposite meanings.", parents = {"terms by lexical property"}, } labels["double negatives"] = { description = "{{{langname}}} terms which include a [[double negative]], either etymologically or in a definition.", parents = {"terms by lexical property"}, } labels["heteronyms"] = { description = "{{{langname}}} terms that have different meanings depending on their etymology and/or on how they are pronounced.", parents = {"terms by lexical property"}, } labels["nuqtaless forms"] = { description = "{{{langname}}} terms that are spelled without a [[nuqta]].", parents = {"terms by orthographic property"}, } labels["unhamzated forms"] = { description = "{{{langname}}} terms that are spelled without a [[hamza]].", parents = {"terms by orthographic property"}, } labels["palindromes"] = { description = "{{{langname}}} terms whose characters are read equally both from left to right and vice versa, normally ignoring spaces, [[diacritic]]s and punctuation.", parents = {"terms by their sequences of characters"}, } labels["pleonastic compounds"] = { description = "{{{langname}}} compound terms where the head is a hyponym of its other part and whose other part is its synonym.", parents = {"terms by lexical property", "compound terms"}, } labels["pleonastic compound adjectives"] = { description = "{{{langname}}} compound adjectives where the head is a hyponym of its other part and whose other part is its synonym.", breadcrumb = "adjectives", parents = {{name = "pleonastic compounds", sort = "adjectives"}, "compound adjectives"}, } labels["pleonastic compound nouns"] = { description = "{{{langname}}} compound nouns where the head is a hyponym of its other part and where the head is the synonym for the whole.", breadcrumb = "nouns", parents = {{name = "pleonastic compounds", sort = "nouns"}, "compound nouns"}, } labels["pronunciation spellings"] = { description = "{{{langname}}} terms spelled to represent a pronunciation, often a nonstandard one.", parents = {"terms by orthographic property"}, } labels["tautophrases"] = { description = "{{{langname}}} phrases that repeat the same idea or concept using the same words.", parents = {"terms by lexical property"}, } labels["terms by orthographic property"] = { description = "{{{langname}}} terms categorized by properties relating to [[orthography]] or [[spelling]].", breadcrumb = "by orthographic property", parents = {{name = "terms by lexical property", sort = "orthographic property"}}, } labels["calculator words"] = { description = "{{{langname}}} terms that can be spelled on a [[seven-segment]] display, as found on pocket calculators, by turning numbers upside-down.", parents = {"terms by orthographic property"}, } labels["words spelled without vowels"] = { description = "{{{langname}}} words spelled without vowels.", additional = "The letters counted as vowels may differ from language to language but typically include the conventional written vowels (''a'' ''e'' ''i'' ''o'' ''u'' ''y''), and may include other less common letters representing vowels (e.g. ''æ'', ''œ'', ''ø''). Terms in this category may contain vowel sounds in their pronunciation.", parents = {"terms by their sequences of characters"}, } labels["words by number of letters"] = { description = "{{{langname}}} words categorized by number of letters.", parents = {"terms by orthographic property"}, } labels["abbreviations by number of letters"] = { description = "{{{langname}}} abbreviations categorized by number of letters.", parents = {"terms by orthographic property"}, } labels["roots by number of letters"] = { description = "{{{langname}}} {{lg|roots}} categorized by number of letters.", breadcrumb = "by number of letters", parents = { {name = "roots", sort = "number of letters"}, "terms by orthographic property" }, } labels["roots by shape"] = { description = "{{{langname}}} {{lg|roots}} categorized by their shape.", breadcrumb = "by shape", parents = { {name = "roots", sort = "shape"}, "terms by lexical property" }, } labels["words by number of syllables"] = { description = "{{{langname}}} words categorized by number of syllables.", parents = {"terms by phonemic property"}, } labels["terms by their individual characters"] = { description = "{{{langname}}} terms categorized by whether they include certain individual characters.", breadcrumb = "by their individual characters", parents = {{name = "terms by orthographic property", sort = "individual characters"}}, } labels["terms by their sequences of characters"] = { description = "{{{langname}}} terms categorized by whether they include certain sequences of characters.", breadcrumb = "by their sequences of characters", parents = {{name = "terms by orthographic property", sort = "sequences of characters"}}, } labels["terms with consecutive instances of the same letter"] = { description = "{{{langname}}} words categorized by the number of consecutive instances of the same letter they contain.", breadcrumb = "consecutive instances of the same letter", parents = {{name = "terms by orthographic property", sort = "consecutive instances of the same letter"}}, } labels["terms containing italics"] = { description = "{{{langname}}} terms containing [[italics]].", breadcrumb = "containing italics", parents = {{name = "terms by orthographic property", sort = "containing italics"}}, } labels["terms containing Roman numerals"] = { description = "{{{langname}}} terms containing [[Roman numeral]]s.", breadcrumb = "containing Roman numbers", parents = {{name = "terms by orthographic property", sort = "containing Roman numbers"}, {name = "terms spelled with numbers", sort = "Roman numerals"}}, } labels["terms with mixed convergence"] = { description = "{{{langname}}} terms where the spelling represents a variant pronunciation that differs from (one of) the current standard pronunciation(s).", breadcrumb = "with mixed convergence", parents = {{name = "terms by orthographic property", sort = "mixed convergence"}, "terms by phonemic property"}, } labels["terms with homophones"] = { description = "{{{langname}}} terms that have one or more [[homophones]]: other terms that are pronounced in the same way but spelled differently.", breadcrumb = "with homophones", parents = {{name = "terms by lexical property", sort = "homophones"}}, } labels["terms with honorific transposition"] = { description = "{{{langname}}} compound terms where the written order of the elements is reversed due to [[honorific transposition]].", breadcrumb = "with honorific transposition", parents = {{name = "terms by orthographic property", sort = "honorific transposition"}}, } labels["terms where the adjective follows the noun"] = { description = "{{{langname}}} terms where the adjective follows the noun. These adjectives within these terms are sometimes referred to as postpositive or postnominal adjectives.", breadcrumb = "adjective follows the noun", parents = {{name = "terms by lexical property", sort = "adjective follows the noun"}}, } labels["terms written in foreign scripts"] = { description = "{{{langname}}} terms that are written in a different, non-native script.", breadcrumb = "written in foreign scripts", parents = {{name = "terms by orthographic property", sort = "written in foreign scripts"}}, } labels["terms written in multiple scripts"] = { description = "{{{langname}}} terms that are written using more than one script.", breadcrumb = "written in multiple scripts", parents = {{name = "terms by orthographic property", sort = "written in multiple scripts"}}, } labels["terms by phonemic property"] = { description = "{{{langname}}} terms categorized by properties relating to [[pronunciation]] and [[phonemics]].", breadcrumb = "by phonemic property", parents = {{name = "terms by lexical property", sort = "phonemic property"}}, } -- Add 'umbrella_parents' key if not already present. for _, data in pairs(labels) do if not data.umbrella_parents then data.umbrella_parents = "Terms by lexical property subcategories by language" end end ----------------------------------------------------------------------------- -- -- -- RAW CATEGORIES -- -- -- ----------------------------------------------------------------------------- raw_categories["Terms by lexical property subcategories by language"] = { breadcrumb = "subcategories", description = "Umbrella categories covering topics related to terms categorized by their lexical properties, such as palindromes and number of letters or syllables in a word.", additional = "{{{umbrella_meta_msg}}}", parents = { {name = "terms by lexical property", is_label = true, sort = " "}, "Umbrella metacategories", }, } for _, v in ipairs{ {"words", "letters"}, {"abbreviations", "letters"}, {"roots", "letters"}, {"words", "syllables"} } do raw_categories[("%s by number of %s subcategories by language"):format(ucfirst(v[1]), v[2])] = { breadcrumb = "subcategories", description = ( "Umbrella categories covering topics related to %s categorized by their number of %s.") :format(v[1], v[2] ), additional = "{{{umbrella_meta_msg}}}", parents = { {name = ("%s by number of %s"):format(v[1], v[2]), is_label = true, sort = " "}, "Umbrella metacategories", }, } end raw_categories["Terms with consecutive instances of the same letter subcategories by language"] = { breadcrumb = "subcategories", description = "Umbrella categories covering topics related to terms categorized by the number of consecutive instances of the same letter they contain.", additional = "{{{umbrella_meta_msg}}}", parents = { {name = "terms with consecutive instances of the same letter", is_label = true, sort = " "}, "Umbrella metacategories", }, } raw_categories["Long words by language"] = { description = "Categories with terms that are longer than a given (per-language) threshold.", additional = "{{{umbrella_msg}}}", parents = { {name = "terms by lexical property", is_label = true, sort = " "}, }, } ----------------------------------------------------------------------------- -- -- -- HANDLERS -- -- -- ----------------------------------------------------------------------------- for _, v in ipairs{ { "words", "letter", "composed of", function(n) local pl = n == "1" and "" or "s" return ("They have meaning(s) other than their letter%s or the shape of their letter%s which are not abbreviations, numbers or symbols."):format(pl, pl) end }, {"abbreviations", "letter", "composed of"}, {"roots", "letter", "composed of"}, {"words", "syllable", "pronounced with"} } do insert(handlers, function(data) local n = data.label:match(("^([1-9]%%d*)%%-%s %s$"):format(v[2], v[1])) if not n then return end local sortkey = require("Module:category tree").numeral_sortkey(n, 2097152) return { breadcrumb = n, description = ( "{{{langname}}} %s that are %s %d %s%s.") :format(v[1], v[3], n, v[2], n == "1" and "" or "s" ), additional = v[4] and v[4](n) or nil, umbrella = { breadcrumb = ("%d %s"):format(n, v[2]), parents = { { name = ("%s by number of %ss subcategories by language") :format(ucfirst(v[1]), v[2]), sort = sortkey } }, }, parents = {{name = ("%s by number of %ss"):format(v[1], v[2]), sort = sortkey}} } end) end insert(handlers, function(data) local n = data.label:match("^terms with ([1-9]%d*) consecutive instances of the same letter$") if not (n and tonumber(n) > 2) then return end local sortkey = require("Module:category tree").numeral_sortkey(n, 2097152) return { breadcrumb = n, description = ( "{{{langname}}} terms containing %d consecutive instances of the same letter.") :format(n), umbrella = { breadcrumb = ("%d consecutive instances"):format(n), parents = { {name = "Terms with consecutive instances of the same letter subcategories by language", sort = sortkey}}, }, parents = {{name = "terms with consecutive instances of the same letter", sort = sortkey}} } end) ----------------------------------------------------------------------------- -- -- -- RAW HANDLERS -- -- -- ----------------------------------------------------------------------------- insert(raw_handlers, function(data) local langname = data.category:match("^Long (.*) words$") if langname then local lang = require("Module:languages").getByCanonicalName(langname) if not lang then return end local length_threshold = require("Module:headword/data").long_word_thresholds[lang:getCode()] if length_threshold then return { lang = lang:getCode(), description = ( "{{{langname}}} words that are " .. length_threshold .. " letters or longer." ), parents = { { name = "terms by orthographic property", lang = lang:getCode(), is_label = true }, { name = "Long words by language" }, }, } end end end) return { LABELS = labels, RAW_CATEGORIES = raw_categories, HANDLERS = handlers, RAW_HANDLERS = raw_handlers } gsz9p9sbvfri4mdkyn53l9derax2zo8 239286 239285 2026-11-19T04:10:57Z Lee 19 පැරණි සංස්කරණයකින් ගත් කොටස්... 239286 Scribunto text/plain local m_sinhala = require("Module:sinhala") local labels = {} local raw_categories = {} local handlers = {} local raw_handlers = {} local insert = table.insert local ucfirst = require("Module:string utilities").ucfirst ----------------------------------------------------------------------------- -- -- -- LABELS -- -- -- ----------------------------------------------------------------------------- labels["terms by lexical property"] = { description = "{{{langname}}} terms categorized by properties relating to spelling, pronunciation or meaning.", umbrella_parents = "මූලධර්ම", parents = {{name = "{{{langcat}}}", raw = true}} } labels["autohyponyms"] = { description = "{{{langname}}} terms that have at least two meanings, one of which is a hyponym of the other.", parents = {"terms by lexical property"}, } labels["contranyms"] = { description = "{{{langname}}} terms that have two opposite meanings.", parents = {"terms by lexical property"}, } labels["double negatives"] = { description = "{{{langname}}} terms which include a [[double negative]], either etymologically or in a definition.", parents = {"terms by lexical property"}, } labels["heteronyms"] = { description = "{{{langname}}} terms that have different meanings depending on their etymology and/or on how they are pronounced.", parents = {"terms by lexical property"}, } labels["nuqtaless forms"] = { description = "{{{langname}}} terms that are spelled without a [[nuqta]].", parents = {"terms by orthographic property"}, } labels["unhamzated forms"] = { description = "{{{langname}}} terms that are spelled without a [[hamza]].", parents = {"terms by orthographic property"}, } labels["palindromes"] = { description = "{{{langname}}} terms whose characters are read equally both from left to right and vice versa, normally ignoring spaces, [[diacritic]]s and punctuation.", parents = {"terms by their sequences of characters"}, } labels["pleonastic compounds"] = { description = "{{{langname}}} compound terms where the head is a hyponym of its other part and whose other part is its synonym.", parents = {"terms by lexical property", "compound terms"}, } labels["pleonastic compound adjectives"] = { description = "{{{langname}}} compound adjectives where the head is a hyponym of its other part and whose other part is its synonym.", breadcrumb = "adjectives", parents = {{name = "pleonastic compounds", sort = "adjectives"}, "compound adjectives"}, } labels["pleonastic compound nouns"] = { description = "{{{langname}}} compound nouns where the head is a hyponym of its other part and where the head is the synonym for the whole.", breadcrumb = "nouns", parents = {{name = "pleonastic compounds", sort = "nouns"}, "compound nouns"}, } labels["pronunciation spellings"] = { description = "{{{langname}}} terms spelled to represent a pronunciation, often a nonstandard one.", parents = {"terms by orthographic property"}, } labels["tautophrases"] = { description = "{{{langname}}} phrases that repeat the same idea or concept using the same words.", parents = {"terms by lexical property"}, } labels["terms by orthographic property"] = { description = "{{{langname}}} terms categorized by properties relating to [[orthography]] or [[spelling]].", breadcrumb = "by orthographic property", parents = {{name = "terms by lexical property", sort = "orthographic property"}}, } labels["calculator words"] = { description = "{{{langname}}} terms that can be spelled on a [[seven-segment]] display, as found on pocket calculators, by turning numbers upside-down.", parents = {"terms by orthographic property"}, } labels["words spelled without vowels"] = { description = "{{{langname}}} words spelled without vowels.", additional = "The letters counted as vowels may differ from language to language but typically include the conventional written vowels (''a'' ''e'' ''i'' ''o'' ''u'' ''y''), and may include other less common letters representing vowels (e.g. ''æ'', ''œ'', ''ø''). Terms in this category may contain vowel sounds in their pronunciation.", parents = {"terms by their sequences of characters"}, } labels["words by number of letters"] = { description = "{{{langname}}} words categorized by number of letters.", parents = {"terms by orthographic property"}, } labels["abbreviations by number of letters"] = { description = "{{{langname}}} abbreviations categorized by number of letters.", parents = {"terms by orthographic property"}, } labels["roots by number of letters"] = { description = "{{{langname}}} {{lg|roots}} categorized by number of letters.", breadcrumb = "by number of letters", parents = { {name = "roots", sort = "number of letters"}, "terms by orthographic property" }, } labels["roots by shape"] = { description = "{{{langname}}} {{lg|roots}} categorized by their shape.", breadcrumb = "by shape", parents = { {name = "roots", sort = "shape"}, "terms by lexical property" }, } labels["words by number of syllables"] = { description = "{{{langname}}} words categorized by number of syllables.", parents = {"terms by phonemic property"}, } labels["යෙදුම්, ඒවායේ භාවිතාවන තනි තනි අනුලක්ෂණ අනුව"] = { description = "{{{langname}}} terms categorized by whether they include certain individual characters.", breadcrumb = "by their individual characters", parents = {{name = "terms by orthographic property", sort = "individual characters"}}, } labels["terms by their sequences of characters"] = { description = "{{{langname}}} terms categorized by whether they include certain sequences of characters.", breadcrumb = "by their sequences of characters", parents = {{name = "terms by orthographic property", sort = "sequences of characters"}}, } labels["terms with consecutive instances of the same letter"] = { description = "{{{langname}}} words categorized by the number of consecutive instances of the same letter they contain.", breadcrumb = "consecutive instances of the same letter", parents = {{name = "terms by orthographic property", sort = "consecutive instances of the same letter"}}, } labels["terms containing italics"] = { description = "{{{langname}}} terms containing [[italics]].", breadcrumb = "containing italics", parents = {{name = "terms by orthographic property", sort = "containing italics"}}, } labels["terms containing Roman numerals"] = { description = "{{{langname}}} terms containing [[Roman numeral]]s.", breadcrumb = "containing Roman numbers", parents = {{name = "terms by orthographic property", sort = "containing Roman numbers"}, {name = "terms spelled with numbers", sort = "Roman numerals"}}, } labels["terms with mixed convergence"] = { description = "{{{langname}}} terms where the spelling represents a variant pronunciation that differs from (one of) the current standard pronunciation(s).", breadcrumb = "with mixed convergence", parents = {{name = "terms by orthographic property", sort = "mixed convergence"}, "terms by phonemic property"}, } labels["terms with homophones"] = { description = "{{{langname}}} terms that have one or more [[homophones]]: other terms that are pronounced in the same way but spelled differently.", breadcrumb = "with homophones", parents = {{name = "terms by lexical property", sort = "homophones"}}, } labels["terms with honorific transposition"] = { description = "{{{langname}}} compound terms where the written order of the elements is reversed due to [[honorific transposition]].", breadcrumb = "with honorific transposition", parents = {{name = "terms by orthographic property", sort = "honorific transposition"}}, } labels["terms where the adjective follows the noun"] = { description = "{{{langname}}} terms where the adjective follows the noun. These adjectives within these terms are sometimes referred to as postpositive or postnominal adjectives.", breadcrumb = "adjective follows the noun", parents = {{name = "terms by lexical property", sort = "adjective follows the noun"}}, } labels["terms written in foreign scripts"] = { description = "{{{langname}}} terms that are written in a different, non-native script.", breadcrumb = "written in foreign scripts", parents = {{name = "terms by orthographic property", sort = "written in foreign scripts"}}, } labels["terms written in multiple scripts"] = { description = "{{{langname}}} terms that are written using more than one script.", breadcrumb = "written in multiple scripts", parents = {{name = "terms by orthographic property", sort = "written in multiple scripts"}}, } labels["terms by phonemic property"] = { description = "{{{langname}}} terms categorized by properties relating to [[pronunciation]] and [[phonemics]].", breadcrumb = "by phonemic property", parents = {{name = "terms by lexical property", sort = "phonemic property"}}, } -- Add 'umbrella_parents' key if not already present. for _, data in pairs(labels) do if not data.umbrella_parents then data.umbrella_parents = "Terms by lexical property subcategories by language" end end ----------------------------------------------------------------------------- -- -- -- RAW CATEGORIES -- -- -- ----------------------------------------------------------------------------- raw_categories["Terms by lexical property subcategories by language"] = { breadcrumb = "subcategories", description = "Umbrella categories covering topics related to terms categorized by their lexical properties, such as palindromes and number of letters or syllables in a word.", additional = "{{{umbrella_meta_msg}}}", parents = { {name = "terms by lexical property", is_label = true, sort = " "}, "ඡත්‍ර මෙටා ප්‍රවර්ග", }, } for _, v in ipairs{ {"words", "letters"}, {"abbreviations", "letters"}, {"roots", "letters"}, {"words", "syllables"} } do raw_categories[("%s by number of %s subcategories by language"):format(ucfirst(v[1]), v[2])] = { breadcrumb = "subcategories", description = ( "Umbrella categories covering topics related to %s categorized by their number of %s.") :format(v[1], v[2] ), additional = "{{{umbrella_meta_msg}}}", parents = { {name = ("%s by number of %s"):format(v[1], v[2]), is_label = true, sort = " "}, "ඡත්‍ර මෙටා ප්‍රවර්ග", }, } end raw_categories["Terms with consecutive instances of the same letter subcategories by language"] = { breadcrumb = "subcategories", description = "Umbrella categories covering topics related to terms categorized by the number of consecutive instances of the same letter they contain.", additional = "{{{umbrella_meta_msg}}}", parents = { {name = "terms with consecutive instances of the same letter", is_label = true, sort = " "}, "ඡත්‍ර මෙටා ප්‍රවර්ග", }, } raw_categories["Long words by language"] = { description = "Categories with terms that are longer than a given (per-language) threshold.", additional = "{{{umbrella_msg}}}", parents = { {name = "terms by lexical property", is_label = true, sort = " "}, }, } ----------------------------------------------------------------------------- -- -- -- HANDLERS -- -- -- ----------------------------------------------------------------------------- for _, v in ipairs{ { "words", "letter", "composed of", function(n) local pl = n == "1" and "" or "s" return ("They have meaning(s) other than their letter%s or the shape of their letter%s which are not abbreviations, numbers or symbols."):format(pl, pl) end }, {"abbreviations", "letter", "composed of"}, {"roots", "letter", "composed of"}, {"words", "syllable", "pronounced with"} } do insert(handlers, function(data) local n = data.label:match(("^([1-9]%%d*)%%-%s %s$"):format(m_sinhala.sinhala_adjective(v[2]), m_sinhala.sinhala(v[1]))) if not n then return end local sortkey = require("Module:category tree").numeral_sortkey(n, 2097152) return { breadcrumb = n, description = ( "{{{langname}}} %s that are %s %d %s%s.") :format(v[1], v[3], n, v[2], n == "1" and "" or "s" ), additional = v[4] and v[4](n) or nil, umbrella = { breadcrumb = ("%d %s"):format(n, v[2]), parents = { { name = ("%s by number of %ss subcategories by language") :format(ucfirst(v[1]), v[2]), sort = sortkey } }, }, parents = {{name = ("%s by number of %ss"):format(v[1], v[2]), sort = sortkey}} } end) end insert(handlers, function(data) local n = data.label:match("^terms with ([1-9]%d*) consecutive instances of the same letter$") if not (n and tonumber(n) > 2) then return end local sortkey = require("Module:category tree").numeral_sortkey(n, 2097152) return { breadcrumb = n, description = ( "{{{langname}}} terms containing %d consecutive instances of the same letter.") :format(n), umbrella = { breadcrumb = ("%d consecutive instances"):format(n), parents = { {name = "Terms with consecutive instances of the same letter subcategories by language", sort = sortkey}}, }, parents = {{name = "terms with consecutive instances of the same letter", sort = sortkey}} } end) ----------------------------------------------------------------------------- -- -- -- RAW HANDLERS -- -- -- ----------------------------------------------------------------------------- insert(raw_handlers, function(data) local langname = data.category:match("^Long (.*) words$") if langname then local lang = require("Module:languages").getByCanonicalName(langname) if not lang then return end local length_threshold = require("Module:headword/data").long_word_thresholds[lang:getCode()] if length_threshold then return { lang = lang:getCode(), description = ( "{{{langname}}} words that are " .. length_threshold .. " letters or longer." ), parents = { { name = "terms by orthographic property", lang = lang:getCode(), is_label = true }, { name = "Long words by language" }, }, } end end end) return { LABELS = labels, RAW_CATEGORIES = raw_categories, HANDLERS = handlers, RAW_HANDLERS = raw_handlers } gpa9mny61h7banxwcueft9dj41gyzxq Module:category tree/fam/jpx 828 140957 239312 234058 2026-07-26T06:03:25Z en>Benwing 0 Changed protection settings for "[[Module:category tree/fam/jpx]]": per existence of [[WT:CLTR]]; changes to these modules should go through a vetting process ([Edit=Allow only autopatrollers] (indefinite) [Move=Allow only autopatrollers] (indefinite)) 239312 Scribunto text/plain local labels = {} local handlers = {} local m_str_utils = require("Module:string utilities") local concat = table.concat local full_link = require("Module:links").full_link local insert = table.insert local Hani_sort = require("Module:Hani-sortkey").makeSortKey local match = m_str_utils.match local sort = table.sort local tag_text = require("Module:script_utilities").tag_text local ucfirst = m_str_utils.ucfirst local Hira = require("Module:scripts").getByCode("Hira") local Jpan = require("Module:scripts").getByCode("Jpan") local kana_to_romaji = require("Module:Hrkt-translit").tr local m_numeric = require("Module:ConvertNumeric") local kana_capture = "([-" .. require("Module:ja/data/range").kana .. "・]+)" local yomi_data = require("Module:kanjitab/data") labels["adnominals"] = { description = "{{{langname}}} adnominals, or {{ja-r|連%体%詞|れん%たい%し}}, which modify nouns, and do not conjugate or [[predicate#Verb|predicate]].", parents = {{name = "{{{langcat}}}", raw = true}}, } labels["hiragana"] = { description = "{{{langname}}} terms with hiragana {{mdash}} {{ja-r|平%仮%名|ひら%が%な}} {{mdash}} forms, sorted by conventional hiragana sequence. The hiragana form is a [[phonetic]] representation of that word. " .. "Wiktionary represents {{{langname}}}-language segments in three ways: in normal form (with [[kanji]], if appropriate), in [[hiragana]] " .. "form (this differs from kanji form only when the segment contains kanji), and in [[romaji]] form.", additional = "''See also'' [[:Category:{{{langname}}} katakana]]", toc_template = "Hira-categoryTOC", toc_template_full = "Hira-categoryTOC/full", parents = { {name = "{{{langcat}}}", raw = true}, "Category:Hiragana script characters", } } labels["historical hiragana"] = { description = "{{{langname}}} historical [[hiragana]].", additional = "''See also'' [[:Category:{{{langname}}} historical katakana]].", toc_template = "Hira-categoryTOC", toc_template_full = "Hira-categoryTOC/full", parents = { "hiragana", {name = "{{{langcat}}}", raw = true}, "Category:Hiragana script characters", } } labels["katakana"] = { description = "{{{langname}}} terms with katakana {{mdash}} {{ja-r|片%仮%名|かた%か%な}} {{mdash}} forms, sorted by conventional katakana sequence. Katakana is used primarily for transliterations of foreign words, including old Chinese hanzi not used in [[shinjitai]].", additional = "''See also'' [[:Category:{{{langname}}} hiragana]]", toc_template = "Kana-categoryTOC", toc_template_full = "Kana-categoryTOC/full", parents = { {name = "{{{langcat}}}", raw = true}, "Category:Katakana script characters", } } labels["historical katakana"] = { description = "{{{langname}}} historical [[katakana]].", additional = "''See also'' [[:Category:{{{langname}}} historical hiragana]].", toc_template = "Kana-categoryTOC", toc_template_full = "Kana-categoryTOC/full", parents = { "katakana", {name = "{{{langcat}}}", raw = true}, "Category:Katakana script characters", } } labels["terms spelled with mixed kana"] = { description = "{{{langname}}} terms which combine [[hiragana]] and [[katakana]] characters, potentially with [[kanji]] too.", parents = { {name = "{{{langcat}}}", raw = true}, "hiragana", "katakana", }, } labels["kanji"] = { topright = "{{wp|Kanji}}", description = "{{{langname}}} symbols of the Han logographic script, which can represent sounds or convey meanings directly.", toc_template = "Hani-categoryTOC", umbrella = "Han characters", parents = "logograms", } labels["kanji by reading"] = { description = "{{{langname}}} kanji categorized by reading.", parents = {{name = "kanji", sort = "reading"}}, } labels["makurakotoba"] = { topright = "{{wp|Makurakotoba}}", description = "{{{langname}}} idioms used in poetry to introduce specific words.", parents = {"idioms"}, } labels["terms by kanji readings"] = { description = "{{{langname}}} categories grouped with regard to the readings of the kanji with which they are spelled.", parents = {{name = "{{{langcat}}}", raw = true}}, } labels["terms by reading pattern"] = { description = "{{{langname}}} categories with terms grouped by their reading patterns.", parents = {{name = "{{{langcat}}}", raw = true}}, } labels["terms by number of kanji"] = { description = "{{{langname}}} terms categorized by number of kanji.", parents = {"terms by orthographic property"}, } local function handle_onyomi_list(category, category_type, cat_yomi_type) local onyomi, seen = {}, {} for _, yomi in pairs(yomi_data) do if not seen[yomi] and yomi.onyomi then local yomi_catname = yomi[category_type] if yomi_catname ~= false then local yomi_type = yomi.type if yomi_type ~= "on'yomi" and yomi_type ~= cat_yomi_type then insert(onyomi, "[[:Category:{{{langname}}} " .. category:gsub("{{{yomi_catname}}}", yomi_catname) .. "]]") end end end seen[yomi] = true end sort(onyomi) return onyomi end local function add_yomi_category(category, category_type, parent, description) for _, yomi in pairs(yomi_data) do local yomi_catname = yomi[category_type] if yomi_catname ~= false then local yomi_type = yomi.type local yomi_desc = yomi.link or yomi_catname if yomi.description then yomi_desc = yomi_desc .. "; " .. yomi.description end local label = { description = description .. " " .. yomi_desc .. ".", breadcrumb = yomi_type, parents = {{name = parent, sort = yomi_catname}}, } if yomi.onyomi then local onyomi = handle_onyomi_list(category, category_type, yomi_type) label.additional = "Categories of terms with " .. (yomi_type == "on'yomi" and "more" or "other") .. " specific types of on'yomi readings can be found in the following categories:\n* " .. concat(onyomi, "\n* ") if yomi_type ~= "on'yomi" then insert(label.parents, 1, { name = (category:gsub("{{{yomi_catname}}}", yomi_data.on[category_type])), sort = yomi_catname }) end end labels[category:gsub("{{{yomi_catname}}}", yomi_catname)] = label end end end add_yomi_category( "terms read with {{{yomi_catname}}}", "reading_category", "terms by reading pattern", "{{{langname}}} terms read with" ) add_yomi_category( "terms spelled with kanji with {{{yomi_catname}}} readings", "kanji_category", "terms by kanji reading type", "{{{langname}}} categories with terms that are spelled with one or more kanji read with" ) labels["terms with missing yomi"] = { description = "{{{langname}}} terms where at least one [[Appendix:Japanese glossary#yomi|yomi]] is missing from {{tl|{{{langcode}}}-kanjitab}}.", hidden = true, can_be_empty = true, parents = {"entry maintenance"}, } labels["terms with IPA pronunciation with pitch accent"] = { description = "{{{langname}}} terms with pronunciations that have {{w|Japanese pitch accent|pitch accent}} specified.", additional = "Pitch accent can be specified in {{tl|{{{langcode}}}-pron}} with the {{code|=acc=}} parameter.", can_be_empty = true, parents = {"entry maintenance", "pitch accent"}, } labels["terms with IPA pronunciation missing pitch accent"] = { description = "{{{langname}}} terms with pronunciations that do not have a {{w|Japanese pitch accent|pitch accent}} specified.", additional = "Pitch accent can be specified in {{tl|{{{langcode}}}-pron}} with the {{code|=acc=}} parameter.", hidden = true, can_be_empty = true, parents = {"entry maintenance"}, } labels["pitch accent"] = { description = "{{{langname}}} terms regarding {{w|Japanese pitch accent|pitch accent}} pronunciation.", can_be_empty = true, parents = {{name = "{{{langcat}}}", raw = true}}, } labels["terms with Heiban pitch accent (Tōkyō)"] = { description = "{{{langname}}} terms with pronunciations that are (Tōkyō) [[平板型|Heiban]] {{w|Japanese pitch accent|pitch accent}}.", can_be_empty = true, parents = {"pitch accent"} } labels["terms with Atamadaka pitch accent (Tōkyō)"] = { description = "{{{langname}}} terms with pronunciations that are (Tōkyō) [[頭高型|Atamadaka]] {{w|Japanese pitch accent|pitch accent}}.", can_be_empty = true, parents = {"pitch accent"} } labels["terms with Nakadaka pitch accent (Tōkyō)"] = { description = "{{{langname}}} terms with pronunciations that are (Tōkyō) [[中高型|Nakadaka]] {{w|Japanese pitch accent|pitch accent}}.", can_be_empty = true, parents = {"pitch accent"} } labels["terms with Odaka pitch accent (Tōkyō)"] = { description = "{{{langname}}} terms with pronunciations that are (Tōkyō) [[尾高型|Odaka]] {{w|Japanese pitch accent|pitch accent}}.", can_be_empty = true, parents = {"pitch accent"} } labels["terms with complex pitch accent (Tōkyō)"] = { description = "{{{langname}}} terms with pronunciations that are (Tōkyō) complex {{w|Japanese pitch accent|pitch accent}}, as in having more than one {{m|ja|アクセント句}}.", can_be_empty = true, parents = {"pitch accent"} } labels["pitch accent deaccenting before の"] = { description = "{{{langname}}} terms with {{w|Japanese pitch accent|pitch accent}} pronunciations that have exceptional deaccenting or lack thereof before の ({{ja-deaccenting-before-no}}).", can_be_empty = true, parents = {"pitch accent"} } labels["terms with Odaka pitch accent not deaccented before の (Tōkyō)"] = { description = "{{{langname}}} terms with pronunciations that are (Tōkyō) [[尾高型|Odaka]] {{w|Japanese pitch accent|pitch accent}} and do not become deaccented before の ({{ja-deaccenting-before-no}}).\n\nTerms are placed in this category using {{tl|ja-odaka-deaccent-exception}}.", can_be_empty = true, parents = {"pitch accent deaccenting before の"} } labels["terms with Nakadaka pitch accent deaccented before の (Tōkyō)"] = { description = "{{{langname}}} terms with pronunciations that are (Tōkyō) [[中高型|Nakadaka]] {{w|Japanese pitch accent|pitch accent}} and become deaccented before の ({{ja-deaccenting-before-no}}).\n\nTerms are placed in this category using {{tl|ja-nakadaka-deaccent}}.", can_be_empty = true, parents = {"pitch accent deaccenting before の"} } labels["terms by kanji reading type"] = { description = "{{{langname}}} categories with terms grouped with regard to the types of readings of the kanji with which " .. "they are spelled; broadly, those of Chinese origin, {{ja-r|音|おん}} readings, and those of non-Chinese origin, {{ja-r|訓|くん}} readings.", parents = {{name = "{{{langcat}}}", raw = true}}, } labels["terms spelled with ateji"] = { topright = "{{wp|Ateji}}", description = "{{{langname}}} terms containing one or more [[Appendix:Japanese glossary#ateji|ateji]] {{mdash}} {{ja-r|当て字|あてじ}} {{mdash}} which are [[kanji]] used to represent sounds rather than meanings (though meaning may have some influence on which kanji are chosen).", parents = {{name = "{{{langcat}}}", raw = true}}, } labels["terms spelled with daiyōji"] = { description = "Japanese terms spelled using [[Appendix:Japanese glossary#daiyouji|daiyōji]], categorized using {{temp|ja-daiyouji}}.", parents = {"terms by etymology"}, } labels["terms spelled with jukujikun"] = { description = "{{{langname}}} terms containing one or more [[Appendix:Japanese glossary#jukujikun|jukujikun]] {{mdash}} {{ja-r|熟%字%訓|じゅく%じ%くん}} {{mdash}} which are [[kanji]] used to represent meanings rather than sounds.", parents = {{name = "{{{langcat}}}", raw = true}}, } local function add_grade_categories(grade, desc, wp, only_one, parent, sort) local grade_kanji = grade .. " kanji" local topright = wp and ("{{wp|%s}}"):format(ucfirst(grade_kanji)) or nil labels[grade_kanji] = { topright = topright, description = "{{{langname}}} kanji " .. desc, toc_template = "Hani-categoryTOC", parents = {{ name = parent and (parent .. " kanji") or "kanji", sort = sort or grade }}, } labels["terms spelled with " .. grade_kanji] = { topright = topright, description = "{{{langname}}} terms spelled with " .. (only_one and "at least one " or "") .. "kanji " .. desc, parents = {{ name = parent and ("terms spelled with " .. parent .. " kanji") or "terms by orthographic property", sort = sort or grade }}, } end for i = 1, 6 do local ord = m_numeric.ones_position_ord[i] add_grade_categories( ord .. " grade", "taught in the " .. ord .. " grade of elementary school, as designated by the the official list of {{ja-r|教%育 漢%字|きょう%いく かん%じ|education kanji}}.", false, false, "kyōiku", i ) end add_grade_categories( "kyōiku", "on the official list of {{ja-r|教%育 漢%字|きょう%いく かん%じ|education kanji}}.", true, false, "jōyō" ) add_grade_categories( "secondary school", "on the official list of {{ja-r|常%用 漢%字|じょう%よう かん%じ|regular-use characters}} that are generally taught in secondary school.", false, false, "jōyō" ) add_grade_categories( "jōyō", "on the official list of {{ja-r|常%用 漢%字|じょう%よう かん%じ|regular-use characters}}.", true, false ) add_grade_categories( "tōyō", "on the official list of {{ja-r|当%用 漢%字|とう%よう かん%じ|general-use characters}}, which was used from 1946{{ndash}}1981 until the publication of the list of {{ja-r|常%用 漢%字|じょう%よう かん%じ|regular-use characters}}.", true, false ) add_grade_categories( "jinmeiyō", "on the official list of {{ja-r|人%名%用 漢%字|じん%めい%-よう かん%じ|kanji for use in personal names}}.", true, true ) add_grade_categories( "hyōgai", "not included on the official list of {{ja-r|常%用 漢%字|じょう%よう かん%じ|regular-use characters}} or {{ja-r|人%名%用 漢%字|じん%めい%-よう かん%じ|kanji for use in personal names}}, known as {{ja-r|表%外 漢%字|ひょう%がい かん%じ}} or {{ja-r|表%外%字|ひょう%がい%じ|unlisted characters}}.", true, true ) labels["terms with multiple readings"] = { description = "{{{langname}}} terms with multiple pronunciations (hence multiple [[kana]] spellings).", parents = {{name = "{{{langcat}}}", raw = true}}, } labels["kanji readings by number of morae"] = { description = "{{{langname}}} categories grouped with regard to the number of morae in their kanji readings.", parents = {{name = "{{{langcat}}}", raw = true}}, } labels["single-kanji terms"] = { description = "{{{langname}}} terms written as a single kanji.", parents = { "terms by orthographic property", {name = "terms with 1 kanji", sort = " "}, }, } labels["kanji with kun readings missing okurigana designation"] = { breadcrumb = "Kanji missing okurigana designation", description = "{{{langname}}} kanji entries in which one or more kun readings entered into {{tl|{{{langcode}}}-readings}} is missing a hyphen denoting okurigana.", toc_template = "Hani-categoryTOC", hidden = true, can_be_empty = true, parents = {"entry maintenance"}, } labels["terms by the individual characters in their historical spellings"] = { breadcrumb = "Historical", description = "{{{langname}}} terms categorized by whether their spellings in the {{w|historical kana orthography}} included certain individual characters.", parents = {{name = "terms by their individual characters", sort = " "}}, } labels["verbs without transitivity"] = { description = "{{{langname}}} verbs missing the {{code|=tr=}} parameter from their headword templates.", hidden = true, can_be_empty = true, parents = {"entry maintenance"}, } labels["yojijukugo"] = { topright = "{{wp|Yojijukugo}}", description = "{{{langname}}} four-[[kanji]] compound terms, {{ja-r|四%字 熟%語|よ%じ じゅく%ご}}, with idiomatic meanings; typically derived from Classical Chinese, Buddhist scripture or traditional Japanese proverbs.", additional = "Compare Chinese {{w|chengyu}} and Korean {{w|sajaseong-eo}}.", umbrella = "four-character idioms", parents = {"idioms"}, } -- FIXME: Only works for 0 through 19. local word_to_number = {} for k, v in pairs(m_numeric.ones_position) do word_to_number[v] = k end local periods = { historical = true, ancient = true, } local function get_period_text_and_reading_type_link(period, reading_type) if period and not periods[period] then return nil end local period_text = period and period .. " " or nil -- Allow periods (historical or ancient) by themselves; they will parse as reading types. if not period and periods[reading_type] then return nil, reading_type end local reading_type_link = "[[Appendix:Japanese glossary#" .. reading_type .. "|" .. reading_type .. "]]" return period_text, reading_type_link end local function get_sc(str) return match(str:gsub("[%s%p]+", ""), "[^" .. Hira:getCharacters() .. "]") and Jpan or Hira end local function get_tagged_reading(reading, lang) return tag_text(reading, lang, get_sc(reading)) end local function get_reading_link(reading, lang, period, link) local hist = periods[period] reading = reading:gsub("[%.%-%s]+", "") return full_link({ lang = lang, sc = get_sc(reading), term = link or reading:gsub("・", ""), -- If we have okurigana, demarcate furigana. alt = reading:gsub("^(.-)・", "<span style=\"border-top:1px solid;position:relative;padding:1px;\">%1<span style=\"position:absolute;top:0;bottom:67%%;right:0%%;border-right:1px solid;\"></span></span>"), tr = kana_to_romaji((reading:gsub("・", ".")), lang:getCode(), nil, {keep_dot = true, hist = hist}) :gsub("^(.-)%.", "<u>%1</u>"), pos = reading:find("・", 1, true) and get_tagged_reading((reading:gsub("^.-・", "~")), lang) or nil }, "term") end local function is_on_subtype(reading_type) return reading_type:find(".on$") end insert(handlers, function(data) local n =data.label:match("^terms with ([1-9]%d*) kanji$") if not n then return end local sortkey = require("Module:category tree").numeral_sortkey(n, 2097152) return { breadcrumb = n, description = ("{{{langname}}} terms containing exactly %d kanji."):format(n), -- TODO: implement this using the same mechanism used to implement parents (i.e. avoiding the need for raw categories). -- umbrella = { -- breadcrumb = ("%d kanji"):format(n), -- parents = {{name = "terms by number of kanji subcategories by language", sort = sortkey}}, -- }, parents = {{name = ("terms by number of kanji"), sort = sortkey}} } end) insert(handlers, function(data) local label_pref, kana = data.label:match("^(terms historically spelled with )" .. kana_capture .. "$") if not kana then return end local lang = data.lang return { description = "{{{langname}}} terms spelled with " .. get_reading_link(kana, lang, "historical") .. " in the {{w|historical kana orthography}}.", displaytitle = "{{{langname}}} " .. label_pref .. get_tagged_reading(kana, lang), breadcrumb = "historical", parents = { {name = "terms spelled with " .. kana, sort = " "}, {name = "terms by the individual characters in their historical spellings", sort = lang:makeSortKey(kana)} }, umbrella = false, } end) insert(handlers, function(data) local count, plural = data.label:match("^kanji readings with (.+) mora(e?)$") -- Make sure 'one' goes with singular and other numbers with plural. if not count or (count == "one") ~= (plural == "") then return end local num = word_to_number[count] if not num then return nil end return { description = "{{{langname}}} kanji readings containing " .. count .. " mora" .. plural .. ".", breadcrumb = num, parents = {{name = "kanji readings by number of morae", sort = num}}, umbrella = false, } end) insert(handlers, function(data) local label_pref, period, reading_type, reading = match(data.label, "^(kanji with ([a-z]-) ?([%a']+) reading )" .. kana_capture .. "$") if not period then return end period = period ~= "" and period or nil local period_text, reading_type_link = get_period_text_and_reading_type_link(period, reading_type) if not reading_type_link then return end local lang = data.lang -- Compute parents. local parents, breadcrumb = {} if reading:find("・", 1, true) then local okurigana = reading:match("・(.*)") insert(parents, { name = "kanji with " .. (period_text or "") .. reading_type .. " reading " .. reading:match("(.-)・"), -- Sort by okurigana, since all coordinate categories will have the same furigana. sort = (lang:makeSortKey(okurigana)) }) breadcrumb = "~" .. okurigana else insert(parents, { name = "kanji by " .. (period_text or "") .. reading_type .. " reading", sort = (lang:makeSortKey(reading)) }) breadcrumb = reading end if is_on_subtype(reading_type) then insert(parents, {name = "kanji with " .. (period_text or "") .. "on reading " .. reading, sort = reading_type}) elseif period_text then insert(parents, {name = "kanji with " .. period_text .. "reading " .. reading, sort = reading_type}) end if not period_text then insert(parents, {name = "kanji read as " .. reading, sort = reading_type}) end return { description = "{{{langname}}} [[kanji]] with the " .. (period_text or "") .. reading_type_link .. " reading " .. get_reading_link(reading, lang, period or reading_type) .. ".", displaytitle = "{{{langname}}} " .. label_pref .. get_tagged_reading(reading, lang), breadcrumb = get_tagged_reading(breadcrumb, lang), parents = parents, umbrella = false, } end) insert(handlers, function(data) local period, reading_type = match(data.label, "^kanji by ([a-z]-) ?([%a']+) reading$") if not period then return end period = period ~= "" and period or nil local period_text, reading_type_link = get_period_text_and_reading_type_link(period, reading_type) if not reading_type_link then return nil end -- Compute parents. local parents = { is_on_subtype(reading_type) and {name = "kanji by " .. (period_text or "") .. "on reading", sort = reading_type} or period_text and {name = "kanji by " .. reading_type .. " reading", sort = period} or {name = "kanji by reading", sort = reading_type} } if period_text then insert(parents, {name = "kanji by " .. period_text .. "reading", sort = reading_type}) end -- Compute description. local description = "{{{langname}}} [[kanji]] categorized by " .. (period_text or "") .. reading_type_link .. " reading." return { description = description, breadcrumb = (period_text or "") .. reading_type, parents = parents, umbrella = false, } end) insert(handlers, function(data) local label_pref, reading = match(data.label, "^(kanji read as )" .. kana_capture .. "$") if not reading then return end local args = require("Module:parameters").process(data.args, { ["histconsol"] = true, }) local lang = data.lang local parents, breadcrumb = {} if reading:find("・", 1, true) then local okurigana = reading:match("・(.*)") insert(parents, { name = "kanji read as " .. reading:match("(.-)・"), -- Sort by okurigana, since all coordinate categories will have the same furigana. sort = (lang:makeSortKey(okurigana)) }) breadcrumb = "~" .. okurigana else insert(parents, { name = "kanji by reading", sort = (lang:makeSortKey(reading)) }) breadcrumb = reading end local addl local period_text if args.histconsol then period_text = "historical" addl = ("This is a [[Wikipedia:Historical kana orthography|historical]] [[Wikipedia:Kanazukai|reading]], now " .. "consolidated with the [[Wikipedia:Modern kana usage|modern reading]] of " .. get_reading_link(args.histconsol, lang, nil, ("Category:Japanese kanji read as %s"):format(args.histconsol)) .. ".") end return { description = "{{{langname}}} [[kanji]] read as " .. get_reading_link(reading, lang, period_text) .. ".", additional = addl, displaytitle = "{{{langname}}} " .. label_pref .. get_tagged_reading(reading, lang), breadcrumb = get_tagged_reading(breadcrumb, lang), parents = parents, umbrella = false, }, true end) insert(handlers, function(data) local label_pref, reading = match(data.label, "^(terms spelled with kanji read as )" .. kana_capture .. "$") if not reading then return end -- Compute parents. local lang = data.lang local sort_key = (lang:makeSortKey(reading)) local mora_count = require("Module:ja").count_morae(reading) local mora_count_words = m_numeric.spell_number(tostring(mora_count)) local parents = { {name = "terms by kanji readings", sort = sort_key}, {name = "kanji readings with " .. mora_count_words .. " mora" .. (mora_count > 1 and "e" or ""), sort = sort_key}, {name = "kanji read as " .. reading, sort = " "}, } local tagged_reading = get_tagged_reading(reading, lang) return { description = "{{{langname}}} terms that contain kanji that exhibit a reading of " .. get_reading_link(reading, lang) .. " in those terms prior to any sound changes.", displaytitle = "{{{langname}}} " .. label_pref .. tagged_reading, breadcrumb = tagged_reading, parents = parents, umbrella = false, } end) insert(handlers, function(data) local kanji, reading = match(data.label, "^terms spelled with (.) read as " .. kana_capture .. "$") if not kanji then return nil end local args = require("Module:parameters").process(data.args, { [1] = {list = true}, }) local lang = data.lang if #args[1] == 0 then error("For categories of the form \"" .. lang:getCanonicalName() .. " terms spelled with KANJI read as READING\", at least one reading type (e.g. <code>kun</code> or <code>on</code>) must be specified using <code>1=</code>, <code>2=</code>, <code>3=</code>, etc.") end local yomi_types, parents = {}, {} for _, yomi, category in ipairs(args[1]) do local yomi_data = yomi_data[yomi] if not yomi_data then error("The yomi type \"" .. yomi .. "\" is not recognized.") end category = yomi_data.kanji_category if not category then error("The yomi type \"" .. yomi .. "\" is not valid for this type of category.") end insert(yomi_types, yomi_data.link) insert(parents, { name = "terms spelled with kanji with " .. category .. " readings", sort = (lang:makeSortKey(reading)) }) end insert(parents, 1, {name = "terms spelled with " .. kanji, sort = (lang:makeSortKey(reading))}) insert(parents, 2, {name = "terms spelled with kanji read as " .. reading, sort = Hani_sort(kanji)}) yomi_types = (#yomi_types > 1 and "one of " or "") .. "its " .. require("Module:table").serialCommaJoin(yomi_types, {conj = "or"}) .. " reading" .. (#yomi_types > 1 and "s" or "") local tagged_kanji = get_tagged_reading(kanji, lang) local tagged_reading = get_tagged_reading(reading, lang) return { description = "{{{langname}}} terms spelled with {{l|{{{langcode}}}|" .. kanji .. "}} with " .. yomi_types .. " of " .. get_reading_link(reading, lang) .. ".", displaytitle = "{{{langname}}} terms spelled with " .. tagged_kanji .. " read as " .. tagged_reading, breadcrumb = "read as " .. tagged_reading, parents = parents, umbrella = false, }, true end) insert(handlers, function(data) local affix, kanji, reading = data.label:match("^terms ([a-z]+fix)ed with (.+) read as " .. kana_capture .. "$") if not affix or not kanji or not reading then return nil end local args = require("Module:parameters").process(data.args, { [1] = {list = true}, }) local lang = data.lang if #args[1] == 0 then error("For categories of the form \"" .. lang:getCanonicalName() .. " terms AFFIXed with KANJI read as READING\", at least one reading type (e.g. <code>kun</code> or <code>on</code>) must be specified using <code>1=</code>, <code>2=</code>, <code>3=</code>, etc.") end local yomi_types = {} for _, yomi, category in ipairs(args[1]) do local yomi_data = yomi_data[yomi] if not yomi_data then error("The yomi type \"" .. yomi .. "\" is not recognized.") end category = yomi_data.kanji_category if not category then error("The yomi type \"" .. yomi .. "\" is not valid for this type of category.") end insert(yomi_types, yomi_data.link) end yomi_types = (#yomi_types > 1 and "one of " or "") .. "its " .. require("Module:table").serialCommaJoin(yomi_types, {conj = "or"}) .. " reading" .. (#yomi_types > 1 and "s" or "") local description = "{{{langname}}} terms " .. affix .. "ed with {{l|{{{langcode}}}|" .. kanji .. "}} with " .. yomi_types .. " of " .. get_reading_link(reading, lang) .. "." local what_categorizes_msg = require("Module:category tree/fam/jpx/what-categorizes-msg") .get_what_categorizes_msg(kanji, reading, affix) if what_categorizes_msg then description = description .. "\n\n" .. what_categorizes_msg end local parents = {} table.insert(parents, {name = "terms " .. affix .. "ed with " .. kanji, sort = (lang:makeSortKey(reading))}) if mw.title.new("Category:" .. lang:getCanonicalName() .. " terms spelled with " .. kanji .. " read as " .. reading).exists then table.insert(parents, {name = "terms spelled with " .. kanji .. " read as " .. reading, sort = (lang:makeSortKey(reading)), args=data.args}) end local tagged_kanji = get_tagged_reading(kanji, lang) local tagged_reading = get_tagged_reading(reading, lang) return { description = description, displaytitle = "{{{langname}}} terms " .. affix .. "ed with " .. tagged_kanji .. " read as " .. tagged_reading, breadcrumb = "read as " .. reading, parents = parents, umbrella = false, }, true end) insert(handlers, function(data) local kanji, daiyoji = match(data.label, "^terms with (.) replaced by daiyōji (.)$") if not kanji then return nil end local args = require("Module:parameters").process(data.args, { ["sort"] = true, }) local lang = data.lang if not args.sort then error("For categories of the form \"" .. lang:getCanonicalName() .. " terms with KANJI replaced by daiyōji DAIYOJI\", the sort key must be specified using sort=") end local tagged_kanji = get_tagged_reading(kanji, lang) local tagged_daiyoji = get_tagged_reading(daiyoji, lang) return { description = "{{{langname}}} terms with {{l|{{{langcode}}}|" .. kanji .. "}} replaced by [[Appendix:Japanese glossary#daiyouji|daiyōji]] {{l|{{{langcode}}}|" .. daiyoji .. "}}.", displaytitle = "{{{langname}}} terms with " .. tagged_kanji .. " replaced by daiyōji " .. tagged_daiyoji, breadcrumb = tagged_kanji .. " replaced by daiyōji " .. tagged_daiyoji, parents = {{name = "terms spelled with daiyōji", sort = args.sort}}, umbrella = false, }, true end) return {LABELS = labels, HANDLERS = handlers} ea2zmcmhguqw3ivdjan9pb199sxgqx3 239313 239312 2026-11-19T07:08:55Z Lee 19 [[:en:Module:category_tree/fam/jpx]] වෙතින් එක් සංශෝධනයක් 239312 Scribunto text/plain local labels = {} local handlers = {} local m_str_utils = require("Module:string utilities") local concat = table.concat local full_link = require("Module:links").full_link local insert = table.insert local Hani_sort = require("Module:Hani-sortkey").makeSortKey local match = m_str_utils.match local sort = table.sort local tag_text = require("Module:script_utilities").tag_text local ucfirst = m_str_utils.ucfirst local Hira = require("Module:scripts").getByCode("Hira") local Jpan = require("Module:scripts").getByCode("Jpan") local kana_to_romaji = require("Module:Hrkt-translit").tr local m_numeric = require("Module:ConvertNumeric") local kana_capture = "([-" .. require("Module:ja/data/range").kana .. "・]+)" local yomi_data = require("Module:kanjitab/data") labels["adnominals"] = { description = "{{{langname}}} adnominals, or {{ja-r|連%体%詞|れん%たい%し}}, which modify nouns, and do not conjugate or [[predicate#Verb|predicate]].", parents = {{name = "{{{langcat}}}", raw = true}}, } labels["hiragana"] = { description = "{{{langname}}} terms with hiragana {{mdash}} {{ja-r|平%仮%名|ひら%が%な}} {{mdash}} forms, sorted by conventional hiragana sequence. The hiragana form is a [[phonetic]] representation of that word. " .. "Wiktionary represents {{{langname}}}-language segments in three ways: in normal form (with [[kanji]], if appropriate), in [[hiragana]] " .. "form (this differs from kanji form only when the segment contains kanji), and in [[romaji]] form.", additional = "''See also'' [[:Category:{{{langname}}} katakana]]", toc_template = "Hira-categoryTOC", toc_template_full = "Hira-categoryTOC/full", parents = { {name = "{{{langcat}}}", raw = true}, "Category:Hiragana script characters", } } labels["historical hiragana"] = { description = "{{{langname}}} historical [[hiragana]].", additional = "''See also'' [[:Category:{{{langname}}} historical katakana]].", toc_template = "Hira-categoryTOC", toc_template_full = "Hira-categoryTOC/full", parents = { "hiragana", {name = "{{{langcat}}}", raw = true}, "Category:Hiragana script characters", } } labels["katakana"] = { description = "{{{langname}}} terms with katakana {{mdash}} {{ja-r|片%仮%名|かた%か%な}} {{mdash}} forms, sorted by conventional katakana sequence. Katakana is used primarily for transliterations of foreign words, including old Chinese hanzi not used in [[shinjitai]].", additional = "''See also'' [[:Category:{{{langname}}} hiragana]]", toc_template = "Kana-categoryTOC", toc_template_full = "Kana-categoryTOC/full", parents = { {name = "{{{langcat}}}", raw = true}, "Category:Katakana script characters", } } labels["historical katakana"] = { description = "{{{langname}}} historical [[katakana]].", additional = "''See also'' [[:Category:{{{langname}}} historical hiragana]].", toc_template = "Kana-categoryTOC", toc_template_full = "Kana-categoryTOC/full", parents = { "katakana", {name = "{{{langcat}}}", raw = true}, "Category:Katakana script characters", } } labels["terms spelled with mixed kana"] = { description = "{{{langname}}} terms which combine [[hiragana]] and [[katakana]] characters, potentially with [[kanji]] too.", parents = { {name = "{{{langcat}}}", raw = true}, "hiragana", "katakana", }, } labels["kanji"] = { topright = "{{wp|Kanji}}", description = "{{{langname}}} symbols of the Han logographic script, which can represent sounds or convey meanings directly.", toc_template = "Hani-categoryTOC", umbrella = "Han characters", parents = "logograms", } labels["kanji by reading"] = { description = "{{{langname}}} kanji categorized by reading.", parents = {{name = "kanji", sort = "reading"}}, } labels["makurakotoba"] = { topright = "{{wp|Makurakotoba}}", description = "{{{langname}}} idioms used in poetry to introduce specific words.", parents = {"idioms"}, } labels["terms by kanji readings"] = { description = "{{{langname}}} categories grouped with regard to the readings of the kanji with which they are spelled.", parents = {{name = "{{{langcat}}}", raw = true}}, } labels["terms by reading pattern"] = { description = "{{{langname}}} categories with terms grouped by their reading patterns.", parents = {{name = "{{{langcat}}}", raw = true}}, } labels["terms by number of kanji"] = { description = "{{{langname}}} terms categorized by number of kanji.", parents = {"terms by orthographic property"}, } local function handle_onyomi_list(category, category_type, cat_yomi_type) local onyomi, seen = {}, {} for _, yomi in pairs(yomi_data) do if not seen[yomi] and yomi.onyomi then local yomi_catname = yomi[category_type] if yomi_catname ~= false then local yomi_type = yomi.type if yomi_type ~= "on'yomi" and yomi_type ~= cat_yomi_type then insert(onyomi, "[[:Category:{{{langname}}} " .. category:gsub("{{{yomi_catname}}}", yomi_catname) .. "]]") end end end seen[yomi] = true end sort(onyomi) return onyomi end local function add_yomi_category(category, category_type, parent, description) for _, yomi in pairs(yomi_data) do local yomi_catname = yomi[category_type] if yomi_catname ~= false then local yomi_type = yomi.type local yomi_desc = yomi.link or yomi_catname if yomi.description then yomi_desc = yomi_desc .. "; " .. yomi.description end local label = { description = description .. " " .. yomi_desc .. ".", breadcrumb = yomi_type, parents = {{name = parent, sort = yomi_catname}}, } if yomi.onyomi then local onyomi = handle_onyomi_list(category, category_type, yomi_type) label.additional = "Categories of terms with " .. (yomi_type == "on'yomi" and "more" or "other") .. " specific types of on'yomi readings can be found in the following categories:\n* " .. concat(onyomi, "\n* ") if yomi_type ~= "on'yomi" then insert(label.parents, 1, { name = (category:gsub("{{{yomi_catname}}}", yomi_data.on[category_type])), sort = yomi_catname }) end end labels[category:gsub("{{{yomi_catname}}}", yomi_catname)] = label end end end add_yomi_category( "terms read with {{{yomi_catname}}}", "reading_category", "terms by reading pattern", "{{{langname}}} terms read with" ) add_yomi_category( "terms spelled with kanji with {{{yomi_catname}}} readings", "kanji_category", "terms by kanji reading type", "{{{langname}}} categories with terms that are spelled with one or more kanji read with" ) labels["terms with missing yomi"] = { description = "{{{langname}}} terms where at least one [[Appendix:Japanese glossary#yomi|yomi]] is missing from {{tl|{{{langcode}}}-kanjitab}}.", hidden = true, can_be_empty = true, parents = {"entry maintenance"}, } labels["terms with IPA pronunciation with pitch accent"] = { description = "{{{langname}}} terms with pronunciations that have {{w|Japanese pitch accent|pitch accent}} specified.", additional = "Pitch accent can be specified in {{tl|{{{langcode}}}-pron}} with the {{code|=acc=}} parameter.", can_be_empty = true, parents = {"entry maintenance", "pitch accent"}, } labels["terms with IPA pronunciation missing pitch accent"] = { description = "{{{langname}}} terms with pronunciations that do not have a {{w|Japanese pitch accent|pitch accent}} specified.", additional = "Pitch accent can be specified in {{tl|{{{langcode}}}-pron}} with the {{code|=acc=}} parameter.", hidden = true, can_be_empty = true, parents = {"entry maintenance"}, } labels["pitch accent"] = { description = "{{{langname}}} terms regarding {{w|Japanese pitch accent|pitch accent}} pronunciation.", can_be_empty = true, parents = {{name = "{{{langcat}}}", raw = true}}, } labels["terms with Heiban pitch accent (Tōkyō)"] = { description = "{{{langname}}} terms with pronunciations that are (Tōkyō) [[平板型|Heiban]] {{w|Japanese pitch accent|pitch accent}}.", can_be_empty = true, parents = {"pitch accent"} } labels["terms with Atamadaka pitch accent (Tōkyō)"] = { description = "{{{langname}}} terms with pronunciations that are (Tōkyō) [[頭高型|Atamadaka]] {{w|Japanese pitch accent|pitch accent}}.", can_be_empty = true, parents = {"pitch accent"} } labels["terms with Nakadaka pitch accent (Tōkyō)"] = { description = "{{{langname}}} terms with pronunciations that are (Tōkyō) [[中高型|Nakadaka]] {{w|Japanese pitch accent|pitch accent}}.", can_be_empty = true, parents = {"pitch accent"} } labels["terms with Odaka pitch accent (Tōkyō)"] = { description = "{{{langname}}} terms with pronunciations that are (Tōkyō) [[尾高型|Odaka]] {{w|Japanese pitch accent|pitch accent}}.", can_be_empty = true, parents = {"pitch accent"} } labels["terms with complex pitch accent (Tōkyō)"] = { description = "{{{langname}}} terms with pronunciations that are (Tōkyō) complex {{w|Japanese pitch accent|pitch accent}}, as in having more than one {{m|ja|アクセント句}}.", can_be_empty = true, parents = {"pitch accent"} } labels["pitch accent deaccenting before の"] = { description = "{{{langname}}} terms with {{w|Japanese pitch accent|pitch accent}} pronunciations that have exceptional deaccenting or lack thereof before の ({{ja-deaccenting-before-no}}).", can_be_empty = true, parents = {"pitch accent"} } labels["terms with Odaka pitch accent not deaccented before の (Tōkyō)"] = { description = "{{{langname}}} terms with pronunciations that are (Tōkyō) [[尾高型|Odaka]] {{w|Japanese pitch accent|pitch accent}} and do not become deaccented before の ({{ja-deaccenting-before-no}}).\n\nTerms are placed in this category using {{tl|ja-odaka-deaccent-exception}}.", can_be_empty = true, parents = {"pitch accent deaccenting before の"} } labels["terms with Nakadaka pitch accent deaccented before の (Tōkyō)"] = { description = "{{{langname}}} terms with pronunciations that are (Tōkyō) [[中高型|Nakadaka]] {{w|Japanese pitch accent|pitch accent}} and become deaccented before の ({{ja-deaccenting-before-no}}).\n\nTerms are placed in this category using {{tl|ja-nakadaka-deaccent}}.", can_be_empty = true, parents = {"pitch accent deaccenting before の"} } labels["terms by kanji reading type"] = { description = "{{{langname}}} categories with terms grouped with regard to the types of readings of the kanji with which " .. "they are spelled; broadly, those of Chinese origin, {{ja-r|音|おん}} readings, and those of non-Chinese origin, {{ja-r|訓|くん}} readings.", parents = {{name = "{{{langcat}}}", raw = true}}, } labels["terms spelled with ateji"] = { topright = "{{wp|Ateji}}", description = "{{{langname}}} terms containing one or more [[Appendix:Japanese glossary#ateji|ateji]] {{mdash}} {{ja-r|当て字|あてじ}} {{mdash}} which are [[kanji]] used to represent sounds rather than meanings (though meaning may have some influence on which kanji are chosen).", parents = {{name = "{{{langcat}}}", raw = true}}, } labels["terms spelled with daiyōji"] = { description = "Japanese terms spelled using [[Appendix:Japanese glossary#daiyouji|daiyōji]], categorized using {{temp|ja-daiyouji}}.", parents = {"terms by etymology"}, } labels["terms spelled with jukujikun"] = { description = "{{{langname}}} terms containing one or more [[Appendix:Japanese glossary#jukujikun|jukujikun]] {{mdash}} {{ja-r|熟%字%訓|じゅく%じ%くん}} {{mdash}} which are [[kanji]] used to represent meanings rather than sounds.", parents = {{name = "{{{langcat}}}", raw = true}}, } local function add_grade_categories(grade, desc, wp, only_one, parent, sort) local grade_kanji = grade .. " kanji" local topright = wp and ("{{wp|%s}}"):format(ucfirst(grade_kanji)) or nil labels[grade_kanji] = { topright = topright, description = "{{{langname}}} kanji " .. desc, toc_template = "Hani-categoryTOC", parents = {{ name = parent and (parent .. " kanji") or "kanji", sort = sort or grade }}, } labels["terms spelled with " .. grade_kanji] = { topright = topright, description = "{{{langname}}} terms spelled with " .. (only_one and "at least one " or "") .. "kanji " .. desc, parents = {{ name = parent and ("terms spelled with " .. parent .. " kanji") or "terms by orthographic property", sort = sort or grade }}, } end for i = 1, 6 do local ord = m_numeric.ones_position_ord[i] add_grade_categories( ord .. " grade", "taught in the " .. ord .. " grade of elementary school, as designated by the the official list of {{ja-r|教%育 漢%字|きょう%いく かん%じ|education kanji}}.", false, false, "kyōiku", i ) end add_grade_categories( "kyōiku", "on the official list of {{ja-r|教%育 漢%字|きょう%いく かん%じ|education kanji}}.", true, false, "jōyō" ) add_grade_categories( "secondary school", "on the official list of {{ja-r|常%用 漢%字|じょう%よう かん%じ|regular-use characters}} that are generally taught in secondary school.", false, false, "jōyō" ) add_grade_categories( "jōyō", "on the official list of {{ja-r|常%用 漢%字|じょう%よう かん%じ|regular-use characters}}.", true, false ) add_grade_categories( "tōyō", "on the official list of {{ja-r|当%用 漢%字|とう%よう かん%じ|general-use characters}}, which was used from 1946{{ndash}}1981 until the publication of the list of {{ja-r|常%用 漢%字|じょう%よう かん%じ|regular-use characters}}.", true, false ) add_grade_categories( "jinmeiyō", "on the official list of {{ja-r|人%名%用 漢%字|じん%めい%-よう かん%じ|kanji for use in personal names}}.", true, true ) add_grade_categories( "hyōgai", "not included on the official list of {{ja-r|常%用 漢%字|じょう%よう かん%じ|regular-use characters}} or {{ja-r|人%名%用 漢%字|じん%めい%-よう かん%じ|kanji for use in personal names}}, known as {{ja-r|表%外 漢%字|ひょう%がい かん%じ}} or {{ja-r|表%外%字|ひょう%がい%じ|unlisted characters}}.", true, true ) labels["terms with multiple readings"] = { description = "{{{langname}}} terms with multiple pronunciations (hence multiple [[kana]] spellings).", parents = {{name = "{{{langcat}}}", raw = true}}, } labels["kanji readings by number of morae"] = { description = "{{{langname}}} categories grouped with regard to the number of morae in their kanji readings.", parents = {{name = "{{{langcat}}}", raw = true}}, } labels["single-kanji terms"] = { description = "{{{langname}}} terms written as a single kanji.", parents = { "terms by orthographic property", {name = "terms with 1 kanji", sort = " "}, }, } labels["kanji with kun readings missing okurigana designation"] = { breadcrumb = "Kanji missing okurigana designation", description = "{{{langname}}} kanji entries in which one or more kun readings entered into {{tl|{{{langcode}}}-readings}} is missing a hyphen denoting okurigana.", toc_template = "Hani-categoryTOC", hidden = true, can_be_empty = true, parents = {"entry maintenance"}, } labels["terms by the individual characters in their historical spellings"] = { breadcrumb = "Historical", description = "{{{langname}}} terms categorized by whether their spellings in the {{w|historical kana orthography}} included certain individual characters.", parents = {{name = "terms by their individual characters", sort = " "}}, } labels["verbs without transitivity"] = { description = "{{{langname}}} verbs missing the {{code|=tr=}} parameter from their headword templates.", hidden = true, can_be_empty = true, parents = {"entry maintenance"}, } labels["yojijukugo"] = { topright = "{{wp|Yojijukugo}}", description = "{{{langname}}} four-[[kanji]] compound terms, {{ja-r|四%字 熟%語|よ%じ じゅく%ご}}, with idiomatic meanings; typically derived from Classical Chinese, Buddhist scripture or traditional Japanese proverbs.", additional = "Compare Chinese {{w|chengyu}} and Korean {{w|sajaseong-eo}}.", umbrella = "four-character idioms", parents = {"idioms"}, } -- FIXME: Only works for 0 through 19. local word_to_number = {} for k, v in pairs(m_numeric.ones_position) do word_to_number[v] = k end local periods = { historical = true, ancient = true, } local function get_period_text_and_reading_type_link(period, reading_type) if period and not periods[period] then return nil end local period_text = period and period .. " " or nil -- Allow periods (historical or ancient) by themselves; they will parse as reading types. if not period and periods[reading_type] then return nil, reading_type end local reading_type_link = "[[Appendix:Japanese glossary#" .. reading_type .. "|" .. reading_type .. "]]" return period_text, reading_type_link end local function get_sc(str) return match(str:gsub("[%s%p]+", ""), "[^" .. Hira:getCharacters() .. "]") and Jpan or Hira end local function get_tagged_reading(reading, lang) return tag_text(reading, lang, get_sc(reading)) end local function get_reading_link(reading, lang, period, link) local hist = periods[period] reading = reading:gsub("[%.%-%s]+", "") return full_link({ lang = lang, sc = get_sc(reading), term = link or reading:gsub("・", ""), -- If we have okurigana, demarcate furigana. alt = reading:gsub("^(.-)・", "<span style=\"border-top:1px solid;position:relative;padding:1px;\">%1<span style=\"position:absolute;top:0;bottom:67%%;right:0%%;border-right:1px solid;\"></span></span>"), tr = kana_to_romaji((reading:gsub("・", ".")), lang:getCode(), nil, {keep_dot = true, hist = hist}) :gsub("^(.-)%.", "<u>%1</u>"), pos = reading:find("・", 1, true) and get_tagged_reading((reading:gsub("^.-・", "~")), lang) or nil }, "term") end local function is_on_subtype(reading_type) return reading_type:find(".on$") end insert(handlers, function(data) local n =data.label:match("^terms with ([1-9]%d*) kanji$") if not n then return end local sortkey = require("Module:category tree").numeral_sortkey(n, 2097152) return { breadcrumb = n, description = ("{{{langname}}} terms containing exactly %d kanji."):format(n), -- TODO: implement this using the same mechanism used to implement parents (i.e. avoiding the need for raw categories). -- umbrella = { -- breadcrumb = ("%d kanji"):format(n), -- parents = {{name = "terms by number of kanji subcategories by language", sort = sortkey}}, -- }, parents = {{name = ("terms by number of kanji"), sort = sortkey}} } end) insert(handlers, function(data) local label_pref, kana = data.label:match("^(terms historically spelled with )" .. kana_capture .. "$") if not kana then return end local lang = data.lang return { description = "{{{langname}}} terms spelled with " .. get_reading_link(kana, lang, "historical") .. " in the {{w|historical kana orthography}}.", displaytitle = "{{{langname}}} " .. label_pref .. get_tagged_reading(kana, lang), breadcrumb = "historical", parents = { {name = "terms spelled with " .. kana, sort = " "}, {name = "terms by the individual characters in their historical spellings", sort = lang:makeSortKey(kana)} }, umbrella = false, } end) insert(handlers, function(data) local count, plural = data.label:match("^kanji readings with (.+) mora(e?)$") -- Make sure 'one' goes with singular and other numbers with plural. if not count or (count == "one") ~= (plural == "") then return end local num = word_to_number[count] if not num then return nil end return { description = "{{{langname}}} kanji readings containing " .. count .. " mora" .. plural .. ".", breadcrumb = num, parents = {{name = "kanji readings by number of morae", sort = num}}, umbrella = false, } end) insert(handlers, function(data) local label_pref, period, reading_type, reading = match(data.label, "^(kanji with ([a-z]-) ?([%a']+) reading )" .. kana_capture .. "$") if not period then return end period = period ~= "" and period or nil local period_text, reading_type_link = get_period_text_and_reading_type_link(period, reading_type) if not reading_type_link then return end local lang = data.lang -- Compute parents. local parents, breadcrumb = {} if reading:find("・", 1, true) then local okurigana = reading:match("・(.*)") insert(parents, { name = "kanji with " .. (period_text or "") .. reading_type .. " reading " .. reading:match("(.-)・"), -- Sort by okurigana, since all coordinate categories will have the same furigana. sort = (lang:makeSortKey(okurigana)) }) breadcrumb = "~" .. okurigana else insert(parents, { name = "kanji by " .. (period_text or "") .. reading_type .. " reading", sort = (lang:makeSortKey(reading)) }) breadcrumb = reading end if is_on_subtype(reading_type) then insert(parents, {name = "kanji with " .. (period_text or "") .. "on reading " .. reading, sort = reading_type}) elseif period_text then insert(parents, {name = "kanji with " .. period_text .. "reading " .. reading, sort = reading_type}) end if not period_text then insert(parents, {name = "kanji read as " .. reading, sort = reading_type}) end return { description = "{{{langname}}} [[kanji]] with the " .. (period_text or "") .. reading_type_link .. " reading " .. get_reading_link(reading, lang, period or reading_type) .. ".", displaytitle = "{{{langname}}} " .. label_pref .. get_tagged_reading(reading, lang), breadcrumb = get_tagged_reading(breadcrumb, lang), parents = parents, umbrella = false, } end) insert(handlers, function(data) local period, reading_type = match(data.label, "^kanji by ([a-z]-) ?([%a']+) reading$") if not period then return end period = period ~= "" and period or nil local period_text, reading_type_link = get_period_text_and_reading_type_link(period, reading_type) if not reading_type_link then return nil end -- Compute parents. local parents = { is_on_subtype(reading_type) and {name = "kanji by " .. (period_text or "") .. "on reading", sort = reading_type} or period_text and {name = "kanji by " .. reading_type .. " reading", sort = period} or {name = "kanji by reading", sort = reading_type} } if period_text then insert(parents, {name = "kanji by " .. period_text .. "reading", sort = reading_type}) end -- Compute description. local description = "{{{langname}}} [[kanji]] categorized by " .. (period_text or "") .. reading_type_link .. " reading." return { description = description, breadcrumb = (period_text or "") .. reading_type, parents = parents, umbrella = false, } end) insert(handlers, function(data) local label_pref, reading = match(data.label, "^(kanji read as )" .. kana_capture .. "$") if not reading then return end local args = require("Module:parameters").process(data.args, { ["histconsol"] = true, }) local lang = data.lang local parents, breadcrumb = {} if reading:find("・", 1, true) then local okurigana = reading:match("・(.*)") insert(parents, { name = "kanji read as " .. reading:match("(.-)・"), -- Sort by okurigana, since all coordinate categories will have the same furigana. sort = (lang:makeSortKey(okurigana)) }) breadcrumb = "~" .. okurigana else insert(parents, { name = "kanji by reading", sort = (lang:makeSortKey(reading)) }) breadcrumb = reading end local addl local period_text if args.histconsol then period_text = "historical" addl = ("This is a [[Wikipedia:Historical kana orthography|historical]] [[Wikipedia:Kanazukai|reading]], now " .. "consolidated with the [[Wikipedia:Modern kana usage|modern reading]] of " .. get_reading_link(args.histconsol, lang, nil, ("Category:Japanese kanji read as %s"):format(args.histconsol)) .. ".") end return { description = "{{{langname}}} [[kanji]] read as " .. get_reading_link(reading, lang, period_text) .. ".", additional = addl, displaytitle = "{{{langname}}} " .. label_pref .. get_tagged_reading(reading, lang), breadcrumb = get_tagged_reading(breadcrumb, lang), parents = parents, umbrella = false, }, true end) insert(handlers, function(data) local label_pref, reading = match(data.label, "^(terms spelled with kanji read as )" .. kana_capture .. "$") if not reading then return end -- Compute parents. local lang = data.lang local sort_key = (lang:makeSortKey(reading)) local mora_count = require("Module:ja").count_morae(reading) local mora_count_words = m_numeric.spell_number(tostring(mora_count)) local parents = { {name = "terms by kanji readings", sort = sort_key}, {name = "kanji readings with " .. mora_count_words .. " mora" .. (mora_count > 1 and "e" or ""), sort = sort_key}, {name = "kanji read as " .. reading, sort = " "}, } local tagged_reading = get_tagged_reading(reading, lang) return { description = "{{{langname}}} terms that contain kanji that exhibit a reading of " .. get_reading_link(reading, lang) .. " in those terms prior to any sound changes.", displaytitle = "{{{langname}}} " .. label_pref .. tagged_reading, breadcrumb = tagged_reading, parents = parents, umbrella = false, } end) insert(handlers, function(data) local kanji, reading = match(data.label, "^terms spelled with (.) read as " .. kana_capture .. "$") if not kanji then return nil end local args = require("Module:parameters").process(data.args, { [1] = {list = true}, }) local lang = data.lang if #args[1] == 0 then error("For categories of the form \"" .. lang:getCanonicalName() .. " terms spelled with KANJI read as READING\", at least one reading type (e.g. <code>kun</code> or <code>on</code>) must be specified using <code>1=</code>, <code>2=</code>, <code>3=</code>, etc.") end local yomi_types, parents = {}, {} for _, yomi, category in ipairs(args[1]) do local yomi_data = yomi_data[yomi] if not yomi_data then error("The yomi type \"" .. yomi .. "\" is not recognized.") end category = yomi_data.kanji_category if not category then error("The yomi type \"" .. yomi .. "\" is not valid for this type of category.") end insert(yomi_types, yomi_data.link) insert(parents, { name = "terms spelled with kanji with " .. category .. " readings", sort = (lang:makeSortKey(reading)) }) end insert(parents, 1, {name = "terms spelled with " .. kanji, sort = (lang:makeSortKey(reading))}) insert(parents, 2, {name = "terms spelled with kanji read as " .. reading, sort = Hani_sort(kanji)}) yomi_types = (#yomi_types > 1 and "one of " or "") .. "its " .. require("Module:table").serialCommaJoin(yomi_types, {conj = "or"}) .. " reading" .. (#yomi_types > 1 and "s" or "") local tagged_kanji = get_tagged_reading(kanji, lang) local tagged_reading = get_tagged_reading(reading, lang) return { description = "{{{langname}}} terms spelled with {{l|{{{langcode}}}|" .. kanji .. "}} with " .. yomi_types .. " of " .. get_reading_link(reading, lang) .. ".", displaytitle = "{{{langname}}} terms spelled with " .. tagged_kanji .. " read as " .. tagged_reading, breadcrumb = "read as " .. tagged_reading, parents = parents, umbrella = false, }, true end) insert(handlers, function(data) local affix, kanji, reading = data.label:match("^terms ([a-z]+fix)ed with (.+) read as " .. kana_capture .. "$") if not affix or not kanji or not reading then return nil end local args = require("Module:parameters").process(data.args, { [1] = {list = true}, }) local lang = data.lang if #args[1] == 0 then error("For categories of the form \"" .. lang:getCanonicalName() .. " terms AFFIXed with KANJI read as READING\", at least one reading type (e.g. <code>kun</code> or <code>on</code>) must be specified using <code>1=</code>, <code>2=</code>, <code>3=</code>, etc.") end local yomi_types = {} for _, yomi, category in ipairs(args[1]) do local yomi_data = yomi_data[yomi] if not yomi_data then error("The yomi type \"" .. yomi .. "\" is not recognized.") end category = yomi_data.kanji_category if not category then error("The yomi type \"" .. yomi .. "\" is not valid for this type of category.") end insert(yomi_types, yomi_data.link) end yomi_types = (#yomi_types > 1 and "one of " or "") .. "its " .. require("Module:table").serialCommaJoin(yomi_types, {conj = "or"}) .. " reading" .. (#yomi_types > 1 and "s" or "") local description = "{{{langname}}} terms " .. affix .. "ed with {{l|{{{langcode}}}|" .. kanji .. "}} with " .. yomi_types .. " of " .. get_reading_link(reading, lang) .. "." local what_categorizes_msg = require("Module:category tree/fam/jpx/what-categorizes-msg") .get_what_categorizes_msg(kanji, reading, affix) if what_categorizes_msg then description = description .. "\n\n" .. what_categorizes_msg end local parents = {} table.insert(parents, {name = "terms " .. affix .. "ed with " .. kanji, sort = (lang:makeSortKey(reading))}) if mw.title.new("Category:" .. lang:getCanonicalName() .. " terms spelled with " .. kanji .. " read as " .. reading).exists then table.insert(parents, {name = "terms spelled with " .. kanji .. " read as " .. reading, sort = (lang:makeSortKey(reading)), args=data.args}) end local tagged_kanji = get_tagged_reading(kanji, lang) local tagged_reading = get_tagged_reading(reading, lang) return { description = description, displaytitle = "{{{langname}}} terms " .. affix .. "ed with " .. tagged_kanji .. " read as " .. tagged_reading, breadcrumb = "read as " .. reading, parents = parents, umbrella = false, }, true end) insert(handlers, function(data) local kanji, daiyoji = match(data.label, "^terms with (.) replaced by daiyōji (.)$") if not kanji then return nil end local args = require("Module:parameters").process(data.args, { ["sort"] = true, }) local lang = data.lang if not args.sort then error("For categories of the form \"" .. lang:getCanonicalName() .. " terms with KANJI replaced by daiyōji DAIYOJI\", the sort key must be specified using sort=") end local tagged_kanji = get_tagged_reading(kanji, lang) local tagged_daiyoji = get_tagged_reading(daiyoji, lang) return { description = "{{{langname}}} terms with {{l|{{{langcode}}}|" .. kanji .. "}} replaced by [[Appendix:Japanese glossary#daiyouji|daiyōji]] {{l|{{{langcode}}}|" .. daiyoji .. "}}.", displaytitle = "{{{langname}}} terms with " .. tagged_kanji .. " replaced by daiyōji " .. tagged_daiyoji, breadcrumb = tagged_kanji .. " replaced by daiyōji " .. tagged_daiyoji, parents = {{name = "terms spelled with daiyōji", sort = args.sort}}, umbrella = false, }, true end) return {LABELS = labels, HANDLERS = handlers} ea2zmcmhguqw3ivdjan9pb199sxgqx3 239314 239313 2026-11-19T07:09:13Z Lee 19 පැරණි සංස්කරණයකින් ගත් කොටස්... 239314 Scribunto text/plain local labels = {} local handlers = {} local m_str_utils = require("Module:string utilities") local concat = table.concat local full_link = require("Module:links").full_link local insert = table.insert local Hani_sort = require("Module:Hani-sortkey").makeSortKey local match = m_str_utils.match local sort = table.sort local tag_text = require("Module:script_utilities").tag_text local ucfirst = m_str_utils.ucfirst local Hira = require("Module:scripts").getByCode("Hira") local Jpan = require("Module:scripts").getByCode("Jpan") local kana_to_romaji = require("Module:Hrkt-translit").tr local m_numeric = require("Module:ConvertNumeric") local kana_capture = "([-" .. require("Module:ja/data/range").kana .. "・]+)" local yomi_data = require("Module:kanjitab/data") labels["adnominals"] = { description = "{{{langname}}} adnominals, or {{ja-r|連%体%詞|れん%たい%し}}, which modify nouns, and do not conjugate or [[predicate#Verb|predicate]].", parents = {{name = "{{{langcat}}}", raw = true}}, } labels["hiragana"] = { description = "{{{langname}}} terms with hiragana {{mdash}} {{ja-r|平%仮%名|ひら%が%な}} {{mdash}} forms, sorted by conventional hiragana sequence. The hiragana form is a [[phonetic]] representation of that word. " .. "Wiktionary represents {{{langname}}}-language segments in three ways: in normal form (with [[kanji]], if appropriate), in [[hiragana]] " .. "form (this differs from kanji form only when the segment contains kanji), and in [[romaji]] form.", additional = "''See also'' [[:Category:{{{langname}}} katakana]]", toc_template = "Hira-categoryTOC", toc_template_full = "Hira-categoryTOC/full", parents = { {name = "{{{langcat}}}", raw = true}, "ප්‍රවර්ගය:හිරගනා අක්ෂරක්‍රමය තුළ භාවිතා වන අනුලක්ෂණ", } } labels["historical hiragana"] = { description = "{{{langname}}} historical [[hiragana]].", additional = "''See also'' [[:Category:{{{langname}}} historical katakana]].", toc_template = "Hira-categoryTOC", toc_template_full = "Hira-categoryTOC/full", parents = { "hiragana", {name = "{{{langcat}}}", raw = true}, "ප්‍රවර්ගය:හිරගනා අක්ෂරක්‍රමය තුළ භාවිතා වන අනුලක්ෂණ", } } labels["katakana"] = { description = "{{{langname}}} terms with katakana {{mdash}} {{ja-r|片%仮%名|かた%か%な}} {{mdash}} forms, sorted by conventional katakana sequence. Katakana is used primarily for transliterations of foreign words, including old Chinese hanzi not used in [[shinjitai]].", additional = "''See also'' [[:Category:{{{langname}}} hiragana]]", toc_template = "Kana-categoryTOC", toc_template_full = "Kana-categoryTOC/full", parents = { {name = "{{{langcat}}}", raw = true}, "Category:Katakana script characters", } } labels["historical katakana"] = { description = "{{{langname}}} historical [[katakana]].", additional = "''See also'' [[:Category:{{{langname}}} historical hiragana]].", toc_template = "Kana-categoryTOC", toc_template_full = "Kana-categoryTOC/full", parents = { "katakana", {name = "{{{langcat}}}", raw = true}, "Category:Katakana script characters", } } labels["terms spelled with mixed kana"] = { description = "{{{langname}}} terms which combine [[hiragana]] and [[katakana]] characters, potentially with [[kanji]] too.", parents = { {name = "{{{langcat}}}", raw = true}, "hiragana", "katakana", }, } labels["kanji"] = { topright = "{{wp|Kanji}}", description = "{{{langname}}} symbols of the Han logographic script, which can represent sounds or convey meanings directly.", toc_template = "Hani-categoryTOC", umbrella = "Han characters", parents = "ලෝගෝග්‍රෑම", } labels["kanji by reading"] = { description = "{{{langname}}} kanji categorized by reading.", parents = {{name = "kanji", sort = "reading"}}, } labels["makurakotoba"] = { topright = "{{wp|Makurakotoba}}", description = "{{{langname}}} idioms used in poetry to introduce specific words.", parents = {"idioms"}, } labels["terms by kanji readings"] = { description = "{{{langname}}} categories grouped with regard to the readings of the kanji with which they are spelled.", parents = {{name = "{{{langcat}}}", raw = true}}, } labels["terms by reading pattern"] = { description = "{{{langname}}} categories with terms grouped by their reading patterns.", parents = {{name = "{{{langcat}}}", raw = true}}, } labels["terms by number of kanji"] = { description = "{{{langname}}} terms categorized by number of kanji.", parents = {"terms by orthographic property"}, } local function handle_onyomi_list(category, category_type, cat_yomi_type) local onyomi, seen = {}, {} for _, yomi in pairs(yomi_data) do if not seen[yomi] and yomi.onyomi then local yomi_catname = yomi[category_type] if yomi_catname ~= false then local yomi_type = yomi.type if yomi_type ~= "on'yomi" and yomi_type ~= cat_yomi_type then insert(onyomi, "[[:Category:{{{langname}}} " .. category:gsub("{{{yomi_catname}}}", yomi_catname) .. "]]") end end end seen[yomi] = true end sort(onyomi) return onyomi end local function add_yomi_category(category, category_type, parent, description) for _, yomi in pairs(yomi_data) do local yomi_catname = yomi[category_type] if yomi_catname ~= false then local yomi_type = yomi.type local yomi_desc = yomi.link or yomi_catname if yomi.description then yomi_desc = yomi_desc .. "; " .. yomi.description end local label = { description = description .. " " .. yomi_desc .. ".", breadcrumb = yomi_type, parents = {{name = parent, sort = yomi_catname}}, } if yomi.onyomi then local onyomi = handle_onyomi_list(category, category_type, yomi_type) label.additional = "Categories of terms with " .. (yomi_type == "on'yomi" and "more" or "other") .. " specific types of on'yomi readings can be found in the following categories:\n* " .. concat(onyomi, "\n* ") if yomi_type ~= "on'yomi" then insert(label.parents, 1, { name = (category:gsub("{{{yomi_catname}}}", yomi_data.on[category_type])), sort = yomi_catname }) end end labels[category:gsub("{{{yomi_catname}}}", yomi_catname)] = label end end end add_yomi_category( "terms read with {{{yomi_catname}}}", "reading_category", "terms by reading pattern", "{{{langname}}} terms read with" ) add_yomi_category( "terms spelled with kanji with {{{yomi_catname}}} readings", "kanji_category", "terms by kanji reading type", "{{{langname}}} categories with terms that are spelled with one or more kanji read with" ) labels["terms with missing yomi"] = { description = "{{{langname}}} terms where at least one [[Appendix:Japanese glossary#yomi|yomi]] is missing from {{tl|{{{langcode}}}-kanjitab}}.", hidden = true, can_be_empty = true, parents = {"ප්‍රවේශ නඩත්තුව"}, } labels["terms with IPA pronunciation with pitch accent"] = { description = "{{{langname}}} terms with pronunciations that have {{w|Japanese pitch accent|pitch accent}} specified.", additional = "Pitch accent can be specified in {{tl|{{{langcode}}}-pron}} with the {{code|=acc=}} parameter.", can_be_empty = true, parents = {"ප්‍රවේශ නඩත්තුව", "pitch accent"}, } labels["terms with IPA pronunciation missing pitch accent"] = { description = "{{{langname}}} terms with pronunciations that do not have a {{w|Japanese pitch accent|pitch accent}} specified.", additional = "Pitch accent can be specified in {{tl|{{{langcode}}}-pron}} with the {{code|=acc=}} parameter.", hidden = true, can_be_empty = true, parents = {"ප්‍රවේශ නඩත්තුව"}, } labels["pitch accent"] = { description = "{{{langname}}} terms regarding {{w|Japanese pitch accent|pitch accent}} pronunciation.", can_be_empty = true, parents = {{name = "{{{langcat}}}", raw = true}}, } labels["terms with Heiban pitch accent (Tōkyō)"] = { description = "{{{langname}}} terms with pronunciations that are (Tōkyō) [[平板型|Heiban]] {{w|Japanese pitch accent|pitch accent}}.", can_be_empty = true, parents = {"pitch accent"} } labels["terms with Atamadaka pitch accent (Tōkyō)"] = { description = "{{{langname}}} terms with pronunciations that are (Tōkyō) [[頭高型|Atamadaka]] {{w|Japanese pitch accent|pitch accent}}.", can_be_empty = true, parents = {"pitch accent"} } labels["terms with Nakadaka pitch accent (Tōkyō)"] = { description = "{{{langname}}} terms with pronunciations that are (Tōkyō) [[中高型|Nakadaka]] {{w|Japanese pitch accent|pitch accent}}.", can_be_empty = true, parents = {"pitch accent"} } labels["terms with Odaka pitch accent (Tōkyō)"] = { description = "{{{langname}}} terms with pronunciations that are (Tōkyō) [[尾高型|Odaka]] {{w|Japanese pitch accent|pitch accent}}.", can_be_empty = true, parents = {"pitch accent"} } labels["terms with complex pitch accent (Tōkyō)"] = { description = "{{{langname}}} terms with pronunciations that are (Tōkyō) complex {{w|Japanese pitch accent|pitch accent}}, as in having more than one {{m|ja|アクセント句}}.", can_be_empty = true, parents = {"pitch accent"} } labels["pitch accent deaccenting before の"] = { description = "{{{langname}}} terms with {{w|Japanese pitch accent|pitch accent}} pronunciations that have exceptional deaccenting or lack thereof before の ({{ja-deaccenting-before-no}}).", can_be_empty = true, parents = {"pitch accent"} } labels["terms with Odaka pitch accent not deaccented before の (Tōkyō)"] = { description = "{{{langname}}} terms with pronunciations that are (Tōkyō) [[尾高型|Odaka]] {{w|Japanese pitch accent|pitch accent}} and do not become deaccented before の ({{ja-deaccenting-before-no}}).\n\nTerms are placed in this category using {{tl|ja-odaka-deaccent-exception}}.", can_be_empty = true, parents = {"pitch accent deaccenting before の"} } labels["terms with Nakadaka pitch accent deaccented before の (Tōkyō)"] = { description = "{{{langname}}} terms with pronunciations that are (Tōkyō) [[中高型|Nakadaka]] {{w|Japanese pitch accent|pitch accent}} and become deaccented before の ({{ja-deaccenting-before-no}}).\n\nTerms are placed in this category using {{tl|ja-nakadaka-deaccent}}.", can_be_empty = true, parents = {"pitch accent deaccenting before の"} } labels["terms by kanji reading type"] = { description = "{{{langname}}} categories with terms grouped with regard to the types of readings of the kanji with which " .. "they are spelled; broadly, those of Chinese origin, {{ja-r|音|おん}} readings, and those of non-Chinese origin, {{ja-r|訓|くん}} readings.", parents = {{name = "{{{langcat}}}", raw = true}}, } labels["terms spelled with ateji"] = { topright = "{{wp|Ateji}}", description = "{{{langname}}} terms containing one or more [[Appendix:Japanese glossary#ateji|ateji]] {{mdash}} {{ja-r|当て字|あてじ}} {{mdash}} which are [[kanji]] used to represent sounds rather than meanings (though meaning may have some influence on which kanji are chosen).", parents = {{name = "{{{langcat}}}", raw = true}}, } labels["terms spelled with daiyōji"] = { description = "Japanese terms spelled using [[Appendix:Japanese glossary#daiyouji|daiyōji]], categorized using {{temp|ja-daiyouji}}.", parents = {"යෙදුම්, නිරුක්තිය අනුව"}, } labels["terms spelled with jukujikun"] = { description = "{{{langname}}} terms containing one or more [[Appendix:Japanese glossary#jukujikun|jukujikun]] {{mdash}} {{ja-r|熟%字%訓|じゅく%じ%くん}} {{mdash}} which are [[kanji]] used to represent meanings rather than sounds.", parents = {{name = "{{{langcat}}}", raw = true}}, } local function add_grade_categories(grade, desc, wp, only_one, parent, sort) local grade_kanji = grade .. " kanji" local topright = wp and ("{{wp|%s}}"):format(ucfirst(grade_kanji)) or nil labels[grade_kanji] = { topright = topright, description = "{{{langname}}} kanji " .. desc, toc_template = "Hani-categoryTOC", parents = {{ name = parent and (parent .. " kanji") or "kanji", sort = sort or grade }}, } labels["terms spelled with " .. grade_kanji] = { topright = topright, description = "{{{langname}}} terms spelled with " .. (only_one and "at least one " or "") .. "kanji " .. desc, parents = {{ name = parent and ("terms spelled with " .. parent .. " kanji") or "terms by orthographic property", sort = sort or grade }}, } end for i = 1, 6 do local ord = m_numeric.ones_position_ord[i] add_grade_categories( ord .. " grade", "taught in the " .. ord .. " grade of elementary school, as designated by the the official list of {{ja-r|教%育 漢%字|きょう%いく かん%じ|education kanji}}.", false, false, "kyōiku", i ) end add_grade_categories( "kyōiku", "on the official list of {{ja-r|教%育 漢%字|きょう%いく かん%じ|education kanji}}.", true, false, "jōyō" ) add_grade_categories( "secondary school", "on the official list of {{ja-r|常%用 漢%字|じょう%よう かん%じ|regular-use characters}} that are generally taught in secondary school.", false, false, "jōyō" ) add_grade_categories( "jōyō", "on the official list of {{ja-r|常%用 漢%字|じょう%よう かん%じ|regular-use characters}}.", true, false ) add_grade_categories( "tōyō", "on the official list of {{ja-r|当%用 漢%字|とう%よう かん%じ|general-use characters}}, which was used from 1946{{ndash}}1981 until the publication of the list of {{ja-r|常%用 漢%字|じょう%よう かん%じ|regular-use characters}}.", true, false ) add_grade_categories( "jinmeiyō", "on the official list of {{ja-r|人%名%用 漢%字|じん%めい%-よう かん%じ|kanji for use in personal names}}.", true, true ) add_grade_categories( "hyōgai", "not included on the official list of {{ja-r|常%用 漢%字|じょう%よう かん%じ|regular-use characters}} or {{ja-r|人%名%用 漢%字|じん%めい%-よう かん%じ|kanji for use in personal names}}, known as {{ja-r|表%外 漢%字|ひょう%がい かん%じ}} or {{ja-r|表%外%字|ひょう%がい%じ|unlisted characters}}.", true, true ) labels["terms with multiple readings"] = { description = "{{{langname}}} terms with multiple pronunciations (hence multiple [[kana]] spellings).", parents = {{name = "{{{langcat}}}", raw = true}}, } labels["kanji readings by number of morae"] = { description = "{{{langname}}} categories grouped with regard to the number of morae in their kanji readings.", parents = {{name = "{{{langcat}}}", raw = true}}, } labels["single-kanji terms"] = { description = "{{{langname}}} terms written as a single kanji.", parents = { "terms by orthographic property", {name = "terms with 1 kanji", sort = " "}, }, } labels["kanji with kun readings missing okurigana designation"] = { breadcrumb = "Kanji missing okurigana designation", description = "{{{langname}}} kanji entries in which one or more kun readings entered into {{tl|{{{langcode}}}-readings}} is missing a hyphen denoting okurigana.", toc_template = "Hani-categoryTOC", hidden = true, can_be_empty = true, parents = {"ප්‍රවේශ නඩත්තුව"}, } labels["terms by the individual characters in their historical spellings"] = { breadcrumb = "Historical", description = "{{{langname}}} terms categorized by whether their spellings in the {{w|historical kana orthography}} included certain individual characters.", parents = {{name = "terms by their individual characters", sort = " "}}, } labels["verbs without transitivity"] = { description = "{{{langname}}} verbs missing the {{code|=tr=}} parameter from their headword templates.", hidden = true, can_be_empty = true, parents = {"ප්‍රවේශ නඩත්තුව"}, } labels["yojijukugo"] = { topright = "{{wp|Yojijukugo}}", description = "{{{langname}}} four-[[kanji]] compound terms, {{ja-r|四%字 熟%語|よ%じ じゅく%ご}}, with idiomatic meanings; typically derived from Classical Chinese, Buddhist scripture or traditional Japanese proverbs.", additional = "Compare Chinese {{w|chengyu}} and Korean {{w|sajaseong-eo}}.", umbrella = "four-character idioms", parents = {"idioms"}, } -- FIXME: Only works for 0 through 19. local word_to_number = {} for k, v in pairs(m_numeric.ones_position) do word_to_number[v] = k end local periods = { historical = true, ancient = true, } local function get_period_text_and_reading_type_link(period, reading_type) if period and not periods[period] then return nil end local period_text = period and period .. " " or nil -- Allow periods (historical or ancient) by themselves; they will parse as reading types. if not period and periods[reading_type] then return nil, reading_type end local reading_type_link = "[[Appendix:Japanese glossary#" .. reading_type .. "|" .. reading_type .. "]]" return period_text, reading_type_link end local function get_sc(str) return match(str:gsub("[%s%p]+", ""), "[^" .. Hira:getCharacters() .. "]") and Jpan or Hira end local function get_tagged_reading(reading, lang) return tag_text(reading, lang, get_sc(reading)) end local function get_reading_link(reading, lang, period, link) local hist = periods[period] reading = reading:gsub("[%.%-%s]+", "") return full_link({ lang = lang, sc = get_sc(reading), term = link or reading:gsub("・", ""), -- If we have okurigana, demarcate furigana. alt = reading:gsub("^(.-)・", "<span style=\"border-top:1px solid;position:relative;padding:1px;\">%1<span style=\"position:absolute;top:0;bottom:67%%;right:0%%;border-right:1px solid;\"></span></span>"), tr = kana_to_romaji((reading:gsub("・", ".")), lang:getCode(), nil, {keep_dot = true, hist = hist}) :gsub("^(.-)%.", "<u>%1</u>"), pos = reading:find("・", 1, true) and get_tagged_reading((reading:gsub("^.-・", "~")), lang) or nil }, "term") end local function is_on_subtype(reading_type) return reading_type:find(".on$") end insert(handlers, function(data) local n =data.label:match("^terms with ([1-9]%d*) kanji$") if not n then return end local sortkey = require("Module:category tree").numeral_sortkey(n, 2097152) return { breadcrumb = n, description = ("{{{langname}}} terms containing exactly %d kanji."):format(n), -- TODO: implement this using the same mechanism used to implement parents (i.e. avoiding the need for raw categories). -- umbrella = { -- breadcrumb = ("%d kanji"):format(n), -- parents = {{name = "terms by number of kanji subcategories by language", sort = sortkey}}, -- }, parents = {{name = ("terms by number of kanji"), sort = sortkey}} } end) insert(handlers, function(data) local label_pref, kana = data.label:match("^(terms historically spelled with )" .. kana_capture .. "$") if not kana then return end local lang = data.lang return { description = "{{{langname}}} terms spelled with " .. get_reading_link(kana, lang, "historical") .. " in the {{w|historical kana orthography}}.", displaytitle = "{{{langname}}} " .. label_pref .. get_tagged_reading(kana, lang), breadcrumb = "historical", parents = { {name = "terms spelled with " .. kana, sort = " "}, {name = "terms by the individual characters in their historical spellings", sort = lang:makeSortKey(kana)} }, umbrella = false, } end) insert(handlers, function(data) local count, plural = data.label:match("^kanji readings with (.+) mora(e?)$") -- Make sure 'one' goes with singular and other numbers with plural. if not count or (count == "one") ~= (plural == "") then return end local num = word_to_number[count] if not num then return nil end return { description = "{{{langname}}} kanji readings containing " .. count .. " mora" .. plural .. ".", breadcrumb = num, parents = {{name = "kanji readings by number of morae", sort = num}}, umbrella = false, } end) insert(handlers, function(data) local label_pref, period, reading_type, reading = match(data.label, "^(kanji with ([a-z]-) ?([%a']+) reading )" .. kana_capture .. "$") if not period then return end period = period ~= "" and period or nil local period_text, reading_type_link = get_period_text_and_reading_type_link(period, reading_type) if not reading_type_link then return end local lang = data.lang -- Compute parents. local parents, breadcrumb = {} if reading:find("・", 1, true) then local okurigana = reading:match("・(.*)") insert(parents, { name = "kanji with " .. (period_text or "") .. reading_type .. " reading " .. reading:match("(.-)・"), -- Sort by okurigana, since all coordinate categories will have the same furigana. sort = (lang:makeSortKey(okurigana)) }) breadcrumb = "~" .. okurigana else insert(parents, { name = "kanji by " .. (period_text or "") .. reading_type .. " reading", sort = (lang:makeSortKey(reading)) }) breadcrumb = reading end if is_on_subtype(reading_type) then insert(parents, {name = "kanji with " .. (period_text or "") .. "on reading " .. reading, sort = reading_type}) elseif period_text then insert(parents, {name = "kanji with " .. period_text .. "reading " .. reading, sort = reading_type}) end if not period_text then insert(parents, {name = "kanji read as " .. reading, sort = reading_type}) end return { description = "{{{langname}}} [[kanji]] with the " .. (period_text or "") .. reading_type_link .. " reading " .. get_reading_link(reading, lang, period or reading_type) .. ".", displaytitle = "{{{langname}}} " .. label_pref .. get_tagged_reading(reading, lang), breadcrumb = get_tagged_reading(breadcrumb, lang), parents = parents, umbrella = false, } end) insert(handlers, function(data) local period, reading_type = match(data.label, "^kanji by ([a-z]-) ?([%a']+) reading$") if not period then return end period = period ~= "" and period or nil local period_text, reading_type_link = get_period_text_and_reading_type_link(period, reading_type) if not reading_type_link then return nil end -- Compute parents. local parents = { is_on_subtype(reading_type) and {name = "kanji by " .. (period_text or "") .. "on reading", sort = reading_type} or period_text and {name = "kanji by " .. reading_type .. " reading", sort = period} or {name = "kanji by reading", sort = reading_type} } if period_text then insert(parents, {name = "kanji by " .. period_text .. "reading", sort = reading_type}) end -- Compute description. local description = "{{{langname}}} [[kanji]] categorized by " .. (period_text or "") .. reading_type_link .. " reading." return { description = description, breadcrumb = (period_text or "") .. reading_type, parents = parents, umbrella = false, } end) insert(handlers, function(data) local label_pref, reading = match(data.label, "^(kanji read as )" .. kana_capture .. "$") if not reading then return end local args = require("Module:parameters").process(data.args, { ["histconsol"] = true, }) local lang = data.lang local parents, breadcrumb = {} if reading:find("・", 1, true) then local okurigana = reading:match("・(.*)") insert(parents, { name = "kanji read as " .. reading:match("(.-)・"), -- Sort by okurigana, since all coordinate categories will have the same furigana. sort = (lang:makeSortKey(okurigana)) }) breadcrumb = "~" .. okurigana else insert(parents, { name = "kanji by reading", sort = (lang:makeSortKey(reading)) }) breadcrumb = reading end local addl local period_text if args.histconsol then period_text = "historical" addl = ("This is a [[Wikipedia:Historical kana orthography|historical]] [[Wikipedia:Kanazukai|reading]], now " .. "consolidated with the [[Wikipedia:Modern kana usage|modern reading]] of " .. get_reading_link(args.histconsol, lang, nil, ("Category:Japanese kanji read as %s"):format(args.histconsol)) .. ".") end return { description = "{{{langname}}} [[kanji]] read as " .. get_reading_link(reading, lang, period_text) .. ".", additional = addl, displaytitle = "{{{langname}}} " .. label_pref .. get_tagged_reading(reading, lang), breadcrumb = get_tagged_reading(breadcrumb, lang), parents = parents, umbrella = false, }, true end) insert(handlers, function(data) local label_pref, reading = match(data.label, "^(terms spelled with kanji read as )" .. kana_capture .. "$") if not reading then return end -- Compute parents. local lang = data.lang local sort_key = (lang:makeSortKey(reading)) local mora_count = require("Module:ja").count_morae(reading) local mora_count_words = m_numeric.spell_number(tostring(mora_count)) local parents = { {name = "terms by kanji readings", sort = sort_key}, {name = "kanji readings with " .. mora_count_words .. " mora" .. (mora_count > 1 and "e" or ""), sort = sort_key}, {name = "kanji read as " .. reading, sort = " "}, } local tagged_reading = get_tagged_reading(reading, lang) return { description = "{{{langname}}} terms that contain kanji that exhibit a reading of " .. get_reading_link(reading, lang) .. " in those terms prior to any sound changes.", displaytitle = "{{{langname}}} " .. label_pref .. tagged_reading, breadcrumb = tagged_reading, parents = parents, umbrella = false, } end) insert(handlers, function(data) local kanji, reading = match(data.label, "^terms spelled with (.) read as " .. kana_capture .. "$") if not kanji then return nil end local args = require("Module:parameters").process(data.args, { [1] = {list = true}, }) local lang = data.lang if #args[1] == 0 then error("For categories of the form \"" .. lang:getCanonicalName() .. " terms spelled with KANJI read as READING\", at least one reading type (e.g. <code>kun</code> or <code>on</code>) must be specified using <code>1=</code>, <code>2=</code>, <code>3=</code>, etc.") end local yomi_types, parents = {}, {} for _, yomi, category in ipairs(args[1]) do local yomi_data = yomi_data[yomi] if not yomi_data then error("The yomi type \"" .. yomi .. "\" is not recognized.") end category = yomi_data.kanji_category if not category then error("The yomi type \"" .. yomi .. "\" is not valid for this type of category.") end insert(yomi_types, yomi_data.link) insert(parents, { name = "terms spelled with kanji with " .. category .. " readings", sort = (lang:makeSortKey(reading)) }) end insert(parents, 1, {name = "terms spelled with " .. kanji, sort = (lang:makeSortKey(reading))}) insert(parents, 2, {name = "terms spelled with kanji read as " .. reading, sort = Hani_sort(kanji)}) yomi_types = (#yomi_types > 1 and "one of " or "") .. "its " .. require("Module:table").serialCommaJoin(yomi_types, {conj = "or"}) .. " reading" .. (#yomi_types > 1 and "s" or "") local tagged_kanji = get_tagged_reading(kanji, lang) local tagged_reading = get_tagged_reading(reading, lang) return { description = "{{{langname}}} terms spelled with {{l|{{{langcode}}}|" .. kanji .. "}} with " .. yomi_types .. " of " .. get_reading_link(reading, lang) .. ".", displaytitle = "{{{langname}}} terms spelled with " .. tagged_kanji .. " read as " .. tagged_reading, breadcrumb = "read as " .. tagged_reading, parents = parents, umbrella = false, }, true end) insert(handlers, function(data) local affix, kanji, reading = data.label:match("^terms ([a-z]+fix)ed with (.+) read as " .. kana_capture .. "$") if not affix or not kanji or not reading then return nil end local args = require("Module:parameters").process(data.args, { [1] = {list = true}, }) local lang = data.lang if #args[1] == 0 then error("For categories of the form \"" .. lang:getCanonicalName() .. " terms AFFIXed with KANJI read as READING\", at least one reading type (e.g. <code>kun</code> or <code>on</code>) must be specified using <code>1=</code>, <code>2=</code>, <code>3=</code>, etc.") end local yomi_types = {} for _, yomi, category in ipairs(args[1]) do local yomi_data = yomi_data[yomi] if not yomi_data then error("The yomi type \"" .. yomi .. "\" is not recognized.") end category = yomi_data.kanji_category if not category then error("The yomi type \"" .. yomi .. "\" is not valid for this type of category.") end insert(yomi_types, yomi_data.link) end yomi_types = (#yomi_types > 1 and "one of " or "") .. "its " .. require("Module:table").serialCommaJoin(yomi_types, {conj = "or"}) .. " reading" .. (#yomi_types > 1 and "s" or "") local description = "{{{langname}}} terms " .. affix .. "ed with {{l|{{{langcode}}}|" .. kanji .. "}} with " .. yomi_types .. " of " .. get_reading_link(reading, lang) .. "." local what_categorizes_msg = require("Module:category tree/fam/jpx/what-categorizes-msg") .get_what_categorizes_msg(kanji, reading, affix) if what_categorizes_msg then description = description .. "\n\n" .. what_categorizes_msg end local parents = {} table.insert(parents, {name = "terms " .. affix .. "ed with " .. kanji, sort = (lang:makeSortKey(reading))}) if mw.title.new("Category:" .. lang:getCanonicalName() .. " terms spelled with " .. kanji .. " read as " .. reading).exists then table.insert(parents, {name = "terms spelled with " .. kanji .. " read as " .. reading, sort = (lang:makeSortKey(reading)), args=data.args}) end local tagged_kanji = get_tagged_reading(kanji, lang) local tagged_reading = get_tagged_reading(reading, lang) return { description = description, displaytitle = "{{{langname}}} terms " .. affix .. "ed with " .. tagged_kanji .. " read as " .. tagged_reading, breadcrumb = "read as " .. reading, parents = parents, umbrella = false, }, true end) insert(handlers, function(data) local kanji, daiyoji = match(data.label, "^terms with (.) replaced by daiyōji (.)$") if not kanji then return nil end local args = require("Module:parameters").process(data.args, { ["sort"] = true, }) local lang = data.lang if not args.sort then error("For categories of the form \"" .. lang:getCanonicalName() .. " terms with KANJI replaced by daiyōji DAIYOJI\", the sort key must be specified using sort=") end local tagged_kanji = get_tagged_reading(kanji, lang) local tagged_daiyoji = get_tagged_reading(daiyoji, lang) return { description = "{{{langname}}} terms with {{l|{{{langcode}}}|" .. kanji .. "}} replaced by [[Appendix:Japanese glossary#daiyouji|daiyōji]] {{l|{{{langcode}}}|" .. daiyoji .. "}}.", displaytitle = "{{{langname}}} terms with " .. tagged_kanji .. " replaced by daiyōji " .. tagged_daiyoji, breadcrumb = tagged_kanji .. " replaced by daiyōji " .. tagged_daiyoji, parents = {{name = "terms spelled with daiyōji", sort = args.sort}}, umbrella = false, }, true end) return {LABELS = labels, HANDLERS = handlers} q7omxckrovsts17eegi7asnybtj9yc9 239315 239314 2026-11-19T07:22:27Z Lee 19 [[Module:category tree/lang/jpx]] වෙතින් 239315 Scribunto text/plain local labels = {} local handlers = {} local m_str_utils = require("Module:string utilities") local concat = table.concat local full_link = require("Module:links").full_link local insert = table.insert local Hani_sort = require("Module:Hani-sortkey").makeSortKey local match = m_str_utils.match local sort = table.sort local tag_text = require("Module:script_utilities").tag_text local ucfirst = m_str_utils.ucfirst local Hira = require("Module:scripts").getByCode("Hira") local Jpan = require("Module:scripts").getByCode("Jpan") local kana_to_romaji = require("Module:Hrkt-translit").tr local m_numeric = require("Module:ConvertNumeric") local kana_capture = "([-" .. require("Module:ja/data/range").kana .. "・]+)" local yomi_data = require("Module:kanjitab/data") labels["adnominals"] = { description = "{{{langname}}} adnominals, or {{ja-r|連%体%詞|れん%たい%し}}, which modify nouns, and do not conjugate or [[predicate#Verb|predicate]].", parents = {{name = "{{{langcat}}}", raw = true}}, } labels["හිරගනා"] = { description = "{{{langname}}} terms with hiragana {{mdash}} {{ja-r|平%仮%名|ひら%が%な}} {{mdash}} forms, sorted by conventional hiragana sequence. The hiragana form is a [[phonetic]] representation of that word. " .. "Wiktionary represents {{{langname}}}-language segments in three ways: in normal form (with [[kanji]], if appropriate), in [[hiragana]] " .. "form (this differs from kanji form only when the segment contains kanji), and in [[romaji]] form.", additional = "''See also'' [[:Category:{{{langname}}} katakana]]", toc_template = "Hira-categoryTOC", toc_template_full = "Hira-categoryTOC/full", parents = { {name = "{{{langcat}}}", raw = true}, "ප්‍රවර්ගය:හිරගනා අක්ෂරක්‍රමය තුළ භාවිතා වන අනුලක්ෂණ", } } labels["historical hiragana"] = { description = "{{{langname}}} historical [[hiragana]].", additional = "''See also'' [[:Category:{{{langname}}} historical katakana]].", toc_template = "Hira-categoryTOC", toc_template_full = "Hira-categoryTOC/full", parents = { "හිරගනා", {name = "{{{langcat}}}", raw = true}, "ප්‍රවර්ගය:හිරගනා අක්ෂරක්‍රමය තුළ භාවිතා වන අනුලක්ෂණ", } } labels["කතකනා"] = { description = "{{{langname}}} terms with katakana {{mdash}} {{ja-r|片%仮%名|かた%か%な}} {{mdash}} forms, sorted by conventional katakana sequence. Katakana is used primarily for transliterations of foreign words, including old Chinese hanzi not used in [[shinjitai]].", additional = "''See also'' [[:Category:{{{langname}}} hiragana]]", toc_template = "Kana-categoryTOC", toc_template_full = "Kana-categoryTOC/full", parents = { {name = "{{{langcat}}}", raw = true}, "ප්‍රවර්ගය:කතකනා අක්ෂරක්‍රමය තුළ භාවිතා වන අනුලක්ෂණ", } } labels["historical katakana"] = { description = "{{{langname}}} historical [[katakana]].", additional = "''See also'' [[:Category:{{{langname}}} historical hiragana]].", toc_template = "Kana-categoryTOC", toc_template_full = "Kana-categoryTOC/full", parents = { "කතකනා", {name = "{{{langcat}}}", raw = true}, "ප්‍රවර්ගය:කතකනා අක්ෂරක්‍රමය තුළ භාවිතා වන අනුලක්ෂණ", } } labels["terms spelled with mixed kana"] = { description = "{{{langname}}} terms which combine [[hiragana]] and [[katakana]] characters, potentially with [[kanji]] too.", parents = { {name = "{{{langcat}}}", raw = true}, "හිරගනා", "කතකනා", }, } labels["කන්ජි"] = { topright = "{{wp|Kanji}}", description = "{{{langname}}} symbols of the Han logographic script, which can represent sounds or convey meanings directly.", toc_template = "Hani-categoryTOC", umbrella = "හන් අනුලක්ෂණ", parents = "ලෝගෝග්‍රෑම", } labels["කන්ජි, කියවන ආකාරය අනුව"] = { description = "කියවන ආකාරය අනුව වර්ගීකරණය කළ, {{{langname}}} කන්ජි.", parents = {{name = "කන්ජි", sort = "reading"}}, } labels["makurakotoba"] = { topright = "{{wp|Makurakotoba}}", description = "{{{langname}}} idioms used in poetry to introduce specific words.", parents = {"idioms"}, } labels["යෙදුම්, කන්ජි කියවන ආකාරය අනුව"] = { description = "ලිවීම සඳහා භාවිතා කොට ඇති කන්ජි කියවන ආකාරය අනුව කාණ්ඩ ගතකොට ඇති, {{{langname}}} ප්‍රවර්ග.", parents = {{name = "{{{langcat}}}", raw = true}}, } labels["terms by reading pattern"] = { description = "{{{langname}}} categories with terms grouped by their reading patterns.", parents = {{name = "{{{langcat}}}", raw = true}}, } labels["terms by number of kanji"] = { description = "{{{langname}}} terms categorized by number of kanji.", parents = {"terms by orthographic property"}, } local function handle_onyomi_list(category, category_type, cat_yomi_type) local onyomi, seen = {}, {} for _, yomi in pairs(yomi_data) do if not seen[yomi] and yomi.onyomi then local yomi_catname = yomi[category_type] if yomi_catname ~= false then local yomi_type = yomi.type if yomi_type ~= "on'yomi" and yomi_type ~= cat_yomi_type then insert(onyomi, "[[:Category:{{{langname}}} " .. category:gsub("{{{yomi_catname}}}", yomi_catname) .. "]]") end end end seen[yomi] = true end sort(onyomi) return onyomi end local function add_yomi_category(category, category_type, parent, description) for _, yomi in pairs(yomi_data) do local yomi_catname = yomi[category_type] if yomi_catname ~= false then local yomi_type = yomi.type local yomi_desc = yomi.link or yomi_catname if yomi.description then yomi_desc = yomi_desc .. "; " .. yomi.description end local label = { description = description .. " " .. yomi_desc .. ".", breadcrumb = yomi_type, parents = {{name = parent, sort = yomi_catname}}, } if yomi.onyomi then local onyomi = handle_onyomi_list(category, category_type, yomi_type) label.additional = "Categories of terms with " .. (yomi_type == "on'yomi" and "more" or "other") .. " specific types of on'yomi readings can be found in the following categories:\n* " .. concat(onyomi, "\n* ") if yomi_type ~= "on'yomi" then insert(label.parents, 1, { name = (category:gsub("{{{yomi_catname}}}", yomi_data.on[category_type])), sort = yomi_catname }) end end labels[category:gsub("{{{yomi_catname}}}", yomi_catname)] = label end end end add_yomi_category( "terms read with {{{yomi_catname}}}", "reading_category", "terms by reading pattern", "{{{langname}}} terms read with" ) add_yomi_category( "terms spelled with kanji with {{{yomi_catname}}} readings", "kanji_category", "terms by kanji reading type", "{{{langname}}} categories with terms that are spelled with one or more kanji read with" ) labels["terms with missing yomi"] = { description = "{{{langname}}} terms where at least one [[Appendix:Japanese glossary#yomi|yomi]] is missing from {{tl|{{{langcode}}}-kanjitab}}.", hidden = true, can_be_empty = true, parents = {"ප්‍රවේශ නඩත්තුව"}, } labels["terms with IPA pronunciation with pitch accent"] = { description = "{{{langname}}} terms with pronunciations that have {{w|Japanese pitch accent|pitch accent}} specified.", additional = "Pitch accent can be specified in {{tl|{{{langcode}}}-pron}} with the {{code|=acc=}} parameter.", can_be_empty = true, parents = {"ප්‍රවේශ නඩත්තුව", "pitch accent"}, } labels["terms with IPA pronunciation missing pitch accent"] = { description = "{{{langname}}} terms with pronunciations that do not have a {{w|Japanese pitch accent|pitch accent}} specified.", additional = "Pitch accent can be specified in {{tl|{{{langcode}}}-pron}} with the {{code|=acc=}} parameter.", hidden = true, can_be_empty = true, parents = {"ප්‍රවේශ නඩත්තුව"}, } labels["pitch accent"] = { description = "{{{langname}}} terms regarding {{w|Japanese pitch accent|pitch accent}} pronunciation.", can_be_empty = true, parents = {{name = "{{{langcat}}}", raw = true}}, } labels["terms with Heiban pitch accent (Tōkyō)"] = { description = "{{{langname}}} terms with pronunciations that are (Tōkyō) [[平板型|Heiban]] {{w|Japanese pitch accent|pitch accent}}.", can_be_empty = true, parents = {"pitch accent"} } labels["terms with Atamadaka pitch accent (Tōkyō)"] = { description = "{{{langname}}} terms with pronunciations that are (Tōkyō) [[頭高型|Atamadaka]] {{w|Japanese pitch accent|pitch accent}}.", can_be_empty = true, parents = {"pitch accent"} } labels["terms with Nakadaka pitch accent (Tōkyō)"] = { description = "{{{langname}}} terms with pronunciations that are (Tōkyō) [[中高型|Nakadaka]] {{w|Japanese pitch accent|pitch accent}}.", can_be_empty = true, parents = {"pitch accent"} } labels["terms with Odaka pitch accent (Tōkyō)"] = { description = "{{{langname}}} terms with pronunciations that are (Tōkyō) [[尾高型|Odaka]] {{w|Japanese pitch accent|pitch accent}}.", can_be_empty = true, parents = {"pitch accent"} } labels["terms with complex pitch accent (Tōkyō)"] = { description = "{{{langname}}} terms with pronunciations that are (Tōkyō) complex {{w|Japanese pitch accent|pitch accent}}, as in having more than one {{m|ja|アクセント句}}.", can_be_empty = true, parents = {"pitch accent"} } labels["pitch accent deaccenting before の"] = { description = "{{{langname}}} terms with {{w|Japanese pitch accent|pitch accent}} pronunciations that have exceptional deaccenting or lack thereof before の ({{ja-deaccenting-before-no}}).", can_be_empty = true, parents = {"pitch accent"} } labels["terms with Odaka pitch accent not deaccented before の (Tōkyō)"] = { description = "{{{langname}}} terms with pronunciations that are (Tōkyō) [[尾高型|Odaka]] {{w|Japanese pitch accent|pitch accent}} and do not become deaccented before の ({{ja-deaccenting-before-no}}).\n\nTerms are placed in this category using {{tl|ja-odaka-deaccent-exception}}.", can_be_empty = true, parents = {"pitch accent deaccenting before の"} } labels["terms with Nakadaka pitch accent deaccented before の (Tōkyō)"] = { description = "{{{langname}}} terms with pronunciations that are (Tōkyō) [[中高型|Nakadaka]] {{w|Japanese pitch accent|pitch accent}} and become deaccented before の ({{ja-deaccenting-before-no}}).\n\nTerms are placed in this category using {{tl|ja-nakadaka-deaccent}}.", can_be_empty = true, parents = {"pitch accent deaccenting before の"} } labels["terms by kanji reading type"] = { description = "{{{langname}}} categories with terms grouped with regard to the types of readings of the kanji with which " .. "they are spelled; broadly, those of Chinese origin, {{ja-r|音|おん}} readings, and those of non-Chinese origin, {{ja-r|訓|くん}} readings.", parents = {{name = "{{{langcat}}}", raw = true}}, } labels["terms spelled with ateji"] = { topright = "{{wp|Ateji}}", description = "{{{langname}}} terms containing one or more [[Appendix:Japanese glossary#ateji|ateji]] {{mdash}} {{ja-r|当て字|あてじ}} {{mdash}} which are [[kanji]] used to represent sounds rather than meanings (though meaning may have some influence on which kanji are chosen).", parents = {{name = "{{{langcat}}}", raw = true}}, } labels["terms spelled with daiyōji"] = { description = "Japanese terms spelled using [[Appendix:Japanese glossary#daiyouji|daiyōji]], categorized using {{temp|ja-daiyouji}}.", parents = {"යෙදුම්, නිරුක්තිය අනුව"}, } labels["terms spelled with jukujikun"] = { description = "{{{langname}}} terms containing one or more [[Appendix:Japanese glossary#jukujikun|jukujikun]] {{mdash}} {{ja-r|熟%字%訓|じゅく%じ%くん}} {{mdash}} which are [[kanji]] used to represent meanings rather than sounds.", parents = {{name = "{{{langcat}}}", raw = true}}, } local function add_grade_categories(grade, desc, wp, only_one, parent, sort) local grade_kanji = grade .. " කන්ජි" local topright = wp and ("{{wp|%s}}"):format(ucfirst(grade_kanji)) or nil labels[grade_kanji] = { topright = topright, description = "{{{langname}}} kanji " .. desc, toc_template = "Hani-categoryTOC", parents = {{ name = parent and (parent .. " කන්ජි") or "කන්ජි", sort = sort or grade }}, } labels["යෙදුම්, " .. grade_kanji .. " භාවිතා කොට ලියන ලද"] = { topright = topright, description = "{{{langname}}} terms spelled with " .. (only_one and "at least one " or "") .. "kanji " .. desc, parents = {{ name = parent and ("යෙදුම්, " .. parent .. " kanji භාවිතා කොට ලියන ලද") or "terms by orthographic property", sort = sort or grade }}, } end for i = 1, 6 do local ord = m_numeric.ones_position_ord[i] add_grade_categories( ord .. " grade", "taught in the " .. ord .. " grade of elementary school, as designated by the the official list of {{ja-r|教%育 漢%字|きょう%いく かん%じ|education kanji}}.", false, false, "kyōiku", i ) end add_grade_categories( "kyōiku", "on the official list of {{ja-r|教%育 漢%字|きょう%いく かん%じ|education kanji}}.", true, false, "ජෝයෝ" ) add_grade_categories( "secondary school", "on the official list of {{ja-r|常%用 漢%字|じょう%よう かん%じ|regular-use characters}} that are generally taught in secondary school.", false, false, "ජෝයෝ" ) add_grade_categories( "ජෝයෝ", "on the official list of {{ja-r|常%用 漢%字|じょう%よう かん%じ|regular-use characters}}.", true, false ) add_grade_categories( "tōyō", "on the official list of {{ja-r|当%用 漢%字|とう%よう かん%じ|general-use characters}}, which was used from 1946{{ndash}}1981 until the publication of the list of {{ja-r|常%用 漢%字|じょう%よう かん%じ|regular-use characters}}.", true, false ) add_grade_categories( "jinmeiyō", "on the official list of {{ja-r|人%名%用 漢%字|じん%めい%-よう かん%じ|kanji for use in personal names}}.", true, true ) add_grade_categories( "hyōgai", "not included on the official list of {{ja-r|常%用 漢%字|じょう%よう かん%じ|regular-use characters}} or {{ja-r|人%名%用 漢%字|じん%めい%-よう かん%じ|kanji for use in personal names}}, known as {{ja-r|表%外 漢%字|ひょう%がい かん%じ}} or {{ja-r|表%外%字|ひょう%がい%じ|unlisted characters}}.", true, true ) labels["terms with multiple readings"] = { description = "{{{langname}}} terms with multiple pronunciations (hence multiple [[kana]] spellings).", parents = {{name = "{{{langcat}}}", raw = true}}, } labels["kanji readings by number of morae"] = { description = "{{{langname}}} categories grouped with regard to the number of morae in their kanji readings.", parents = {{name = "{{{langcat}}}", raw = true}}, } labels["single-kanji terms"] = { description = "{{{langname}}} terms written as a single kanji.", parents = { "terms by orthographic property", {name = "terms with 1 kanji", sort = " "}, }, } labels["kanji with kun readings missing okurigana designation"] = { breadcrumb = "Kanji missing okurigana designation", description = "{{{langname}}} kanji entries in which one or more kun readings entered into {{tl|{{{langcode}}}-readings}} is missing a hyphen denoting okurigana.", toc_template = "Hani-categoryTOC", hidden = true, can_be_empty = true, parents = {"ප්‍රවේශ නඩත්තුව"}, } labels["terms by the individual characters in their historical spellings"] = { breadcrumb = "Historical", description = "{{{langname}}} terms categorized by whether their spellings in the {{w|historical kana orthography}} included certain individual characters.", parents = {{name = "terms by their individual characters", sort = " "}}, } labels["verbs without transitivity"] = { description = "{{{langname}}} verbs missing the {{code|=tr=}} parameter from their headword templates.", hidden = true, can_be_empty = true, parents = {"ප්‍රවේශ නඩත්තුව"}, } labels["yojijukugo"] = { topright = "{{wp|Yojijukugo}}", description = "{{{langname}}} four-[[kanji]] compound terms, {{ja-r|四%字 熟%語|よ%じ じゅく%ご}}, with idiomatic meanings; typically derived from Classical Chinese, Buddhist scripture or traditional Japanese proverbs.", additional = "Compare Chinese {{w|chengyu}} and Korean {{w|sajaseong-eo}}.", umbrella = "four-character idioms", parents = {"idioms"}, } -- FIXME: Only works for 0 through 19. local word_to_number = {} for k, v in pairs(m_numeric.ones_position) do word_to_number[v] = k end local periods = { historical = true, ancient = true, } local function get_period_text_and_reading_type_link(period, reading_type) if period and not periods[period] then return nil end local period_text = period and period .. " " or nil -- Allow periods (historical or ancient) by themselves; they will parse as reading types. if not period and periods[reading_type] then return nil, reading_type end local reading_type_link = "[[Appendix:Japanese glossary#" .. reading_type .. "|" .. reading_type .. "]]" return period_text, reading_type_link end local function get_sc(str) return match(str:gsub("[%s%p]+", ""), "[^" .. Hira:getCharacters() .. "]") and Jpan or Hira end local function get_tagged_reading(reading, lang) return tag_text(reading, lang, get_sc(reading)) end local function get_reading_link(reading, lang, period, link) local hist = periods[period] reading = reading:gsub("[%.%-%s]+", "") return full_link({ lang = lang, sc = get_sc(reading), term = link or reading:gsub("・", ""), -- If we have okurigana, demarcate furigana. alt = reading:gsub("^(.-)・", "<span style=\"border-top:1px solid;position:relative;padding:1px;\">%1<span style=\"position:absolute;top:0;bottom:67%%;right:0%%;border-right:1px solid;\"></span></span>"), tr = kana_to_romaji((reading:gsub("・", ".")), lang:getCode(), nil, {keep_dot = true, hist = hist}) :gsub("^(.-)%.", "<u>%1</u>"), pos = reading:find("・", 1, true) and get_tagged_reading((reading:gsub("^.-・", "~")), lang) or nil }, "term") end local function is_on_subtype(reading_type) return reading_type:find(".on$") end insert(handlers, function(data) local n =data.label:match("^terms with ([1-9]%d*) kanji$") if not n then return end local sortkey = require("Module:category tree").numeral_sortkey(n, 2097152) return { breadcrumb = n, description = ("{{{langname}}} terms containing exactly %d kanji."):format(n), -- TODO: implement this using the same mechanism used to implement parents (i.e. avoiding the need for raw categories). -- umbrella = { -- breadcrumb = ("%d kanji"):format(n), -- parents = {{name = "terms by number of kanji subcategories by language", sort = sortkey}}, -- }, parents = {{name = ("terms by number of kanji"), sort = sortkey}} } end) insert(handlers, function(data) local label_pref, kana = data.label:match("^(terms historically spelled with )" .. kana_capture .. "$") if not kana then return end local lang = data.lang return { description = "{{{langname}}} terms spelled with " .. get_reading_link(kana, lang, "historical") .. " in the {{w|historical kana orthography}}.", displaytitle = "{{{langname}}} " .. label_pref .. get_tagged_reading(kana, lang), breadcrumb = "historical", parents = { {name = "terms spelled with " .. kana, sort = " "}, {name = "terms by the individual characters in their historical spellings", sort = lang:makeSortKey(kana)} }, umbrella = false, } end) insert(handlers, function(data) local count, plural = data.label:match("^kanji readings with (.+) mora(e?)$") -- Make sure 'one' goes with singular and other numbers with plural. if not count or (count == "one") ~= (plural == "") then return end local num = word_to_number[count] if not num then return nil end return { description = "{{{langname}}} kanji readings containing " .. count .. " mora" .. plural .. ".", breadcrumb = num, parents = {{name = "kanji readings by number of morae", sort = num}}, umbrella = false, } end) insert(handlers, function(data) local label_pref, period, reading_type, reading = match(data.label, "^(kanji with ([a-z]-) ?([%a']+) reading )" .. kana_capture .. "$") if not period then return end period = period ~= "" and period or nil local period_text, reading_type_link = get_period_text_and_reading_type_link(period, reading_type) if not reading_type_link then return end local lang = data.lang -- Compute parents. local parents, breadcrumb = {} if reading:find("・", 1, true) then local okurigana = reading:match("・(.*)") insert(parents, { name = "kanji with " .. (period_text or "") .. reading_type .. " reading " .. reading:match("(.-)・"), -- Sort by okurigana, since all coordinate categories will have the same furigana. sort = (lang:makeSortKey(okurigana)) }) breadcrumb = "~" .. okurigana else insert(parents, { name = "kanji by " .. (period_text or "") .. reading_type .. " reading", sort = (lang:makeSortKey(reading)) }) breadcrumb = reading end if is_on_subtype(reading_type) then insert(parents, {name = "kanji with " .. (period_text or "") .. "on reading " .. reading, sort = reading_type}) elseif period_text then insert(parents, {name = "kanji with " .. period_text .. "reading " .. reading, sort = reading_type}) end if not period_text then insert(parents, {name = "කන්ජි, " .. reading .. " ලෙස කියවන", sort = reading_type}) end return { description = "{{{langname}}} [[kanji]] with the " .. (period_text or "") .. reading_type_link .. " reading " .. get_reading_link(reading, lang, period or reading_type) .. ".", displaytitle = "{{{langname}}} " .. label_pref .. get_tagged_reading(reading, lang), breadcrumb = get_tagged_reading(breadcrumb, lang), parents = parents, umbrella = false, } end) insert(handlers, function(data) local period, reading_type = match(data.label, "^kanji by ([a-z]-) ?([%a']+) reading$") if not period then return end period = period ~= "" and period or nil local period_text, reading_type_link = get_period_text_and_reading_type_link(period, reading_type) if not reading_type_link then return nil end -- Compute parents. local parents = { is_on_subtype(reading_type) and {name = "kanji by " .. (period_text or "") .. "on reading", sort = reading_type} or period_text and {name = "kanji by " .. reading_type .. " reading", sort = period} or {name = "කන්ජි, කියවන ආකාරය අනුව", sort = reading_type} } if period_text then insert(parents, {name = "kanji by " .. period_text .. "reading", sort = reading_type}) end -- Compute description. local description = "{{{langname}}} [[kanji]] categorized by " .. (period_text or "") .. reading_type_link .. " reading." return { description = description, breadcrumb = (period_text or "") .. reading_type, parents = parents, umbrella = false, } end) insert(handlers, function(data) local label_pref, reading = match(data.label, "^(කන්ජි, )" .. kana_capture .. " ලෙස කියවන$") if not reading then return end local args = require("Module:parameters").process(data.args, { ["histconsol"] = true, }) local lang = data.lang local parents, breadcrumb = {} if reading:find("・", 1, true) then local okurigana = reading:match("・(.*)") insert(parents, { name = "kanji read as " .. reading:match("(.-)・"), -- Sort by okurigana, since all coordinate categories will have the same furigana. sort = (lang:makeSortKey(okurigana)) }) breadcrumb = "~" .. okurigana else insert(parents, { name = "කන්ජි, කියවන ආකාරය අනුව", sort = (lang:makeSortKey(reading)) }) breadcrumb = reading end local addl local period_text if args.histconsol then period_text = "historical" addl = ("This is a [[Wikipedia:Historical kana orthography|historical]] [[Wikipedia:Kanazukai|reading]], now " .. "consolidated with the [[Wikipedia:Modern kana usage|modern reading]] of " .. get_reading_link(args.histconsol, lang, nil, ("ප්‍රවර්ගය:ජපන් කන්ජි, %s ලෙස කියවන"):format(args.histconsol)) .. ".") end return { description = "{{{langname}}} [[kanji]] read as " .. get_reading_link(reading, lang, period_text) .. ".", additional = addl, displaytitle = "{{{langname}}} " .. label_pref .. get_tagged_reading(reading, lang), breadcrumb = get_tagged_reading(breadcrumb, lang), parents = parents, umbrella = false, }, true end) insert(handlers, function(data) local label_pref, reading = match(data.label, "^(යෙදුම්, ලියා ඇති කන්ජි කියවීම )" .. kana_capture .. " ආකාරයෙන් වන$") if not reading then return end -- Compute parents. local lang = data.lang local sort_key = (lang:makeSortKey(reading)) local mora_count = require("Module:ja").count_morae(reading) local mora_count_words = m_numeric.spell_number(tostring(mora_count)) local parents = { {name = "යෙදුම්, කන්ජි කියවන ආකාරය අනුව", sort = sort_key}, {name = "kanji readings with " .. mora_count_words .. " mora" .. (mora_count > 1 and "e" or ""), sort = sort_key}, {name = "කන්ජි, " .. reading .. " ලෙස කියවන", sort = " "}, } local tagged_reading = get_tagged_reading(reading, lang) return { description = "{{{langname}}} terms that contain kanji that exhibit a reading of " .. get_reading_link(reading, lang) .. " in those terms prior to any sound changes.", displaytitle = "{{{langname}}} " .. label_pref .. tagged_reading, breadcrumb = tagged_reading, parents = parents, umbrella = false, } end) insert(handlers, function(data) local kanji, reading = match(data.label, "^යෙදුම්, (.) භාවිතා කොට ලියා " .. kana_capture .. " ලෙස කියවන$") if not kanji then return nil end local args = require("Module:parameters").process(data.args, { [1] = {list = true}, }) local lang = data.lang if #args[1] == 0 then error("For categories of the form \"" .. lang:getCanonicalName() .. " terms spelled with KANJI read as READING\", at least one reading type (e.g. <code>kun</code> or <code>on</code>) must be specified using <code>1=</code>, <code>2=</code>, <code>3=</code>, etc.") end local yomi_types, parents = {}, {} for _, yomi, category in ipairs(args[1]) do local yomi_data = yomi_data[yomi] if not yomi_data then error("The yomi type \"" .. yomi .. "\" is not recognized.") end category = yomi_data.kanji_category if not category then error("The yomi type \"" .. yomi .. "\" is not valid for this type of category.") end insert(yomi_types, yomi_data.link) insert(parents, { name = "terms spelled with kanji with " .. category .. " readings", sort = (lang:makeSortKey(reading)) }) end insert(parents, 1, {name = "යෙදුම්, " .. kanji .. " භාවිතා කොට ලියන ලද", sort = (lang:makeSortKey(reading))}) insert(parents, 2, {name = "යෙදුම්, ලියා ඇති කන්ජි කියවීම " .. reading .." ආකාරයෙන් වන", sort = Hani_sort(kanji)}) yomi_types = (#yomi_types > 1 and "one of " or "") .. "its " .. require("Module:table").serialCommaJoin(yomi_types, {conj = "or"}) .. " reading" .. (#yomi_types > 1 and "s" or "") local tagged_kanji = get_tagged_reading(kanji, lang) local tagged_reading = get_tagged_reading(reading, lang) return { description = "{{{langname}}} යෙදුම්, spelled with {{l|{{{langcode}}}|" .. kanji .. "}} with " .. yomi_types .. " of " .. get_reading_link(reading, lang) .. ".", displaytitle = "{{{langname}}} යෙදුම්, " .. tagged_kanji .. " භාවිතා කොට ලියා " .. tagged_reading .. " ලෙස කියවන", breadcrumb = tagged_reading .. " ලෙස කියවන", parents = parents, umbrella = false, }, true end) insert(handlers, function(data) local affix, kanji, reading = data.label:match("^terms ([a-z]+fix)ed with (.+) read as " .. kana_capture .. "$") if not affix or not kanji or not reading then return nil end local args = require("Module:parameters").process(data.args, { [1] = {list = true}, }) local lang = data.lang if #args[1] == 0 then error("For categories of the form \"" .. lang:getCanonicalName() .. " terms AFFIXed with KANJI read as READING\", at least one reading type (e.g. <code>kun</code> or <code>on</code>) must be specified using <code>1=</code>, <code>2=</code>, <code>3=</code>, etc.") end local yomi_types = {} for _, yomi, category in ipairs(args[1]) do local yomi_data = yomi_data[yomi] if not yomi_data then error("The yomi type \"" .. yomi .. "\" is not recognized.") end category = yomi_data.kanji_category if not category then error("The yomi type \"" .. yomi .. "\" is not valid for this type of category.") end insert(yomi_types, yomi_data.link) end yomi_types = (#yomi_types > 1 and "one of " or "") .. "its " .. require("Module:table").serialCommaJoin(yomi_types, {conj = "or"}) .. " reading" .. (#yomi_types > 1 and "s" or "") local description = "{{{langname}}} terms " .. affix .. "ed with {{l|{{{langcode}}}|" .. kanji .. "}} with " .. yomi_types .. " of " .. get_reading_link(reading, lang) .. "." local what_categorizes_msg = require("Module:category tree/fam/jpx/what-categorizes-msg") .get_what_categorizes_msg(kanji, reading, affix) if what_categorizes_msg then description = description .. "\n\n" .. what_categorizes_msg end local parents = {} table.insert(parents, {name = "terms " .. affix .. "ed with " .. kanji, sort = (lang:makeSortKey(reading))}) if mw.title.new("Category:" .. lang:getCanonicalName() .. " terms spelled with " .. kanji .. " read as " .. reading).exists then table.insert(parents, {name = "terms spelled with " .. kanji .. " read as " .. reading, sort = (lang:makeSortKey(reading)), args=data.args}) end local tagged_kanji = get_tagged_reading(kanji, lang) local tagged_reading = get_tagged_reading(reading, lang) return { description = description, displaytitle = "{{{langname}}} terms " .. affix .. "ed with " .. tagged_kanji .. " read as " .. tagged_reading, breadcrumb = "read as " .. reading, parents = parents, umbrella = false, }, true end) insert(handlers, function(data) local kanji, daiyoji = match(data.label, "^terms with (.) replaced by daiyōji (.)$") if not kanji then return nil end local args = require("Module:parameters").process(data.args, { ["sort"] = true, }) local lang = data.lang if not args.sort then error("For categories of the form \"" .. lang:getCanonicalName() .. " terms with KANJI replaced by daiyōji DAIYOJI\", the sort key must be specified using sort=") end local tagged_kanji = get_tagged_reading(kanji, lang) local tagged_daiyoji = get_tagged_reading(daiyoji, lang) return { description = "{{{langname}}} terms with {{l|{{{langcode}}}|" .. kanji .. "}} replaced by [[Appendix:Japanese glossary#daiyouji|daiyōji]] {{l|{{{langcode}}}|" .. daiyoji .. "}}.", displaytitle = "{{{langname}}} terms with " .. tagged_kanji .. " replaced by daiyōji " .. tagged_daiyoji, breadcrumb = tagged_kanji .. " replaced by daiyōji " .. tagged_daiyoji, parents = {{name = "terms spelled with daiyōji", sort = args.sort}}, umbrella = false, }, true end) return {LABELS = labels, HANDLERS = handlers} cu6ill5klketrsg9cq4ywr7tfyvbvus 239316 239315 2026-11-19T07:24:52Z Lee 19 Lee විසින් යලියොමුවක් නොදමාම [[Module:category tree/fam/jpx]] පිටුව [[Module:category tree/lang/jpx]] වෙත ගෙනයන ලදී 239315 Scribunto text/plain local labels = {} local handlers = {} local m_str_utils = require("Module:string utilities") local concat = table.concat local full_link = require("Module:links").full_link local insert = table.insert local Hani_sort = require("Module:Hani-sortkey").makeSortKey local match = m_str_utils.match local sort = table.sort local tag_text = require("Module:script_utilities").tag_text local ucfirst = m_str_utils.ucfirst local Hira = require("Module:scripts").getByCode("Hira") local Jpan = require("Module:scripts").getByCode("Jpan") local kana_to_romaji = require("Module:Hrkt-translit").tr local m_numeric = require("Module:ConvertNumeric") local kana_capture = "([-" .. require("Module:ja/data/range").kana .. "・]+)" local yomi_data = require("Module:kanjitab/data") labels["adnominals"] = { description = "{{{langname}}} adnominals, or {{ja-r|連%体%詞|れん%たい%し}}, which modify nouns, and do not conjugate or [[predicate#Verb|predicate]].", parents = {{name = "{{{langcat}}}", raw = true}}, } labels["හිරගනා"] = { description = "{{{langname}}} terms with hiragana {{mdash}} {{ja-r|平%仮%名|ひら%が%な}} {{mdash}} forms, sorted by conventional hiragana sequence. The hiragana form is a [[phonetic]] representation of that word. " .. "Wiktionary represents {{{langname}}}-language segments in three ways: in normal form (with [[kanji]], if appropriate), in [[hiragana]] " .. "form (this differs from kanji form only when the segment contains kanji), and in [[romaji]] form.", additional = "''See also'' [[:Category:{{{langname}}} katakana]]", toc_template = "Hira-categoryTOC", toc_template_full = "Hira-categoryTOC/full", parents = { {name = "{{{langcat}}}", raw = true}, "ප්‍රවර්ගය:හිරගනා අක්ෂරක්‍රමය තුළ භාවිතා වන අනුලක්ෂණ", } } labels["historical hiragana"] = { description = "{{{langname}}} historical [[hiragana]].", additional = "''See also'' [[:Category:{{{langname}}} historical katakana]].", toc_template = "Hira-categoryTOC", toc_template_full = "Hira-categoryTOC/full", parents = { "හිරගනා", {name = "{{{langcat}}}", raw = true}, "ප්‍රවර්ගය:හිරගනා අක්ෂරක්‍රමය තුළ භාවිතා වන අනුලක්ෂණ", } } labels["කතකනා"] = { description = "{{{langname}}} terms with katakana {{mdash}} {{ja-r|片%仮%名|かた%か%な}} {{mdash}} forms, sorted by conventional katakana sequence. Katakana is used primarily for transliterations of foreign words, including old Chinese hanzi not used in [[shinjitai]].", additional = "''See also'' [[:Category:{{{langname}}} hiragana]]", toc_template = "Kana-categoryTOC", toc_template_full = "Kana-categoryTOC/full", parents = { {name = "{{{langcat}}}", raw = true}, "ප්‍රවර්ගය:කතකනා අක්ෂරක්‍රමය තුළ භාවිතා වන අනුලක්ෂණ", } } labels["historical katakana"] = { description = "{{{langname}}} historical [[katakana]].", additional = "''See also'' [[:Category:{{{langname}}} historical hiragana]].", toc_template = "Kana-categoryTOC", toc_template_full = "Kana-categoryTOC/full", parents = { "කතකනා", {name = "{{{langcat}}}", raw = true}, "ප්‍රවර්ගය:කතකනා අක්ෂරක්‍රමය තුළ භාවිතා වන අනුලක්ෂණ", } } labels["terms spelled with mixed kana"] = { description = "{{{langname}}} terms which combine [[hiragana]] and [[katakana]] characters, potentially with [[kanji]] too.", parents = { {name = "{{{langcat}}}", raw = true}, "හිරගනා", "කතකනා", }, } labels["කන්ජි"] = { topright = "{{wp|Kanji}}", description = "{{{langname}}} symbols of the Han logographic script, which can represent sounds or convey meanings directly.", toc_template = "Hani-categoryTOC", umbrella = "හන් අනුලක්ෂණ", parents = "ලෝගෝග්‍රෑම", } labels["කන්ජි, කියවන ආකාරය අනුව"] = { description = "කියවන ආකාරය අනුව වර්ගීකරණය කළ, {{{langname}}} කන්ජි.", parents = {{name = "කන්ජි", sort = "reading"}}, } labels["makurakotoba"] = { topright = "{{wp|Makurakotoba}}", description = "{{{langname}}} idioms used in poetry to introduce specific words.", parents = {"idioms"}, } labels["යෙදුම්, කන්ජි කියවන ආකාරය අනුව"] = { description = "ලිවීම සඳහා භාවිතා කොට ඇති කන්ජි කියවන ආකාරය අනුව කාණ්ඩ ගතකොට ඇති, {{{langname}}} ප්‍රවර්ග.", parents = {{name = "{{{langcat}}}", raw = true}}, } labels["terms by reading pattern"] = { description = "{{{langname}}} categories with terms grouped by their reading patterns.", parents = {{name = "{{{langcat}}}", raw = true}}, } labels["terms by number of kanji"] = { description = "{{{langname}}} terms categorized by number of kanji.", parents = {"terms by orthographic property"}, } local function handle_onyomi_list(category, category_type, cat_yomi_type) local onyomi, seen = {}, {} for _, yomi in pairs(yomi_data) do if not seen[yomi] and yomi.onyomi then local yomi_catname = yomi[category_type] if yomi_catname ~= false then local yomi_type = yomi.type if yomi_type ~= "on'yomi" and yomi_type ~= cat_yomi_type then insert(onyomi, "[[:Category:{{{langname}}} " .. category:gsub("{{{yomi_catname}}}", yomi_catname) .. "]]") end end end seen[yomi] = true end sort(onyomi) return onyomi end local function add_yomi_category(category, category_type, parent, description) for _, yomi in pairs(yomi_data) do local yomi_catname = yomi[category_type] if yomi_catname ~= false then local yomi_type = yomi.type local yomi_desc = yomi.link or yomi_catname if yomi.description then yomi_desc = yomi_desc .. "; " .. yomi.description end local label = { description = description .. " " .. yomi_desc .. ".", breadcrumb = yomi_type, parents = {{name = parent, sort = yomi_catname}}, } if yomi.onyomi then local onyomi = handle_onyomi_list(category, category_type, yomi_type) label.additional = "Categories of terms with " .. (yomi_type == "on'yomi" and "more" or "other") .. " specific types of on'yomi readings can be found in the following categories:\n* " .. concat(onyomi, "\n* ") if yomi_type ~= "on'yomi" then insert(label.parents, 1, { name = (category:gsub("{{{yomi_catname}}}", yomi_data.on[category_type])), sort = yomi_catname }) end end labels[category:gsub("{{{yomi_catname}}}", yomi_catname)] = label end end end add_yomi_category( "terms read with {{{yomi_catname}}}", "reading_category", "terms by reading pattern", "{{{langname}}} terms read with" ) add_yomi_category( "terms spelled with kanji with {{{yomi_catname}}} readings", "kanji_category", "terms by kanji reading type", "{{{langname}}} categories with terms that are spelled with one or more kanji read with" ) labels["terms with missing yomi"] = { description = "{{{langname}}} terms where at least one [[Appendix:Japanese glossary#yomi|yomi]] is missing from {{tl|{{{langcode}}}-kanjitab}}.", hidden = true, can_be_empty = true, parents = {"ප්‍රවේශ නඩත්තුව"}, } labels["terms with IPA pronunciation with pitch accent"] = { description = "{{{langname}}} terms with pronunciations that have {{w|Japanese pitch accent|pitch accent}} specified.", additional = "Pitch accent can be specified in {{tl|{{{langcode}}}-pron}} with the {{code|=acc=}} parameter.", can_be_empty = true, parents = {"ප්‍රවේශ නඩත්තුව", "pitch accent"}, } labels["terms with IPA pronunciation missing pitch accent"] = { description = "{{{langname}}} terms with pronunciations that do not have a {{w|Japanese pitch accent|pitch accent}} specified.", additional = "Pitch accent can be specified in {{tl|{{{langcode}}}-pron}} with the {{code|=acc=}} parameter.", hidden = true, can_be_empty = true, parents = {"ප්‍රවේශ නඩත්තුව"}, } labels["pitch accent"] = { description = "{{{langname}}} terms regarding {{w|Japanese pitch accent|pitch accent}} pronunciation.", can_be_empty = true, parents = {{name = "{{{langcat}}}", raw = true}}, } labels["terms with Heiban pitch accent (Tōkyō)"] = { description = "{{{langname}}} terms with pronunciations that are (Tōkyō) [[平板型|Heiban]] {{w|Japanese pitch accent|pitch accent}}.", can_be_empty = true, parents = {"pitch accent"} } labels["terms with Atamadaka pitch accent (Tōkyō)"] = { description = "{{{langname}}} terms with pronunciations that are (Tōkyō) [[頭高型|Atamadaka]] {{w|Japanese pitch accent|pitch accent}}.", can_be_empty = true, parents = {"pitch accent"} } labels["terms with Nakadaka pitch accent (Tōkyō)"] = { description = "{{{langname}}} terms with pronunciations that are (Tōkyō) [[中高型|Nakadaka]] {{w|Japanese pitch accent|pitch accent}}.", can_be_empty = true, parents = {"pitch accent"} } labels["terms with Odaka pitch accent (Tōkyō)"] = { description = "{{{langname}}} terms with pronunciations that are (Tōkyō) [[尾高型|Odaka]] {{w|Japanese pitch accent|pitch accent}}.", can_be_empty = true, parents = {"pitch accent"} } labels["terms with complex pitch accent (Tōkyō)"] = { description = "{{{langname}}} terms with pronunciations that are (Tōkyō) complex {{w|Japanese pitch accent|pitch accent}}, as in having more than one {{m|ja|アクセント句}}.", can_be_empty = true, parents = {"pitch accent"} } labels["pitch accent deaccenting before の"] = { description = "{{{langname}}} terms with {{w|Japanese pitch accent|pitch accent}} pronunciations that have exceptional deaccenting or lack thereof before の ({{ja-deaccenting-before-no}}).", can_be_empty = true, parents = {"pitch accent"} } labels["terms with Odaka pitch accent not deaccented before の (Tōkyō)"] = { description = "{{{langname}}} terms with pronunciations that are (Tōkyō) [[尾高型|Odaka]] {{w|Japanese pitch accent|pitch accent}} and do not become deaccented before の ({{ja-deaccenting-before-no}}).\n\nTerms are placed in this category using {{tl|ja-odaka-deaccent-exception}}.", can_be_empty = true, parents = {"pitch accent deaccenting before の"} } labels["terms with Nakadaka pitch accent deaccented before の (Tōkyō)"] = { description = "{{{langname}}} terms with pronunciations that are (Tōkyō) [[中高型|Nakadaka]] {{w|Japanese pitch accent|pitch accent}} and become deaccented before の ({{ja-deaccenting-before-no}}).\n\nTerms are placed in this category using {{tl|ja-nakadaka-deaccent}}.", can_be_empty = true, parents = {"pitch accent deaccenting before の"} } labels["terms by kanji reading type"] = { description = "{{{langname}}} categories with terms grouped with regard to the types of readings of the kanji with which " .. "they are spelled; broadly, those of Chinese origin, {{ja-r|音|おん}} readings, and those of non-Chinese origin, {{ja-r|訓|くん}} readings.", parents = {{name = "{{{langcat}}}", raw = true}}, } labels["terms spelled with ateji"] = { topright = "{{wp|Ateji}}", description = "{{{langname}}} terms containing one or more [[Appendix:Japanese glossary#ateji|ateji]] {{mdash}} {{ja-r|当て字|あてじ}} {{mdash}} which are [[kanji]] used to represent sounds rather than meanings (though meaning may have some influence on which kanji are chosen).", parents = {{name = "{{{langcat}}}", raw = true}}, } labels["terms spelled with daiyōji"] = { description = "Japanese terms spelled using [[Appendix:Japanese glossary#daiyouji|daiyōji]], categorized using {{temp|ja-daiyouji}}.", parents = {"යෙදුම්, නිරුක්තිය අනුව"}, } labels["terms spelled with jukujikun"] = { description = "{{{langname}}} terms containing one or more [[Appendix:Japanese glossary#jukujikun|jukujikun]] {{mdash}} {{ja-r|熟%字%訓|じゅく%じ%くん}} {{mdash}} which are [[kanji]] used to represent meanings rather than sounds.", parents = {{name = "{{{langcat}}}", raw = true}}, } local function add_grade_categories(grade, desc, wp, only_one, parent, sort) local grade_kanji = grade .. " කන්ජි" local topright = wp and ("{{wp|%s}}"):format(ucfirst(grade_kanji)) or nil labels[grade_kanji] = { topright = topright, description = "{{{langname}}} kanji " .. desc, toc_template = "Hani-categoryTOC", parents = {{ name = parent and (parent .. " කන්ජි") or "කන්ජි", sort = sort or grade }}, } labels["යෙදුම්, " .. grade_kanji .. " භාවිතා කොට ලියන ලද"] = { topright = topright, description = "{{{langname}}} terms spelled with " .. (only_one and "at least one " or "") .. "kanji " .. desc, parents = {{ name = parent and ("යෙදුම්, " .. parent .. " kanji භාවිතා කොට ලියන ලද") or "terms by orthographic property", sort = sort or grade }}, } end for i = 1, 6 do local ord = m_numeric.ones_position_ord[i] add_grade_categories( ord .. " grade", "taught in the " .. ord .. " grade of elementary school, as designated by the the official list of {{ja-r|教%育 漢%字|きょう%いく かん%じ|education kanji}}.", false, false, "kyōiku", i ) end add_grade_categories( "kyōiku", "on the official list of {{ja-r|教%育 漢%字|きょう%いく かん%じ|education kanji}}.", true, false, "ජෝයෝ" ) add_grade_categories( "secondary school", "on the official list of {{ja-r|常%用 漢%字|じょう%よう かん%じ|regular-use characters}} that are generally taught in secondary school.", false, false, "ජෝයෝ" ) add_grade_categories( "ජෝයෝ", "on the official list of {{ja-r|常%用 漢%字|じょう%よう かん%じ|regular-use characters}}.", true, false ) add_grade_categories( "tōyō", "on the official list of {{ja-r|当%用 漢%字|とう%よう かん%じ|general-use characters}}, which was used from 1946{{ndash}}1981 until the publication of the list of {{ja-r|常%用 漢%字|じょう%よう かん%じ|regular-use characters}}.", true, false ) add_grade_categories( "jinmeiyō", "on the official list of {{ja-r|人%名%用 漢%字|じん%めい%-よう かん%じ|kanji for use in personal names}}.", true, true ) add_grade_categories( "hyōgai", "not included on the official list of {{ja-r|常%用 漢%字|じょう%よう かん%じ|regular-use characters}} or {{ja-r|人%名%用 漢%字|じん%めい%-よう かん%じ|kanji for use in personal names}}, known as {{ja-r|表%外 漢%字|ひょう%がい かん%じ}} or {{ja-r|表%外%字|ひょう%がい%じ|unlisted characters}}.", true, true ) labels["terms with multiple readings"] = { description = "{{{langname}}} terms with multiple pronunciations (hence multiple [[kana]] spellings).", parents = {{name = "{{{langcat}}}", raw = true}}, } labels["kanji readings by number of morae"] = { description = "{{{langname}}} categories grouped with regard to the number of morae in their kanji readings.", parents = {{name = "{{{langcat}}}", raw = true}}, } labels["single-kanji terms"] = { description = "{{{langname}}} terms written as a single kanji.", parents = { "terms by orthographic property", {name = "terms with 1 kanji", sort = " "}, }, } labels["kanji with kun readings missing okurigana designation"] = { breadcrumb = "Kanji missing okurigana designation", description = "{{{langname}}} kanji entries in which one or more kun readings entered into {{tl|{{{langcode}}}-readings}} is missing a hyphen denoting okurigana.", toc_template = "Hani-categoryTOC", hidden = true, can_be_empty = true, parents = {"ප්‍රවේශ නඩත්තුව"}, } labels["terms by the individual characters in their historical spellings"] = { breadcrumb = "Historical", description = "{{{langname}}} terms categorized by whether their spellings in the {{w|historical kana orthography}} included certain individual characters.", parents = {{name = "terms by their individual characters", sort = " "}}, } labels["verbs without transitivity"] = { description = "{{{langname}}} verbs missing the {{code|=tr=}} parameter from their headword templates.", hidden = true, can_be_empty = true, parents = {"ප්‍රවේශ නඩත්තුව"}, } labels["yojijukugo"] = { topright = "{{wp|Yojijukugo}}", description = "{{{langname}}} four-[[kanji]] compound terms, {{ja-r|四%字 熟%語|よ%じ じゅく%ご}}, with idiomatic meanings; typically derived from Classical Chinese, Buddhist scripture or traditional Japanese proverbs.", additional = "Compare Chinese {{w|chengyu}} and Korean {{w|sajaseong-eo}}.", umbrella = "four-character idioms", parents = {"idioms"}, } -- FIXME: Only works for 0 through 19. local word_to_number = {} for k, v in pairs(m_numeric.ones_position) do word_to_number[v] = k end local periods = { historical = true, ancient = true, } local function get_period_text_and_reading_type_link(period, reading_type) if period and not periods[period] then return nil end local period_text = period and period .. " " or nil -- Allow periods (historical or ancient) by themselves; they will parse as reading types. if not period and periods[reading_type] then return nil, reading_type end local reading_type_link = "[[Appendix:Japanese glossary#" .. reading_type .. "|" .. reading_type .. "]]" return period_text, reading_type_link end local function get_sc(str) return match(str:gsub("[%s%p]+", ""), "[^" .. Hira:getCharacters() .. "]") and Jpan or Hira end local function get_tagged_reading(reading, lang) return tag_text(reading, lang, get_sc(reading)) end local function get_reading_link(reading, lang, period, link) local hist = periods[period] reading = reading:gsub("[%.%-%s]+", "") return full_link({ lang = lang, sc = get_sc(reading), term = link or reading:gsub("・", ""), -- If we have okurigana, demarcate furigana. alt = reading:gsub("^(.-)・", "<span style=\"border-top:1px solid;position:relative;padding:1px;\">%1<span style=\"position:absolute;top:0;bottom:67%%;right:0%%;border-right:1px solid;\"></span></span>"), tr = kana_to_romaji((reading:gsub("・", ".")), lang:getCode(), nil, {keep_dot = true, hist = hist}) :gsub("^(.-)%.", "<u>%1</u>"), pos = reading:find("・", 1, true) and get_tagged_reading((reading:gsub("^.-・", "~")), lang) or nil }, "term") end local function is_on_subtype(reading_type) return reading_type:find(".on$") end insert(handlers, function(data) local n =data.label:match("^terms with ([1-9]%d*) kanji$") if not n then return end local sortkey = require("Module:category tree").numeral_sortkey(n, 2097152) return { breadcrumb = n, description = ("{{{langname}}} terms containing exactly %d kanji."):format(n), -- TODO: implement this using the same mechanism used to implement parents (i.e. avoiding the need for raw categories). -- umbrella = { -- breadcrumb = ("%d kanji"):format(n), -- parents = {{name = "terms by number of kanji subcategories by language", sort = sortkey}}, -- }, parents = {{name = ("terms by number of kanji"), sort = sortkey}} } end) insert(handlers, function(data) local label_pref, kana = data.label:match("^(terms historically spelled with )" .. kana_capture .. "$") if not kana then return end local lang = data.lang return { description = "{{{langname}}} terms spelled with " .. get_reading_link(kana, lang, "historical") .. " in the {{w|historical kana orthography}}.", displaytitle = "{{{langname}}} " .. label_pref .. get_tagged_reading(kana, lang), breadcrumb = "historical", parents = { {name = "terms spelled with " .. kana, sort = " "}, {name = "terms by the individual characters in their historical spellings", sort = lang:makeSortKey(kana)} }, umbrella = false, } end) insert(handlers, function(data) local count, plural = data.label:match("^kanji readings with (.+) mora(e?)$") -- Make sure 'one' goes with singular and other numbers with plural. if not count or (count == "one") ~= (plural == "") then return end local num = word_to_number[count] if not num then return nil end return { description = "{{{langname}}} kanji readings containing " .. count .. " mora" .. plural .. ".", breadcrumb = num, parents = {{name = "kanji readings by number of morae", sort = num}}, umbrella = false, } end) insert(handlers, function(data) local label_pref, period, reading_type, reading = match(data.label, "^(kanji with ([a-z]-) ?([%a']+) reading )" .. kana_capture .. "$") if not period then return end period = period ~= "" and period or nil local period_text, reading_type_link = get_period_text_and_reading_type_link(period, reading_type) if not reading_type_link then return end local lang = data.lang -- Compute parents. local parents, breadcrumb = {} if reading:find("・", 1, true) then local okurigana = reading:match("・(.*)") insert(parents, { name = "kanji with " .. (period_text or "") .. reading_type .. " reading " .. reading:match("(.-)・"), -- Sort by okurigana, since all coordinate categories will have the same furigana. sort = (lang:makeSortKey(okurigana)) }) breadcrumb = "~" .. okurigana else insert(parents, { name = "kanji by " .. (period_text or "") .. reading_type .. " reading", sort = (lang:makeSortKey(reading)) }) breadcrumb = reading end if is_on_subtype(reading_type) then insert(parents, {name = "kanji with " .. (period_text or "") .. "on reading " .. reading, sort = reading_type}) elseif period_text then insert(parents, {name = "kanji with " .. period_text .. "reading " .. reading, sort = reading_type}) end if not period_text then insert(parents, {name = "කන්ජි, " .. reading .. " ලෙස කියවන", sort = reading_type}) end return { description = "{{{langname}}} [[kanji]] with the " .. (period_text or "") .. reading_type_link .. " reading " .. get_reading_link(reading, lang, period or reading_type) .. ".", displaytitle = "{{{langname}}} " .. label_pref .. get_tagged_reading(reading, lang), breadcrumb = get_tagged_reading(breadcrumb, lang), parents = parents, umbrella = false, } end) insert(handlers, function(data) local period, reading_type = match(data.label, "^kanji by ([a-z]-) ?([%a']+) reading$") if not period then return end period = period ~= "" and period or nil local period_text, reading_type_link = get_period_text_and_reading_type_link(period, reading_type) if not reading_type_link then return nil end -- Compute parents. local parents = { is_on_subtype(reading_type) and {name = "kanji by " .. (period_text or "") .. "on reading", sort = reading_type} or period_text and {name = "kanji by " .. reading_type .. " reading", sort = period} or {name = "කන්ජි, කියවන ආකාරය අනුව", sort = reading_type} } if period_text then insert(parents, {name = "kanji by " .. period_text .. "reading", sort = reading_type}) end -- Compute description. local description = "{{{langname}}} [[kanji]] categorized by " .. (period_text or "") .. reading_type_link .. " reading." return { description = description, breadcrumb = (period_text or "") .. reading_type, parents = parents, umbrella = false, } end) insert(handlers, function(data) local label_pref, reading = match(data.label, "^(කන්ජි, )" .. kana_capture .. " ලෙස කියවන$") if not reading then return end local args = require("Module:parameters").process(data.args, { ["histconsol"] = true, }) local lang = data.lang local parents, breadcrumb = {} if reading:find("・", 1, true) then local okurigana = reading:match("・(.*)") insert(parents, { name = "kanji read as " .. reading:match("(.-)・"), -- Sort by okurigana, since all coordinate categories will have the same furigana. sort = (lang:makeSortKey(okurigana)) }) breadcrumb = "~" .. okurigana else insert(parents, { name = "කන්ජි, කියවන ආකාරය අනුව", sort = (lang:makeSortKey(reading)) }) breadcrumb = reading end local addl local period_text if args.histconsol then period_text = "historical" addl = ("This is a [[Wikipedia:Historical kana orthography|historical]] [[Wikipedia:Kanazukai|reading]], now " .. "consolidated with the [[Wikipedia:Modern kana usage|modern reading]] of " .. get_reading_link(args.histconsol, lang, nil, ("ප්‍රවර්ගය:ජපන් කන්ජි, %s ලෙස කියවන"):format(args.histconsol)) .. ".") end return { description = "{{{langname}}} [[kanji]] read as " .. get_reading_link(reading, lang, period_text) .. ".", additional = addl, displaytitle = "{{{langname}}} " .. label_pref .. get_tagged_reading(reading, lang), breadcrumb = get_tagged_reading(breadcrumb, lang), parents = parents, umbrella = false, }, true end) insert(handlers, function(data) local label_pref, reading = match(data.label, "^(යෙදුම්, ලියා ඇති කන්ජි කියවීම )" .. kana_capture .. " ආකාරයෙන් වන$") if not reading then return end -- Compute parents. local lang = data.lang local sort_key = (lang:makeSortKey(reading)) local mora_count = require("Module:ja").count_morae(reading) local mora_count_words = m_numeric.spell_number(tostring(mora_count)) local parents = { {name = "යෙදුම්, කන්ජි කියවන ආකාරය අනුව", sort = sort_key}, {name = "kanji readings with " .. mora_count_words .. " mora" .. (mora_count > 1 and "e" or ""), sort = sort_key}, {name = "කන්ජි, " .. reading .. " ලෙස කියවන", sort = " "}, } local tagged_reading = get_tagged_reading(reading, lang) return { description = "{{{langname}}} terms that contain kanji that exhibit a reading of " .. get_reading_link(reading, lang) .. " in those terms prior to any sound changes.", displaytitle = "{{{langname}}} " .. label_pref .. tagged_reading, breadcrumb = tagged_reading, parents = parents, umbrella = false, } end) insert(handlers, function(data) local kanji, reading = match(data.label, "^යෙදුම්, (.) භාවිතා කොට ලියා " .. kana_capture .. " ලෙස කියවන$") if not kanji then return nil end local args = require("Module:parameters").process(data.args, { [1] = {list = true}, }) local lang = data.lang if #args[1] == 0 then error("For categories of the form \"" .. lang:getCanonicalName() .. " terms spelled with KANJI read as READING\", at least one reading type (e.g. <code>kun</code> or <code>on</code>) must be specified using <code>1=</code>, <code>2=</code>, <code>3=</code>, etc.") end local yomi_types, parents = {}, {} for _, yomi, category in ipairs(args[1]) do local yomi_data = yomi_data[yomi] if not yomi_data then error("The yomi type \"" .. yomi .. "\" is not recognized.") end category = yomi_data.kanji_category if not category then error("The yomi type \"" .. yomi .. "\" is not valid for this type of category.") end insert(yomi_types, yomi_data.link) insert(parents, { name = "terms spelled with kanji with " .. category .. " readings", sort = (lang:makeSortKey(reading)) }) end insert(parents, 1, {name = "යෙදුම්, " .. kanji .. " භාවිතා කොට ලියන ලද", sort = (lang:makeSortKey(reading))}) insert(parents, 2, {name = "යෙදුම්, ලියා ඇති කන්ජි කියවීම " .. reading .." ආකාරයෙන් වන", sort = Hani_sort(kanji)}) yomi_types = (#yomi_types > 1 and "one of " or "") .. "its " .. require("Module:table").serialCommaJoin(yomi_types, {conj = "or"}) .. " reading" .. (#yomi_types > 1 and "s" or "") local tagged_kanji = get_tagged_reading(kanji, lang) local tagged_reading = get_tagged_reading(reading, lang) return { description = "{{{langname}}} යෙදුම්, spelled with {{l|{{{langcode}}}|" .. kanji .. "}} with " .. yomi_types .. " of " .. get_reading_link(reading, lang) .. ".", displaytitle = "{{{langname}}} යෙදුම්, " .. tagged_kanji .. " භාවිතා කොට ලියා " .. tagged_reading .. " ලෙස කියවන", breadcrumb = tagged_reading .. " ලෙස කියවන", parents = parents, umbrella = false, }, true end) insert(handlers, function(data) local affix, kanji, reading = data.label:match("^terms ([a-z]+fix)ed with (.+) read as " .. kana_capture .. "$") if not affix or not kanji or not reading then return nil end local args = require("Module:parameters").process(data.args, { [1] = {list = true}, }) local lang = data.lang if #args[1] == 0 then error("For categories of the form \"" .. lang:getCanonicalName() .. " terms AFFIXed with KANJI read as READING\", at least one reading type (e.g. <code>kun</code> or <code>on</code>) must be specified using <code>1=</code>, <code>2=</code>, <code>3=</code>, etc.") end local yomi_types = {} for _, yomi, category in ipairs(args[1]) do local yomi_data = yomi_data[yomi] if not yomi_data then error("The yomi type \"" .. yomi .. "\" is not recognized.") end category = yomi_data.kanji_category if not category then error("The yomi type \"" .. yomi .. "\" is not valid for this type of category.") end insert(yomi_types, yomi_data.link) end yomi_types = (#yomi_types > 1 and "one of " or "") .. "its " .. require("Module:table").serialCommaJoin(yomi_types, {conj = "or"}) .. " reading" .. (#yomi_types > 1 and "s" or "") local description = "{{{langname}}} terms " .. affix .. "ed with {{l|{{{langcode}}}|" .. kanji .. "}} with " .. yomi_types .. " of " .. get_reading_link(reading, lang) .. "." local what_categorizes_msg = require("Module:category tree/fam/jpx/what-categorizes-msg") .get_what_categorizes_msg(kanji, reading, affix) if what_categorizes_msg then description = description .. "\n\n" .. what_categorizes_msg end local parents = {} table.insert(parents, {name = "terms " .. affix .. "ed with " .. kanji, sort = (lang:makeSortKey(reading))}) if mw.title.new("Category:" .. lang:getCanonicalName() .. " terms spelled with " .. kanji .. " read as " .. reading).exists then table.insert(parents, {name = "terms spelled with " .. kanji .. " read as " .. reading, sort = (lang:makeSortKey(reading)), args=data.args}) end local tagged_kanji = get_tagged_reading(kanji, lang) local tagged_reading = get_tagged_reading(reading, lang) return { description = description, displaytitle = "{{{langname}}} terms " .. affix .. "ed with " .. tagged_kanji .. " read as " .. tagged_reading, breadcrumb = "read as " .. reading, parents = parents, umbrella = false, }, true end) insert(handlers, function(data) local kanji, daiyoji = match(data.label, "^terms with (.) replaced by daiyōji (.)$") if not kanji then return nil end local args = require("Module:parameters").process(data.args, { ["sort"] = true, }) local lang = data.lang if not args.sort then error("For categories of the form \"" .. lang:getCanonicalName() .. " terms with KANJI replaced by daiyōji DAIYOJI\", the sort key must be specified using sort=") end local tagged_kanji = get_tagged_reading(kanji, lang) local tagged_daiyoji = get_tagged_reading(daiyoji, lang) return { description = "{{{langname}}} terms with {{l|{{{langcode}}}|" .. kanji .. "}} replaced by [[Appendix:Japanese glossary#daiyouji|daiyōji]] {{l|{{{langcode}}}|" .. daiyoji .. "}}.", displaytitle = "{{{langname}}} terms with " .. tagged_kanji .. " replaced by daiyōji " .. tagged_daiyoji, breadcrumb = tagged_kanji .. " replaced by daiyōji " .. tagged_daiyoji, parents = {{name = "terms spelled with daiyōji", sort = args.sort}}, umbrella = false, }, true end) return {LABELS = labels, HANDLERS = handlers} cu6ill5klketrsg9cq4ywr7tfyvbvus 239317 239316 2026-11-19T07:25:22Z Lee 19 Lee විසින් [[Module:category tree/lang/jpx]] සිට [[Module:category tree/fam/jpx]] වෙත පිටුව ගෙන යන ලදී 239315 Scribunto text/plain local labels = {} local handlers = {} local m_str_utils = require("Module:string utilities") local concat = table.concat local full_link = require("Module:links").full_link local insert = table.insert local Hani_sort = require("Module:Hani-sortkey").makeSortKey local match = m_str_utils.match local sort = table.sort local tag_text = require("Module:script_utilities").tag_text local ucfirst = m_str_utils.ucfirst local Hira = require("Module:scripts").getByCode("Hira") local Jpan = require("Module:scripts").getByCode("Jpan") local kana_to_romaji = require("Module:Hrkt-translit").tr local m_numeric = require("Module:ConvertNumeric") local kana_capture = "([-" .. require("Module:ja/data/range").kana .. "・]+)" local yomi_data = require("Module:kanjitab/data") labels["adnominals"] = { description = "{{{langname}}} adnominals, or {{ja-r|連%体%詞|れん%たい%し}}, which modify nouns, and do not conjugate or [[predicate#Verb|predicate]].", parents = {{name = "{{{langcat}}}", raw = true}}, } labels["හිරගනා"] = { description = "{{{langname}}} terms with hiragana {{mdash}} {{ja-r|平%仮%名|ひら%が%な}} {{mdash}} forms, sorted by conventional hiragana sequence. The hiragana form is a [[phonetic]] representation of that word. " .. "Wiktionary represents {{{langname}}}-language segments in three ways: in normal form (with [[kanji]], if appropriate), in [[hiragana]] " .. "form (this differs from kanji form only when the segment contains kanji), and in [[romaji]] form.", additional = "''See also'' [[:Category:{{{langname}}} katakana]]", toc_template = "Hira-categoryTOC", toc_template_full = "Hira-categoryTOC/full", parents = { {name = "{{{langcat}}}", raw = true}, "ප්‍රවර්ගය:හිරගනා අක්ෂරක්‍රමය තුළ භාවිතා වන අනුලක්ෂණ", } } labels["historical hiragana"] = { description = "{{{langname}}} historical [[hiragana]].", additional = "''See also'' [[:Category:{{{langname}}} historical katakana]].", toc_template = "Hira-categoryTOC", toc_template_full = "Hira-categoryTOC/full", parents = { "හිරගනා", {name = "{{{langcat}}}", raw = true}, "ප්‍රවර්ගය:හිරගනා අක්ෂරක්‍රමය තුළ භාවිතා වන අනුලක්ෂණ", } } labels["කතකනා"] = { description = "{{{langname}}} terms with katakana {{mdash}} {{ja-r|片%仮%名|かた%か%な}} {{mdash}} forms, sorted by conventional katakana sequence. Katakana is used primarily for transliterations of foreign words, including old Chinese hanzi not used in [[shinjitai]].", additional = "''See also'' [[:Category:{{{langname}}} hiragana]]", toc_template = "Kana-categoryTOC", toc_template_full = "Kana-categoryTOC/full", parents = { {name = "{{{langcat}}}", raw = true}, "ප්‍රවර්ගය:කතකනා අක්ෂරක්‍රමය තුළ භාවිතා වන අනුලක්ෂණ", } } labels["historical katakana"] = { description = "{{{langname}}} historical [[katakana]].", additional = "''See also'' [[:Category:{{{langname}}} historical hiragana]].", toc_template = "Kana-categoryTOC", toc_template_full = "Kana-categoryTOC/full", parents = { "කතකනා", {name = "{{{langcat}}}", raw = true}, "ප්‍රවර්ගය:කතකනා අක්ෂරක්‍රමය තුළ භාවිතා වන අනුලක්ෂණ", } } labels["terms spelled with mixed kana"] = { description = "{{{langname}}} terms which combine [[hiragana]] and [[katakana]] characters, potentially with [[kanji]] too.", parents = { {name = "{{{langcat}}}", raw = true}, "හිරගනා", "කතකනා", }, } labels["කන්ජි"] = { topright = "{{wp|Kanji}}", description = "{{{langname}}} symbols of the Han logographic script, which can represent sounds or convey meanings directly.", toc_template = "Hani-categoryTOC", umbrella = "හන් අනුලක්ෂණ", parents = "ලෝගෝග්‍රෑම", } labels["කන්ජි, කියවන ආකාරය අනුව"] = { description = "කියවන ආකාරය අනුව වර්ගීකරණය කළ, {{{langname}}} කන්ජි.", parents = {{name = "කන්ජි", sort = "reading"}}, } labels["makurakotoba"] = { topright = "{{wp|Makurakotoba}}", description = "{{{langname}}} idioms used in poetry to introduce specific words.", parents = {"idioms"}, } labels["යෙදුම්, කන්ජි කියවන ආකාරය අනුව"] = { description = "ලිවීම සඳහා භාවිතා කොට ඇති කන්ජි කියවන ආකාරය අනුව කාණ්ඩ ගතකොට ඇති, {{{langname}}} ප්‍රවර්ග.", parents = {{name = "{{{langcat}}}", raw = true}}, } labels["terms by reading pattern"] = { description = "{{{langname}}} categories with terms grouped by their reading patterns.", parents = {{name = "{{{langcat}}}", raw = true}}, } labels["terms by number of kanji"] = { description = "{{{langname}}} terms categorized by number of kanji.", parents = {"terms by orthographic property"}, } local function handle_onyomi_list(category, category_type, cat_yomi_type) local onyomi, seen = {}, {} for _, yomi in pairs(yomi_data) do if not seen[yomi] and yomi.onyomi then local yomi_catname = yomi[category_type] if yomi_catname ~= false then local yomi_type = yomi.type if yomi_type ~= "on'yomi" and yomi_type ~= cat_yomi_type then insert(onyomi, "[[:Category:{{{langname}}} " .. category:gsub("{{{yomi_catname}}}", yomi_catname) .. "]]") end end end seen[yomi] = true end sort(onyomi) return onyomi end local function add_yomi_category(category, category_type, parent, description) for _, yomi in pairs(yomi_data) do local yomi_catname = yomi[category_type] if yomi_catname ~= false then local yomi_type = yomi.type local yomi_desc = yomi.link or yomi_catname if yomi.description then yomi_desc = yomi_desc .. "; " .. yomi.description end local label = { description = description .. " " .. yomi_desc .. ".", breadcrumb = yomi_type, parents = {{name = parent, sort = yomi_catname}}, } if yomi.onyomi then local onyomi = handle_onyomi_list(category, category_type, yomi_type) label.additional = "Categories of terms with " .. (yomi_type == "on'yomi" and "more" or "other") .. " specific types of on'yomi readings can be found in the following categories:\n* " .. concat(onyomi, "\n* ") if yomi_type ~= "on'yomi" then insert(label.parents, 1, { name = (category:gsub("{{{yomi_catname}}}", yomi_data.on[category_type])), sort = yomi_catname }) end end labels[category:gsub("{{{yomi_catname}}}", yomi_catname)] = label end end end add_yomi_category( "terms read with {{{yomi_catname}}}", "reading_category", "terms by reading pattern", "{{{langname}}} terms read with" ) add_yomi_category( "terms spelled with kanji with {{{yomi_catname}}} readings", "kanji_category", "terms by kanji reading type", "{{{langname}}} categories with terms that are spelled with one or more kanji read with" ) labels["terms with missing yomi"] = { description = "{{{langname}}} terms where at least one [[Appendix:Japanese glossary#yomi|yomi]] is missing from {{tl|{{{langcode}}}-kanjitab}}.", hidden = true, can_be_empty = true, parents = {"ප්‍රවේශ නඩත්තුව"}, } labels["terms with IPA pronunciation with pitch accent"] = { description = "{{{langname}}} terms with pronunciations that have {{w|Japanese pitch accent|pitch accent}} specified.", additional = "Pitch accent can be specified in {{tl|{{{langcode}}}-pron}} with the {{code|=acc=}} parameter.", can_be_empty = true, parents = {"ප්‍රවේශ නඩත්තුව", "pitch accent"}, } labels["terms with IPA pronunciation missing pitch accent"] = { description = "{{{langname}}} terms with pronunciations that do not have a {{w|Japanese pitch accent|pitch accent}} specified.", additional = "Pitch accent can be specified in {{tl|{{{langcode}}}-pron}} with the {{code|=acc=}} parameter.", hidden = true, can_be_empty = true, parents = {"ප්‍රවේශ නඩත්තුව"}, } labels["pitch accent"] = { description = "{{{langname}}} terms regarding {{w|Japanese pitch accent|pitch accent}} pronunciation.", can_be_empty = true, parents = {{name = "{{{langcat}}}", raw = true}}, } labels["terms with Heiban pitch accent (Tōkyō)"] = { description = "{{{langname}}} terms with pronunciations that are (Tōkyō) [[平板型|Heiban]] {{w|Japanese pitch accent|pitch accent}}.", can_be_empty = true, parents = {"pitch accent"} } labels["terms with Atamadaka pitch accent (Tōkyō)"] = { description = "{{{langname}}} terms with pronunciations that are (Tōkyō) [[頭高型|Atamadaka]] {{w|Japanese pitch accent|pitch accent}}.", can_be_empty = true, parents = {"pitch accent"} } labels["terms with Nakadaka pitch accent (Tōkyō)"] = { description = "{{{langname}}} terms with pronunciations that are (Tōkyō) [[中高型|Nakadaka]] {{w|Japanese pitch accent|pitch accent}}.", can_be_empty = true, parents = {"pitch accent"} } labels["terms with Odaka pitch accent (Tōkyō)"] = { description = "{{{langname}}} terms with pronunciations that are (Tōkyō) [[尾高型|Odaka]] {{w|Japanese pitch accent|pitch accent}}.", can_be_empty = true, parents = {"pitch accent"} } labels["terms with complex pitch accent (Tōkyō)"] = { description = "{{{langname}}} terms with pronunciations that are (Tōkyō) complex {{w|Japanese pitch accent|pitch accent}}, as in having more than one {{m|ja|アクセント句}}.", can_be_empty = true, parents = {"pitch accent"} } labels["pitch accent deaccenting before の"] = { description = "{{{langname}}} terms with {{w|Japanese pitch accent|pitch accent}} pronunciations that have exceptional deaccenting or lack thereof before の ({{ja-deaccenting-before-no}}).", can_be_empty = true, parents = {"pitch accent"} } labels["terms with Odaka pitch accent not deaccented before の (Tōkyō)"] = { description = "{{{langname}}} terms with pronunciations that are (Tōkyō) [[尾高型|Odaka]] {{w|Japanese pitch accent|pitch accent}} and do not become deaccented before の ({{ja-deaccenting-before-no}}).\n\nTerms are placed in this category using {{tl|ja-odaka-deaccent-exception}}.", can_be_empty = true, parents = {"pitch accent deaccenting before の"} } labels["terms with Nakadaka pitch accent deaccented before の (Tōkyō)"] = { description = "{{{langname}}} terms with pronunciations that are (Tōkyō) [[中高型|Nakadaka]] {{w|Japanese pitch accent|pitch accent}} and become deaccented before の ({{ja-deaccenting-before-no}}).\n\nTerms are placed in this category using {{tl|ja-nakadaka-deaccent}}.", can_be_empty = true, parents = {"pitch accent deaccenting before の"} } labels["terms by kanji reading type"] = { description = "{{{langname}}} categories with terms grouped with regard to the types of readings of the kanji with which " .. "they are spelled; broadly, those of Chinese origin, {{ja-r|音|おん}} readings, and those of non-Chinese origin, {{ja-r|訓|くん}} readings.", parents = {{name = "{{{langcat}}}", raw = true}}, } labels["terms spelled with ateji"] = { topright = "{{wp|Ateji}}", description = "{{{langname}}} terms containing one or more [[Appendix:Japanese glossary#ateji|ateji]] {{mdash}} {{ja-r|当て字|あてじ}} {{mdash}} which are [[kanji]] used to represent sounds rather than meanings (though meaning may have some influence on which kanji are chosen).", parents = {{name = "{{{langcat}}}", raw = true}}, } labels["terms spelled with daiyōji"] = { description = "Japanese terms spelled using [[Appendix:Japanese glossary#daiyouji|daiyōji]], categorized using {{temp|ja-daiyouji}}.", parents = {"යෙදුම්, නිරුක්තිය අනුව"}, } labels["terms spelled with jukujikun"] = { description = "{{{langname}}} terms containing one or more [[Appendix:Japanese glossary#jukujikun|jukujikun]] {{mdash}} {{ja-r|熟%字%訓|じゅく%じ%くん}} {{mdash}} which are [[kanji]] used to represent meanings rather than sounds.", parents = {{name = "{{{langcat}}}", raw = true}}, } local function add_grade_categories(grade, desc, wp, only_one, parent, sort) local grade_kanji = grade .. " කන්ජි" local topright = wp and ("{{wp|%s}}"):format(ucfirst(grade_kanji)) or nil labels[grade_kanji] = { topright = topright, description = "{{{langname}}} kanji " .. desc, toc_template = "Hani-categoryTOC", parents = {{ name = parent and (parent .. " කන්ජි") or "කන්ජි", sort = sort or grade }}, } labels["යෙදුම්, " .. grade_kanji .. " භාවිතා කොට ලියන ලද"] = { topright = topright, description = "{{{langname}}} terms spelled with " .. (only_one and "at least one " or "") .. "kanji " .. desc, parents = {{ name = parent and ("යෙදුම්, " .. parent .. " kanji භාවිතා කොට ලියන ලද") or "terms by orthographic property", sort = sort or grade }}, } end for i = 1, 6 do local ord = m_numeric.ones_position_ord[i] add_grade_categories( ord .. " grade", "taught in the " .. ord .. " grade of elementary school, as designated by the the official list of {{ja-r|教%育 漢%字|きょう%いく かん%じ|education kanji}}.", false, false, "kyōiku", i ) end add_grade_categories( "kyōiku", "on the official list of {{ja-r|教%育 漢%字|きょう%いく かん%じ|education kanji}}.", true, false, "ජෝයෝ" ) add_grade_categories( "secondary school", "on the official list of {{ja-r|常%用 漢%字|じょう%よう かん%じ|regular-use characters}} that are generally taught in secondary school.", false, false, "ජෝයෝ" ) add_grade_categories( "ජෝයෝ", "on the official list of {{ja-r|常%用 漢%字|じょう%よう かん%じ|regular-use characters}}.", true, false ) add_grade_categories( "tōyō", "on the official list of {{ja-r|当%用 漢%字|とう%よう かん%じ|general-use characters}}, which was used from 1946{{ndash}}1981 until the publication of the list of {{ja-r|常%用 漢%字|じょう%よう かん%じ|regular-use characters}}.", true, false ) add_grade_categories( "jinmeiyō", "on the official list of {{ja-r|人%名%用 漢%字|じん%めい%-よう かん%じ|kanji for use in personal names}}.", true, true ) add_grade_categories( "hyōgai", "not included on the official list of {{ja-r|常%用 漢%字|じょう%よう かん%じ|regular-use characters}} or {{ja-r|人%名%用 漢%字|じん%めい%-よう かん%じ|kanji for use in personal names}}, known as {{ja-r|表%外 漢%字|ひょう%がい かん%じ}} or {{ja-r|表%外%字|ひょう%がい%じ|unlisted characters}}.", true, true ) labels["terms with multiple readings"] = { description = "{{{langname}}} terms with multiple pronunciations (hence multiple [[kana]] spellings).", parents = {{name = "{{{langcat}}}", raw = true}}, } labels["kanji readings by number of morae"] = { description = "{{{langname}}} categories grouped with regard to the number of morae in their kanji readings.", parents = {{name = "{{{langcat}}}", raw = true}}, } labels["single-kanji terms"] = { description = "{{{langname}}} terms written as a single kanji.", parents = { "terms by orthographic property", {name = "terms with 1 kanji", sort = " "}, }, } labels["kanji with kun readings missing okurigana designation"] = { breadcrumb = "Kanji missing okurigana designation", description = "{{{langname}}} kanji entries in which one or more kun readings entered into {{tl|{{{langcode}}}-readings}} is missing a hyphen denoting okurigana.", toc_template = "Hani-categoryTOC", hidden = true, can_be_empty = true, parents = {"ප්‍රවේශ නඩත්තුව"}, } labels["terms by the individual characters in their historical spellings"] = { breadcrumb = "Historical", description = "{{{langname}}} terms categorized by whether their spellings in the {{w|historical kana orthography}} included certain individual characters.", parents = {{name = "terms by their individual characters", sort = " "}}, } labels["verbs without transitivity"] = { description = "{{{langname}}} verbs missing the {{code|=tr=}} parameter from their headword templates.", hidden = true, can_be_empty = true, parents = {"ප්‍රවේශ නඩත්තුව"}, } labels["yojijukugo"] = { topright = "{{wp|Yojijukugo}}", description = "{{{langname}}} four-[[kanji]] compound terms, {{ja-r|四%字 熟%語|よ%じ じゅく%ご}}, with idiomatic meanings; typically derived from Classical Chinese, Buddhist scripture or traditional Japanese proverbs.", additional = "Compare Chinese {{w|chengyu}} and Korean {{w|sajaseong-eo}}.", umbrella = "four-character idioms", parents = {"idioms"}, } -- FIXME: Only works for 0 through 19. local word_to_number = {} for k, v in pairs(m_numeric.ones_position) do word_to_number[v] = k end local periods = { historical = true, ancient = true, } local function get_period_text_and_reading_type_link(period, reading_type) if period and not periods[period] then return nil end local period_text = period and period .. " " or nil -- Allow periods (historical or ancient) by themselves; they will parse as reading types. if not period and periods[reading_type] then return nil, reading_type end local reading_type_link = "[[Appendix:Japanese glossary#" .. reading_type .. "|" .. reading_type .. "]]" return period_text, reading_type_link end local function get_sc(str) return match(str:gsub("[%s%p]+", ""), "[^" .. Hira:getCharacters() .. "]") and Jpan or Hira end local function get_tagged_reading(reading, lang) return tag_text(reading, lang, get_sc(reading)) end local function get_reading_link(reading, lang, period, link) local hist = periods[period] reading = reading:gsub("[%.%-%s]+", "") return full_link({ lang = lang, sc = get_sc(reading), term = link or reading:gsub("・", ""), -- If we have okurigana, demarcate furigana. alt = reading:gsub("^(.-)・", "<span style=\"border-top:1px solid;position:relative;padding:1px;\">%1<span style=\"position:absolute;top:0;bottom:67%%;right:0%%;border-right:1px solid;\"></span></span>"), tr = kana_to_romaji((reading:gsub("・", ".")), lang:getCode(), nil, {keep_dot = true, hist = hist}) :gsub("^(.-)%.", "<u>%1</u>"), pos = reading:find("・", 1, true) and get_tagged_reading((reading:gsub("^.-・", "~")), lang) or nil }, "term") end local function is_on_subtype(reading_type) return reading_type:find(".on$") end insert(handlers, function(data) local n =data.label:match("^terms with ([1-9]%d*) kanji$") if not n then return end local sortkey = require("Module:category tree").numeral_sortkey(n, 2097152) return { breadcrumb = n, description = ("{{{langname}}} terms containing exactly %d kanji."):format(n), -- TODO: implement this using the same mechanism used to implement parents (i.e. avoiding the need for raw categories). -- umbrella = { -- breadcrumb = ("%d kanji"):format(n), -- parents = {{name = "terms by number of kanji subcategories by language", sort = sortkey}}, -- }, parents = {{name = ("terms by number of kanji"), sort = sortkey}} } end) insert(handlers, function(data) local label_pref, kana = data.label:match("^(terms historically spelled with )" .. kana_capture .. "$") if not kana then return end local lang = data.lang return { description = "{{{langname}}} terms spelled with " .. get_reading_link(kana, lang, "historical") .. " in the {{w|historical kana orthography}}.", displaytitle = "{{{langname}}} " .. label_pref .. get_tagged_reading(kana, lang), breadcrumb = "historical", parents = { {name = "terms spelled with " .. kana, sort = " "}, {name = "terms by the individual characters in their historical spellings", sort = lang:makeSortKey(kana)} }, umbrella = false, } end) insert(handlers, function(data) local count, plural = data.label:match("^kanji readings with (.+) mora(e?)$") -- Make sure 'one' goes with singular and other numbers with plural. if not count or (count == "one") ~= (plural == "") then return end local num = word_to_number[count] if not num then return nil end return { description = "{{{langname}}} kanji readings containing " .. count .. " mora" .. plural .. ".", breadcrumb = num, parents = {{name = "kanji readings by number of morae", sort = num}}, umbrella = false, } end) insert(handlers, function(data) local label_pref, period, reading_type, reading = match(data.label, "^(kanji with ([a-z]-) ?([%a']+) reading )" .. kana_capture .. "$") if not period then return end period = period ~= "" and period or nil local period_text, reading_type_link = get_period_text_and_reading_type_link(period, reading_type) if not reading_type_link then return end local lang = data.lang -- Compute parents. local parents, breadcrumb = {} if reading:find("・", 1, true) then local okurigana = reading:match("・(.*)") insert(parents, { name = "kanji with " .. (period_text or "") .. reading_type .. " reading " .. reading:match("(.-)・"), -- Sort by okurigana, since all coordinate categories will have the same furigana. sort = (lang:makeSortKey(okurigana)) }) breadcrumb = "~" .. okurigana else insert(parents, { name = "kanji by " .. (period_text or "") .. reading_type .. " reading", sort = (lang:makeSortKey(reading)) }) breadcrumb = reading end if is_on_subtype(reading_type) then insert(parents, {name = "kanji with " .. (period_text or "") .. "on reading " .. reading, sort = reading_type}) elseif period_text then insert(parents, {name = "kanji with " .. period_text .. "reading " .. reading, sort = reading_type}) end if not period_text then insert(parents, {name = "කන්ජි, " .. reading .. " ලෙස කියවන", sort = reading_type}) end return { description = "{{{langname}}} [[kanji]] with the " .. (period_text or "") .. reading_type_link .. " reading " .. get_reading_link(reading, lang, period or reading_type) .. ".", displaytitle = "{{{langname}}} " .. label_pref .. get_tagged_reading(reading, lang), breadcrumb = get_tagged_reading(breadcrumb, lang), parents = parents, umbrella = false, } end) insert(handlers, function(data) local period, reading_type = match(data.label, "^kanji by ([a-z]-) ?([%a']+) reading$") if not period then return end period = period ~= "" and period or nil local period_text, reading_type_link = get_period_text_and_reading_type_link(period, reading_type) if not reading_type_link then return nil end -- Compute parents. local parents = { is_on_subtype(reading_type) and {name = "kanji by " .. (period_text or "") .. "on reading", sort = reading_type} or period_text and {name = "kanji by " .. reading_type .. " reading", sort = period} or {name = "කන්ජි, කියවන ආකාරය අනුව", sort = reading_type} } if period_text then insert(parents, {name = "kanji by " .. period_text .. "reading", sort = reading_type}) end -- Compute description. local description = "{{{langname}}} [[kanji]] categorized by " .. (period_text or "") .. reading_type_link .. " reading." return { description = description, breadcrumb = (period_text or "") .. reading_type, parents = parents, umbrella = false, } end) insert(handlers, function(data) local label_pref, reading = match(data.label, "^(කන්ජි, )" .. kana_capture .. " ලෙස කියවන$") if not reading then return end local args = require("Module:parameters").process(data.args, { ["histconsol"] = true, }) local lang = data.lang local parents, breadcrumb = {} if reading:find("・", 1, true) then local okurigana = reading:match("・(.*)") insert(parents, { name = "kanji read as " .. reading:match("(.-)・"), -- Sort by okurigana, since all coordinate categories will have the same furigana. sort = (lang:makeSortKey(okurigana)) }) breadcrumb = "~" .. okurigana else insert(parents, { name = "කන්ජි, කියවන ආකාරය අනුව", sort = (lang:makeSortKey(reading)) }) breadcrumb = reading end local addl local period_text if args.histconsol then period_text = "historical" addl = ("This is a [[Wikipedia:Historical kana orthography|historical]] [[Wikipedia:Kanazukai|reading]], now " .. "consolidated with the [[Wikipedia:Modern kana usage|modern reading]] of " .. get_reading_link(args.histconsol, lang, nil, ("ප්‍රවර්ගය:ජපන් කන්ජි, %s ලෙස කියවන"):format(args.histconsol)) .. ".") end return { description = "{{{langname}}} [[kanji]] read as " .. get_reading_link(reading, lang, period_text) .. ".", additional = addl, displaytitle = "{{{langname}}} " .. label_pref .. get_tagged_reading(reading, lang), breadcrumb = get_tagged_reading(breadcrumb, lang), parents = parents, umbrella = false, }, true end) insert(handlers, function(data) local label_pref, reading = match(data.label, "^(යෙදුම්, ලියා ඇති කන්ජි කියවීම )" .. kana_capture .. " ආකාරයෙන් වන$") if not reading then return end -- Compute parents. local lang = data.lang local sort_key = (lang:makeSortKey(reading)) local mora_count = require("Module:ja").count_morae(reading) local mora_count_words = m_numeric.spell_number(tostring(mora_count)) local parents = { {name = "යෙදුම්, කන්ජි කියවන ආකාරය අනුව", sort = sort_key}, {name = "kanji readings with " .. mora_count_words .. " mora" .. (mora_count > 1 and "e" or ""), sort = sort_key}, {name = "කන්ජි, " .. reading .. " ලෙස කියවන", sort = " "}, } local tagged_reading = get_tagged_reading(reading, lang) return { description = "{{{langname}}} terms that contain kanji that exhibit a reading of " .. get_reading_link(reading, lang) .. " in those terms prior to any sound changes.", displaytitle = "{{{langname}}} " .. label_pref .. tagged_reading, breadcrumb = tagged_reading, parents = parents, umbrella = false, } end) insert(handlers, function(data) local kanji, reading = match(data.label, "^යෙදුම්, (.) භාවිතා කොට ලියා " .. kana_capture .. " ලෙස කියවන$") if not kanji then return nil end local args = require("Module:parameters").process(data.args, { [1] = {list = true}, }) local lang = data.lang if #args[1] == 0 then error("For categories of the form \"" .. lang:getCanonicalName() .. " terms spelled with KANJI read as READING\", at least one reading type (e.g. <code>kun</code> or <code>on</code>) must be specified using <code>1=</code>, <code>2=</code>, <code>3=</code>, etc.") end local yomi_types, parents = {}, {} for _, yomi, category in ipairs(args[1]) do local yomi_data = yomi_data[yomi] if not yomi_data then error("The yomi type \"" .. yomi .. "\" is not recognized.") end category = yomi_data.kanji_category if not category then error("The yomi type \"" .. yomi .. "\" is not valid for this type of category.") end insert(yomi_types, yomi_data.link) insert(parents, { name = "terms spelled with kanji with " .. category .. " readings", sort = (lang:makeSortKey(reading)) }) end insert(parents, 1, {name = "යෙදුම්, " .. kanji .. " භාවිතා කොට ලියන ලද", sort = (lang:makeSortKey(reading))}) insert(parents, 2, {name = "යෙදුම්, ලියා ඇති කන්ජි කියවීම " .. reading .." ආකාරයෙන් වන", sort = Hani_sort(kanji)}) yomi_types = (#yomi_types > 1 and "one of " or "") .. "its " .. require("Module:table").serialCommaJoin(yomi_types, {conj = "or"}) .. " reading" .. (#yomi_types > 1 and "s" or "") local tagged_kanji = get_tagged_reading(kanji, lang) local tagged_reading = get_tagged_reading(reading, lang) return { description = "{{{langname}}} යෙදුම්, spelled with {{l|{{{langcode}}}|" .. kanji .. "}} with " .. yomi_types .. " of " .. get_reading_link(reading, lang) .. ".", displaytitle = "{{{langname}}} යෙදුම්, " .. tagged_kanji .. " භාවිතා කොට ලියා " .. tagged_reading .. " ලෙස කියවන", breadcrumb = tagged_reading .. " ලෙස කියවන", parents = parents, umbrella = false, }, true end) insert(handlers, function(data) local affix, kanji, reading = data.label:match("^terms ([a-z]+fix)ed with (.+) read as " .. kana_capture .. "$") if not affix or not kanji or not reading then return nil end local args = require("Module:parameters").process(data.args, { [1] = {list = true}, }) local lang = data.lang if #args[1] == 0 then error("For categories of the form \"" .. lang:getCanonicalName() .. " terms AFFIXed with KANJI read as READING\", at least one reading type (e.g. <code>kun</code> or <code>on</code>) must be specified using <code>1=</code>, <code>2=</code>, <code>3=</code>, etc.") end local yomi_types = {} for _, yomi, category in ipairs(args[1]) do local yomi_data = yomi_data[yomi] if not yomi_data then error("The yomi type \"" .. yomi .. "\" is not recognized.") end category = yomi_data.kanji_category if not category then error("The yomi type \"" .. yomi .. "\" is not valid for this type of category.") end insert(yomi_types, yomi_data.link) end yomi_types = (#yomi_types > 1 and "one of " or "") .. "its " .. require("Module:table").serialCommaJoin(yomi_types, {conj = "or"}) .. " reading" .. (#yomi_types > 1 and "s" or "") local description = "{{{langname}}} terms " .. affix .. "ed with {{l|{{{langcode}}}|" .. kanji .. "}} with " .. yomi_types .. " of " .. get_reading_link(reading, lang) .. "." local what_categorizes_msg = require("Module:category tree/fam/jpx/what-categorizes-msg") .get_what_categorizes_msg(kanji, reading, affix) if what_categorizes_msg then description = description .. "\n\n" .. what_categorizes_msg end local parents = {} table.insert(parents, {name = "terms " .. affix .. "ed with " .. kanji, sort = (lang:makeSortKey(reading))}) if mw.title.new("Category:" .. lang:getCanonicalName() .. " terms spelled with " .. kanji .. " read as " .. reading).exists then table.insert(parents, {name = "terms spelled with " .. kanji .. " read as " .. reading, sort = (lang:makeSortKey(reading)), args=data.args}) end local tagged_kanji = get_tagged_reading(kanji, lang) local tagged_reading = get_tagged_reading(reading, lang) return { description = description, displaytitle = "{{{langname}}} terms " .. affix .. "ed with " .. tagged_kanji .. " read as " .. tagged_reading, breadcrumb = "read as " .. reading, parents = parents, umbrella = false, }, true end) insert(handlers, function(data) local kanji, daiyoji = match(data.label, "^terms with (.) replaced by daiyōji (.)$") if not kanji then return nil end local args = require("Module:parameters").process(data.args, { ["sort"] = true, }) local lang = data.lang if not args.sort then error("For categories of the form \"" .. lang:getCanonicalName() .. " terms with KANJI replaced by daiyōji DAIYOJI\", the sort key must be specified using sort=") end local tagged_kanji = get_tagged_reading(kanji, lang) local tagged_daiyoji = get_tagged_reading(daiyoji, lang) return { description = "{{{langname}}} terms with {{l|{{{langcode}}}|" .. kanji .. "}} replaced by [[Appendix:Japanese glossary#daiyouji|daiyōji]] {{l|{{{langcode}}}|" .. daiyoji .. "}}.", displaytitle = "{{{langname}}} terms with " .. tagged_kanji .. " replaced by daiyōji " .. tagged_daiyoji, breadcrumb = tagged_kanji .. " replaced by daiyōji " .. tagged_daiyoji, parents = {{name = "terms spelled with daiyōji", sort = args.sort}}, umbrella = false, }, true end) return {LABELS = labels, HANDLERS = handlers} cu6ill5klketrsg9cq4ywr7tfyvbvus Module:category tree/fam/jpx/what-categorizes-msg 828 143586 239310 234072 2026-07-26T06:04:37Z en>Benwing 0 Protected "[[Module:category tree/fam/jpx/what-categorizes-msg]]": per existence of [[WT:CLTR]]; changes to these modules should go through a vetting process ([Edit=Allow only autopatrollers] (indefinite) [Move=Allow only autopatrollers] (indefinite)) 234071 Scribunto text/plain local export = {} local m_str_utils = require("Module:string utilities") local d_range = mw.loadData("Module:ja/data/range") -- Handles the "Terms are placed in this category..." text in Japanese affix categories -- Used in -- [[Module:category tree/affixes and compounds]] -- [[Module:category tree/fam/jpx]] function export.get_what_categorizes_msg(affix, affix_reading, affix_type) if not affix_reading then if m_str_utils.find(affix, "[" .. d_range.kanji .. "々〻]") then --Category has kanji but no reading "read as" return nil end affix_reading = affix end local tl if affix_type == "suffix" then tl = "{{tl|ja-compound|<var>|...|</var>|" .. affix .. "|-" .. affix_reading .. "}}" elseif affix_type == "prefix" then tl = "{{tl|ja-compound|" .. affix .. "|" .. affix_reading .. "-|<var>|...|</var>}}" elseif affix_type == "infix" then tl = "{{tl|ja-compound|<var>|...|</var>|" .. affix .. "|-" .. affix_reading .. "-|<var>|...|</var>}}" end if tl then tl = "Terms are placed in this category using " .. tl .. "." end return tl end return export aseik7d8zcfi37ce42nxrihk8lz825b 239311 239310 2026-11-19T07:05:53Z Lee 19 [[:en:Module:category_tree/fam/jpx/what-categorizes-msg]] වෙතින් එක් සංශෝධනයක් 234071 Scribunto text/plain local export = {} local m_str_utils = require("Module:string utilities") local d_range = mw.loadData("Module:ja/data/range") -- Handles the "Terms are placed in this category..." text in Japanese affix categories -- Used in -- [[Module:category tree/affixes and compounds]] -- [[Module:category tree/fam/jpx]] function export.get_what_categorizes_msg(affix, affix_reading, affix_type) if not affix_reading then if m_str_utils.find(affix, "[" .. d_range.kanji .. "々〻]") then --Category has kanji but no reading "read as" return nil end affix_reading = affix end local tl if affix_type == "suffix" then tl = "{{tl|ja-compound|<var>|...|</var>|" .. affix .. "|-" .. affix_reading .. "}}" elseif affix_type == "prefix" then tl = "{{tl|ja-compound|" .. affix .. "|" .. affix_reading .. "-|<var>|...|</var>}}" elseif affix_type == "infix" then tl = "{{tl|ja-compound|<var>|...|</var>|" .. affix .. "|-" .. affix_reading .. "-|<var>|...|</var>}}" end if tl then tl = "Terms are placed in this category using " .. tl .. "." end return tl end return export aseik7d8zcfi37ce42nxrihk8lz825b ප්‍රවර්ගය:East Circassian ප්‍රවේශ නඩත්තුව 14 143915 239305 234813 2026-11-19T07:00:50Z Lee 19 Lee විසින් යලියොමුවක් නොදමාම [[ප්‍රවර්ගය:East Circassian ප්‍රවේශ නඩත්තුව]] පිටුව [[ප්‍රවර්ගය:Kabardian ප්‍රවේශ නඩත්තුව]] වෙත ගෙනයන ලදී 234813 wikitext text/x-wiki {{auto cat}} [[en:Category:East Circassian entry maintenance]] 1ohyw4gkjtcakkevararpwgq21ewp32 239306 239305 2026-11-19T07:01:14Z Lee 19 Lee විසින් [[ප්‍රවර්ගය:Kabardian ප්‍රවේශ නඩත්තුව]] සිට [[ප්‍රවර්ගය:East Circassian ප්‍රවේශ නඩත්තුව]] වෙත පිටුව ගෙන යන ලදී 234813 wikitext text/x-wiki {{auto cat}} [[en:Category:East Circassian entry maintenance]] 1ohyw4gkjtcakkevararpwgq21ewp32 ප්‍රවර්ගය:East Circassian භාෂාව 14 143916 239302 234814 2026-11-19T06:59:19Z Lee 19 Lee විසින් යලියොමුවක් නොදමාම [[ප්‍රවර්ගය:East Circassian භාෂාව]] පිටුව [[ප්‍රවර්ගය:Kabardian භාෂාව]] වෙත ගෙනයන ලදී 234814 wikitext text/x-wiki {{auto cat|Russia|Turkey|the Caucasus}} [[en:Category:East Circassian language]] dtp0hemsvzvxa4x8hfmyom9mfjyat29 239303 239302 2026-11-19T06:59:50Z Lee 19 Lee විසින් [[ප්‍රවර්ගය:Kabardian භාෂාව]] සිට [[ප්‍රවර්ගය:East Circassian භාෂාව]] වෙත පිටුව ගෙන යන ලදී 234814 wikitext text/x-wiki {{auto cat|Russia|Turkey|the Caucasus}} [[en:Category:East Circassian language]] dtp0hemsvzvxa4x8hfmyom9mfjyat29 ප්‍රවර්ගය:Kabardian මොඩියුල 14 145890 239288 2026-11-19T04:13:11Z Lee 19 Lee විසින් [[ප්‍රවර්ගය:Kabardian මොඩියුල]] සිට [[ප්‍රවර්ගය:East Circassian මොඩියුල]] වෙත පිටුව ගෙන යන ලදී 239288 wikitext text/x-wiki #යළියොමුව [[:ප්‍රවර්ගය:East Circassian මොඩියුල]] oct5aoyg4z6rjjboo4ygxd3wxcu9an3 239299 239288 2026-11-19T04:14:02Z Pinthura 2424 රොබෝ: යළියොමුව, මෘදු ප්‍රවර්ග යළියොමුවක් බවට හැරවීම 239299 wikitext text/x-wiki {{category redirect|East Circassian මොඩියුල}} dwmesexi3tvz8gw0d7pweipzmq163sj ප්‍රවර්ග සාකච්ඡාව:Kabardian මොඩියුල 15 145891 239290 2026-11-19T04:13:11Z Lee 19 Lee විසින් [[ප්‍රවර්ග සාකච්ඡාව:Kabardian මොඩියුල]] සිට [[ප්‍රවර්ග සාකච්ඡාව:East Circassian මොඩියුල]] වෙත පිටුව ගෙන යන ලදී 239290 wikitext text/x-wiki #යළියොමුව [[ප්‍රවර්ග සාකච්ඡාව:East Circassian මොඩියුල]] 5knvz540kxyup9k3lgy01c2r06fwoct ප්‍රවර්ගය:Kabardian යොමු වචන පේළි සැකිලි 14 145892 239292 2026-11-19T04:13:16Z Lee 19 Lee විසින් [[ප්‍රවර්ගය:Kabardian යොමු වචන පේළි සැකිලි]] සිට [[ප්‍රවර්ගය:East Circassian යොමු වචන පේළි සැකිලි]] වෙත පිටුව ගෙන යන ලදී 239292 wikitext text/x-wiki #යළියොමුව [[:ප්‍රවර්ගය:East Circassian යොමු වචන පේළි සැකිලි]] tw8k370qmrrle44y34q267wvqa6u4uf 239300 239292 2026-11-19T04:14:12Z Pinthura 2424 රොබෝ: යළියොමුව, මෘදු ප්‍රවර්ග යළියොමුවක් බවට හැරවීම 239300 wikitext text/x-wiki {{category redirect|East Circassian යොමු වචන පේළි සැකිලි}} 00murj2rc1rozrel75r0hnwolm9exdm ප්‍රවර්ග සාකච්ඡාව:Kabardian යොමු වචන පේළි සැකිලි 15 145893 239294 2026-11-19T04:13:17Z Lee 19 Lee විසින් [[ප්‍රවර්ග සාකච්ඡාව:Kabardian යොමු වචන පේළි සැකිලි]] සිට [[ප්‍රවර්ග සාකච්ඡාව:East Circassian යොමු වචන පේළි සැකිලි]] වෙත පිටුව ගෙන යන ලදී 239294 wikitext text/x-wiki #යළියොමුව [[ප්‍රවර්ග සාකච්ඡාව:East Circassian යොමු වචන පේළි සැකිලි]] 7k9qoc37jgdx8dgyxobmjv37i3kicyu ප්‍රවර්ගය:Kabardian සැකිලි 14 145894 239296 2026-11-19T04:13:21Z Lee 19 Lee විසින් [[ප්‍රවර්ගය:Kabardian සැකිලි]] සිට [[ප්‍රවර්ගය:East Circassian සැකිලි]] වෙත පිටුව ගෙන යන ලදී 239296 wikitext text/x-wiki #යළියොමුව [[:ප්‍රවර්ගය:East Circassian සැකිලි]] c29tbptdq84mp6w999gkd9179uzythm 239301 239296 2026-11-19T04:14:22Z Pinthura 2424 රොබෝ: යළියොමුව, මෘදු ප්‍රවර්ග යළියොමුවක් බවට හැරවීම 239301 wikitext text/x-wiki {{category redirect|East Circassian සැකිලි}} 29uabhu1j61e2xp33ug4d0b50p3ldy4 ප්‍රවර්ග සාකච්ඡාව:Kabardian සැකිලි 15 145895 239298 2026-11-19T04:13:21Z Lee 19 Lee විසින් [[ප්‍රවර්ග සාකච්ඡාව:Kabardian සැකිලි]] සිට [[ප්‍රවර්ග සාකච්ඡාව:East Circassian සැකිලි]] වෙත පිටුව ගෙන යන ලදී 239298 wikitext text/x-wiki #යළියොමුව [[ප්‍රවර්ග සාකච්ඡාව:East Circassian සැකිලි]] n61nc4nfg8hapvd3a6viri2a5vn5dil ප්‍රවර්ගය:Kabardian භාෂාව 14 145897 239304 2026-11-19T06:59:51Z Lee 19 Lee විසින් [[ප්‍රවර්ගය:Kabardian භාෂාව]] සිට [[ප්‍රවර්ගය:East Circassian භාෂාව]] වෙත පිටුව ගෙන යන ලදී 239304 wikitext text/x-wiki #යළියොමුව [[:ප්‍රවර්ගය:East Circassian භාෂාව]] mcf53u0c1e7s6philbvxfr09f56k41i 239309 239304 2026-11-19T07:01:50Z Pinthura 2424 රොබෝ: යළියොමුව, මෘදු ප්‍රවර්ග යළියොමුවක් බවට හැරවීම 239309 wikitext text/x-wiki {{category redirect|East Circassian භාෂාව}} 4x45jjrgyyuxadwvvmkjndcjes0zhiz ප්‍රවර්ගය:Kabardian ප්‍රවේශ නඩත්තුව 14 145899 239307 2026-11-19T07:01:14Z Lee 19 Lee විසින් [[ප්‍රවර්ගය:Kabardian ප්‍රවේශ නඩත්තුව]] සිට [[ප්‍රවර්ගය:East Circassian ප්‍රවේශ නඩත්තුව]] වෙත පිටුව ගෙන යන ලදී 239307 wikitext text/x-wiki #යළියොමුව [[:ප්‍රවර්ගය:East Circassian ප්‍රවේශ නඩත්තුව]] le8nt19ksb4nz0fj7zkqt1y2za3vlip 239308 239307 2026-11-19T07:01:40Z Pinthura 2424 රොබෝ: යළියොමුව, මෘදු ප්‍රවර්ග යළියොමුවක් බවට හැරවීම 239308 wikitext text/x-wiki {{category redirect|East Circassian ප්‍රවේශ නඩත්තුව}} agervhs494fx9wkley3aywvxrn82pa4 Module:category tree/lang/jpx 828 145901 239318 2026-11-19T07:25:22Z Lee 19 Lee විසින් [[Module:category tree/lang/jpx]] සිට [[Module:category tree/fam/jpx]] වෙත පිටුව ගෙන යන ලදී 239318 Scribunto text/plain return require [[Module:category tree/fam/jpx]] plyyad33bq6xb7tys32dq8sjuh7h8eb