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.44.0-wmf.3 case-sensitive මාධ්‍යය විශේෂ සාකච්ඡාව පරිශීලක පරිශීලක සාකච්ඡාව වික්ෂනරි වික්ෂනරි සාකච්ඡාව ගොනුව ගොනුව සාකච්ඡාව මාධ්‍යවිකි මාධ්‍යවිකි සාකච්ඡාව සැකිල්ල සැකිලි සාකච්ඡාව උදවු උදවු සාකච්ඡාව ප්‍රවර්ගය ප්‍රවර්ග සාකච්ඡාව TimedText TimedText talk Module Module talk Module:sinhala 828 5451 192800 191197 2024-11-18T09:30:18Z Lee 19 ප්‍රත්‍ය ස්වරූප 192800 Scribunto text/plain local p = {} -- p stands for package local m_strutils = require("Module:string utilities") -- ගැටළු සහගත වචන දැනට පරීක්ෂාවට ලක් කෙරෙයි local words_with_issues = { "female", "male", } local english2sinhala = {} -- තරමක් දිග යෙදුම් english2sinhala["an alternative spelling "] = "වෛකල්පික අක්ෂර වින්‍යාසයක් " -- විශේෂ english2sinhala["related-to"] = "ආශ්‍රිත" english2sinhala["name"] = "නාම" english2sinhala["set"] = "කුලක" english2sinhala["type"] = "වර්ග" english2sinhala["grouping"] = "කාණ්ඩ" -- සැකිලි ප්‍රවර්ග සඳහා අවශ්‍ය දත්ත english2sinhala["data"] = "දත්ත" english2sinhala["Data"] = "දත්ත" english2sinhala["Administration"] = "පරිපාලන" english2sinhala["Archive"] = "ලේඛනාරක්ෂණ" english2sinhala["Audio"] = "ශ්‍රව්‍ය සහාය" -- english2sinhala["data modules"] = "දත්ත මොඩියුල" english2sinhala["Sortkey-generating"] = "සෝට්කී-ජනක" -- english2sinhala["Etymology templates"] = "නිරුක්ති සැකිලි" english2sinhala["Translation templates"] = "පරිවර්තන සැකිලි" english2sinhala["Appendix templates"] = "උපග්‍රන්ථ සැකිලි" -- english2sinhala["symbols"] = "සංකේත" english2sinhala["clipping"] = "ක්ලිප් කිරීම" -- english2sinhala["morphemes"] = "පදාණු" english2sinhala["morpheme"] = "පදාණුව" -- english2sinhala["imperative"] = "විධි ක්‍රියා" -- english2sinhala["third-person"] = "අන්‍ය පුරුෂ" english2sinhala["third person"] = "අන්‍ය පුරුෂ" -- english2sinhala["gender"] = "ලිංග භේදය" english2sinhala["feminine"] = "ස්ත්‍රී ලිංග" english2sinhala["masculine"] = "පුරුෂ ලිංග" english2sinhala["female"] = "ස්ත්‍රී ලිංග" english2sinhala["male"] = "පුරුෂ ලිංග" english2sinhala["unknown-gender"] = "ලිංග භේදය නොදන්නා" english2sinhala["female given names"] = "ස්ත්‍රී ලිංග පුද්ගල නාම" english2sinhala["male given names"] = "පුරුෂ ලිංග පුද්ගල නාම" -- 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["continent"] = "මහාද්වීපය" english2sinhala["Continent"] = "මහාද්වීපය" english2sinhala["continents"] = "මහාද්වීප" english2sinhala["Continents"] = "මහාද්වීප" english2sinhala["island"] = "දූපත" english2sinhala["country"] = "රට" english2sinhala["language"] = "භාෂාව" english2sinhala["Language"] = "භාෂාව" english2sinhala["languages"] = "භාෂා" english2sinhala["Languages"] = "භාෂා" english2sinhala["surname"] = "පෙළපත් නාමය" english2sinhala["surnames"] = "පෙළපත් නාම" english2sinhala["proper noun"] = "සංඥා නාම පදය" english2sinhala["proper nouns"] = "සංඥා නාම පද" english2sinhala["abbreviation"] = "කෙටි යෙදුම" english2sinhala["abbreviations"] = "කෙටි යෙදුම්" -- පහත කොටසේ "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["inflection"] = "වරනැගීම" english2sinhala["Inflection"] = "වරනැගීම" english2sinhala["inflections"] = "වරනැගීම්" english2sinhala["Inflections"] = "වරනැගීම්" english2sinhala["transliteration"] = "අක්ෂර පරිවර්තනය" english2sinhala["Transliteration"] = "අක්ෂර පරිවර්තනය" english2sinhala["transliterations"] = "අක්ෂර පරිවර්තන" english2sinhala["Transliterations"] = "අක්ෂර පරිවර්තන" -- english2sinhala["entry name-generating"] = "ප්‍රවේශ නාම-ජනනය" -- english2sinhala["Entry name-generating"] = "ප්‍රවේශ නාම-ජනනය" -- english2sinhala["entry name-generatings"] = "ප්‍රවේශ නාම-ජනක" -- english2sinhala["Entry name-generatings"] = "ප්‍රවේශ නාම-ජනක" english2sinhala["Religion"] = "ආගම" english2sinhala["Buddhism"] = "බුදු දහම" -- අක්ෂරක්‍රම english2sinhala["Devanagari"] = "දේවනාගරි" english2sinhala["Brahmi"] = "බ්‍රාහ්මී" english2sinhala["Braille"] = "බ්‍රේල්" english2sinhala["Han"] = "හන්" english2sinhala["Hiragana"] = "හිරගනා" english2sinhala["Katakana"] = "කතකනා" -- භාෂා english2sinhala["Amharic"] = "ඇම්හාරික්" english2sinhala["Ancient Greek"] = "පුරාතන ග්‍රීක" english2sinhala["Arabic"] = "අරාබි" english2sinhala["Armenian"] = "ආමේනියානු" english2sinhala["Aymara"] = "අයිමාරා" english2sinhala["Azerbaijani"] = "අසර්බයිජානි" english2sinhala["Okinawan"] = "ඔකිනවා" 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["Middle English"] = "මධ්‍යකාලීන ඉංග්‍රීසි" english2sinhala["Esperanto"] = "එස්පෙරාන්තො" english2sinhala["Estonian"] = "එස්තෝනියානු" english2sinhala["Finnish"] = "ෆින්ලන්ත" english2sinhala["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["Latin"] = "ලතින්" english2sinhala["Malay"] = "මැලේ" english2sinhala["Malayalam"] = "මලයාලම්" english2sinhala["Mandarin"] = "මැන්ඩරීන්" english2sinhala["Manx"] = "මැන්ක්ස්" english2sinhala["Marathi"] = "මරාථි" english2sinhala["Mongolian"] = "මොංගෝලියානු" english2sinhala["Norwegian"] = "නෝර්වීජියානු" english2sinhala["Pali"] = "පාලි" english2sinhala["Persian"] = "පර්සියානු" english2sinhala["Polish"] = "පෝලන්ත" english2sinhala["Portuguese"] = "පෘතුගීසි" english2sinhala["Prakrit"] = "ප්‍රාකෘත" english2sinhala["Proto-Indo-European"] = "ප්‍රොටෝ-ඉන්දු-යුරෝපීය" english2sinhala["Quechua"] = "ක්වෙච්වා" english2sinhala["Romanian"] = "රුමේනියානු" english2sinhala["Russian"] = "රුසියානු" english2sinhala["Sanskrit"] = "සංස්කෘත" english2sinhala["Scottish Gaelic"] = "ස්කොට්ස් ගේලික්" english2sinhala["Sindhi"] = "සින්ධි" english2sinhala["Sinhalese"] = "සිංහල" english2sinhala["Somali"] = "සෝමාලි" english2sinhala["Spanish"] = "ස්පාඤ්ඤ" english2sinhala["Sundanese"] = "සුන්ඩා" english2sinhala["Swedish"] = "ස්වීඩන්" 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["Afghanistan"] = "ඇෆ්ගනිස්ථානය" english2sinhala["Africa"] = "අප්‍රිකාව" english2sinhala["America"] = "ඇමෙරිකාව" english2sinhala["Armenia"] = "ආමේනියාව" english2sinhala["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["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["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["ප්‍රවේශ නාම-ජනනය"] = "ප්‍රවේශ නාම-ජනක" function p.hello( frame ) return "Hello, world!" end function p.sinhala_adjective( word ) local sinhala_word = p.sinhala( word ) -- සටහන: නාම විශේෂණය සඳහා කළ යුතු විශේෂ යමක් පවතියි ද? -- බොහෝවිට නාම විශේෂණ ස්වරූපය වන්නේ බහු වචනය නේ ද? local plural = p.search_plural( sinhala_word ) if plural ~= nil then sinhala_word = plural end -- return sinhala_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 local plural_word = singular2plural[word] -- දත්ත ලැයිස්තුව මුලින්ම පරික්ෂාකර බලන්න if plural_word ~= nil then 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 -- නොදන්නා වචන සඳහා ඉංග්‍රීසි ආකාරයේ වචනයම ලබා දෙන්න return m_strutils.pluralize(word) -- if word:find("x$") then -- return word .. "es" -- else -- return word .. "s" -- end end return word end return p mdrnjwaz08yfnpwg0tkswrirpfy0sms 192807 192800 2024-11-18T09:38:24Z Lee 19 [[:ප්‍රවර්ගය:ඉංග්‍රීසි ප්‍රත්‍ය ස්වරූප]] සඳහා සහාය 192807 Scribunto text/plain local p = {} -- p stands for package local m_strutils = require("Module:string utilities") -- ගැටළු සහගත වචන දැනට පරීක්ෂාවට ලක් කෙරෙයි local words_with_issues = { "female", "male", } local english2sinhala = {} -- තරමක් දිග යෙදුම් english2sinhala["an alternative spelling "] = "වෛකල්පික අක්ෂර වින්‍යාසයක් " -- විශේෂ english2sinhala["related-to"] = "ආශ්‍රිත" english2sinhala["name"] = "නාම" english2sinhala["set"] = "කුලක" english2sinhala["type"] = "වර්ග" english2sinhala["grouping"] = "කාණ්ඩ" -- සැකිලි ප්‍රවර්ග සඳහා අවශ්‍ය දත්ත english2sinhala["data"] = "දත්ත" english2sinhala["Data"] = "දත්ත" english2sinhala["Administration"] = "පරිපාලන" english2sinhala["Archive"] = "ලේඛනාරක්ෂණ" english2sinhala["Audio"] = "ශ්‍රව්‍ය සහාය" -- english2sinhala["data modules"] = "දත්ත මොඩියුල" english2sinhala["Sortkey-generating"] = "සෝට්කී-ජනක" -- english2sinhala["Etymology templates"] = "නිරුක්ති සැකිලි" english2sinhala["Translation templates"] = "පරිවර්තන සැකිලි" english2sinhala["Appendix templates"] = "උපග්‍රන්ථ සැකිලි" -- english2sinhala["symbols"] = "සංකේත" english2sinhala["clipping"] = "ක්ලිප් කිරීම" english2sinhala["morphemes"] = "පදාණු" english2sinhala["morpheme"] = "පදාණුව" -- english2sinhala["imperative"] = "විධි ක්‍රියා" -- english2sinhala["third-person"] = "අන්‍ය පුරුෂ" english2sinhala["third person"] = "අන්‍ය පුරුෂ" -- english2sinhala["gender"] = "ලිංග භේදය" english2sinhala["feminine"] = "ස්ත්‍රී ලිංග" english2sinhala["masculine"] = "පුරුෂ ලිංග" english2sinhala["female"] = "ස්ත්‍රී ලිංග" english2sinhala["male"] = "පුරුෂ ලිංග" english2sinhala["unknown-gender"] = "ලිංග භේදය නොදන්නා" english2sinhala["female given names"] = "ස්ත්‍රී ලිංග පුද්ගල නාම" english2sinhala["male given names"] = "පුරුෂ ලිංග පුද්ගල නාම" -- 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["continent"] = "මහාද්වීපය" english2sinhala["Continent"] = "මහාද්වීපය" english2sinhala["continents"] = "මහාද්වීප" english2sinhala["Continents"] = "මහාද්වීප" english2sinhala["island"] = "දූපත" english2sinhala["country"] = "රට" english2sinhala["language"] = "භාෂාව" english2sinhala["Language"] = "භාෂාව" english2sinhala["languages"] = "භාෂා" english2sinhala["Languages"] = "භාෂා" english2sinhala["surname"] = "පෙළපත් නාමය" english2sinhala["surnames"] = "පෙළපත් නාම" english2sinhala["proper noun"] = "සංඥා නාම පදය" english2sinhala["proper nouns"] = "සංඥා නාම පද" english2sinhala["abbreviation"] = "කෙටි යෙදුම" english2sinhala["abbreviations"] = "කෙටි යෙදුම්" -- පහත කොටසේ "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["inflection"] = "වරනැගීම" english2sinhala["Inflection"] = "වරනැගීම" english2sinhala["inflections"] = "වරනැගීම්" english2sinhala["Inflections"] = "වරනැගීම්" english2sinhala["transliteration"] = "අක්ෂර පරිවර්තනය" english2sinhala["Transliteration"] = "අක්ෂර පරිවර්තනය" english2sinhala["transliterations"] = "අක්ෂර පරිවර්තන" english2sinhala["Transliterations"] = "අක්ෂර පරිවර්තන" -- english2sinhala["entry name-generating"] = "ප්‍රවේශ නාම-ජනනය" -- english2sinhala["Entry name-generating"] = "ප්‍රවේශ නාම-ජනනය" -- english2sinhala["entry name-generatings"] = "ප්‍රවේශ නාම-ජනක" -- english2sinhala["Entry name-generatings"] = "ප්‍රවේශ නාම-ජනක" english2sinhala["Religion"] = "ආගම" english2sinhala["Buddhism"] = "බුදු දහම" -- අක්ෂරක්‍රම english2sinhala["Devanagari"] = "දේවනාගරි" english2sinhala["Brahmi"] = "බ්‍රාහ්මී" english2sinhala["Braille"] = "බ්‍රේල්" english2sinhala["Han"] = "හන්" english2sinhala["Hiragana"] = "හිරගනා" english2sinhala["Katakana"] = "කතකනා" -- භාෂා english2sinhala["Amharic"] = "ඇම්හාරික්" english2sinhala["Ancient Greek"] = "පුරාතන ග්‍රීක" english2sinhala["Arabic"] = "අරාබි" english2sinhala["Armenian"] = "ආමේනියානු" english2sinhala["Aymara"] = "අයිමාරා" english2sinhala["Azerbaijani"] = "අසර්බයිජානි" english2sinhala["Okinawan"] = "ඔකිනවා" 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["Middle English"] = "මධ්‍යකාලීන ඉංග්‍රීසි" english2sinhala["Esperanto"] = "එස්පෙරාන්තො" english2sinhala["Estonian"] = "එස්තෝනියානු" english2sinhala["Finnish"] = "ෆින්ලන්ත" english2sinhala["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["Latin"] = "ලතින්" english2sinhala["Malay"] = "මැලේ" english2sinhala["Malayalam"] = "මලයාලම්" english2sinhala["Mandarin"] = "මැන්ඩරීන්" english2sinhala["Manx"] = "මැන්ක්ස්" english2sinhala["Marathi"] = "මරාථි" english2sinhala["Mongolian"] = "මොංගෝලියානු" english2sinhala["Norwegian"] = "නෝර්වීජියානු" english2sinhala["Pali"] = "පාලි" english2sinhala["Persian"] = "පර්සියානු" english2sinhala["Polish"] = "පෝලන්ත" english2sinhala["Portuguese"] = "පෘතුගීසි" english2sinhala["Prakrit"] = "ප්‍රාකෘත" english2sinhala["Proto-Indo-European"] = "ප්‍රොටෝ-ඉන්දු-යුරෝපීය" english2sinhala["Quechua"] = "ක්වෙච්වා" english2sinhala["Romanian"] = "රුමේනියානු" english2sinhala["Russian"] = "රුසියානු" english2sinhala["Sanskrit"] = "සංස්කෘත" english2sinhala["Scottish Gaelic"] = "ස්කොට්ස් ගේලික්" english2sinhala["Sindhi"] = "සින්ධි" english2sinhala["Sinhalese"] = "සිංහල" english2sinhala["Somali"] = "සෝමාලි" english2sinhala["Spanish"] = "ස්පාඤ්ඤ" english2sinhala["Sundanese"] = "සුන්ඩා" english2sinhala["Swedish"] = "ස්වීඩන්" 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["Afghanistan"] = "ඇෆ්ගනිස්ථානය" english2sinhala["Africa"] = "අප්‍රිකාව" english2sinhala["America"] = "ඇමෙරිකාව" english2sinhala["Armenia"] = "ආමේනියාව" english2sinhala["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["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["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["ප්‍රවේශ නාම-ජනනය"] = "ප්‍රවේශ නාම-ජනක" function p.hello( frame ) return "Hello, world!" end function p.sinhala_adjective( word ) local sinhala_word = p.sinhala( word ) -- සටහන: නාම විශේෂණය සඳහා කළ යුතු විශේෂ යමක් පවතියි ද? -- බොහෝවිට නාම විශේෂණ ස්වරූපය වන්නේ බහු වචනය නේ ද? local plural = p.search_plural( sinhala_word ) if plural ~= nil then sinhala_word = plural end -- return sinhala_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 local plural_word = singular2plural[word] -- දත්ත ලැයිස්තුව මුලින්ම පරික්ෂාකර බලන්න if plural_word ~= nil then 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 -- නොදන්නා වචන සඳහා ඉංග්‍රීසි ආකාරයේ වචනයම ලබා දෙන්න return m_strutils.pluralize(word) -- if word:find("x$") then -- return word .. "es" -- else -- return word .. "s" -- end end return word end return p 57frruq2ivvr89d3cqbqprcaswozhky 192861 192807 2024-11-18T10:36:08Z Lee 19 සරලීකෘත 192861 Scribunto text/plain local p = {} -- p stands for package local m_strutils = require("Module:string utilities") -- ගැටළු සහගත වචන දැනට පරීක්ෂාවට ලක් කෙරෙයි local words_with_issues = { "female", "male", } local english2sinhala = {} -- තරමක් දිග යෙදුම් english2sinhala["an alternative spelling "] = "වෛකල්පික අක්ෂර වින්‍යාසයක් " -- විශේෂ english2sinhala["the simplified"] = "සරලීකෘත" english2sinhala["related-to"] = "ආශ්‍රිත" english2sinhala["name"] = "නාම" english2sinhala["set"] = "කුලක" english2sinhala["type"] = "වර්ග" english2sinhala["grouping"] = "කාණ්ඩ" -- සැකිලි ප්‍රවර්ග සඳහා අවශ්‍ය දත්ත english2sinhala["data"] = "දත්ත" english2sinhala["Data"] = "දත්ත" english2sinhala["Administration"] = "පරිපාලන" english2sinhala["Archive"] = "ලේඛනාරක්ෂණ" english2sinhala["Audio"] = "ශ්‍රව්‍ය සහාය" -- english2sinhala["data modules"] = "දත්ත මොඩියුල" english2sinhala["Sortkey-generating"] = "සෝට්කී-ජනක" -- english2sinhala["Etymology templates"] = "නිරුක්ති සැකිලි" english2sinhala["Translation templates"] = "පරිවර්තන සැකිලි" english2sinhala["Appendix templates"] = "උපග්‍රන්ථ සැකිලි" -- english2sinhala["symbols"] = "සංකේත" english2sinhala["clipping"] = "ක්ලිප් කිරීම" english2sinhala["morphemes"] = "පදාණු" english2sinhala["morpheme"] = "පදාණුව" -- english2sinhala["imperative"] = "විධි ක්‍රියා" -- english2sinhala["third-person"] = "අන්‍ය පුරුෂ" english2sinhala["third person"] = "අන්‍ය පුරුෂ" -- english2sinhala["gender"] = "ලිංග භේදය" english2sinhala["feminine"] = "ස්ත්‍රී ලිංග" english2sinhala["masculine"] = "පුරුෂ ලිංග" english2sinhala["female"] = "ස්ත්‍රී ලිංග" english2sinhala["male"] = "පුරුෂ ලිංග" english2sinhala["unknown-gender"] = "ලිංග භේදය නොදන්නා" english2sinhala["female given names"] = "ස්ත්‍රී ලිංග පුද්ගල නාම" english2sinhala["male given names"] = "පුරුෂ ලිංග පුද්ගල නාම" -- 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["continent"] = "මහාද්වීපය" english2sinhala["Continent"] = "මහාද්වීපය" english2sinhala["continents"] = "මහාද්වීප" english2sinhala["Continents"] = "මහාද්වීප" english2sinhala["island"] = "දූපත" english2sinhala["country"] = "රට" english2sinhala["language"] = "භාෂාව" english2sinhala["Language"] = "භාෂාව" english2sinhala["languages"] = "භාෂා" english2sinhala["Languages"] = "භාෂා" english2sinhala["surname"] = "පෙළපත් නාමය" english2sinhala["surnames"] = "පෙළපත් නාම" english2sinhala["proper noun"] = "සංඥා නාම පදය" english2sinhala["proper nouns"] = "සංඥා නාම පද" english2sinhala["abbreviation"] = "කෙටි යෙදුම" english2sinhala["abbreviations"] = "කෙටි යෙදුම්" -- පහත කොටසේ "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["inflection"] = "වරනැගීම" english2sinhala["Inflection"] = "වරනැගීම" english2sinhala["inflections"] = "වරනැගීම්" english2sinhala["Inflections"] = "වරනැගීම්" english2sinhala["transliteration"] = "අක්ෂර පරිවර්තනය" english2sinhala["Transliteration"] = "අක්ෂර පරිවර්තනය" english2sinhala["transliterations"] = "අක්ෂර පරිවර්තන" english2sinhala["Transliterations"] = "අක්ෂර පරිවර්තන" -- english2sinhala["entry name-generating"] = "ප්‍රවේශ නාම-ජනනය" -- english2sinhala["Entry name-generating"] = "ප්‍රවේශ නාම-ජනනය" -- english2sinhala["entry name-generatings"] = "ප්‍රවේශ නාම-ජනක" -- english2sinhala["Entry name-generatings"] = "ප්‍රවේශ නාම-ජනක" english2sinhala["Religion"] = "ආගම" english2sinhala["Buddhism"] = "බුදු දහම" -- අක්ෂරක්‍රම english2sinhala["Devanagari"] = "දේවනාගරි" english2sinhala["Brahmi"] = "බ්‍රාහ්මී" english2sinhala["Braille"] = "බ්‍රේල්" english2sinhala["Han"] = "හන්" english2sinhala["Hiragana"] = "හිරගනා" english2sinhala["Katakana"] = "කතකනා" -- භාෂා english2sinhala["Amharic"] = "ඇම්හාරික්" english2sinhala["Ancient Greek"] = "පුරාතන ග්‍රීක" english2sinhala["Arabic"] = "අරාබි" english2sinhala["Armenian"] = "ආමේනියානු" english2sinhala["Aymara"] = "අයිමාරා" english2sinhala["Azerbaijani"] = "අසර්බයිජානි" english2sinhala["Okinawan"] = "ඔකිනවා" 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["Middle English"] = "මධ්‍යකාලීන ඉංග්‍රීසි" english2sinhala["Esperanto"] = "එස්පෙරාන්තො" english2sinhala["Estonian"] = "එස්තෝනියානු" english2sinhala["Finnish"] = "ෆින්ලන්ත" english2sinhala["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["Latin"] = "ලතින්" english2sinhala["Malay"] = "මැලේ" english2sinhala["Malayalam"] = "මලයාලම්" english2sinhala["Mandarin"] = "මැන්ඩරීන්" english2sinhala["Manx"] = "මැන්ක්ස්" english2sinhala["Marathi"] = "මරාථි" english2sinhala["Mongolian"] = "මොංගෝලියානු" english2sinhala["Norwegian"] = "නෝර්වීජියානු" english2sinhala["Pali"] = "පාලි" english2sinhala["Persian"] = "පර්සියානු" english2sinhala["Polish"] = "පෝලන්ත" english2sinhala["Portuguese"] = "පෘතුගීසි" english2sinhala["Prakrit"] = "ප්‍රාකෘත" english2sinhala["Proto-Indo-European"] = "ප්‍රොටෝ-ඉන්දු-යුරෝපීය" english2sinhala["Quechua"] = "ක්වෙච්වා" english2sinhala["Romanian"] = "රුමේනියානු" english2sinhala["Russian"] = "රුසියානු" english2sinhala["Sanskrit"] = "සංස්කෘත" english2sinhala["Scottish Gaelic"] = "ස්කොට්ස් ගේලික්" english2sinhala["Sindhi"] = "සින්ධි" english2sinhala["Sinhalese"] = "සිංහල" english2sinhala["Somali"] = "සෝමාලි" english2sinhala["Spanish"] = "ස්පාඤ්ඤ" english2sinhala["Sundanese"] = "සුන්ඩා" english2sinhala["Swedish"] = "ස්වීඩන්" 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["Afghanistan"] = "ඇෆ්ගනිස්ථානය" english2sinhala["Africa"] = "අප්‍රිකාව" english2sinhala["America"] = "ඇමෙරිකාව" english2sinhala["Armenia"] = "ආමේනියාව" english2sinhala["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["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["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["ප්‍රවේශ නාම-ජනනය"] = "ප්‍රවේශ නාම-ජනක" function p.hello( frame ) return "Hello, world!" end function p.sinhala_adjective( word ) local sinhala_word = p.sinhala( word ) -- සටහන: නාම විශේෂණය සඳහා කළ යුතු විශේෂ යමක් පවතියි ද? -- බොහෝවිට නාම විශේෂණ ස්වරූපය වන්නේ බහු වචනය නේ ද? local plural = p.search_plural( sinhala_word ) if plural ~= nil then sinhala_word = plural end -- return sinhala_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 local plural_word = singular2plural[word] -- දත්ත ලැයිස්තුව මුලින්ම පරික්ෂාකර බලන්න if plural_word ~= nil then 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 -- නොදන්නා වචන සඳහා ඉංග්‍රීසි ආකාරයේ වචනයම ලබා දෙන්න return m_strutils.pluralize(word) -- if word:find("x$") then -- return word .. "es" -- else -- return word .. "s" -- end end return word end return p 9dpy17km86hbnpvi2af1ynijkj38jgt සැකිල්ල:auto cat 10 5989 192621 182307 2024-11-11T19:22:31Z en>Theknightwho 0 [[Module:auto cat]] merged into [[Module:category tree]]. 192621 wikitext text/x-wiki {{safesubst:<noinclude/>#invoke:category tree|show}}<noinclude>{{documentation}}</noinclude> j6zycuhqgb1iu335vq2dprah00g58ws 192622 192621 2024-11-18T03:59:11Z Lee 19 [[:en:Template:auto_cat]] වෙතින් එක් සංශෝධනයක් 192621 wikitext text/x-wiki {{safesubst:<noinclude/>#invoke:category tree|show}}<noinclude>{{documentation}}</noinclude> j6zycuhqgb1iu335vq2dprah00g58ws සැකිල්ල:auto cat/documentation 10 6063 192623 182309 2024-11-11T19:45:14Z en>Theknightwho 0 192623 wikitext text/x-wiki {{documentation subpage}} {{uses lua|Module:category tree}} [[File:Cat on a civic.jpg|thumb|Auto cat]] This template is used on category pages to automatically add a [[:Category:Category boilerplate templates|category boilerplate template]]. It deciphers the category name and transcludes the correct template with the correct parameters. No parameters are needed in most cases. A few categories have optional or required parameters to help out the categorization; see below. '''Note: all categories should now be handled by {{tl|auto cat}}. See [[Module:category tree/poscatboiler/data/documentation]] for more information, and for specifics regarding the category tree.''' Most categories have an '''Edit category data''' button in the upper right that takes you directly to the module that implements the category. To more easily add this template, place {{code|js|importScript('User:Erutuon/addAutoCat.js');}} in your [[Special:MyPage/common.js|common.js]]. This will add buttons directly below the first heading. Click them to add the template and save, or add the template and preview. ==Parameters== Some categories allow or require parameters to {{temp|auto cat}} to help out categorization. ===Affix categories=== These are categories are categories such as [[:Category:Latin terms suffixed with -inus]] and [[:Category:Japanese terms prefixed with 真っ]]. The types of affixes currently recognized are [[prefix]], [[suffix]], [[infix]], [[interfix]], [[circumfix]] and [[transfix]]. For these categories, the following parameters are allowed (none are required): ;{{para|alt}} : The affix with diacritics. Only needed for languages with extra diacritics in their headwords (e.g. Latin, Russian, Arabic and Old English), and only if those diacritics are present. For example, for [[:Category:Latin terms suffixed with -inus]], specify {{temp|auto cat|alt=-īnus}} so that the suffix in the category description, and the breadcrumb at the top of the page, are displayed as {{m|la|-īnus}}, with a macron. ;{{para|sort}} : The sort key. Mostly only needed for Japanese. For example, for [[:Category:Japanese terms prefixed with 真っ]], use {{temp|auto cat|sort=まっ}} so that the page is properly sorted in its parent category [[:Category:Japanese terms by prefix]]. ;{{para|tr}} : Manual transliteration. Occasionally needed for non-Latin-script languages if the automatic transliteration is incorrect or if the language doesn't have automatic transliteration (e.g. Persian and Hebrew). ;{{para|sc}} : Script code. Almost never needed. ===Language categories=== These are categories such as [[:Category:French language]] and [[:Category:Proto-Indo-European language]]. These are the root categories for the various languages represented in Wiktionary. These categories have '''required''' parameters specifying the country or countries where the language is spoken, as well as additional optional parameters: ;{{para|1}}, {{para|2}}, {{para|3}}, ... : The country or countries where the language is spoken. See [[:Category:Languages by country]] and its subcategories. Make sure to include the word <code>the</code> if warranted, e.g. <code>the Philippines</code> or <code>the United States</code>. At least one country is '''required''' unless the language is reconstructed (e.g. [[:Category:Proto-Indo-European language|Proto-Indo-European]]) or constructed/artificial (e.g. [[:Category:Esperanto language|Esperanto]]). If the country is truly unknown, use the value <code>UNKNOWN</code>. ; {{para|extinct|1}} : Specify that this language is extinct (no longer spoken). ; {{para|setwiki}} : The name of the Wikipedia article about the language to link to. If omitted, the Wikipedia article in the language's wikidata entry or the language's category name will be used (e.g. <code>French language</code>). Specify {{para|setwiki|-}} to show no Wikipedia article link. Preferably, the wikidata entry for the language should be added to the language's data file rather than specified manually in this template. ; {{para|setwikt}} : The code of the language's Wiktionary edition. If omitted, the Wiktionary language code for the language will be used. Specify {{para|setwikt|-}} to show no Wiktionary edition link. ; {{para|setsister}} : The name of the category on Wikimedia Commons with files related to the language. If omitted, the category name will be used (e.g. <code>French language</code>). Specify {{para|setsister|-}} to show no Commons category link. ; {{para|entryname}} : The English term on this Wiktionary to link to. If omitted, the canonical name of the language will be used (e.g. <code>French</code>). Specify {{para|entryname|-}} to show no entry link. ===Lect categories=== These are categories that refer to regional, temporal and sociolectal varieties of languages such as [[:Category:Latin American Spanish]] (regional), [[:Category:Early Modern English]] (temporal) and [[:Category:Classical Persian]] (sociolectal), including those that don't have the containing language in their name (e.g. [[:Category:Provençal]] and [[:Category:Dari]]) or have only part of the containing language in their name (e.g. [[:Category:Walser German]], which is a variety of the [[:Category:Alemannic German language|Alemannic German language]] and not a variety of [[:Category:German language|German]]). Because of the diversity of naming conventions, {{tl|auto cat}} won't recognize or process such categories unless {{para|lect|1}} is given. The handler in {{tl|auto cat}} that handles such categories will attempt to infer the relevant properties of the lect in various ways: # It will infer some default properties from the name of the lect itself. For example [[:Category:Jakarta Indonesian]] is assumed to be a variety of Indonesian and spoken in [[Jakarta]]. # It will look for a language-specific label that categorizes into the category in question. ''If and only if'' the label definition of that label has a {{cd|parent}} field, the relevant fields of the label definition will be used to establish the lect's properties. '''This is now the preferred method of specifying a lect's properties, because it centralizes all information about the lect in the language-specific label modules.''' As an example, consider the category [[:Category:Javanese Indonesian]]. The Indonesian label data module [[Module:labels/data/lang/id]] defines a label {{cd|Java}} that has the setting {{cd|1=regional_categories = "Javanese"}} (causing that label to categorize into [[:Category:Javanese Indonesian]]) and also has a setting {{cd|1=parent = "Indonesia"}} (indicating that the label is a lect whose parent lect is defined by the {{cd|Indonesia}} label). As a result of the {{cd|parent}} setting, the properties of the {{cd|Java}} label will be taken from the fields specified for this label, such as {{cd|1=prep = "on"}} and {{cd|1=region = "the island of [[Java]]"}}, which together cause the description of the category to read ''Terms or senses in Indonesian as spoken on the island of [[Java]]''. (See below for fields like {{cd|prep}} and {{cd|region}}.) The value of the {{cd|parent}} field, {{cd|Indonesia}}, will cause the category associated with that label ([[:Category:Indonesian Indonesian]]) to be the parent category of [[:Category:Javanese Indonesian]]. Top-level lects should use {{cd|1=parent = true}}, which puts them directly under e.g. [[:Category:Regional Indonesian]] (unless {{cd|1=noreg = true}} is also given, in which case they go under the higher-level category [[:Category:Varieties of Indonesian]]; non-regional lects such as [[:Category:Classical Indonesian]] and [[:Category:Prokem Indonesian]] should use this). '''NOTE:''' The value of the {{cd|parent}} field is a ''label'', not a category. Labels and categories do not have to match exactly in name (cf. the label {{cd|Java}} vs. the corresponding category [[:Category:Javanese Indonesian]], and the label {{cd|Indonesia}} vs. the corresponding category [[:Category:Indonesian Indonesian]]). However, if they do not match, the connection between them should still be clear. # It will take properties from parameters directly specified to {{tl|auto cat}}. Generally, the same recognized parameters to {{tl|auto cat}} (described below) have the same names and semantics as the fields in label definitions that control lect properties. In the above list, properties specified lower down override those specified higher-up. In other words, default properties inferred from the name itself are overridden by properties derived from a lect label that categorizes into the category in question, which are in turn overridden by properties directly specified by {{tl|auto cat}} parameters. The following parameters are recognized to {{tl|auto cat}}, which are listed along with the corresponding fields in the lect label definition: {|class="wikitable" ! {{tl|auto cat}} param !! Lect label field !! Definition |- | {{para|lect|1}} || {{cd|1=parent =}} | {{para|lect|1}} must be specified for {{tl|auto cat}} to process the category, and {{cd|1=parent =}} must be given for a label to be treated as a lect label (along with the fact that the label must categorize into the category in question). The value of {{cd|parent}} is either the containing lect label ('''not''' the category name) or {{lua|true}} if the lect is a top-level lect (its parent will be [[:Category:Regional LANG]] where <code>LANG</code> is the L2 language in question, or [[:Category:Varieties of LANG]] if the field {{cd|1=noreg = true}} is set). |- | {{para|1}} || {{cd|1=region =}} | English description of the location where the lect is spoken (for regional lects), the time period where the lect was spoken (for temporal lects) or the {{w|Register (sociolinguistics)|linguistic register}} of the lect (for sociolects). The text normally appears after the words "Terms or senses in LANGUAGE as spoken in", although both the verb ("spoken") and the preposition ("in") can be customized. Normally, the description will be linked using {{tl|l|en}}; use {{para|nolink|1}} to disable this (see below). If the description names a country (or in some cases a sub-country entity such as California), and a category named <code>Languages of <var>country</var></code> exists, the lect will automatically be categorized into this category. You can override the country or countries of the lect using {{para|country}}. If omitted, the default description is inferred from the lect name by subtracting the containing language (see {{para|cat}} and {{para|lang}} below). For example, for [[:Category:Texas German]], the containing language will be inferred as 'German', and after subtracting this, the default description becomes <code>Texas</code>. In some cases, this will be wrong, especially if the location is named in the lect using the adjectival form of the location, and the description must be given explicitly. For example, [[:Category:Puerto Rican Spanish]] will result in a default description <code>Puerto Rican</code> when it should be <code>Puerto Rico</code>. If it's not possible to match the containing language in the lect name, {{para|1}} must be specified or an error results (unless {{para|def}} or {{para|fulldef}} are given; see below). : If the description contains the string <code><country></code>, the countries in {{para|country}} will be substituted, comma-separated with "and" before the last one. See the examples below for an example of this. |- | {{para|cat}} || {{cd|1=parent =}} | The parent category. This is the first containing category listed at the bottom of the page and determines the trail of ''breadcrumbs'' displayed at the top of the page. This should be used to express containment relationships of regional and temporal lects. For example, [[:Category:Durham University English]] has [[:Category:Durham English]] as its parent, which in turn has [[:Category:Northumbrian English]] as its parent, which in turn has [[:Category:Northern England English]] as its parent, etc. For lect labels, the parent category is the regional or plain category that the parent label categorizes into. If the parent category is omitted, the default depends on the containing language, according to the following algorithm: :# The containing language is normally inferred from the lect's name by looking for the longest matching language suffix. This means, for example, that [[:Category:Kentish Middle English]] will have 'Middle English' as its containing language, not merely 'English'. The containing language can be an [[Wiktionary:Languages#Lects which appear only in etymology sections|etymology-only language]]; e.g. [[:Category:Southern Brazilian Portuguese]] has 'Brazilian Portuguese' (code <code>pt-BR</code>) as its containing language. It is also possible for the lect itself to be an etymology-only language (e.g. [[:Category:Brazilian Portuguese]] or [[:Category:Provençal]]). In this case, the containing language is that same etymology-only language; but these categories are treated specially. The containing language can also be manually set using {{para|lang}}; this is necessary when it cannot be inferred from the name (e.g. [[:Category:Issime Walser]] is a variety of etymology-only language [[:Category:Walser German]], but this language cannot be inferred because only part of its canonical name is found in the lect's name). :# If the containing language is an etymology-only language, the default parent category is simply the containing language's category, which has the same name as the containing language (e.g. [[:Category:Southern Brazilian Portuguese]] has [[:Category:Brazilian Portuguese]] as its default parent). :# If the containing language is a full language (i.e. not an etymology-only language), the default is normally named <code>Regional <var>language</var></code>, e.g. [[:Category:Regional English]] for [[:Category:European English]]. However, if {{para|noreg|1}} or the lect label field {{cd|1=noreg = true}} is set (to indicate a non-regional lect), the default will be named <code>Varieties of <var>language</var></code>, e.g. [[:Category:Early Modern English]] should set {{para|noreg|1}} and will have [[:Category:Varieties of English]] as its parent. :# If the lect '''is''' an etymology-only language, its default parent category will be based on the language's parent, using the above algorithm. For example, Brazilian Portuguese is an etymology-only language (code <code>pt-BR</code>) whose parent language is the full language Portuguese (code <code>pt</code>), and the default parent category of [[:Category:Brazilian Portuguese]] will be [[:Category:Regional Portuguese]]. (It is also possible for etymology-only languages to have other etymology-only languages as their parent; e.g. Contemporary Latin (code <code>la-con</code>) has etymology-only language New Latin (code <code>la-new</code>) as its parent, so the default parent category of [[:Category:Contemporary Latin]] will be [[:Category:New Latin]].) : NOTE: This category needs to be one that is handled internally using the "raw category" subsystem of the poscatboiler system (see [[Module:category tree/poscatboiler/data/documentation]]). In particular, this means it cannot be a language category (such as [[:Category:Mandarin lemmas]]), an umbrella category (such as [[:Category:Nouns by language]]) or a topic category (such as [[:Category:en:Universities]]). If this limitation is problematic, please contact [[User:Benwing2]]. |- | {{para|lang}} || (no equivalent) | Override the containing language. See {{para|cat}} above for more details. The containing language determines the default parent category (see above) and the default breadcrumb (see below). Note that if the lect directly names an etymology-only language, {{para|lang}} will automatically be inferred to be that language, and the corresponding language code(s) will be shown as part of the "additional" text following the category description. There is no equivalent because the containing language is taken from whatever language-specific label module the lect label was found in. Note that this does not have to match the name of the category. For example, all Chinese-related lect labels are centralized in [[Module:labels/data/lang/zh]], meaning that a category like [[:Category:Beijing Mandarin]] will have its lect label definition in [[Module:labels/data/lang/zh]], not in [[Module:labels/data/lang/cmn]] (corresponding to the [[:Category:Mandarin language]]), and this will not cause a problem. |- | {{para|breadcrumb}} || {{cd|1=breadcrumb =}} | Override the default breadcrumb displayed for the lect in the trail of breadcrumbs displayed at the top of the page. The default breadcrumb is normally the portion of the lect's name minus the containing language suffix. For example, [[:Category:Southern Brazilian Portuguese]] has containing language 'Brazilian Portuguese' and hence will have default breadcrumb <code>Southern</code>. If the containing language cannot be matched in the lect's name, the code will try matching any parent languages of the containing language. For example, [[:Category:Bahian Portuguese]] is a sublect of Brazilian Portuguese; if {{para|lang|pt-BR}} is given to set the containing language appropriately, the name 'Brazilian Portuguese' is not a suffix of 'Bahian Portuguese', but its parent language Portuguese is, so the default breadcrumb will be <code>Bahian</code>. If neither the containing language nor any parent language matches, the breadcrumb is based on the entire lect (e.g. for lects like [[:Category:Provençal]]). |- | {{para|noreg|1}} || {{cd|1=noreg = true}} | Indicate that this lect is not a regional lect. This is only necessary when {{para|cat}} isn't explicitly given to {{tl|auto cat}} (or equivalently, {{cd|1=parent = true}} is given in the lect label definition), as its only purpose is to control the default parent category. See {{para|cat}} and {{cd|1=parent =}} for more information. |- | {{para|nolink|1}} || {{cd|1=nolink = true}} | Don't automatically link the description in {{para|1}} using {{tl|l|en}}. This should be specified if {{para|1}} contains a description such as <code>from the 15th to the 18th centuries</code> that is not a Wiktionary entry, and does not have any links in it (either bare or specified using {{tl|l}}, {{tl|w}} or the like). (If the value of {{para|1}} has bare links in it, the effect of wrapping with {{tl|l|en}} is simply to convert those bare links into links pointing to the English section of the page in question, which is generally correct.) |- | {{para|verb}} || {{cd|1=verb =}} | Override the verb "spoken" that normally appears in the category's description. Example values are <code>formerly spoken</code> for an extinct lect; <code>chiefly spoken</code> for a lect mostly spoken in the location specified in {{para|1}} but also spoken elsewhere; <code>written</code> for a written-only lect; etc. |- | {{para|prep}} || {{cd|1=prep =}} | Override the preposition "in" that normally appears in the category's description. Example values are <code>on</code> if the location in {{para|1}} is an island; <code>by</code> if {{para|1}} specifies a group of people speaking the language (e.g. {{w|Tamil Brahmin}}s); etc. Use <code>-</code> to suppress the preposition (e.g. [[:Category:Overseas Chinese]] sets {{para|1|<nowiki>outside of [[China]] and [[Taiwan]]</nowiki>}} and {{para|prep|-}}). |- | {{para|def}} || {{cd|1=def =}} | Override the whole description following the words "Terms or senses in". The final period should not be included. |- | {{para|fulldef}} || {{cd|1=fulldef =}} | Override the entire description. The final period should not be included. |- | {{para|addl}} || {{cd|1=addl =}} | Specify additional text to display after the "Terms or senses in ..." category description, and before any category TOC (table of contents) bar. If this is given, include the final period. Note that if the lect directly names an etymology-only language, the additional text will automatically include the language code(s) of this etymology-only language. In such a case, any text specified using {{para|addl}} will follow this auto-added text. |- | {{para|othercat}} || {{cd|1=othercat =}} | Any additional category or categories to place the lect in. Separate multiple categories with a comma, without a following space (if a space follows the comma, it will not be considered a delimiter; this allows for embedded commas in categories, which are nearly always followed by a space). Unlike the value in {{para|cat}}, there are no restrictions on what sort of categories can be specified here. |- | {{para|country}} || {{cd|1=country =}} | Override the country or countries where the lect is spoken. See {{para|1}} above. Separate multiple countries with a comma without a following space, as with {{para|othercat}}. The purpose of this parameter is to add the lect to additional categories named <code>Languages of <var>country</var></code>, so that such categories will be populated with all lects spoken in the country. If the <code>Languages of <var>country</var></code> category does not already exist, the lect will not be added to it. As mentioned in {{para|1}} above, if {{para|1}} names a country and a corresponding <code>Languages of <var>country</var></code> category exists, the lect will automatically be added to it, so {{para|country}} does not need to be specified. As a rule, do not specify {{para|country}} for sub-country lects. For example, [[:Category:Texas English]] should not have {{para|country|the United States}} specified, since [[:Category:Texas English]] is a subcategory of [[:Category:American English]], which is in [[:Category:Languages of the United States]]. An exception is when a language is spoken in only a portion of a country. For example, [[:Category:Texas Silesian]] should have {{para|country|the United States}} specified because there is no lect named [[:Category:American Silesian]] (Silesian is not normally spoken in the United States except in Texas). |- | {{para|wp}} || {{cd|1=Wikipedia =}} | Wikipedia link to include on the lect's page. This can be a single Wikipedia page or a comma-separated list of such pages (without any space after the comma; if a space follows the comma, it will not be considered a delimiter, to allow for embedded commas in Wikipedia page names). A given Wikipedia page can be prefixed with a language code to link to a page in a non-English Wikipedia. For example, [[:Category:Japanese Korean]] specifies {{para|wp|Zainichi Korean language,ko:재일조선어}} to link to the {{w|Zainichi Korean language}} page on the English Wikipedia as well as the page {{w|lang=ko|재일조선어}} on the Korean Wikipedia. If the value of a Wikipedia page is <code>+</code>, <code>1</code>, <code>yes</code>, <code>true</code>, <code>on</code> or similar, the Wikipedia page will be taken from the lect name. Note that if the lect names an etymology-only language (e.g. [[:Category:Provençal]] or [[:Category:Brazilian Portuguese]]), the correct Wikipedia article for this lect will automatically be fetched based on the relevant Wikidata entry and added to the category page. To prevent this, specify an explicit value for {{para|wp}}; use <code>-</code>, <code>0</code>, <code>no</code>, <code>false</code>, <code>off</code> or similar if you don't want any Wikipedia page displayed. |- | {{para|type}} || {{cd|1=type =}} | Specify the type of lect (<code>extinct</code>, <code>extant</code>, <code>reconstructed</code>, <code>unattested</code> or <code>constructed</code>). Extinct lects are categorized into [[:Category:All extinct languages]]. Reconstructed lects are categorized into [[:Category:Reconstructed languages]]. Unattested lects are categorized into [[:Category:Unattested languages]]. Constructed lects are categorized into [[:Category:Constructed languages]]. In all cases an "additional text" message is placed indicating that the lect is (respectively) extinct, reconstructed, unattested or constructed. If the type is not given, it is inferred based on various factors (the type of the parent category, the type of the language that the lect belongs to, and whether the name of the category or language begins with "Proto-"). If no type can be inferred, it defaults to <code>extant</code>. |- | {{para|pagename}} || (no equivalent) | Act as if the pagename is the specified value rather than its actual value. Any inferred parameters will be based off of the specified value. This is useful for testing and demonstration purposes (e.g. in documentation pages). |} ====Examples==== 1. For [[:Category:Hong Kong English]], use: <code><nowiki>{{auto cat|lect=1|cat=Chinese English}}</nowiki></code> Here, {{para|1}} does not need to be specified because the inferred description "Hong Kong" is correct. The language is automatically inferred as English (and in any case, this is an etymology-only language with code <code>en-HK</code>, from which the language can be inferred). The parent category is set to [[:Category:Chinese English]] in place of the default [[:Category:Regional English]]. 2. For [[:Category:Durham University English]], use: <code><nowiki>{{auto cat|lect=1|prep=at|{{w|Durham University}} in [[Durham]]|cat=Durham English|othercat=en:Universities}}</nowiki></code> Here, we specify the region description in {{para|1}} but the language is automatically inferred as English. The parent category is set to [[:Category:Durham English]] in place of the default [[:Category:Regional English]] (which leads to a breadcrumb chain '''Regional » European » British » English » Northern England » Northumbrian » Durham » Durham University''' based on parent categories). [[:Category:en:Universities]] is added as an additional parent category. 3. For [[:Category:Limburgan-Ripuarian transitional dialects]], you could use: <code><nowiki>{{auto cat|lect=1|lang=gmw-cfr|the tri-state region of <country>|cat=Ripuarian Franconian|country=Belgium,the [[Netherlands]],Germany|wp=Southeast Limburgish dialect}}</nowiki></code> This is a more complex example. We have to set the language (Central Franconian) explicitly using {{para|lang}} because it is not inferrable from the name and the category does not refer to an etymology-only language. The description in {{para|1}} contains <code><country></code>, which substitutes the countries mentioned in {{para|country}} (which also cause the category to be added to [[:Category:Languages of Belgium]], [[:Category:Languages of the Netherlands]] and [[:Category:Languages of Germany]]. We also specify a parent category and Wikipedia page to link to. However, this is now handled in the preferred way, using properties of the lect label, as follows (as found in [[Module:labels/data/lang/gmw-cfr]]): <pre> labels["Limburgan Ripuarian"] = { region = "the tri-state region of <country>", country = "Belgium,the [[Netherlands]],Germany", aliases = {"Tri-state Limburgish", "Limburgan-Ripuarian", "Southeast Limburgish dialect", "Limburgan-Ripuarian Transitional Dialects"}, Wikipedia = "Southeast Limburgish dialect", plain_categories = "Limburgan-Ripuarian transitional dialects", parent = "Ripuarian", } </pre> 4. For [[:Category:Dobhashi]], use: <code><nowiki>{{auto cat|lect=1|lang=bn|def=a literary register of Bengali that was in common use from the 14th century to the 19th century|type=extinct|noreg=1|wp=1}}</nowiki></code> Here, we have to set the language (Bengali), and we override the definition after "Terms or senses in" using {{para|def}} in place of specifying {{para|1}}. Since this isn't a regional lect, we set {{para|noreg|1}} so the parent defaults to [[:Category:Bengali language]]. We set {{para|type|extinct}} because this lect is extinct and this cannot be inferred from the parent (which is not extinct). We also use {{para|wp|1}} to link to {{w|Dobhashi}} on Wikipedia. 5. For [[:Category:The BMAC substrate]], use: <code><nowiki>{{auto cat|lect=1|def=the [[substrate]](s) spoken in the {{w|Bactria–Margiana Archaeological Complex}} and possibly found as a {{w|substratum in Vedic Sanskrit}}|breadcrumb=BMAC}}</nowiki></code> Here, the language in question is an etymology-only substrate language whose actual name begins with a lowercase letter (<code>the BMAC substrate</code>), but the lect handler automatically takes care of the mismatch and recognizes the etymology-only language. The type is automatically inferred to be <code>unattested</code> based on it being a substrate language (this is done by checking the code; all substrate language codes begin with <code>qsb-</code>). Based on the type, the default parent is {{catlink|Substrate languages}}. We set a breadcrumb to override the default breadcrumb <code>The BMAC substrate</code>. ==="Languages of COUNTRY" categories=== These are categories such as [[:Category:Languages of India]] and [[:Category:Languages of the United States]]. These categories contain subcategories for all the languages and sublects spoken in the country in question. The following parameters are allowed (none are required): ;{{para|flagfile}} : An image file specifying the flag of the country in question, displayed in the upper right corner of the category page. The <code>File:</code> prefix should be omitted. An example is {{para|flagfile|Flag of Afghanistan (2013–2021).svg}} for Afghanistan. The default is <code>Flag of <var>country</var>.svg</code>; if this file does not exist, no flag is displayed. Use {{para|flagfile|-}} to cause the flag to be omitted even if the appropriate flag file is present. ;{{para|wp}} : A link to a Wikipedia article describing the languages of the country, such as {{w|Languages of Australia}}. Use {{para|wp|+}} or {{para|wp|1}} to specify that the name of the Wikipedia article is the same as the category name. ;{{para|commonscat}} : A link to a Commons category describing the languages of the country, such as [[Commons:Category:Languages of Chad]]. Use {{para|commonscat|+}} or {{para|commonscat|1}} to specify that the name of the Commons category is the same as the category name. ===User language competency categories=== These are categories such as [[:Category:User fr-4]] indicating that the user speaks French at near-native competency. The following parameters are allowed (none are required): ;{{para|text}} : The native-language text specifying a translation of the English text describing the competency of the users in the category in the language in question. An image file specifying the flag of the country in question, displayed in the upper right corner of the category page. The <code>File:</code> prefix should be omitted. An example is {{para|text|<nowiki>Ces utilisateurs parlent <<français>> à un niveau '''comparable à la langue maternelle'''.</nowiki>}} for the translation of "These users speak French at a near-native level." The text describing the level of competency should be boldfaced and the text specifying the language should be surrounded in double angle brackets, as shown. The language in double angle brackets will be boldfaced and linked to the higher-level user-competency category (e.g. [[:Category:User fr]]); in that category, double angle bracket text is linked to the language category (e.g. [[:Category:French language]]). If the text is omitted, the category is placed in two cleanup categories: [[:Category:Requests for translations in user-competency categories by language]] and [[:Category:Requests for translations in user-competency categories with ##-## users]] (e.g. [[:Category:Requests for translations in user-competency categories with 16-31 users]]). (The purpose of the latter categories is to segment the categories with missing text by number of users so that the ones with more users can be focused on first.) ;{{para|verb}} : The correct verb to use in the English text, in place of "speak" or (for sign languages) "communicate in". For example, protolanguages may prefer the verb "know". ;{{para|langname}} : Override the name of the language. This is chiefly used in user competency categories for invalid language codes (e.g. <code>eml</code> for Emiliano-Romagnol; on Wiktionary, this code is represented by two languages, Emilian with code <code>egl</code> and Romagnol with code <code>rgn</code>). Such categories should be actively eliminated by moving the users in them to the nearest valid Wiktionary code and then deleting the category when empty. ===Spelled-with categories=== These are categories such as [[:Category:English terms spelled with É]], [[:Category:Japanese terms spelled with 愛]] and [[:Category:Ladino terms derived from the Hebrew root ח־ב־ר]]. Normally, what follows <code>spelled with</code> is a single character, but occasionally multiple characters are used, as in [[:Category:Ladino terms derived from the Hebrew root ח־ב־ר]]. For these categories, the following parameters are allowed (none are required): ;{{para|sort}} : The sort key; used to sort the page in its parent category (e.g. [[:Category:Japanese terms by their individual characters]]). Only needed if the automatically generated sort key is wrong. Examples are [[:Category:Spanish terms spelled with Î]], which should use {{temp|auto cat|sort=I}}, and [[:Category:Japanese terms spelled with 衛]], which should use {{temp|auto cat|sort=行10}}. Japanese and Okinawan terms use [[Module:Hani-sortkey]] to generate the sort key, but currently this always generates Chinese sort keys, which in rare cases are wrong for Japanese (for example, the autogenerated sort key for [[:Category:Japanese terms spelled with 衛]] is <code>行09</code> instead of <code>行10</code>). ;{{para|char}} : If the category name has a descriptive word in it, such as <code>gershayim</code>, this should be the actual character referred to (in this case, {{temp|auto cat|char=״}}). Otherwise, it should be left out. ;{{para|context}}, {{para|context2}} : Provided for compatibility purposes, but unused. ===Japonic "terms spelled with KANJI read as READING" categories=== These are categories such as [[:Category:Japanese terms spelled with 学 read as がく]] and [[:Category:Okinawan terms spelled with 光 read as ふぃちゃい]]. These contain terms spelled with individual [[kanji]] read in particular ways (where the reading is written in [[hiragana]]). These categories have '''required''' parameters specifying the type(s) of reading(s): ;{{para|1}}, {{para|2}}, {{para|3}}, ... ('''required''') : The reading type(s); one or more of <code>kun</code>, <code>on</code>, <code>goon</code>, <code>kan'on</code>, <code>kan'yōon</code>, <code>tōon</code>, <code>sōon</code> or <code>nanori</code>. For example, [[:Category:Japanese terms spelled with 学 read as がく]] should use {{temp|auto cat|goon|kan'on}} and [[:Category:Okinawan terms spelled with 光 read as ふぃちゃい]] should use {{temp|auto cat|kun}}. The particular reading type(s) can often be found on the page dedicated to the kanji in question. ===Japonic "terms with KANJI replaced by daiyōji DAIYOJI" categories=== These are categories such as [[:Category:Japanese terms with 諒 replaced by daiyōji 了]]. These contain terms spelled with specific uncommon [[kanji]] that normally have that character replaced by another homophonic character (a [[daiyōji]]) chosen only for the sound and not the meaning. These categories have a '''required''' parameter specifying the sort key: ;{{para|sort}} ('''required''') : The sort key; in this case, hiragana representing the pronunciation of the character in question. ===Japonic "kanji read as READING" categories=== These are categories such as [[:Category:Japanese kanji read as ゐ]]. These are umbrella categories grouping categories for kanji read with specific readings that have specific origins (e.g. ''kun'', ''on''). These categories have the following optional parameters: ;{{para|histconsol|<var>modern</var>}} : Specify that this is a historical reading and that such readings are normally consolidated into the modern reading {{cd|<var>modern</var>}} (with modernized pronunciation). A message to this effect appears in the category text. <includeonly> [[Category:Category boilerplate templates]] </includeonly> l04y5crqnu0r3n118v5u7w3s0mzg3um 192624 192623 2024-11-18T03:59:39Z Lee 19 [[:en:Template:auto_cat/documentation]] වෙතින් එක් සංශෝධනයක් 192623 wikitext text/x-wiki {{documentation subpage}} {{uses lua|Module:category tree}} [[File:Cat on a civic.jpg|thumb|Auto cat]] This template is used on category pages to automatically add a [[:Category:Category boilerplate templates|category boilerplate template]]. It deciphers the category name and transcludes the correct template with the correct parameters. No parameters are needed in most cases. A few categories have optional or required parameters to help out the categorization; see below. '''Note: all categories should now be handled by {{tl|auto cat}}. See [[Module:category tree/poscatboiler/data/documentation]] for more information, and for specifics regarding the category tree.''' Most categories have an '''Edit category data''' button in the upper right that takes you directly to the module that implements the category. To more easily add this template, place {{code|js|importScript('User:Erutuon/addAutoCat.js');}} in your [[Special:MyPage/common.js|common.js]]. This will add buttons directly below the first heading. Click them to add the template and save, or add the template and preview. ==Parameters== Some categories allow or require parameters to {{temp|auto cat}} to help out categorization. ===Affix categories=== These are categories are categories such as [[:Category:Latin terms suffixed with -inus]] and [[:Category:Japanese terms prefixed with 真っ]]. The types of affixes currently recognized are [[prefix]], [[suffix]], [[infix]], [[interfix]], [[circumfix]] and [[transfix]]. For these categories, the following parameters are allowed (none are required): ;{{para|alt}} : The affix with diacritics. Only needed for languages with extra diacritics in their headwords (e.g. Latin, Russian, Arabic and Old English), and only if those diacritics are present. For example, for [[:Category:Latin terms suffixed with -inus]], specify {{temp|auto cat|alt=-īnus}} so that the suffix in the category description, and the breadcrumb at the top of the page, are displayed as {{m|la|-īnus}}, with a macron. ;{{para|sort}} : The sort key. Mostly only needed for Japanese. For example, for [[:Category:Japanese terms prefixed with 真っ]], use {{temp|auto cat|sort=まっ}} so that the page is properly sorted in its parent category [[:Category:Japanese terms by prefix]]. ;{{para|tr}} : Manual transliteration. Occasionally needed for non-Latin-script languages if the automatic transliteration is incorrect or if the language doesn't have automatic transliteration (e.g. Persian and Hebrew). ;{{para|sc}} : Script code. Almost never needed. ===Language categories=== These are categories such as [[:Category:French language]] and [[:Category:Proto-Indo-European language]]. These are the root categories for the various languages represented in Wiktionary. These categories have '''required''' parameters specifying the country or countries where the language is spoken, as well as additional optional parameters: ;{{para|1}}, {{para|2}}, {{para|3}}, ... : The country or countries where the language is spoken. See [[:Category:Languages by country]] and its subcategories. Make sure to include the word <code>the</code> if warranted, e.g. <code>the Philippines</code> or <code>the United States</code>. At least one country is '''required''' unless the language is reconstructed (e.g. [[:Category:Proto-Indo-European language|Proto-Indo-European]]) or constructed/artificial (e.g. [[:Category:Esperanto language|Esperanto]]). If the country is truly unknown, use the value <code>UNKNOWN</code>. ; {{para|extinct|1}} : Specify that this language is extinct (no longer spoken). ; {{para|setwiki}} : The name of the Wikipedia article about the language to link to. If omitted, the Wikipedia article in the language's wikidata entry or the language's category name will be used (e.g. <code>French language</code>). Specify {{para|setwiki|-}} to show no Wikipedia article link. Preferably, the wikidata entry for the language should be added to the language's data file rather than specified manually in this template. ; {{para|setwikt}} : The code of the language's Wiktionary edition. If omitted, the Wiktionary language code for the language will be used. Specify {{para|setwikt|-}} to show no Wiktionary edition link. ; {{para|setsister}} : The name of the category on Wikimedia Commons with files related to the language. If omitted, the category name will be used (e.g. <code>French language</code>). Specify {{para|setsister|-}} to show no Commons category link. ; {{para|entryname}} : The English term on this Wiktionary to link to. If omitted, the canonical name of the language will be used (e.g. <code>French</code>). Specify {{para|entryname|-}} to show no entry link. ===Lect categories=== These are categories that refer to regional, temporal and sociolectal varieties of languages such as [[:Category:Latin American Spanish]] (regional), [[:Category:Early Modern English]] (temporal) and [[:Category:Classical Persian]] (sociolectal), including those that don't have the containing language in their name (e.g. [[:Category:Provençal]] and [[:Category:Dari]]) or have only part of the containing language in their name (e.g. [[:Category:Walser German]], which is a variety of the [[:Category:Alemannic German language|Alemannic German language]] and not a variety of [[:Category:German language|German]]). Because of the diversity of naming conventions, {{tl|auto cat}} won't recognize or process such categories unless {{para|lect|1}} is given. The handler in {{tl|auto cat}} that handles such categories will attempt to infer the relevant properties of the lect in various ways: # It will infer some default properties from the name of the lect itself. For example [[:Category:Jakarta Indonesian]] is assumed to be a variety of Indonesian and spoken in [[Jakarta]]. # It will look for a language-specific label that categorizes into the category in question. ''If and only if'' the label definition of that label has a {{cd|parent}} field, the relevant fields of the label definition will be used to establish the lect's properties. '''This is now the preferred method of specifying a lect's properties, because it centralizes all information about the lect in the language-specific label modules.''' As an example, consider the category [[:Category:Javanese Indonesian]]. The Indonesian label data module [[Module:labels/data/lang/id]] defines a label {{cd|Java}} that has the setting {{cd|1=regional_categories = "Javanese"}} (causing that label to categorize into [[:Category:Javanese Indonesian]]) and also has a setting {{cd|1=parent = "Indonesia"}} (indicating that the label is a lect whose parent lect is defined by the {{cd|Indonesia}} label). As a result of the {{cd|parent}} setting, the properties of the {{cd|Java}} label will be taken from the fields specified for this label, such as {{cd|1=prep = "on"}} and {{cd|1=region = "the island of [[Java]]"}}, which together cause the description of the category to read ''Terms or senses in Indonesian as spoken on the island of [[Java]]''. (See below for fields like {{cd|prep}} and {{cd|region}}.) The value of the {{cd|parent}} field, {{cd|Indonesia}}, will cause the category associated with that label ([[:Category:Indonesian Indonesian]]) to be the parent category of [[:Category:Javanese Indonesian]]. Top-level lects should use {{cd|1=parent = true}}, which puts them directly under e.g. [[:Category:Regional Indonesian]] (unless {{cd|1=noreg = true}} is also given, in which case they go under the higher-level category [[:Category:Varieties of Indonesian]]; non-regional lects such as [[:Category:Classical Indonesian]] and [[:Category:Prokem Indonesian]] should use this). '''NOTE:''' The value of the {{cd|parent}} field is a ''label'', not a category. Labels and categories do not have to match exactly in name (cf. the label {{cd|Java}} vs. the corresponding category [[:Category:Javanese Indonesian]], and the label {{cd|Indonesia}} vs. the corresponding category [[:Category:Indonesian Indonesian]]). However, if they do not match, the connection between them should still be clear. # It will take properties from parameters directly specified to {{tl|auto cat}}. Generally, the same recognized parameters to {{tl|auto cat}} (described below) have the same names and semantics as the fields in label definitions that control lect properties. In the above list, properties specified lower down override those specified higher-up. In other words, default properties inferred from the name itself are overridden by properties derived from a lect label that categorizes into the category in question, which are in turn overridden by properties directly specified by {{tl|auto cat}} parameters. The following parameters are recognized to {{tl|auto cat}}, which are listed along with the corresponding fields in the lect label definition: {|class="wikitable" ! {{tl|auto cat}} param !! Lect label field !! Definition |- | {{para|lect|1}} || {{cd|1=parent =}} | {{para|lect|1}} must be specified for {{tl|auto cat}} to process the category, and {{cd|1=parent =}} must be given for a label to be treated as a lect label (along with the fact that the label must categorize into the category in question). The value of {{cd|parent}} is either the containing lect label ('''not''' the category name) or {{lua|true}} if the lect is a top-level lect (its parent will be [[:Category:Regional LANG]] where <code>LANG</code> is the L2 language in question, or [[:Category:Varieties of LANG]] if the field {{cd|1=noreg = true}} is set). |- | {{para|1}} || {{cd|1=region =}} | English description of the location where the lect is spoken (for regional lects), the time period where the lect was spoken (for temporal lects) or the {{w|Register (sociolinguistics)|linguistic register}} of the lect (for sociolects). The text normally appears after the words "Terms or senses in LANGUAGE as spoken in", although both the verb ("spoken") and the preposition ("in") can be customized. Normally, the description will be linked using {{tl|l|en}}; use {{para|nolink|1}} to disable this (see below). If the description names a country (or in some cases a sub-country entity such as California), and a category named <code>Languages of <var>country</var></code> exists, the lect will automatically be categorized into this category. You can override the country or countries of the lect using {{para|country}}. If omitted, the default description is inferred from the lect name by subtracting the containing language (see {{para|cat}} and {{para|lang}} below). For example, for [[:Category:Texas German]], the containing language will be inferred as 'German', and after subtracting this, the default description becomes <code>Texas</code>. In some cases, this will be wrong, especially if the location is named in the lect using the adjectival form of the location, and the description must be given explicitly. For example, [[:Category:Puerto Rican Spanish]] will result in a default description <code>Puerto Rican</code> when it should be <code>Puerto Rico</code>. If it's not possible to match the containing language in the lect name, {{para|1}} must be specified or an error results (unless {{para|def}} or {{para|fulldef}} are given; see below). : If the description contains the string <code><country></code>, the countries in {{para|country}} will be substituted, comma-separated with "and" before the last one. See the examples below for an example of this. |- | {{para|cat}} || {{cd|1=parent =}} | The parent category. This is the first containing category listed at the bottom of the page and determines the trail of ''breadcrumbs'' displayed at the top of the page. This should be used to express containment relationships of regional and temporal lects. For example, [[:Category:Durham University English]] has [[:Category:Durham English]] as its parent, which in turn has [[:Category:Northumbrian English]] as its parent, which in turn has [[:Category:Northern England English]] as its parent, etc. For lect labels, the parent category is the regional or plain category that the parent label categorizes into. If the parent category is omitted, the default depends on the containing language, according to the following algorithm: :# The containing language is normally inferred from the lect's name by looking for the longest matching language suffix. This means, for example, that [[:Category:Kentish Middle English]] will have 'Middle English' as its containing language, not merely 'English'. The containing language can be an [[Wiktionary:Languages#Lects which appear only in etymology sections|etymology-only language]]; e.g. [[:Category:Southern Brazilian Portuguese]] has 'Brazilian Portuguese' (code <code>pt-BR</code>) as its containing language. It is also possible for the lect itself to be an etymology-only language (e.g. [[:Category:Brazilian Portuguese]] or [[:Category:Provençal]]). In this case, the containing language is that same etymology-only language; but these categories are treated specially. The containing language can also be manually set using {{para|lang}}; this is necessary when it cannot be inferred from the name (e.g. [[:Category:Issime Walser]] is a variety of etymology-only language [[:Category:Walser German]], but this language cannot be inferred because only part of its canonical name is found in the lect's name). :# If the containing language is an etymology-only language, the default parent category is simply the containing language's category, which has the same name as the containing language (e.g. [[:Category:Southern Brazilian Portuguese]] has [[:Category:Brazilian Portuguese]] as its default parent). :# If the containing language is a full language (i.e. not an etymology-only language), the default is normally named <code>Regional <var>language</var></code>, e.g. [[:Category:Regional English]] for [[:Category:European English]]. However, if {{para|noreg|1}} or the lect label field {{cd|1=noreg = true}} is set (to indicate a non-regional lect), the default will be named <code>Varieties of <var>language</var></code>, e.g. [[:Category:Early Modern English]] should set {{para|noreg|1}} and will have [[:Category:Varieties of English]] as its parent. :# If the lect '''is''' an etymology-only language, its default parent category will be based on the language's parent, using the above algorithm. For example, Brazilian Portuguese is an etymology-only language (code <code>pt-BR</code>) whose parent language is the full language Portuguese (code <code>pt</code>), and the default parent category of [[:Category:Brazilian Portuguese]] will be [[:Category:Regional Portuguese]]. (It is also possible for etymology-only languages to have other etymology-only languages as their parent; e.g. Contemporary Latin (code <code>la-con</code>) has etymology-only language New Latin (code <code>la-new</code>) as its parent, so the default parent category of [[:Category:Contemporary Latin]] will be [[:Category:New Latin]].) : NOTE: This category needs to be one that is handled internally using the "raw category" subsystem of the poscatboiler system (see [[Module:category tree/poscatboiler/data/documentation]]). In particular, this means it cannot be a language category (such as [[:Category:Mandarin lemmas]]), an umbrella category (such as [[:Category:Nouns by language]]) or a topic category (such as [[:Category:en:Universities]]). If this limitation is problematic, please contact [[User:Benwing2]]. |- | {{para|lang}} || (no equivalent) | Override the containing language. See {{para|cat}} above for more details. The containing language determines the default parent category (see above) and the default breadcrumb (see below). Note that if the lect directly names an etymology-only language, {{para|lang}} will automatically be inferred to be that language, and the corresponding language code(s) will be shown as part of the "additional" text following the category description. There is no equivalent because the containing language is taken from whatever language-specific label module the lect label was found in. Note that this does not have to match the name of the category. For example, all Chinese-related lect labels are centralized in [[Module:labels/data/lang/zh]], meaning that a category like [[:Category:Beijing Mandarin]] will have its lect label definition in [[Module:labels/data/lang/zh]], not in [[Module:labels/data/lang/cmn]] (corresponding to the [[:Category:Mandarin language]]), and this will not cause a problem. |- | {{para|breadcrumb}} || {{cd|1=breadcrumb =}} | Override the default breadcrumb displayed for the lect in the trail of breadcrumbs displayed at the top of the page. The default breadcrumb is normally the portion of the lect's name minus the containing language suffix. For example, [[:Category:Southern Brazilian Portuguese]] has containing language 'Brazilian Portuguese' and hence will have default breadcrumb <code>Southern</code>. If the containing language cannot be matched in the lect's name, the code will try matching any parent languages of the containing language. For example, [[:Category:Bahian Portuguese]] is a sublect of Brazilian Portuguese; if {{para|lang|pt-BR}} is given to set the containing language appropriately, the name 'Brazilian Portuguese' is not a suffix of 'Bahian Portuguese', but its parent language Portuguese is, so the default breadcrumb will be <code>Bahian</code>. If neither the containing language nor any parent language matches, the breadcrumb is based on the entire lect (e.g. for lects like [[:Category:Provençal]]). |- | {{para|noreg|1}} || {{cd|1=noreg = true}} | Indicate that this lect is not a regional lect. This is only necessary when {{para|cat}} isn't explicitly given to {{tl|auto cat}} (or equivalently, {{cd|1=parent = true}} is given in the lect label definition), as its only purpose is to control the default parent category. See {{para|cat}} and {{cd|1=parent =}} for more information. |- | {{para|nolink|1}} || {{cd|1=nolink = true}} | Don't automatically link the description in {{para|1}} using {{tl|l|en}}. This should be specified if {{para|1}} contains a description such as <code>from the 15th to the 18th centuries</code> that is not a Wiktionary entry, and does not have any links in it (either bare or specified using {{tl|l}}, {{tl|w}} or the like). (If the value of {{para|1}} has bare links in it, the effect of wrapping with {{tl|l|en}} is simply to convert those bare links into links pointing to the English section of the page in question, which is generally correct.) |- | {{para|verb}} || {{cd|1=verb =}} | Override the verb "spoken" that normally appears in the category's description. Example values are <code>formerly spoken</code> for an extinct lect; <code>chiefly spoken</code> for a lect mostly spoken in the location specified in {{para|1}} but also spoken elsewhere; <code>written</code> for a written-only lect; etc. |- | {{para|prep}} || {{cd|1=prep =}} | Override the preposition "in" that normally appears in the category's description. Example values are <code>on</code> if the location in {{para|1}} is an island; <code>by</code> if {{para|1}} specifies a group of people speaking the language (e.g. {{w|Tamil Brahmin}}s); etc. Use <code>-</code> to suppress the preposition (e.g. [[:Category:Overseas Chinese]] sets {{para|1|<nowiki>outside of [[China]] and [[Taiwan]]</nowiki>}} and {{para|prep|-}}). |- | {{para|def}} || {{cd|1=def =}} | Override the whole description following the words "Terms or senses in". The final period should not be included. |- | {{para|fulldef}} || {{cd|1=fulldef =}} | Override the entire description. The final period should not be included. |- | {{para|addl}} || {{cd|1=addl =}} | Specify additional text to display after the "Terms or senses in ..." category description, and before any category TOC (table of contents) bar. If this is given, include the final period. Note that if the lect directly names an etymology-only language, the additional text will automatically include the language code(s) of this etymology-only language. In such a case, any text specified using {{para|addl}} will follow this auto-added text. |- | {{para|othercat}} || {{cd|1=othercat =}} | Any additional category or categories to place the lect in. Separate multiple categories with a comma, without a following space (if a space follows the comma, it will not be considered a delimiter; this allows for embedded commas in categories, which are nearly always followed by a space). Unlike the value in {{para|cat}}, there are no restrictions on what sort of categories can be specified here. |- | {{para|country}} || {{cd|1=country =}} | Override the country or countries where the lect is spoken. See {{para|1}} above. Separate multiple countries with a comma without a following space, as with {{para|othercat}}. The purpose of this parameter is to add the lect to additional categories named <code>Languages of <var>country</var></code>, so that such categories will be populated with all lects spoken in the country. If the <code>Languages of <var>country</var></code> category does not already exist, the lect will not be added to it. As mentioned in {{para|1}} above, if {{para|1}} names a country and a corresponding <code>Languages of <var>country</var></code> category exists, the lect will automatically be added to it, so {{para|country}} does not need to be specified. As a rule, do not specify {{para|country}} for sub-country lects. For example, [[:Category:Texas English]] should not have {{para|country|the United States}} specified, since [[:Category:Texas English]] is a subcategory of [[:Category:American English]], which is in [[:Category:Languages of the United States]]. An exception is when a language is spoken in only a portion of a country. For example, [[:Category:Texas Silesian]] should have {{para|country|the United States}} specified because there is no lect named [[:Category:American Silesian]] (Silesian is not normally spoken in the United States except in Texas). |- | {{para|wp}} || {{cd|1=Wikipedia =}} | Wikipedia link to include on the lect's page. This can be a single Wikipedia page or a comma-separated list of such pages (without any space after the comma; if a space follows the comma, it will not be considered a delimiter, to allow for embedded commas in Wikipedia page names). A given Wikipedia page can be prefixed with a language code to link to a page in a non-English Wikipedia. For example, [[:Category:Japanese Korean]] specifies {{para|wp|Zainichi Korean language,ko:재일조선어}} to link to the {{w|Zainichi Korean language}} page on the English Wikipedia as well as the page {{w|lang=ko|재일조선어}} on the Korean Wikipedia. If the value of a Wikipedia page is <code>+</code>, <code>1</code>, <code>yes</code>, <code>true</code>, <code>on</code> or similar, the Wikipedia page will be taken from the lect name. Note that if the lect names an etymology-only language (e.g. [[:Category:Provençal]] or [[:Category:Brazilian Portuguese]]), the correct Wikipedia article for this lect will automatically be fetched based on the relevant Wikidata entry and added to the category page. To prevent this, specify an explicit value for {{para|wp}}; use <code>-</code>, <code>0</code>, <code>no</code>, <code>false</code>, <code>off</code> or similar if you don't want any Wikipedia page displayed. |- | {{para|type}} || {{cd|1=type =}} | Specify the type of lect (<code>extinct</code>, <code>extant</code>, <code>reconstructed</code>, <code>unattested</code> or <code>constructed</code>). Extinct lects are categorized into [[:Category:All extinct languages]]. Reconstructed lects are categorized into [[:Category:Reconstructed languages]]. Unattested lects are categorized into [[:Category:Unattested languages]]. Constructed lects are categorized into [[:Category:Constructed languages]]. In all cases an "additional text" message is placed indicating that the lect is (respectively) extinct, reconstructed, unattested or constructed. If the type is not given, it is inferred based on various factors (the type of the parent category, the type of the language that the lect belongs to, and whether the name of the category or language begins with "Proto-"). If no type can be inferred, it defaults to <code>extant</code>. |- | {{para|pagename}} || (no equivalent) | Act as if the pagename is the specified value rather than its actual value. Any inferred parameters will be based off of the specified value. This is useful for testing and demonstration purposes (e.g. in documentation pages). |} ====Examples==== 1. For [[:Category:Hong Kong English]], use: <code><nowiki>{{auto cat|lect=1|cat=Chinese English}}</nowiki></code> Here, {{para|1}} does not need to be specified because the inferred description "Hong Kong" is correct. The language is automatically inferred as English (and in any case, this is an etymology-only language with code <code>en-HK</code>, from which the language can be inferred). The parent category is set to [[:Category:Chinese English]] in place of the default [[:Category:Regional English]]. 2. For [[:Category:Durham University English]], use: <code><nowiki>{{auto cat|lect=1|prep=at|{{w|Durham University}} in [[Durham]]|cat=Durham English|othercat=en:Universities}}</nowiki></code> Here, we specify the region description in {{para|1}} but the language is automatically inferred as English. The parent category is set to [[:Category:Durham English]] in place of the default [[:Category:Regional English]] (which leads to a breadcrumb chain '''Regional » European » British » English » Northern England » Northumbrian » Durham » Durham University''' based on parent categories). [[:Category:en:Universities]] is added as an additional parent category. 3. For [[:Category:Limburgan-Ripuarian transitional dialects]], you could use: <code><nowiki>{{auto cat|lect=1|lang=gmw-cfr|the tri-state region of <country>|cat=Ripuarian Franconian|country=Belgium,the [[Netherlands]],Germany|wp=Southeast Limburgish dialect}}</nowiki></code> This is a more complex example. We have to set the language (Central Franconian) explicitly using {{para|lang}} because it is not inferrable from the name and the category does not refer to an etymology-only language. The description in {{para|1}} contains <code><country></code>, which substitutes the countries mentioned in {{para|country}} (which also cause the category to be added to [[:Category:Languages of Belgium]], [[:Category:Languages of the Netherlands]] and [[:Category:Languages of Germany]]. We also specify a parent category and Wikipedia page to link to. However, this is now handled in the preferred way, using properties of the lect label, as follows (as found in [[Module:labels/data/lang/gmw-cfr]]): <pre> labels["Limburgan Ripuarian"] = { region = "the tri-state region of <country>", country = "Belgium,the [[Netherlands]],Germany", aliases = {"Tri-state Limburgish", "Limburgan-Ripuarian", "Southeast Limburgish dialect", "Limburgan-Ripuarian Transitional Dialects"}, Wikipedia = "Southeast Limburgish dialect", plain_categories = "Limburgan-Ripuarian transitional dialects", parent = "Ripuarian", } </pre> 4. For [[:Category:Dobhashi]], use: <code><nowiki>{{auto cat|lect=1|lang=bn|def=a literary register of Bengali that was in common use from the 14th century to the 19th century|type=extinct|noreg=1|wp=1}}</nowiki></code> Here, we have to set the language (Bengali), and we override the definition after "Terms or senses in" using {{para|def}} in place of specifying {{para|1}}. Since this isn't a regional lect, we set {{para|noreg|1}} so the parent defaults to [[:Category:Bengali language]]. We set {{para|type|extinct}} because this lect is extinct and this cannot be inferred from the parent (which is not extinct). We also use {{para|wp|1}} to link to {{w|Dobhashi}} on Wikipedia. 5. For [[:Category:The BMAC substrate]], use: <code><nowiki>{{auto cat|lect=1|def=the [[substrate]](s) spoken in the {{w|Bactria–Margiana Archaeological Complex}} and possibly found as a {{w|substratum in Vedic Sanskrit}}|breadcrumb=BMAC}}</nowiki></code> Here, the language in question is an etymology-only substrate language whose actual name begins with a lowercase letter (<code>the BMAC substrate</code>), but the lect handler automatically takes care of the mismatch and recognizes the etymology-only language. The type is automatically inferred to be <code>unattested</code> based on it being a substrate language (this is done by checking the code; all substrate language codes begin with <code>qsb-</code>). Based on the type, the default parent is {{catlink|Substrate languages}}. We set a breadcrumb to override the default breadcrumb <code>The BMAC substrate</code>. ==="Languages of COUNTRY" categories=== These are categories such as [[:Category:Languages of India]] and [[:Category:Languages of the United States]]. These categories contain subcategories for all the languages and sublects spoken in the country in question. The following parameters are allowed (none are required): ;{{para|flagfile}} : An image file specifying the flag of the country in question, displayed in the upper right corner of the category page. The <code>File:</code> prefix should be omitted. An example is {{para|flagfile|Flag of Afghanistan (2013–2021).svg}} for Afghanistan. The default is <code>Flag of <var>country</var>.svg</code>; if this file does not exist, no flag is displayed. Use {{para|flagfile|-}} to cause the flag to be omitted even if the appropriate flag file is present. ;{{para|wp}} : A link to a Wikipedia article describing the languages of the country, such as {{w|Languages of Australia}}. Use {{para|wp|+}} or {{para|wp|1}} to specify that the name of the Wikipedia article is the same as the category name. ;{{para|commonscat}} : A link to a Commons category describing the languages of the country, such as [[Commons:Category:Languages of Chad]]. Use {{para|commonscat|+}} or {{para|commonscat|1}} to specify that the name of the Commons category is the same as the category name. ===User language competency categories=== These are categories such as [[:Category:User fr-4]] indicating that the user speaks French at near-native competency. The following parameters are allowed (none are required): ;{{para|text}} : The native-language text specifying a translation of the English text describing the competency of the users in the category in the language in question. An image file specifying the flag of the country in question, displayed in the upper right corner of the category page. The <code>File:</code> prefix should be omitted. An example is {{para|text|<nowiki>Ces utilisateurs parlent <<français>> à un niveau '''comparable à la langue maternelle'''.</nowiki>}} for the translation of "These users speak French at a near-native level." The text describing the level of competency should be boldfaced and the text specifying the language should be surrounded in double angle brackets, as shown. The language in double angle brackets will be boldfaced and linked to the higher-level user-competency category (e.g. [[:Category:User fr]]); in that category, double angle bracket text is linked to the language category (e.g. [[:Category:French language]]). If the text is omitted, the category is placed in two cleanup categories: [[:Category:Requests for translations in user-competency categories by language]] and [[:Category:Requests for translations in user-competency categories with ##-## users]] (e.g. [[:Category:Requests for translations in user-competency categories with 16-31 users]]). (The purpose of the latter categories is to segment the categories with missing text by number of users so that the ones with more users can be focused on first.) ;{{para|verb}} : The correct verb to use in the English text, in place of "speak" or (for sign languages) "communicate in". For example, protolanguages may prefer the verb "know". ;{{para|langname}} : Override the name of the language. This is chiefly used in user competency categories for invalid language codes (e.g. <code>eml</code> for Emiliano-Romagnol; on Wiktionary, this code is represented by two languages, Emilian with code <code>egl</code> and Romagnol with code <code>rgn</code>). Such categories should be actively eliminated by moving the users in them to the nearest valid Wiktionary code and then deleting the category when empty. ===Spelled-with categories=== These are categories such as [[:Category:English terms spelled with É]], [[:Category:Japanese terms spelled with 愛]] and [[:Category:Ladino terms derived from the Hebrew root ח־ב־ר]]. Normally, what follows <code>spelled with</code> is a single character, but occasionally multiple characters are used, as in [[:Category:Ladino terms derived from the Hebrew root ח־ב־ר]]. For these categories, the following parameters are allowed (none are required): ;{{para|sort}} : The sort key; used to sort the page in its parent category (e.g. [[:Category:Japanese terms by their individual characters]]). Only needed if the automatically generated sort key is wrong. Examples are [[:Category:Spanish terms spelled with Î]], which should use {{temp|auto cat|sort=I}}, and [[:Category:Japanese terms spelled with 衛]], which should use {{temp|auto cat|sort=行10}}. Japanese and Okinawan terms use [[Module:Hani-sortkey]] to generate the sort key, but currently this always generates Chinese sort keys, which in rare cases are wrong for Japanese (for example, the autogenerated sort key for [[:Category:Japanese terms spelled with 衛]] is <code>行09</code> instead of <code>行10</code>). ;{{para|char}} : If the category name has a descriptive word in it, such as <code>gershayim</code>, this should be the actual character referred to (in this case, {{temp|auto cat|char=״}}). Otherwise, it should be left out. ;{{para|context}}, {{para|context2}} : Provided for compatibility purposes, but unused. ===Japonic "terms spelled with KANJI read as READING" categories=== These are categories such as [[:Category:Japanese terms spelled with 学 read as がく]] and [[:Category:Okinawan terms spelled with 光 read as ふぃちゃい]]. These contain terms spelled with individual [[kanji]] read in particular ways (where the reading is written in [[hiragana]]). These categories have '''required''' parameters specifying the type(s) of reading(s): ;{{para|1}}, {{para|2}}, {{para|3}}, ... ('''required''') : The reading type(s); one or more of <code>kun</code>, <code>on</code>, <code>goon</code>, <code>kan'on</code>, <code>kan'yōon</code>, <code>tōon</code>, <code>sōon</code> or <code>nanori</code>. For example, [[:Category:Japanese terms spelled with 学 read as がく]] should use {{temp|auto cat|goon|kan'on}} and [[:Category:Okinawan terms spelled with 光 read as ふぃちゃい]] should use {{temp|auto cat|kun}}. The particular reading type(s) can often be found on the page dedicated to the kanji in question. ===Japonic "terms with KANJI replaced by daiyōji DAIYOJI" categories=== These are categories such as [[:Category:Japanese terms with 諒 replaced by daiyōji 了]]. These contain terms spelled with specific uncommon [[kanji]] that normally have that character replaced by another homophonic character (a [[daiyōji]]) chosen only for the sound and not the meaning. These categories have a '''required''' parameter specifying the sort key: ;{{para|sort}} ('''required''') : The sort key; in this case, hiragana representing the pronunciation of the character in question. ===Japonic "kanji read as READING" categories=== These are categories such as [[:Category:Japanese kanji read as ゐ]]. These are umbrella categories grouping categories for kanji read with specific readings that have specific origins (e.g. ''kun'', ''on''). These categories have the following optional parameters: ;{{para|histconsol|<var>modern</var>}} : Specify that this is a historical reading and that such readings are normally consolidated into the modern reading {{cd|<var>modern</var>}} (with modernized pronunciation). A message to this effect appears in the category text. <includeonly> [[Category:Category boilerplate templates]] </includeonly> l04y5crqnu0r3n118v5u7w3s0mzg3um Module:language-like 828 6242 192566 77641 2024-11-12T13:59:38Z en>Theknightwho 0 This "optimisation" to avoid creating extra objects is actually less efficient, due to the additional loops and table checks, since most languages don't have anything. It's also not really important, since these methods aren't used in mainspace anyway. 192566 Scribunto text/plain local export = {} local insert = table.insert local ipairs = ipairs local type = type local function flatten_data(data, t) for _, v in ipairs(data) do if type(v) == "table" then flatten_data(v, t) else insert(t, v) end end return t end -- Implementation of getOtherNames() for languages, etymology languages, -- families and scripts. If `onlyOtherNames` is passed in, only return -- the names in the `otherNames` field, otherwise combine `otherNames`, -- `aliases` and `varieties`. function export.getOtherNames(self, onlyOtherNames) local data if self._extraData then data = self._extraData elseif self._rawData then data = self._rawData else -- Called from [[Module:list of languages]]; fields already available directly. data = self end if onlyOtherNames then return data.otherNames or {} end local ret, otherNames, aliases, varieties = {}, data.otherNames, data.aliases, data.varieties if otherNames then flatten_data(otherNames, ret) end if aliases then flatten_data(aliases, ret) end if varieties then flatten_data(varieties, ret) end return ret end -- Implementation of getVarieties() for languages, etymology languages, -- families and scripts. If `flatten` is passed in, flatten down to a -- list of strings; otherwise, keep the structure. function export.getVarieties(self, flatten) local data if self._extraData then data = self._extraData elseif self._rawData then data = self._rawData else -- Called from [[Module:list of languages]]; fields already available directly. data = self end local varieties = data.varieties if not varieties then return {} -- If flattening not requested, just return them. elseif not flatten then return varieties end return flatten_data(varieties, {}) end -- Implementation of template-callable getByCode() function for languages, -- etymology languages, families and scripts. `item` is the language, -- family or script in question; `args` is the arguments passed in by the -- module invocation; `extra_processing`, if specified, is a function of -- one argument (the requested property) and should return the value to -- be returned to the caller, or nil if the property isn't recognized. -- `extra_processing` is called after special-cased properties are handled -- and before general-purpose processing code that works for all string -- properties. function export.templateGetByCode(args, extra_processing) -- The item that the caller wanted to look up. local item, itemname, list = args[1], args[2] if itemname == "getOtherNames" then list = item:getOtherNames() elseif itemname == "getOnlyOtherNames" then list = item:getOtherNames(true) elseif itemname == "getAliases" then list = item:getAliases() elseif itemname == "getVarieties" then list = item:getVarieties(true) end if list then local index = args[3]; if index == "" then index = nil end index = tonumber(index or error("Numeric index of the desired item in the list (parameter 3) has not been specified.")) return list[index] or "" end if itemname == "getFamily" and item.getFamily then return item:getFamily():getCode() end if extra_processing then local retval = extra_processing(itemname) if retval then return retval end end if item[itemname] then local ret = item[itemname](item) if type(ret) == "string" then return ret else error("The function \"" .. itemname .. "\" did not return a string value.") end end error("Requested invalid item name \"" .. itemname .. "\".") end -- Implementation of getCommonsCategory() for languages, etymology languages, -- families and scripts. function export.getWikidataItem(self) local item = self._WikidataItem if item == nil then item = self._rawData[2] -- If the value is nil, it's cached as false. item = item ~= nil and (type(item) == "number" and "Q" .. item or item) or false self._WikidataItem = item end return item or nil end -- Implementation of getWikipediaArticle() for languages, etymology languages, -- families and scripts. function export.getWikipediaArticle(self, noCategoryFallback, project) if not project then project = "enwiki" end local cached_value if project == "enwiki" then cached_value = self._wikipedia_article if cached_value == nil then cached_value = self._rawData.wikipedia_article end else -- If the project isn't enwiki, default to no category fallback, but -- this can be overridden by specifying the value `false`. if noCategoryFallback == nil then noCategoryFallback = true end local non_en_wikipedia_articles = self._non_en_wikipedia_articles if non_en_wikipedia_articles == nil then self._non_en_wikipedia_articles = {} else cached_value = non_en_wikipedia_articles[project] end end if cached_value == nil then -- not false local item = self:getWikidataItem() if item and mw.wikibase then cached_value = mw.wikibase.sitelink(item, project) end if not cached_value then cached_value = false end -- Cache the determined value. if project == "enwiki" then self._wikipedia_article = cached_value else self._non_en_wikipedia_articles[project] = cached_value end end if cached_value or noCategoryFallback then return cached_value or nil end return (self:getCategoryName():gsub("Creole language", "Creole")) end do local function get_commons_cat_claim(item) if item then local entity = mw.wikibase.getEntity(item) if entity then -- P373 is the "Commons category" property. local claim = entity:getBestStatements("P373")[1] return claim and ("Category:" .. claim.mainsnak.datavalue.value) or nil end end end local function get_commons_cat_sitelink(item) if item then local sitelink = mw.wikibase.sitelink(item, "commonswiki") -- Reject any sitelinks that aren't categories. return sitelink and sitelink:match("^Category:") and sitelink or nil end end -- Implementation of getCommonsCategory() for languages, etymology -- languages, families and scripts. function export.getCommonsCategory(self) local cached_value cached_value = self._commons_category if cached_value ~= nil then -- including false return cached_value or nil elseif not mw.wikibase then cached_value = false return nil end -- Checks are in decreasing order of likelihood for a useful match. -- Get the Commons Category claim from the language's item. local lang_item = self:getWikidataItem() cached_value = get_commons_cat_claim(lang_item) if cached_value == nil then -- Otherwise, try the language's category's item. local langcat_item = mw.wikibase.getEntityIdForTitle("Category:" .. self:getCategoryName()) cached_value = get_commons_cat_claim(langcat_item) if cached_value == nil then -- If there's no P373 claim, there might be a sitelink on the -- language's category's item. cached_value = get_commons_cat_sitelink(langcat_item) if cached_value == nil then -- Otherwise, try for a sitelink on the language's own item. cached_value = get_commons_cat_sitelink(lang_item) if cached_value == nil then cached_value = false end end end end self._commons_category = cached_value return cached_value or nil end end return export dzd0cght7mu6uma0rnov7mi6z9qn4re 192567 192566 2024-11-17T14:04:42Z Lee 19 [[:en:Module:language-like]] වෙතින් එක් සංශෝධනයක් 192566 Scribunto text/plain local export = {} local insert = table.insert local ipairs = ipairs local type = type local function flatten_data(data, t) for _, v in ipairs(data) do if type(v) == "table" then flatten_data(v, t) else insert(t, v) end end return t end -- Implementation of getOtherNames() for languages, etymology languages, -- families and scripts. If `onlyOtherNames` is passed in, only return -- the names in the `otherNames` field, otherwise combine `otherNames`, -- `aliases` and `varieties`. function export.getOtherNames(self, onlyOtherNames) local data if self._extraData then data = self._extraData elseif self._rawData then data = self._rawData else -- Called from [[Module:list of languages]]; fields already available directly. data = self end if onlyOtherNames then return data.otherNames or {} end local ret, otherNames, aliases, varieties = {}, data.otherNames, data.aliases, data.varieties if otherNames then flatten_data(otherNames, ret) end if aliases then flatten_data(aliases, ret) end if varieties then flatten_data(varieties, ret) end return ret end -- Implementation of getVarieties() for languages, etymology languages, -- families and scripts. If `flatten` is passed in, flatten down to a -- list of strings; otherwise, keep the structure. function export.getVarieties(self, flatten) local data if self._extraData then data = self._extraData elseif self._rawData then data = self._rawData else -- Called from [[Module:list of languages]]; fields already available directly. data = self end local varieties = data.varieties if not varieties then return {} -- If flattening not requested, just return them. elseif not flatten then return varieties end return flatten_data(varieties, {}) end -- Implementation of template-callable getByCode() function for languages, -- etymology languages, families and scripts. `item` is the language, -- family or script in question; `args` is the arguments passed in by the -- module invocation; `extra_processing`, if specified, is a function of -- one argument (the requested property) and should return the value to -- be returned to the caller, or nil if the property isn't recognized. -- `extra_processing` is called after special-cased properties are handled -- and before general-purpose processing code that works for all string -- properties. function export.templateGetByCode(args, extra_processing) -- The item that the caller wanted to look up. local item, itemname, list = args[1], args[2] if itemname == "getOtherNames" then list = item:getOtherNames() elseif itemname == "getOnlyOtherNames" then list = item:getOtherNames(true) elseif itemname == "getAliases" then list = item:getAliases() elseif itemname == "getVarieties" then list = item:getVarieties(true) end if list then local index = args[3]; if index == "" then index = nil end index = tonumber(index or error("Numeric index of the desired item in the list (parameter 3) has not been specified.")) return list[index] or "" end if itemname == "getFamily" and item.getFamily then return item:getFamily():getCode() end if extra_processing then local retval = extra_processing(itemname) if retval then return retval end end if item[itemname] then local ret = item[itemname](item) if type(ret) == "string" then return ret else error("The function \"" .. itemname .. "\" did not return a string value.") end end error("Requested invalid item name \"" .. itemname .. "\".") end -- Implementation of getCommonsCategory() for languages, etymology languages, -- families and scripts. function export.getWikidataItem(self) local item = self._WikidataItem if item == nil then item = self._rawData[2] -- If the value is nil, it's cached as false. item = item ~= nil and (type(item) == "number" and "Q" .. item or item) or false self._WikidataItem = item end return item or nil end -- Implementation of getWikipediaArticle() for languages, etymology languages, -- families and scripts. function export.getWikipediaArticle(self, noCategoryFallback, project) if not project then project = "enwiki" end local cached_value if project == "enwiki" then cached_value = self._wikipedia_article if cached_value == nil then cached_value = self._rawData.wikipedia_article end else -- If the project isn't enwiki, default to no category fallback, but -- this can be overridden by specifying the value `false`. if noCategoryFallback == nil then noCategoryFallback = true end local non_en_wikipedia_articles = self._non_en_wikipedia_articles if non_en_wikipedia_articles == nil then self._non_en_wikipedia_articles = {} else cached_value = non_en_wikipedia_articles[project] end end if cached_value == nil then -- not false local item = self:getWikidataItem() if item and mw.wikibase then cached_value = mw.wikibase.sitelink(item, project) end if not cached_value then cached_value = false end -- Cache the determined value. if project == "enwiki" then self._wikipedia_article = cached_value else self._non_en_wikipedia_articles[project] = cached_value end end if cached_value or noCategoryFallback then return cached_value or nil end return (self:getCategoryName():gsub("Creole language", "Creole")) end do local function get_commons_cat_claim(item) if item then local entity = mw.wikibase.getEntity(item) if entity then -- P373 is the "Commons category" property. local claim = entity:getBestStatements("P373")[1] return claim and ("Category:" .. claim.mainsnak.datavalue.value) or nil end end end local function get_commons_cat_sitelink(item) if item then local sitelink = mw.wikibase.sitelink(item, "commonswiki") -- Reject any sitelinks that aren't categories. return sitelink and sitelink:match("^Category:") and sitelink or nil end end -- Implementation of getCommonsCategory() for languages, etymology -- languages, families and scripts. function export.getCommonsCategory(self) local cached_value cached_value = self._commons_category if cached_value ~= nil then -- including false return cached_value or nil elseif not mw.wikibase then cached_value = false return nil end -- Checks are in decreasing order of likelihood for a useful match. -- Get the Commons Category claim from the language's item. local lang_item = self:getWikidataItem() cached_value = get_commons_cat_claim(lang_item) if cached_value == nil then -- Otherwise, try the language's category's item. local langcat_item = mw.wikibase.getEntityIdForTitle("Category:" .. self:getCategoryName()) cached_value = get_commons_cat_claim(langcat_item) if cached_value == nil then -- If there's no P373 claim, there might be a sitelink on the -- language's category's item. cached_value = get_commons_cat_sitelink(langcat_item) if cached_value == nil then -- Otherwise, try for a sitelink on the language's own item. cached_value = get_commons_cat_sitelink(lang_item) if cached_value == nil then cached_value = false end end end end self._commons_category = cached_value return cached_value or nil end end return export dzd0cght7mu6uma0rnov7mi6z9qn4re Module:root 828 7555 192581 184914 2024-11-17T14:18:39Z Lee 19 පෙර දී "පද" භාවිතා කළ ස්ථාන "යෙදුම්" ලෙස වෙනස් කිරීම 192581 Scribunto text/plain local export = {} local force_cat = false -- for debugging function export.categorize(lang, source, roots, ids, sort_key) local categories = {} if lang:getCode() ~= source:getCode() then table.insert(categories, lang:getFullName() .. " යෙදුම්, " .. source:getCanonicalName() .. " වෙතින් ව්‍යුත්පන්න") end for index, root in ipairs(roots) do if lang:getCode() == source:getCode() then table.insert(categories, lang:getFullName() .. " terms belonging to the root " .. root .. (ids[index] and " (" .. ids[index] .. ")" or "")) else table.insert(categories, lang:getFullName() .. " යෙදුම්, " .. source:getCanonicalName() .. " මූලය " .. root .. (ids[index] and " (" .. ids[index] .. ")" or " වෙතින් ව්‍යුත්පන්න")) end end return require("Module:utilities").format_categories(categories, lang, sort_key, nil, force_cat) end function export.show(frame) local params = { [1] = { required = true, type = "language" }, [2] = { required = true, type = "language" }, [3] = { required = true, list = true }, ["id"] = { list = true, allow_holes = true }, ["sort"] = {}, } local args = require("Module:parameters").process(frame:getParent().args, params) return export.categorize(args[1], args[2], args[3], args.id, args.sort) end return export jm07hfxz8yxy881uybc43umjqs6iqq2 Module:languages 828 7902 192568 182776 2024-11-14T04:52:10Z en>Theknightwho 0 Track uses of paramForError. 192568 Scribunto text/plain local require = require local m_str_utils = require("Module:string utilities") local m_table = require("Module:table") local mw = mw local string = string local table = table local ustring = mw.ustring local char = string.char local check_object = require("Module:utilities").check_object local concat = table.concat local decode_entities = m_str_utils.decode_entities local decode_uri = m_str_utils.decode_uri local find = string.find local floor = math.floor local gmatch = string.gmatch local gsub = string.gsub local insert = table.insert local ipairs = ipairs local list_to_set = m_table.listToSet local load_data = mw.loadData local match = string.match local next = next local pairs = pairs local pattern_escape = m_str_utils.pattern_escape local remove = table.remove local remove_duplicates = m_table.removeDuplicates local replacement_escape = m_str_utils.replacement_escape local select = select local setmetatable = setmetatable local shallowcopy = m_table.shallowcopy local split = m_str_utils.split local type = type local ugsub = ustring.gsub local ulen = m_str_utils.len local ulower = m_str_utils.lower local umatch = ustring.match local uupper = m_str_utils.upper -- Loaded as needed by findBestScript. local Hans_chars local Hant_chars local export = {} --[=[ This module implements fetching of language-specific information and processing text in a given language. There are two types of languages: full languages and etymology-only languages. The essential difference is that only full languages appear in L2 headings in vocabulary entries, and hence categories like [[:Category:French nouns]] exist only for full languages. Etymology-only languages have either a full language or another etymology-only language as their parent (in the parent-child inheritance sense), and for etymology-only languages with another etymology-only language as their parent, a full language can always be derived by following the parent links upwards. For example, "Canadian French", code 'fr-CA', is an etymology-only language whose parent is the full language "French", code 'fr'. An example of an etymology-only language with another etymology-only parent is "Northumbrian Old English", code 'ang-nor', which has "Anglian Old English", code 'ang-ang' as its parent; this is an etymology-only language whose parent is "Old English", code "ang", which is a full language. (This is because Northumbrian Old English is considered a variety of Anglian Old English.) Sometimes the parent is the "Undetermined" language, code 'und'; this is the case, for example, for "substrate" languages such as "Pre-Greek", code 'qsb-grc', and "the BMAC substrate", code 'qsb-bma'. It is important to distinguish language ''parents'' from language ''ancestors''. The parent-child relationship is one of containment, i.e. if X is a child of Y, X is considered a variety of Y. On the other hand, the ancestor-descendant relationship is one of descent in time. For example, "Classical Latin", code 'la-cla', and "Late Latin", code 'la-lat', are both etymology-only languages with "Latin", code 'la', as their parents, because both of the former are varieties of Latin. However, Late Latin does *NOT* have Classical Latin as its parent because Late Latin is *not* a variety of Classical Latin; rather, it is a descendant. There is in fact a separate 'ancestors' field that is used to express the ancestor-descendant relationship, and Late Latin's ancestor is given as Classical Latin. It is also important to note that sometimes an etymology-only language is actually the conceptual ancestor of its parent language. This happens, for example, with "Old Italian" (code 'roa-oit'), which is an etymology-only variant of full language "Italian" (code 'it'), and with "Old Latin" (code 'itc-ola'), which is an etymology-only variant of Latin. In both cases, the full language has the etymology-only variant listed as an ancestor. This allows a Latin term to inherit from Old Latin using the {{tl|inh}} template (where in this template, "inheritance" refers to ancestral inheritance, i.e. inheritance in time, rather than in the parent-child sense); likewise for Italian and Old Italian. Full languages come in three subtypes: * {regular}: This indicates a full language that is attested according to [[WT:CFI]] and therefore permitted in the main namespace. There may also be reconstructed terms for the language, which are placed in the {Reconstruction} namespace and must be prefixed with * to indicate a reconstruction. Most full languages are natural (not constructed) languages, but a few constructed languages (e.g. Esperanto and Volapük, among others) are also allowed in the mainspace and considered regular languages. * {reconstructed}: This language is not attested according to [[WT:CFI]], and therefore is allowed only in the {Reconstruction} namespace. All terms in this language are reconstructed, and must be prefixed with *. Languages such as Proto-Indo-European and Proto-Germanic are in this category. * {appendix-constructed}: This language is attested but does not meet the additional requirements set out for constructed languages ([[WT:CFI#Constructed languages]]). Its entries must therefore be in the Appendix namespace, but they are not reconstructed and therefore should not have * prefixed in links. Most constructed languages are of this subtype. Both full languages and etymology-only languages have a {Language} object associated with them, which is fetched using the {getByCode} function in [[Module:languages]] to convert a language code to a {Language} object. Depending on the options supplied to this function, etymology-only languages may or may not be accepted, and family codes may be accepted (returning a {Family} object as described in [[Module:families]]). There are also separate {getByCanonicalName} functions in [[Module:languages]] and [[Module:etymology languages]] to convert a language's canonical name to a {Language} object (depending on whether the canonical name refers to a full or etymology-only language). Textual strings belonging to a given language come in several different ''text variants'': # The ''input text'' is what the user supplies in wikitext, in the parameters to {{tl|m}}, {{tl|l}}, {{tl|ux}}, {{tl|t}}, {{tl|lang}} and the like. # The ''display text'' is the text in the form as it will be displayed to the user. This can include accent marks that are stripped to form the entry text (see below), as well as embedded bracketed links that are variously processed further. The display text is generated from the input text by applying language-specific transformations; for most languages, there will be no such transformations. Examples of transformations are bad-character replacements for certain languages (e.g. replacing 'l' or '1' to [[palochka]] in certain languages in Cyrillic); and for Thai and Khmer, converting space-separated words to bracketed words and resolving respelling substitutions such as [กรีน/กฺรีน], which indicate how to transliterate given words. # The ''entry text'' is the text in the form used to generate a link to a Wiktionary entry. This is usually generated from the display text by stripping certain sorts of diacritics on a per-language basis, and sometimes doing other transformations. The concept of ''entry text'' only really makes sense for text that does not contain embedded links, meaning that display text containing embedded links will need to have the links individually processed to get per-link entry text in order to generate the resolved display text (see below). # The ''resolved display text'' is the result of resolving embedded links in the display text (e.g. converting them to two-part links where the first part has entry-text transformations applied, and adding appropriate language-specific fragments) and adding appropriate language and script tagging. This text can be passed directly to MediaWiki for display. # The ''source translit text'' is the text as supplied to the language-specific {transliterate()} method. The form of the source translit text may need to be language-specific, e.g Thai and Khmer will need the full unprocessed input text, whereas other languages may need to work off the display text. [FIXME: It's still unclear to me how embedded bracketed links are handled in the existing code.] In general, embedded links need to be removed (i.e. converted to their "bare display" form by taking the right part of two-part links and removing double brackets), but when this happens is unclear to me [FIXME]. Some languages have a chop-up-and-paste-together scheme that sends parts of the text through the transliterate mechanism, and for others (those listed in {contiguous_substition} in [[Module:languages/data]]) they receive the full input text, but preprocessed in certain ways. (The wisdom of this is still unclear to me.) # The ''transliterated text'' (or ''transliteration'') is the result of transliterating the source translit text. Unlike for all the other text variants except the transcribed text, it is always in the Latin script. # The ''transcribed text'' (or ''transcription'') is the result of transcribing the source translit text, where "transcription" here means a close approximation to the phonetic form of the language in languages (e.g. Akkadian, Sumerian, Ancient Egyptian, maybe Tibetan) that have a wide difference between the written letters and spoken form. Unlike for all the other text variants other than the transliterated text, it is always in the Latin script. Currently, the transcribed text is always supplied manually be the user; there is no such thing as a {lua|transcribe()} method on language objects. # The ''sort key'' is the text used in sort keys for determining the placing of pages in categories they belong to. The sort key is generated from the pagename or a specified ''sort base'' by lowercasing, doing language-specific transformations and then uppercasing the result. If the sort base is supplied and is generated from input text, it needs to be converted to display text, have embedded links removed (i.e. resolving them to their right side if they are two-part links) and have entry text transformations applied. # There are other text variants that occur in usexes (specifically, there are normalized variants of several of the above text variants), but we can skip them for now. The following methods exist on {Language} objects to convert between different text variants: # {makeDisplayText}: This converts input text to display text. # {lua|makeEntryName}: This converts input or display text to entry text. [FIXME: This needs some rethinking. In particular, {lua|makeEntryName} is sometimes called on display text (in some paths inside of [[Module:links]]) and sometimes called on input text (in other paths inside of [[Module:links]], and usually from other modules). We need to make sure we don't try to convert input text to display text twice, but at the same time we need to support calling it directly on input text since so many modules do this. This means we need to add a parameter indicating whether the passed-in text is input or display text; if that former, we call {lua|makeDisplayText} ourselves.] # {lua|transliterate}: This appears to convert input text with embedded brackets removed into a transliteration. [FIXME: This needs some rethinking. In particular, it calls {lua|processDisplayText} on its input, which won't work for Thai and Khmer, so we may need language-specific flags indicating whether to pass the input text directly to the language transliterate method. In addition, I'm not sure how embedded links are handled in the existing translit code; a lot of callers remove the links themselves before calling {lua|transliterate()}, which I assume is wrong.] # {lua|makeSortKey}: This converts entry text (?) to a sort key. [FIXME: Clarify this.] ]=] local function track(page) require("Module:debug/track")("languages/" .. page) return true end local function conditionalRequire(modname, useRequire) return (useRequire and require or load_data)(modname) end local function normalize_code(code, useRequire) return conditionalRequire("Module:languages/data", useRequire).aliases[code] or code end -- Convert risky characters to HTML entities, which minimizes interference once returned (e.g. for "sms:a", "<!-- -->" etc.). local function escape_risky_characters(text) local encode_entities = require("Module:string/encode entities") -- Spacing characters in isolation generally need to be escaped in order to be properly processed by the MediaWiki software. if umatch(text, "^%s*$") then return encode_entities(text, text) else return encode_entities(text, "!#%&*+/:;<=>?@[\\]_{|}") end end -- Temporarily convert various formatting characters to PUA to prevent them from being disrupted by the substitution process. local function doTempSubstitutions(text, subbedChars, keepCarets, noTrim) -- Clone so that we don't insert any extra patterns into the table in package.loaded. For some reason, using require seems to keep memory use down; probably because the table is always cloned. local patterns = shallowcopy(require("Module:languages/data/patterns")) if keepCarets then insert(patterns, "((\\+)%^)") insert(patterns, "((%^))") end -- Ensure any whitespace at the beginning and end is temp substituted, to prevent it from being accidentally trimmed. We only want to trim any final spaces added during the substitution process (e.g. by a module), which means we only do this during the first round of temp substitutions. if not noTrim then insert(patterns, "^([\128-\191\244]*(%s+))") insert(patterns, "((%s+)[\128-\191\244]*)$") end -- Pre-substitution, of "[[" and "]]", which makes pattern matching more accurate. text = gsub(text, "%f[%[]%[%[", "\1") :gsub("%f[%]]%]%]", "\2") local i = #subbedChars for _, pattern in ipairs(patterns) do -- Patterns ending in \0 stand are for things like "[[" or "]]"), so the inserted PUA are treated as breaks between terms by modules that scrape info from pages. local term_divider pattern = gsub(pattern, "%z$", function(divider) term_divider = divider == "\0" return "" end) text = gsub(text, pattern, function(...) local m = {...} local m1New = m[1] for k = 2, #m do local n = i + k - 1 subbedChars[n] = m[k] local byte2 = floor(n / 4096) % 64 + (term_divider and 128 or 136) local byte3 = floor(n / 64) % 64 + 128 local byte4 = n % 64 + 128 m1New = gsub(m1New, pattern_escape(m[k]), "\244" .. char(byte2) .. char(byte3) .. char(byte4), 1) end i = i + #m - 1 return m1New end) end text = gsub(text, "\1", "%[%[") :gsub("\2", "%]%]") return text, subbedChars end -- Reinsert any formatting that was temporarily substituted. local function undoTempSubstitutions(text, subbedChars) for i = 1, #subbedChars do local byte2 = floor(i / 4096) % 64 + 128 local byte3 = floor(i / 64) % 64 + 128 local byte4 = i % 64 + 128 text = gsub(text, "\244[" .. char(byte2) .. char(byte2+8) .. "]" .. char(byte3) .. char(byte4), replacement_escape(subbedChars[i])) end text = gsub(text, "\1", "%[%[") :gsub("\2", "%]%]") return text end -- Check if the raw text is an unsupported title, and if so return that. Otherwise, remove HTML entities. We do the pre-conversion to avoid loading the unsupported title list unnecessarily. local function checkNoEntities(self, text) local textNoEnc = decode_entities(text) if textNoEnc ~= text and self:loadData("Module:links/data").unsupported_titles[text] then return text else return textNoEnc end end -- If no script object is provided (or if it's invalid or None), get one. local function checkScript(text, self, sc) if not check_object("script", true, sc) or sc:getCode() == "None" then return self:findBestScript(text) else return sc end end local function normalize(text, sc) text = sc:fixDiscouragedSequences(text) return sc:toFixedNFD(text) end -- Split the text into sections, based on the presence of temporarily substituted formatting characters, then iterate over each one to apply substitutions. This avoids putting PUA characters through language-specific modules, which may be unequipped for them. local function iterateSectionSubstitutions(text, subbedChars, keepCarets, self, sc, substitution_data, function_name) local fail, cats, sections = nil, {} -- See [[Module:languages/data]]. if not find(text, "\244") or self:loadData("Module:languages/data").contiguous_substitution[self._code] then sections = {text} else sections = split(text, "\244[\128-\143][\128-\191]*", true) end for _, section in ipairs(sections) do -- Don't bother processing empty strings or whitespace (which may also not be handled well by dedicated modules). if gsub(section, "%s+", "") ~= "" then local sub, sub_fail, sub_cats = require("Module:languages/doSubstitutions")(section, self, sc, substitution_data, function_name) -- Second round of temporary substitutions, in case any formatting was added by the main substitution process. However, don't do this if the section contains formatting already (as it would have had to have been escaped to reach this stage, and therefore should be given as raw text). if sub and subbedChars then local noSub for _, pattern in ipairs(require("Module:languages/data/patterns")) do if match(section, pattern .. "%z?") then noSub = true end end if not noSub then sub, subbedChars = doTempSubstitutions(sub, subbedChars, keepCarets, true) end end if (not sub) or sub_fail then text = sub fail = sub_fail cats = sub_cats or {} break end text = sub and gsub(text, pattern_escape(section), replacement_escape(sub), 1) or text if type(sub_cats) == "table" then for _, cat in ipairs(sub_cats) do insert(cats, cat) end end end end -- Trim, unless there are only spacing characters, while ignoring any final formatting characters. text = text and text:gsub("^([\128-\191\244]*)%s+(%S)", "%1%2") :gsub("(%S)%s+([\128-\191\244]*)$", "%1%2") -- Remove duplicate categories. if #cats > 1 then cats = remove_duplicates(cats) end return text, fail, cats, subbedChars end -- Process carets (and any escapes). Default to simple removal, if no pattern/replacement is given. local function processCarets(text, pattern, repl) local rep repeat text, rep = gsub(text, "\\\\(\\*^)", "\3%1") until rep == 0 return text:gsub("\\^", "\4") :gsub(pattern or "%^", repl or "") :gsub("\3", "\\") :gsub("\4", "^") end -- Remove carets if they are used to capitalize parts of transliterations (unless they have been escaped). local function removeCarets(text, sc) if not sc:hasCapitalization() and sc:isTransliterated() and text:find("^", 1, true) then return processCarets(text) else return text end end local Language = {} function Language:loadData(modname) return (self._useRequire and require or mw.loadData)(modname) end --[==[Returns the language code of the language. Example: {{code|lua|"fr"}} for French.]==] function Language:getCode() return self._code end --[==[Returns the canonical name of the language. This is the name used to represent that language on Wiktionary, and is guaranteed to be unique to that language alone. Example: {{code|lua|"French"}} for French.]==] function Language:getCanonicalName() local name = self._name if name == nil then name = self._rawData[1] self._name = name end return name end --[==[ Return the display form of the language. The display form of a language, family or script is the form it takes when appearing as the <code><var>source</var></code> in categories such as <code>English terms derived from <var>source</var></code> or <code>English given names from <var>source</var></code>, and is also the displayed text in {makeCategoryLink()} links. For full and etymology-only languages, this is the same as the canonical name, but for families, it reads <code>"<var>name</var> languages"</code> (e.g. {"Indo-Iranian languages"}), and for scripts, it reads <code>"<var>name</var> script"</code> (e.g. {"Arabic script"}). ]==] function Language:getDisplayForm() local form = self._displayForm if form == nil then form = self:getCanonicalName() -- Add article and " substrate" to substrates that lack them. if self:getFamilyCode() == "qfa-sub" then if not (match(form, "^[Tt]he ") or match(form, "^[Aa] ")) then form = "a " .. form end if not match(form, "[Ss]ubstrate") then form = form .. " substrate" end end self._displayForm = form end return form end --[==[Returns the value which should be used in the HTML lang= attribute for tagged text in the language.]==] function Language:getHTMLAttribute(sc, region) local code = self._code if not find(code, "-", 1, true) then return code .. "-" .. sc:getCode() .. (region and "-" .. region or "") end local parent = self:getParent() region = region or match(code, "%f[%u][%u-]+%f[%U]") if parent then return parent:getHTMLAttribute(sc, region) end -- TODO: ISO family codes can also be used. return "mis-" .. sc:getCode() .. (region and "-" .. region or "") end --[==[Returns a table of the "other names" that the language is known by, excluding the canonical name. The names are not guaranteed to be unique, in that sometimes more than one language is known by the same name. Example: {{code|lua|{"Manx Gaelic", "Northern Manx", "Southern Manx"} }} for [[:Category:Manx language|Manx]]. If <code>onlyOtherNames</code> is given and is non-{{code|lua|nil}}, only names explicitly listed in the <code>otherNames</code> field are returned; otherwise, names listed under <code>otherNames</code>, <code>aliases</code> and <code>varieties</code> are combined together and returned. For example, for Manx, Manx Gaelic is listed as an alias, while Northern Manx and Southern Manx are listed as varieties. It should be noted that the <code>otherNames</code> field itself is deprecated, and entries listed there should eventually be moved to either <code>aliases</code> or <code>varieties</code>.]==] function Language:getOtherNames(onlyOtherNames) if #self._stack == 1 then self:loadInExtraData() end return require("Module:language-like").getOtherNames(self, onlyOtherNames) end --[==[Returns a table of the aliases that the language is known by, excluding the canonical name. Aliases are synonyms for the language in question. The names are not guaranteed to be unique, in that sometimes more than one language is known by the same name. Example: {{code|lua|{"High German", "New High German", "Deutsch"} }} for [[:Category:German language|German]].]==] function Language:getAliases() if #self._stack == 1 then self:loadInExtraData() end return self._rawData.aliases or (self._extraData and self._extraData.aliases) or {} end --[==[ Return a table of the known subvarieties of a given language, excluding subvarieties that have been given explicit etymology-only language codes. The names are not guaranteed to be unique, in that sometimes a given name refers to a subvariety of more than one language. Example: {{code|lua|{"Southern Aymara", "Central Aymara"} }} for [[:Category:Aymara language|Aymara]]. Note that the returned value can have nested tables in it, when a subvariety goes by more than one name. Example: {{code|lua|{"North Azerbaijani", "South Azerbaijani", {"Afshar", "Afshari", "Afshar Azerbaijani", "Afchar"}, {"Qashqa'i", "Qashqai", "Kashkay"}, "Sonqor"} }} for [[:Category:Azerbaijani language|Azerbaijani]]. Here, for example, Afshar, Afshari, Afshar Azerbaijani and Afchar all refer to the same subvariety, whose preferred name is Afshar (the one listed first). To avoid a return value with nested tables in it, specify a non-{{code|lua|nil}} value for the <code>flatten</code> parameter; in that case, the return value would be {{code|lua|{"North Azerbaijani", "South Azerbaijani", "Afshar", "Afshari", "Afshar Azerbaijani", "Afchar", "Qashqa'i", "Qashqai", "Kashkay", "Sonqor"} }}. ]==] function Language:getVarieties(flatten) if #self._stack == 1 then self:loadInExtraData() end return require("Module:language-like").getVarieties(self, flatten) end --[==[Returns a table of types as a lookup table (with the types as keys). The possible types are * {language}: This is a language, either full or etymology-only. * {full}: This is a "full" (not etymology-only) language, i.e. the union of {regular}, {reconstructed} and {appendix-constructed}. Note that the types {full} and {etymology-only} also exist for families, so if you want to check specifically for a full language and you have an object that might be a family, you should use {{lua|hasType("language", "full")}} and not simply {{lua|hasType("full")}}. * {etymology-only}: This is an etymology-only (not full) language, whose parent is another etymology-only language or a full language. Note that the types {full} and {etymology-only} also exist for families, so if you want to check specifically for an etymology-only language and you have an object that might be a family, you should use {{lua|hasType("language", "etymology-only")}} and not simply {{lua|hasType("etymology-only")}}. * {regular}: This indicates a full language that is attested according to [[WT:CFI]] and therefore permitted in the main namespace. There may also be reconstructed terms for the language, which are placed in the {Reconstruction} namespace and must be prefixed with * to indicate a reconstruction. Most full languages are natural (not constructed) languages, but a few constructed languages (e.g. Esperanto and Volapük, among others) are also allowed in the mainspace and considered regular languages. * {reconstructed}: This language is not attested according to [[WT:CFI]], and therefore is allowed only in the {Reconstruction} namespace. All terms in this language are reconstructed, and must be prefixed with *. Languages such as Proto-Indo-European and Proto-Germanic are in this category. * {appendix-constructed}: This language is attested but does not meet the additional requirements set out for constructed languages ([[WT:CFI#Constructed languages]]). Its entries must therefore be in the Appendix namespace, but they are not reconstructed and therefore should not have * prefixed in links. ]==] function Language:getTypes() local types = self._types if types == nil then types = {language = true} if self:getFullCode() == self._code then types.full = true else types["etymology-only"] = true end for t in gmatch(self._rawData.type, "[^,]+") do types[t] = true end self._types = types end return types end --[==[Given a list of types as strings, returns true if the language has all of them.]==] function Language:hasType(...) local args, types = {...}, self:getTypes() for i = 1, #args do if not types[args[i]] then return false end end return true end --[==[Returns a table containing <code>WikimediaLanguage</code> objects (see [[Module:wikimedia languages]]), which represent languages and their codes as they are used in Wikimedia projects for interwiki linking and such. More than one object may be returned, as a single Wiktionary language may correspond to multiple Wikimedia languages. For example, Wiktionary's single code <code>sh</code> (Serbo-Croatian) maps to four Wikimedia codes: <code>sh</code> (Serbo-Croatian), <code>bs</code> (Bosnian), <code>hr</code> (Croatian) and <code>sr</code> (Serbian). The code for the Wikimedia language is retrieved from the <code>wikimedia_codes</code> property in the data modules. If that property is not present, the code of the current language is used. If none of the available codes is actually a valid Wikimedia code, an empty table is returned.]==] function Language:getWikimediaLanguages() local wm_langs = self._wikimediaLanguageObjects if wm_langs == nil then local get_wm_lang = require("Module:wikimedia languages").getByCode local codes = self:getWikimediaLanguageCodes() wm_langs = {} for i = 1, #codes do wm_langs[i] = get_wm_lang(codes[i]) end self._wikimediaLanguageObjects = wm_langs end return wm_langs end function Language:getWikimediaLanguageCodes() local wm_langs = self._wikimediaLanguageCodes if wm_langs == nil then wm_langs = self._rawData.wikimedia_codes wm_langs = wm_langs and split(wm_langs, ",", true, true) or {self._code} self._wikimediaLanguageCodes = wm_langs end return wm_langs end --[==[ Returns the name of the Wikipedia article for the language. `project` specifies the language and project to retrieve the article from, defaulting to {"enwiki"} for the English Wikipedia. Normally if specified it should be the project code for a specific-language Wikipedia e.g. "zhwiki" for the Chinese Wikipedia, but it can be any project, including non-Wikipedia ones. If the project is the English Wikipedia and the property {wikipedia_article} is present in the data module it will be used first. In all other cases, a sitelink will be generated from {:getWikidataItem} (if set). The resulting value (or lack of value) is cached so that subsequent calls are fast. If no value could be determined, and `noCategoryFallback` is {false}, {:getCategoryName} is used as fallback; otherwise, {nil} is returned. Note that if `noCategoryFallback` is {nil} or omitted, it defaults to {false} if the project is the English Wikipedia, otherwise to {true}. In other words, under normal circumstances, if the English Wikipedia article couldn't be retrieved, the return value will fall back to a link to the language's category, but this won't normally happen for any other project. ]==] function Language:getWikipediaArticle(noCategoryFallback, project) return require("Module:language-like").getWikipediaArticle(self, noCategoryFallback, project) end function Language:makeWikipediaLink() return "[[w:" .. self:getWikipediaArticle() .. "|" .. self:getCanonicalName() .. "]]" end --[==[Returns the name of the Wikimedia Commons category page for the language.]==] function Language:getCommonsCategory() return require("Module:language-like").getCommonsCategory(self) end --[==[Returns the Wikidata item id for the language or <code>nil</code>. This corresponds to the the second field in the data modules.]==] function Language:getWikidataItem() return require("Module:language-like").getWikidataItem(self) end --[==[Returns a table of <code>Script</code> objects for all scripts that the language is written in. See [[Module:scripts]].]==] function Language:getScripts() local scripts = self._scriptObjects if scripts == nil then local codes = self:getScriptCodes() if codes[1] == "All" then scripts = self:loadData("Module:scripts/data") else local get_script = require("Module:scripts").getByCode scripts = {} for i = 1, #codes do scripts[i] = get_script(codes[i], nil, nil, self._useRequire) end end self._scriptObjects = scripts end return scripts end --[==[Returns the table of script codes in the language's data file.]==] function Language:getScriptCodes() local scripts = self._scriptCodes if scripts == nil then scripts = self._rawData[4] if scripts then local codes, n = {}, 0 for code in gmatch(scripts, "[^,]+") do n = n + 1 -- Special handling of "Hants", which represents "Hani", "Hant" and "Hans" collectively. if code == "Hants" then codes[n] = "Hani" codes[n + 1] = "Hant" codes[n + 2] = "Hans" n = n + 2 else codes[n] = code end end scripts = codes else scripts = {"None"} end self._scriptCodes = scripts end return scripts end --[==[Given some text, this function iterates through the scripts of a given language and tries to find the script that best matches the text. It returns a {{code|lua|Script}} object representing the script. If no match is found at all, it returns the {{code|lua|None}} script object.]==] function Language:findBestScript(text, forceDetect) local useRequire = self._useRequire if not text or text == "" or text == "-" then return require("Module:scripts").getByCode("None", nil, nil, useRequire) end -- Differs from table returned by getScriptCodes, as Hants is not normalized into its constituents. local codes = self._bestScriptCodes if codes == nil then codes = self._rawData[4] codes = codes and split(codes, ",", true, true) or {"None"} self._bestScriptCodes = codes end local first_sc = codes[1] if first_sc == "All" then return require("Module:scripts").findBestScriptWithoutLang(text) end local get_script = require("Module:scripts").getByCode local codes_len = #codes if not (forceDetect or first_sc == "Hants" or codes_len > 1) then first_sc = get_script(first_sc, nil, nil, useRequire) local charset = first_sc.characters return charset and umatch(text, "[" .. charset .. "]") and first_sc or get_script("None", nil, nil, useRequire) end -- Remove all formatting characters. text = require("Module:utilities").get_plaintext(text) -- Remove all spaces and any ASCII punctuation. Some non-ASCII punctuation is script-specific, so can't be removed. text = ugsub(text, "[%s!\"#%%&'()*,%-./:;?@[\\%]_{}]+", "") if #text == 0 then return get_script("None", nil, nil, useRequire) end -- Try to match every script against the text, -- and return the one with the most matching characters. local bestcount, bestscript, length = 0 for i = 1, codes_len do local sc = codes[i] -- Special case for "Hants", which is a special code that represents whichever of "Hant" or "Hans" best matches, or "Hani" if they match equally. This avoids having to list all three. In addition, "Hants" will be treated as the best match if there is at least one matching character, under the assumption that a Han script is desirable in terms that contain a mix of Han and other scripts (not counting those which use Jpan or Kore). if sc == "Hants" then local Hani = get_script("Hani", nil, nil, useRequire) if not Hant_chars then Hant_chars = self:loadData("Module:zh/data/ts") Hans_chars = self:loadData("Module:zh/data/st") end local t, s, found = 0, 0 -- This is faster than using mw.ustring.gmatch directly. for ch in gmatch(ugsub(text, "[" .. Hani.characters .. "]", "\255%0"), "\255(.[\128-\191]*)") do found = true if Hant_chars[ch] then t = t + 1 if Hans_chars[ch] then s = s + 1 end elseif Hans_chars[ch] then s = s + 1 else t, s = t + 1, s + 1 end end if found then if t == s then return Hani end return get_script(t > s and "Hant" or "Hans", nil, nil, useRequire) end else sc = get_script(sc, nil, nil, useRequire) if not length then length = ulen(text) end -- Count characters by removing everything in the script's charset and comparing to the original length. local charset = sc.characters local count = charset and length - ulen(ugsub(text, "[" .. charset .. "]+", "")) or 0 if count >= length then return sc elseif count > bestcount then bestcount = count bestscript = sc end end end -- Return best matching script, or otherwise None. return bestscript or get_script("None", nil, nil, useRequire) end --[==[Returns a <code>Family</code> object for the language family that the language belongs to. See [[Module:families]].]==] function Language:getFamily() local family = self._familyObject if family == nil then family = self:getFamilyCode() -- If the value is nil, it's cached as false. family = family and require("Module:families").getByCode(family, self._useRequire) or false self._familyObject = family end return family or nil end --[==[Returns the family code in the language's data file.]==] function Language:getFamilyCode() local family = self._familyCode if family == nil then -- If the value is nil, it's cached as false. family = self._rawData[3] or false self._familyCode = family end return family or nil end function Language:getFamilyName() local family = self._familyName if family == nil then family = self:getFamily() -- If the value is nil, it's cached as false. family = family and family:getCanonicalName() or false self._familyName = family end return family or nil end --[==[Check whether the language belongs to `family` (which can be a family code or object). A list of objects can be given in place of `family`; in that case, return true if the language belongs to any of the specified families. Note that some languages (in particular, certain creoles) can have multiple immediate ancestors potentially belonging to different families; in that case, return true if the language belongs to any of the specified families.]==] function Language:inFamily(...) --check_object("family", nil, ...) for _, family in ipairs{...} do if type(family) == "table" then family = family:getCode() end local self_family_code = self:getFamilyCode() if not self_family_code then return false elseif self_family_code == family then return true end local self_family = self:getFamily() if self_family:inFamily(family) then return true -- If the family isn't a real family (e.g. creoles) check any ancestors. elseif self_family:getFamilyCode() == "qfa-not" then local ancestors = self:getAncestors() for _, ancestor in ipairs(ancestors) do if ancestor:inFamily(family) then return true end end end end return false end function Language:getParent() local parent = self._parentObject if parent == nil then parent = self:getParentCode() -- If the value is nil, it's cached as false. parent = parent and export.getByCode(parent, nil, true, true, self._useRequire) or false self._parentObject = parent end return parent or nil end function Language:getParentCode() local parent = self._parentCode if parent == nil then -- If the value is nil, it's cached as false. parent = self._rawData[5] or false self._parentCode = parent end return parent or nil end function Language:getParentName() local parent = self._parentName if parent == nil then parent = self:getParent() -- If the value is nil, it's cached as false. parent = parent and parent:getCanonicalName() or false self._parentName = parent end return parent or nil end function Language:getParentChain() local chain = self._parentChain if chain == nil then chain = {} local parent, n = self:getParent(), 0 while parent do n = n + 1 chain[n] = parent parent = parent:getParent() end self._parentChain = chain end return chain end function Language:hasParent(...) --check_object("language", nil, ...) for _, otherlang in ipairs{...} do for _, parent in ipairs(self:getParentChain()) do if type(otherlang) == "string" then if otherlang == parent:getCode() then return true end else if otherlang:getCode() == parent:getCode() then return true end end end end return false end --[==[ If the language is etymology-only, this iterates through parents until a full language or family is found, and the corresponding object is returned. If the language is a full language, then it simply returns itself. ]==] function Language:getFull() local full = self._fullObject if full == nil then full = self:getFullCode() full = full == self._code and self or export.getByCode(full, nil, nil, nil, self._useRequire) self._fullObject = full end return full end --[==[ If the language is an etymology-only language, this iterates through parents until a full language or family is found, and the corresponding code is returned. If the language is a full language, then it simply returns the language code. ]==] function Language:getFullCode() return self._fullCode or self._code end --[==[ If the language is an etymology-only language, this iterates through parents until a full language or family is found, and the corresponding canonical name is returned. If the language is a full language, then it simply returns the canonical name of the language. ]==] function Language:getFullName() local full = self._fullName if full == nil then full = self:getFull():getCanonicalName() self._fullName = full end return full end --[==[Returns a table of <code class="nf">Language</code> objects for all languages that this language is directly descended from. Generally this is only a single language, but creoles, pidgins and mixed languages can have multiple ancestors.]==] function Language:getAncestors() if not self._ancestorObjects then self._ancestorObjects = {} local ancestors = shallowcopy(self:getAncestorCodes()) if #ancestors > 0 then for _, ancestor in ipairs(ancestors) do insert(self._ancestorObjects, export.getByCode(ancestor, nil, true, nil, self._useRequire)) end else local fam = self:getFamily() local protoLang = fam and fam:getProtoLanguage() or nil -- For the cases where the current language is the proto-language -- of its family, or an etymology-only language that is ancestral to that -- proto-language, we need to step up a level higher right from the -- start. if protoLang and ( protoLang:getCode() == self._code or (self:hasType("etymology-only") and protoLang:hasAncestor(self)) ) then fam = fam:getFamily() protoLang = fam and fam:getProtoLanguage() or nil end while not protoLang and not (not fam or fam:getCode() == "qfa-not") do fam = fam:getFamily() protoLang = fam and fam:getProtoLanguage() or nil end insert(self._ancestorObjects, protoLang) end end return self._ancestorObjects end do -- Avoid a language being its own ancestor via class inheritance. We only need to check for this if the language has inherited an ancestor table from its parent, because we never want to drop ancestors that have been explicitly set in the data. -- Recursively iterate over ancestors until we either find self or run out. If self is found, return true. local function check_ancestor(self, lang) local codes = lang:getAncestorCodes() if not codes then return nil end for i = 1, #codes do local code = codes[i] if code == self._code then return true end local anc = export.getByCode(code, nil, true, nil, self._useRequire) if check_ancestor(self, anc) then return true end end end --[==[Returns a table of <code class="nf">Language</code> codes for all languages that this language is directly descended from. Generally this is only a single language, but creoles, pidgins and mixed languages can have multiple ancestors.]==] function Language:getAncestorCodes() if self._ancestorCodes then return self._ancestorCodes end local codes = self._rawData.ancestors if not codes then codes = {} self._ancestorCodes = codes return codes end codes = split(codes, ",", true, true) self._ancestorCodes = codes if ( #codes == 0 or #self._stack == 1 or self._stack[#self._stack].ancestors ) then return codes end local i, code = 1 while i <= #codes do code = codes[i] if check_ancestor(self, self) then remove(codes, i) else i = i + 1 end end return codes end end --[==[Given a list of language objects or codes, returns true if at least one of them is an ancestor. This includes any etymology-only children of that ancestor. If the language's ancestor(s) are etymology-only languages, it will also return true for those language parent(s) (e.g. if Vulgar Latin is the ancestor, it will also return true for its parent, Latin). However, a parent is excluded from this if the ancestor is also ancestral to that parent (e.g. if Classical Persian is the ancestor, Persian would return false, because Classical Persian is also ancestral to Persian).]==] function Language:hasAncestor(...) --check_object("language", nil, ...) local function iterateOverAncestorTree(node, func, parent_check) local ancestors = node:getAncestors() local ancestorsParents = {} for _, ancestor in ipairs(ancestors) do local ret = func(ancestor) or iterateOverAncestorTree(ancestor, func, parent_check) if ret then return ret end end -- Check the parents of any ancestors. We don't do this if checking the parents of the other language, so that we exclude any etymology-only children of those parents that are not directly related (e.g. if the ancestor is Vulgar Latin and we are checking New Latin, we want it to return false because they are on different ancestral branches. As such, if we're already checking the parent of New Latin (Latin) we don't want to compare it to the parent of the ancestor (Latin), as this would be a false positive; it should be one or the other). if not parent_check then return nil end for _, ancestor in ipairs(ancestors) do local ancestorParents = ancestor:getParentChain() for _, ancestorParent in ipairs(ancestorParents) do if ancestorParent:getCode() == self._code or ancestorParent:hasAncestor(ancestor) then break else insert(ancestorsParents, ancestorParent) end end end for _, ancestorParent in ipairs(ancestorsParents) do local ret = func(ancestorParent) if ret then return ret end end end local function do_iteration(otherlang, parent_check) -- otherlang can't be self if (type(otherlang) == "string" and otherlang or otherlang:getCode()) == self._code then return false end repeat if iterateOverAncestorTree( self, function(ancestor) return ancestor:getCode() == (type(otherlang) == "string" and otherlang or otherlang:getCode()) end, parent_check ) then return true elseif type(otherlang) == "string" then otherlang = export.getByCode(otherlang, nil, true, nil, self._useRequire) end otherlang = otherlang:getParent() parent_check = false until not otherlang end local parent_check = true for _, otherlang in ipairs{...} do local ret = do_iteration(otherlang, parent_check) if ret then return true end end return false end function Language:getAncestorChain() if not self._ancestorChain then self._ancestorChain = {} local step = self while true do local ancestors = step:getAncestors() step = #ancestors == 1 and ancestors[1] or nil if not step then break end insert(self._ancestorChain, 1, step) end end return self._ancestorChain end local function fetch_descendants(self, format) local languages = require("Module:languages/code to canonical name") local etymology_languages = require("Module:etymology languages/code to canonical name") local families = require("Module:families/code to canonical name") local descendants = {} local family = self:getFamily() -- Iterate over all three datasets. for _, data in ipairs{languages, etymology_languages, families} do for code in pairs(data) do local lang = export.getByCode(code, nil, true, true, self._useRequire) -- Test for a descendant. Earlier tests weed out most candidates, while the more intensive tests are only used sparingly. if ( code ~= self._code and -- Not self. lang:inFamily(family) and -- In the same family. ( family:getProtoLanguageCode() == self._code or -- Self is the protolanguage. self:hasDescendant(lang) or -- Full hasDescendant check. (lang:getFullCode() == self._code and not self:hasAncestor(lang)) -- Etymology-only child which isn't an ancestor. ) ) then if format == "object" then insert(descendants, lang) elseif format == "code" then insert(descendants, code) elseif format == "name" then insert(descendants, lang:getCanonicalName()) end end end end return descendants end function Language:getDescendants() if not self._descendantObjects then self._descendantObjects = fetch_descendants(self, "object") end return self._descendantObjects end function Language:getDescendantCodes() if not self._descendantCodes then self._descendantCodes = fetch_descendants(self, "code") end return self._descendantCodes end function Language:getDescendantNames() if not self._descendantNames then self._descendantNames = fetch_descendants(self, "name") end return self._descendantNames end function Language:hasDescendant(...) for _, lang in ipairs{...} do if type(lang) == "string" then lang = export.getByCode(lang, nil, true, nil, self._useRequire) end if lang:hasAncestor(self) then return true end end return false end local function fetch_children(self, format) local m_etym_data = require("Module:etymology languages/data") local self_code = self._code local children = {} for code, data in pairs(m_etym_data) do local _data = data repeat local parent = _data[5] if parent == self_code then if format == "object" then insert(children, export.getByCode(code, nil, true, nil, self._useRequire)) elseif format == "code" then insert(children, code) elseif format == "name" then insert(children, data[1]) end break end _data = m_etym_data[parent] until not _data end return children end function Language:getChildren() if not self._childObjects then self._childObjects = fetch_children(self, "object") end return self._childObjects end function Language:getChildrenCodes() if not self._childCodes then self._childCodes = fetch_children(self, "code") end return self._childCodes end function Language:getChildrenNames() if not self._childNames then self._childNames = fetch_children(self, "name") end return self._childNames end function Language:hasChild(...) local lang = ... if not lang then return false elseif type(lang) == "string" then lang = export.getByCode(lang, nil, true, nil, self._useRequire) end if lang:hasParent(self) then return true end return self:hasChild(select(2, ...)) end --[==[Returns the name of the main category of that language. Example: {{code|lua|"French language"}} for French, whose category is at [[:Category:French language]]. Unless optional argument <code>nocap</code> is given, the language name at the beginning of the returned value will be capitalized. This capitalization is correct for category names, but not if the language name is lowercase and the returned value of this function is used in the middle of a sentence.]==] function Language:getCategoryName(nocap) if not self._categoryName then local name = self:getCanonicalName() -- Only add " language" if a full language. if #self._stack == 1 then -- If the name already has "language" in it, don't add it. if not match(name, "[Ll]anguage$") then name = name .. " language" end end self._categoryName = name end if nocap then return self._categoryName else return mw.getContentLanguage():ucfirst(self._categoryName) end end --[==[Creates a link to the category; the link text is the canonical name.]==] function Language:makeCategoryLink() return "[[:Category:" .. self:getCategoryName() .. "|" .. self:getDisplayForm() .. "]]" end function Language:getStandardCharacters(sc) if type(self._rawData.standardChars) ~= "table" then return self._rawData.standardChars else if sc and type(sc) ~= "string" then check_object("script", nil, sc) sc = sc:getCode() end if (not sc) or sc == "None" then local scripts = {} for _, script in pairs(self._rawData.standardChars) do insert(scripts, script) end return concat(scripts) end if self._rawData.standardChars[sc] then return self._rawData.standardChars[sc] .. (self._rawData.standardChars[1] or "") end end end --[==[Make the entry name (i.e. the correct page name).]==] function Language:makeEntryName(text, sc) if (not text) or text == "" then return text, nil, {} end -- Set `unsupported` as true if certain conditions are met. local unsupported -- Check if there's an unsupported character. \239\191\189 is the replacement character U+FFFD, which can't be typed directly here due to an abuse filter. Unix-style dot-slash notation is also unsupported, as it is used for relative paths in links, as are 3 or more consecutive tildes. -- Note: match is faster with magic characters/charsets; find is faster with plaintext. if ( match(text, "[#<>%[%]_{|}]") or find(text, "\239\191\189") or match(text, "%f[^%z/]%.%.?%f[%z/]") or find(text, "~~~") ) then unsupported = true -- If it looks like an interwiki link. elseif find(text, ":") then local prefix = gsub(text, "^:*(.-):.*", ulower) if ( self:loadData("Module:data/namespaces")[prefix] or self:loadData("Module:data/interwikis")[prefix] ) then unsupported = true end end -- Check if the text is a listed unsupported title. local unsupportedTitles = self:loadData("Module:links/data").unsupported_titles if unsupportedTitles[text] then return "Unsupported titles/" .. unsupportedTitles[text], nil, {} end sc = checkScript(text, self, sc) local fail, cats text = normalize(text, sc) text, fail, cats = iterateSectionSubstitutions(text, nil, nil, self, sc, self._rawData.entry_name, "makeEntryName") text = umatch(text, "^[¿¡]?(.-[^%s%p].-)%s*[؟?!;՛՜ ՞ ՟?!︖︕।॥။၊་།]?$") or text -- Escape unsupported characters so they can be used in titles. ` is used as a delimiter for this, so a raw use of it in an unsupported title is also escaped here to prevent interference; this is only done with unsupported titles, though, so inclusion won't in itself mean a title is treated as unsupported (which is why it's excluded from the earlier test). if unsupported then local unsupported_characters = self:loadData("Module:links/data").unsupported_characters text = text:gsub("[#<>%[%]_`{|}\239]\191?\189?", unsupported_characters) :gsub("%f[^%z/]%.%.?%f[%z/]", function(m) return gsub(m, "%.", "`period`") end) :gsub("~~~+", function(m) return gsub(m, "~", "`tilde`") end) text = "Unsupported titles/" .. text end return text, fail, cats end --[==[Generates alternative forms using a specified method, and returns them as a table. If no method is specified, returns a table containing only the input term.]==] function Language:generateForms(text, sc) if self._rawData.generate_forms then sc = checkScript(text, self, sc) return require("Module:" .. self._rawData.generate_forms).generateForms(text, self._code, sc:getCode()) else return {text} end end --[==[Creates a sort key for the given entry name, following the rules appropriate for the language. This removes diacritical marks from the entry name if they are not considered significant for sorting, and may perform some other changes. Any initial hyphen is also removed, and anything parentheses is removed as well. The <code>sort_key</code> setting for each language in the data modules defines the replacements made by this function, or it gives the name of the module that takes the entry name and returns a sortkey.]==] function Language:makeSortKey(text, sc) if (not text) or text == "" then return text, nil, {} end if match(text, "<[^<>]+>") then track("track HTML tag") end -- Remove directional characters, soft hyphens, strip markers and HTML tags. text = ugsub(text, "[\194\173\226\128\170-\226\128\174\226\129\166-\226\129\169]", "") text = gsub(mw.text.unstrip(text), "<[^<>]+>", "") text = decode_uri(text, "PATH") text = checkNoEntities(self, text) -- Remove initial hyphens and * unless the term only consists of spacing + punctuation characters. text = ugsub(text, "^([􀀀-􏿽]*)[-־ـ᠊*]+([􀀀-􏿽]*)(.*[^%s%p].*)", "%1%2%3") sc = checkScript(text, self, sc) text = normalize(text, sc) text = removeCarets(text, sc) -- For languages with dotted dotless i, ensure that "İ" is sorted as "i", and "I" is sorted as "ı". if self:hasDottedDotlessI() then text = gsub(text, "I\204\135", "i") -- decomposed "İ" :gsub("I", "ı") text = sc:toFixedNFD(text) end -- Convert to lowercase, make the sortkey, then convert to uppercase. Where the language has dotted dotless i, it is usually not necessary to convert "i" to "İ" and "ı" to "I" first, because "I" will always be interpreted as conventional "I" (not dotless "İ") by any sorting algorithms, which will have been taken into account by the sortkey substitutions themselves. However, if no sortkey substitutions have been specified, then conversion is necessary so as to prevent "i" and "ı" both being sorted as "I". -- An exception is made for scripts that (sometimes) sort by scraping page content, as that means they are sensitive to changes in capitalization (as it changes the target page). local fail, cats if not sc:sortByScraping() then text = ulower(text) end text, fail, cats = iterateSectionSubstitutions(text, nil, nil, self, sc, self._rawData.sort_key, "makeSortKey") if not sc:sortByScraping() then if self:hasDottedDotlessI() and not self._rawData.sort_key then text = gsub(gsub(text, "ı", "I"), "i", "İ") text = sc:toFixedNFC(text) end text = uupper(text) end -- Remove parentheses, as long as they are either preceded or followed by something. text = gsub(text, "(.)[()]+", "%1") :gsub("[()]+(.)", "%1") text = escape_risky_characters(text) return text, fail, cats end --[==[Create the form used as as a basis for display text and transliteration.]==] local function processDisplayText(text, self, sc, keepCarets, keepPrefixes) local subbedChars = {} text, subbedChars = doTempSubstitutions(text, subbedChars, keepCarets) text = decode_uri(text, "PATH") text = checkNoEntities(self, text) sc = checkScript(text, self, sc) local fail, cats text = normalize(text, sc) text, fail, cats, subbedChars = iterateSectionSubstitutions(text, subbedChars, keepCarets, self, sc, self._rawData.display_text, "makeDisplayText") text = removeCarets(text, sc) -- Remove any interwiki link prefixes (unless they have been escaped or this has been disabled). if find(text, ":") and not keepPrefixes then local rep repeat text, rep = gsub(text, "\\\\(\\*:)", "\3%1") until rep == 0 text = gsub(text, "\\:", "\4") while true do local prefix = gsub(text, "^(.-):.+", function(m1) return gsub(m1, "\244[\128-\191]*", "") end) if not prefix or prefix == text then break end local lower_prefix = ulower(prefix) if not (self:loadData("Module:data/interwikis")[lower_prefix] or prefix == "") then break end text = gsub(text, "^(.-):(.*)", function(m1, m2) local ret = {} for subbedChar in gmatch(m1, "\244[\128-\191]*") do insert(ret, subbedChar) end return concat(ret) .. m2 end) end text = gsub(text, "\3", "\\") :gsub("\4", ":") end return text, fail, cats, subbedChars end --[==[Make the display text (i.e. what is displayed on the page).]==] function Language:makeDisplayText(text, sc, keepPrefixes) if (not text) or text == "" then return text, nil, {} end local fail, cats, subbedChars text, fail, cats, subbedChars = processDisplayText(text, self, sc, nil, keepPrefixes) text = escape_risky_characters(text) return undoTempSubstitutions(text, subbedChars), fail, cats end --[==[Transliterates the text from the given script into the Latin script (see [[Wiktionary:Transliteration and romanization]]). The language must have the <code>translit</code> property for this to work; if it is not present, {{code|lua|nil}} is returned. Returns three values: # The transliteration. # A boolean which indicates whether the transliteration failed for an unexpected reason. If {{code|lua|false}}, then the transliteration either succeeded, or the module is returning nothing in a controlled way (e.g. the input was {{code|lua|"-"}}). Generally, this means that no maintenance action is required. If {{code|lua|true}}, then the transliteration is {{code|lua|nil}} because either the input or output was defective in some way (e.g. [[Module:ar-translit]] will not transliterate non-vocalised inputs, and this module will fail partially-completed transliterations in all languages). Note that this value can be manually set by the transliteration module, so make sure to cross-check to ensure it is accurate. # A table of categories selected by the transliteration module, which should be in the format expected by {{code|lua|format_categories}} in [[Module:utilities]]. The <code>sc</code> parameter is handled by the transliteration module, and how it is handled is specific to that module. Some transliteration modules may tolerate {{code|lua|nil}} as the script, others require it to be one of the possible scripts that the module can transliterate, and will show an error if it's not one of them. For this reason, the <code>sc</code> parameter should always be provided when writing non-language-specific code. The <code>module_override</code> parameter is used to override the default module that is used to provide the transliteration. This is useful in cases where you need to demonstrate a particular module in use, but there is no default module yet, or you want to demonstrate an alternative version of a transliteration module before making it official. It should not be used in real modules or templates, only for testing. All uses of this parameter are tracked by [[Wiktionary:Tracking/module_override]]. '''Known bugs''': * This function assumes {tr(s1) .. tr(s2) == tr(s1 .. s2)}. When this assertion fails, wikitext markups like <nowiki>'''</nowiki> can cause wrong transliterations. * HTML entities like <code>&amp;apos;</code>, often used to escape wikitext markups, do not work.]==] function Language:transliterate(text, sc, module_override) -- If there is no text, or the language doesn't have transliteration data and there's no override, return nil. if not (self._rawData.translit or module_override) then return nil, false, {} elseif (not text) or text == "" or text == "-" then return text, false, {} end -- If the script is not transliteratable (and no override is given), return nil. sc = checkScript(text, self, sc) if not (sc:isTransliterated() or module_override) then -- temporary tracking to see if/when this gets triggered track("non-transliterable") track("non-transliterable/" .. self:getCode()) track("non-transliterable/" .. sc:getCode()) track("non-transliterable/" .. sc:getCode() .. "/" .. self:getCode()) return nil, true, {} end -- Remove any strip markers. text = mw.text.unstrip(text) -- Get the display text with the keepCarets flag set. local fail, cats, subbedChars text, fail, cats, subbedChars = processDisplayText(text, self, sc, true) -- Transliterate (using the module override if applicable). text, fail, cats, subbedChars = iterateSectionSubstitutions(text, subbedChars, true, self, sc, module_override or self._rawData.translit, "tr") if not text then return nil, true, cats end -- Incomplete transliterations return nil. local charset = sc.characters if charset and umatch(text, "[" .. charset .. "]") then -- Remove any characters in Latin, which includes Latin characters also included in other scripts (as these are false positives), as well as any PUA substitutions. Anything remaining should only be script code "None" (e.g. numerals). local check_text = ugsub(text, "[" .. require("Module:scripts").getByCode("Latn").characters .. "􀀀-􏿽]+", "") -- Set none_is_last_resort_only flag, so that any non-None chars will cause a script other than "None" to be returned. if require("Module:scripts").findBestScriptWithoutLang(check_text, true):getCode() ~= "None" then return nil, true, cats end end text = escape_risky_characters(text) text = undoTempSubstitutions(text, subbedChars) -- If the script does not use capitalization, then capitalize any letters of the transliteration which are immediately preceded by a caret (and remove the caret). if text and not sc:hasCapitalization() and text:find("^", 1, true) then text = processCarets(text, "%^([\128-\191\244]*%*?)([^\128-\191\244][\128-\191]*)", function(m1, m2) return m1 .. uupper(m2) end) end -- Track module overrides. if module_override ~= nil then track("module_override") end fail = text == nil and (not not fail) or false return text, fail, cats end do local function handle_language_spec(self, spec, sc) local ret = self["_" .. spec] if ret == nil then ret = self._rawData[spec] if type(ret) == "string" then ret = list_to_set(split(ret, ",", true, true)) end self["_" .. spec] = ret end if type(ret) == "table" then ret = ret[sc:getCode()] end return not not ret end function Language:overrideManualTranslit(sc) return handle_language_spec(self, "override_translit", sc) end function Language:link_tr(sc) return handle_language_spec(self, "link_tr", sc) end end --[==[Returns {{code|lua|true}} if the language has a transliteration module, or {{code|lua|false}} if it doesn't.]==] function Language:hasTranslit() return not not self._rawData.translit end --[==[Returns {{code|lua|true}} if the language uses the letters I/ı and İ/i, or {{code|lua|false}} if it doesn't.]==] function Language:hasDottedDotlessI() return not not self._rawData.dotted_dotless_i end function Language:toJSON(returnTable) local entryNamePatterns = nil local entryNameRemoveDiacritics = nil if self._rawData.entry_name then entryNameRemoveDiacritics = self._rawData.entry_name.remove_diacritics if self._rawData.entry_name.from then entryNamePatterns = {} for i, from in ipairs(self._rawData.entry_name.from) do insert(entryNamePatterns, {from = from, to = self._rawData.entry_name.to[i] or ""}) end end end -- mainCode should only end up non-nil if dontCanonicalizeAliases is passed to make_object(). local ret = m_table.deepcopy{ ancestors = self:getAncestorCodes(), canonicalName = self:getCanonicalName(), categoryName = self:getCategoryName("nocap"), code = self._code, mainCode = self._main_code, entryNamePatterns = entryNamePatterns, entryNameRemoveDiacritics = entryNameRemoveDiacritics, family = self:getFamilyCode(), otherNames = self:getOtherNames(true), aliases = self:getAliases(), varieties = self:getVarieties(), scripts = self:getScriptCodes(), parent = self._parentCode or nil, full = self._fullCode or nil, type = m_table.keysToList(self:getTypes()), wikimediaLanguages = self:getWikimediaLanguageCodes(), wikidataItem = self:getWikidataItem(), } if returnTable then return ret else return require("Module:JSON").toJSON(ret) end end --[==[ <span style="color: #BA0000">This function is not for use in entries or other content pages.</span> Returns a blob of data about the language. The format of this blob is undocumented, and perhaps unstable; it's intended for things like the module's own unit-tests, which are "close friends" with the module and will be kept up-to-date as the format changes. -- Do NOT use these methods! -- All uses should be pre-approved on the talk page! ]==] function Language:getRawData() local rawData = {} for _, element in ipairs(self._stack) do for k, v in pairs(element) do rawData[k] = v end end return rawData end --[==[<span style="color: #BA0000">This function is not for use in entries or other content pages.</span> Returns a blob of data about the language that contains the "extra data". Much like with getRawData, the format of this blob is undocumented, and perhaps unstable; it's intended for things like the module's own unit-tests, which are "close friends" with the module and will be kept up-to-date as the format changes.]==] function Language:getRawExtraData() if #self._stack == 1 then self:loadInExtraData() end return self._extraData end local function getRawExtraLanguageData(self, code) local modulename = export.getExtraDataModuleName(code) return modulename and self:loadData("Module:" .. modulename)[code] or nil end function Language:loadInExtraData() if not self._extraData then -- load extra data from module and assign to _extraData field -- use empty table as a fallback if extra data is nil self._extraData = getRawExtraLanguageData(self, self._code) or {} end end function export.getDataModuleName(code) local letter = match(code, "^(%l)[%l-]+$") if not letter then return nil elseif find(code, "-", 1, true) then return "languages/data/exceptional" end local code_len = #code return code_len == 2 and "languages/data/2" or code_len == 3 and "languages/data/3/" .. letter or nil end function export.getExtraDataModuleName(code) local dataModule = export.getDataModuleName(code) return dataModule and dataModule .. "/extra" or nil end do local key_types = { [2] = "unique", aliases = "unique", otherNames = "unique", type = "append", varieties = "unique" } function export.makeObject(code, data, useRequire, dontCanonicalizeAliases) if not data then return nil end -- Convert any aliases. local input_code = code code = normalize_code(code, useRequire) input_code = dontCanonicalizeAliases and input_code or code if find(data.type, "family") and not data[5] then return require("Module:families").makeObject(code, data, useRequire) end local parent if data[5] then parent = export.getByCode(data[5], nil, true, true, useRequire) else parent = Language end parent.__index = parent local lang = { _code = input_code, _useRequire = useRequire or nil } -- This can only happen if dontCanonicalizeAliases is passed to make_object(). if code ~= input_code then lang._main_code = code end -- Full language. if not parent._stack then -- Create stack, accessed with rawData metamethod. local stack = parent._rawData and {parent._rawData, data} or {data} lang._stack = stack lang._rawData = setmetatable({}, { __index = function(t, k) local key_type = key_types[k] -- Data that isn't inherited from the parent. if key_type == "unique" then return stack[#stack][k] -- Data that is appended by each generation. elseif key_type == "append" then local parts = {} for i = 1, #stack do insert(parts, stack[i][k]) end if type(parts[1]) == "string" then return concat(parts, ","), true end -- Otherwise, iterate down the stack, looking for a match. else local i = #stack while not stack[i][k] and i > 1 do i = i - 1 end return stack[i][k] end end, -- Retain immutability (as writing to rawData will break functionality). __newindex = function() error("not allowed to edit rawData") end }) -- Full code is the parent code. lang._fullCode = parent._code or code -- Etymology-only. else -- Copy over rawData and stack to the new object, and add new layer to stack. lang._rawData = parent._rawData lang._stack = parent._stack insert(lang._stack, data) -- Copy full code. lang._fullCode = parent._fullCode end return setmetatable(lang, parent) end end --[==[Finds the language whose code matches the one provided. If it exists, it returns a <code class="nf">Language</code> object representing the language. Otherwise, it returns {{code|lua|nil}}, unless <code class="n">paramForError</code> is given, in which case an error is generated. If <code class="n">paramForError</code> is {{code|lua|true}}, a generic error message mentioning the bad code is generated; otherwise <code class="n">paramForError</code> should be a string or number specifying the parameter that the code came from, and this parameter will be mentioned in the error message along with the bad code. If <code class="n">allowEtymLang</code> is specified, etymology-only language codes are allowed and looked up along with normal language codes. If <code class="n">allowFamily</code> is specified, language family codes are allowed and looked up along with normal language codes.]==] function export.getByCode(code, paramForError, allowEtymLang, allowFamily, useRequire) -- Track uses of paramForError, ultimately so it can be removed, as error-handling should be done by [[Module:parameters]], not here. if paramForError ~= nil then require("Module:debug/track")("languages/paramForError") end if type(code) ~= "string" then local typ if not code then typ = "nil" elseif check_object("language", true, code) then typ = "a language object" elseif check_object("family", true, code) then typ = "a family object" else typ = "a " .. type(code) end error("The function getByCode expects a string as its first argument, but received " .. typ .. ".") end local m_data = conditionalRequire("Module:languages/data", useRequire) if m_data.aliases[code] or m_data.track[code] then track(code) end local norm_code = normalize_code(code, useRequire) local modulename = export.getDataModuleName(norm_code) local data = modulename and conditionalRequire("Module:" .. modulename, useRequire)[norm_code] or (allowEtymLang and require("Module:etymology languages/track-bad-etym-code")(norm_code) and conditionalRequire("Module:etymology languages/data", useRequire)[norm_code]) or (allowFamily and conditionalRequire("Module:families/data", useRequire)[norm_code]) or (allowEtymLang and allowFamily and require("Module:families/track-bad-etym-code")(norm_code) and conditionalRequire("Module:families/data/etymology", useRequire)[norm_code]) local retval = code and data and export.makeObject(code, data, useRequire) if not retval and paramForError then require("Module:languages/errorGetBy").code(code, paramForError, allowEtymLang, allowFamily) end return retval end --[==[Finds the language whose canonical name (the name used to represent that language on Wiktionary) or other name matches the one provided. If it exists, it returns a <code class="nf">Language</code> object representing the language. Otherwise, it returns {{code|lua|nil}}, unless <code class="n">paramForError</code> is given, in which case an error is generated. If <code class="n">allowEtymLang</code> is specified, etymology-only language codes are allowed and looked up along with normal language codes. If <code class="n">allowFamily</code> is specified, language family codes are allowed and looked up along with normal language codes. The canonical name of languages should always be unique (it is an error for two languages on Wiktionary to share the same canonical name), so this is guaranteed to give at most one result. This function is powered by [[Module:languages/canonical names]], which contains a pre-generated mapping of full-language canonical names to codes. It is generated by going through the [[:Category:Language data modules]] for full languages. When <code class="n">allowEtymLang</code> is specified for the above function, [[Module:etymology languages/canonical names]] may also be used, and when <code class="n">allowFamily</code> is specified for the above function, [[Module:families/canonical names]] may also be used.]==] function export.getByCanonicalName(name, errorIfInvalid, allowEtymLang, allowFamily, useRequire) local byName = conditionalRequire("Module:languages/canonical names", useRequire) local code = byName and byName[name] if not code and allowEtymLang then byName = conditionalRequire("Module:etymology languages/canonical names", useRequire) code = byName and byName[name] or byName[gsub(name, " [Ss]ubstrate$", "")] or byName[gsub(name, "^a ", "")] or byName[gsub(name, "^a ", "") :gsub(" [Ss]ubstrate$", "")] or -- For etymology families like "ira-pro". -- FIXME: This is not ideal, as it allows " languages" to be appended to any etymology-only language, too. byName[match(name, "^(.*) languages$")] end if not code and allowFamily then byName = conditionalRequire("Module:families/canonical names", useRequire) code = byName and byName[name] or byName[match(name, "^(.*) languages$")] end local retval = code and export.getByCode(code, errorIfInvalid, allowEtymLang, allowFamily, useRequire) if not retval and errorIfInvalid then require("Module:languages/errorGetBy").canonicalName(name, allowEtymLang, allowFamily) end return retval end --[==[Used by [[Module:languages/data/2]] (et al.) to add default types to the entities returned.]==] function export.addDefaultTypes(data, regular, ...) local n = arg.n local types = n > 0 and concat(arg, ",") or "" for _, entity in next, data do -- "regular" encompasses everything that doesn't have another type already assigned. if regular then entity.type = entity.type or "regular" end if n > 0 then entity.type = types .. (entity.type and ("," .. entity.type) or "") end end return data end --[==[Used by [[Module:languages/data/2]] (et al.) and [[Module:etymology languages/data]] to finalize language-related data into the format that is actually returned.]==] function export.finalizeLanguageData(data) -- 4 is scripts. local fields = {4, "ancestors", "link_tr", "override_translit", "type", "wikimedia_codes"} local fields_len = #fields for _, entity in next, data do for i = 1, fields_len do local key = fields[i] local field = entity[key] if field and type(field) == "string" then entity[key] = gsub(field, "%s+", "") end end end return data end --[==[Used by [[Module:etymology languages/data]] and [[Module:families/data/etymology]] to finalize etymology-related data into the format that is actually returned.]==] function export.finalizeEtymologyData(data) local aliases = {} for _, entity in next, data do -- Move parent to 5 and family to 3. entity[5] = entity[3] entity[3] = entity.family entity.family = nil end for code, alias in next, aliases do data[code] = alias end return data end --[==[For backwards compatibility only; modules should require the error themselves.]==] function export.err(lang_code, param, code_desc, template_tag, not_real_lang) return require("Module:languages/error")(lang_code, param, code_desc, template_tag, not_real_lang) end return export 2ud235ky1bxzajeuney2fygnbe1dk02 192569 192568 2024-11-17T14:05:35Z Lee 19 [[:en:Module:languages]] වෙතින් එක් සංශෝධනයක් 192568 Scribunto text/plain local require = require local m_str_utils = require("Module:string utilities") local m_table = require("Module:table") local mw = mw local string = string local table = table local ustring = mw.ustring local char = string.char local check_object = require("Module:utilities").check_object local concat = table.concat local decode_entities = m_str_utils.decode_entities local decode_uri = m_str_utils.decode_uri local find = string.find local floor = math.floor local gmatch = string.gmatch local gsub = string.gsub local insert = table.insert local ipairs = ipairs local list_to_set = m_table.listToSet local load_data = mw.loadData local match = string.match local next = next local pairs = pairs local pattern_escape = m_str_utils.pattern_escape local remove = table.remove local remove_duplicates = m_table.removeDuplicates local replacement_escape = m_str_utils.replacement_escape local select = select local setmetatable = setmetatable local shallowcopy = m_table.shallowcopy local split = m_str_utils.split local type = type local ugsub = ustring.gsub local ulen = m_str_utils.len local ulower = m_str_utils.lower local umatch = ustring.match local uupper = m_str_utils.upper -- Loaded as needed by findBestScript. local Hans_chars local Hant_chars local export = {} --[=[ This module implements fetching of language-specific information and processing text in a given language. There are two types of languages: full languages and etymology-only languages. The essential difference is that only full languages appear in L2 headings in vocabulary entries, and hence categories like [[:Category:French nouns]] exist only for full languages. Etymology-only languages have either a full language or another etymology-only language as their parent (in the parent-child inheritance sense), and for etymology-only languages with another etymology-only language as their parent, a full language can always be derived by following the parent links upwards. For example, "Canadian French", code 'fr-CA', is an etymology-only language whose parent is the full language "French", code 'fr'. An example of an etymology-only language with another etymology-only parent is "Northumbrian Old English", code 'ang-nor', which has "Anglian Old English", code 'ang-ang' as its parent; this is an etymology-only language whose parent is "Old English", code "ang", which is a full language. (This is because Northumbrian Old English is considered a variety of Anglian Old English.) Sometimes the parent is the "Undetermined" language, code 'und'; this is the case, for example, for "substrate" languages such as "Pre-Greek", code 'qsb-grc', and "the BMAC substrate", code 'qsb-bma'. It is important to distinguish language ''parents'' from language ''ancestors''. The parent-child relationship is one of containment, i.e. if X is a child of Y, X is considered a variety of Y. On the other hand, the ancestor-descendant relationship is one of descent in time. For example, "Classical Latin", code 'la-cla', and "Late Latin", code 'la-lat', are both etymology-only languages with "Latin", code 'la', as their parents, because both of the former are varieties of Latin. However, Late Latin does *NOT* have Classical Latin as its parent because Late Latin is *not* a variety of Classical Latin; rather, it is a descendant. There is in fact a separate 'ancestors' field that is used to express the ancestor-descendant relationship, and Late Latin's ancestor is given as Classical Latin. It is also important to note that sometimes an etymology-only language is actually the conceptual ancestor of its parent language. This happens, for example, with "Old Italian" (code 'roa-oit'), which is an etymology-only variant of full language "Italian" (code 'it'), and with "Old Latin" (code 'itc-ola'), which is an etymology-only variant of Latin. In both cases, the full language has the etymology-only variant listed as an ancestor. This allows a Latin term to inherit from Old Latin using the {{tl|inh}} template (where in this template, "inheritance" refers to ancestral inheritance, i.e. inheritance in time, rather than in the parent-child sense); likewise for Italian and Old Italian. Full languages come in three subtypes: * {regular}: This indicates a full language that is attested according to [[WT:CFI]] and therefore permitted in the main namespace. There may also be reconstructed terms for the language, which are placed in the {Reconstruction} namespace and must be prefixed with * to indicate a reconstruction. Most full languages are natural (not constructed) languages, but a few constructed languages (e.g. Esperanto and Volapük, among others) are also allowed in the mainspace and considered regular languages. * {reconstructed}: This language is not attested according to [[WT:CFI]], and therefore is allowed only in the {Reconstruction} namespace. All terms in this language are reconstructed, and must be prefixed with *. Languages such as Proto-Indo-European and Proto-Germanic are in this category. * {appendix-constructed}: This language is attested but does not meet the additional requirements set out for constructed languages ([[WT:CFI#Constructed languages]]). Its entries must therefore be in the Appendix namespace, but they are not reconstructed and therefore should not have * prefixed in links. Most constructed languages are of this subtype. Both full languages and etymology-only languages have a {Language} object associated with them, which is fetched using the {getByCode} function in [[Module:languages]] to convert a language code to a {Language} object. Depending on the options supplied to this function, etymology-only languages may or may not be accepted, and family codes may be accepted (returning a {Family} object as described in [[Module:families]]). There are also separate {getByCanonicalName} functions in [[Module:languages]] and [[Module:etymology languages]] to convert a language's canonical name to a {Language} object (depending on whether the canonical name refers to a full or etymology-only language). Textual strings belonging to a given language come in several different ''text variants'': # The ''input text'' is what the user supplies in wikitext, in the parameters to {{tl|m}}, {{tl|l}}, {{tl|ux}}, {{tl|t}}, {{tl|lang}} and the like. # The ''display text'' is the text in the form as it will be displayed to the user. This can include accent marks that are stripped to form the entry text (see below), as well as embedded bracketed links that are variously processed further. The display text is generated from the input text by applying language-specific transformations; for most languages, there will be no such transformations. Examples of transformations are bad-character replacements for certain languages (e.g. replacing 'l' or '1' to [[palochka]] in certain languages in Cyrillic); and for Thai and Khmer, converting space-separated words to bracketed words and resolving respelling substitutions such as [กรีน/กฺรีน], which indicate how to transliterate given words. # The ''entry text'' is the text in the form used to generate a link to a Wiktionary entry. This is usually generated from the display text by stripping certain sorts of diacritics on a per-language basis, and sometimes doing other transformations. The concept of ''entry text'' only really makes sense for text that does not contain embedded links, meaning that display text containing embedded links will need to have the links individually processed to get per-link entry text in order to generate the resolved display text (see below). # The ''resolved display text'' is the result of resolving embedded links in the display text (e.g. converting them to two-part links where the first part has entry-text transformations applied, and adding appropriate language-specific fragments) and adding appropriate language and script tagging. This text can be passed directly to MediaWiki for display. # The ''source translit text'' is the text as supplied to the language-specific {transliterate()} method. The form of the source translit text may need to be language-specific, e.g Thai and Khmer will need the full unprocessed input text, whereas other languages may need to work off the display text. [FIXME: It's still unclear to me how embedded bracketed links are handled in the existing code.] In general, embedded links need to be removed (i.e. converted to their "bare display" form by taking the right part of two-part links and removing double brackets), but when this happens is unclear to me [FIXME]. Some languages have a chop-up-and-paste-together scheme that sends parts of the text through the transliterate mechanism, and for others (those listed in {contiguous_substition} in [[Module:languages/data]]) they receive the full input text, but preprocessed in certain ways. (The wisdom of this is still unclear to me.) # The ''transliterated text'' (or ''transliteration'') is the result of transliterating the source translit text. Unlike for all the other text variants except the transcribed text, it is always in the Latin script. # The ''transcribed text'' (or ''transcription'') is the result of transcribing the source translit text, where "transcription" here means a close approximation to the phonetic form of the language in languages (e.g. Akkadian, Sumerian, Ancient Egyptian, maybe Tibetan) that have a wide difference between the written letters and spoken form. Unlike for all the other text variants other than the transliterated text, it is always in the Latin script. Currently, the transcribed text is always supplied manually be the user; there is no such thing as a {lua|transcribe()} method on language objects. # The ''sort key'' is the text used in sort keys for determining the placing of pages in categories they belong to. The sort key is generated from the pagename or a specified ''sort base'' by lowercasing, doing language-specific transformations and then uppercasing the result. If the sort base is supplied and is generated from input text, it needs to be converted to display text, have embedded links removed (i.e. resolving them to their right side if they are two-part links) and have entry text transformations applied. # There are other text variants that occur in usexes (specifically, there are normalized variants of several of the above text variants), but we can skip them for now. The following methods exist on {Language} objects to convert between different text variants: # {makeDisplayText}: This converts input text to display text. # {lua|makeEntryName}: This converts input or display text to entry text. [FIXME: This needs some rethinking. In particular, {lua|makeEntryName} is sometimes called on display text (in some paths inside of [[Module:links]]) and sometimes called on input text (in other paths inside of [[Module:links]], and usually from other modules). We need to make sure we don't try to convert input text to display text twice, but at the same time we need to support calling it directly on input text since so many modules do this. This means we need to add a parameter indicating whether the passed-in text is input or display text; if that former, we call {lua|makeDisplayText} ourselves.] # {lua|transliterate}: This appears to convert input text with embedded brackets removed into a transliteration. [FIXME: This needs some rethinking. In particular, it calls {lua|processDisplayText} on its input, which won't work for Thai and Khmer, so we may need language-specific flags indicating whether to pass the input text directly to the language transliterate method. In addition, I'm not sure how embedded links are handled in the existing translit code; a lot of callers remove the links themselves before calling {lua|transliterate()}, which I assume is wrong.] # {lua|makeSortKey}: This converts entry text (?) to a sort key. [FIXME: Clarify this.] ]=] local function track(page) require("Module:debug/track")("languages/" .. page) return true end local function conditionalRequire(modname, useRequire) return (useRequire and require or load_data)(modname) end local function normalize_code(code, useRequire) return conditionalRequire("Module:languages/data", useRequire).aliases[code] or code end -- Convert risky characters to HTML entities, which minimizes interference once returned (e.g. for "sms:a", "<!-- -->" etc.). local function escape_risky_characters(text) local encode_entities = require("Module:string/encode entities") -- Spacing characters in isolation generally need to be escaped in order to be properly processed by the MediaWiki software. if umatch(text, "^%s*$") then return encode_entities(text, text) else return encode_entities(text, "!#%&*+/:;<=>?@[\\]_{|}") end end -- Temporarily convert various formatting characters to PUA to prevent them from being disrupted by the substitution process. local function doTempSubstitutions(text, subbedChars, keepCarets, noTrim) -- Clone so that we don't insert any extra patterns into the table in package.loaded. For some reason, using require seems to keep memory use down; probably because the table is always cloned. local patterns = shallowcopy(require("Module:languages/data/patterns")) if keepCarets then insert(patterns, "((\\+)%^)") insert(patterns, "((%^))") end -- Ensure any whitespace at the beginning and end is temp substituted, to prevent it from being accidentally trimmed. We only want to trim any final spaces added during the substitution process (e.g. by a module), which means we only do this during the first round of temp substitutions. if not noTrim then insert(patterns, "^([\128-\191\244]*(%s+))") insert(patterns, "((%s+)[\128-\191\244]*)$") end -- Pre-substitution, of "[[" and "]]", which makes pattern matching more accurate. text = gsub(text, "%f[%[]%[%[", "\1") :gsub("%f[%]]%]%]", "\2") local i = #subbedChars for _, pattern in ipairs(patterns) do -- Patterns ending in \0 stand are for things like "[[" or "]]"), so the inserted PUA are treated as breaks between terms by modules that scrape info from pages. local term_divider pattern = gsub(pattern, "%z$", function(divider) term_divider = divider == "\0" return "" end) text = gsub(text, pattern, function(...) local m = {...} local m1New = m[1] for k = 2, #m do local n = i + k - 1 subbedChars[n] = m[k] local byte2 = floor(n / 4096) % 64 + (term_divider and 128 or 136) local byte3 = floor(n / 64) % 64 + 128 local byte4 = n % 64 + 128 m1New = gsub(m1New, pattern_escape(m[k]), "\244" .. char(byte2) .. char(byte3) .. char(byte4), 1) end i = i + #m - 1 return m1New end) end text = gsub(text, "\1", "%[%[") :gsub("\2", "%]%]") return text, subbedChars end -- Reinsert any formatting that was temporarily substituted. local function undoTempSubstitutions(text, subbedChars) for i = 1, #subbedChars do local byte2 = floor(i / 4096) % 64 + 128 local byte3 = floor(i / 64) % 64 + 128 local byte4 = i % 64 + 128 text = gsub(text, "\244[" .. char(byte2) .. char(byte2+8) .. "]" .. char(byte3) .. char(byte4), replacement_escape(subbedChars[i])) end text = gsub(text, "\1", "%[%[") :gsub("\2", "%]%]") return text end -- Check if the raw text is an unsupported title, and if so return that. Otherwise, remove HTML entities. We do the pre-conversion to avoid loading the unsupported title list unnecessarily. local function checkNoEntities(self, text) local textNoEnc = decode_entities(text) if textNoEnc ~= text and self:loadData("Module:links/data").unsupported_titles[text] then return text else return textNoEnc end end -- If no script object is provided (or if it's invalid or None), get one. local function checkScript(text, self, sc) if not check_object("script", true, sc) or sc:getCode() == "None" then return self:findBestScript(text) else return sc end end local function normalize(text, sc) text = sc:fixDiscouragedSequences(text) return sc:toFixedNFD(text) end -- Split the text into sections, based on the presence of temporarily substituted formatting characters, then iterate over each one to apply substitutions. This avoids putting PUA characters through language-specific modules, which may be unequipped for them. local function iterateSectionSubstitutions(text, subbedChars, keepCarets, self, sc, substitution_data, function_name) local fail, cats, sections = nil, {} -- See [[Module:languages/data]]. if not find(text, "\244") or self:loadData("Module:languages/data").contiguous_substitution[self._code] then sections = {text} else sections = split(text, "\244[\128-\143][\128-\191]*", true) end for _, section in ipairs(sections) do -- Don't bother processing empty strings or whitespace (which may also not be handled well by dedicated modules). if gsub(section, "%s+", "") ~= "" then local sub, sub_fail, sub_cats = require("Module:languages/doSubstitutions")(section, self, sc, substitution_data, function_name) -- Second round of temporary substitutions, in case any formatting was added by the main substitution process. However, don't do this if the section contains formatting already (as it would have had to have been escaped to reach this stage, and therefore should be given as raw text). if sub and subbedChars then local noSub for _, pattern in ipairs(require("Module:languages/data/patterns")) do if match(section, pattern .. "%z?") then noSub = true end end if not noSub then sub, subbedChars = doTempSubstitutions(sub, subbedChars, keepCarets, true) end end if (not sub) or sub_fail then text = sub fail = sub_fail cats = sub_cats or {} break end text = sub and gsub(text, pattern_escape(section), replacement_escape(sub), 1) or text if type(sub_cats) == "table" then for _, cat in ipairs(sub_cats) do insert(cats, cat) end end end end -- Trim, unless there are only spacing characters, while ignoring any final formatting characters. text = text and text:gsub("^([\128-\191\244]*)%s+(%S)", "%1%2") :gsub("(%S)%s+([\128-\191\244]*)$", "%1%2") -- Remove duplicate categories. if #cats > 1 then cats = remove_duplicates(cats) end return text, fail, cats, subbedChars end -- Process carets (and any escapes). Default to simple removal, if no pattern/replacement is given. local function processCarets(text, pattern, repl) local rep repeat text, rep = gsub(text, "\\\\(\\*^)", "\3%1") until rep == 0 return text:gsub("\\^", "\4") :gsub(pattern or "%^", repl or "") :gsub("\3", "\\") :gsub("\4", "^") end -- Remove carets if they are used to capitalize parts of transliterations (unless they have been escaped). local function removeCarets(text, sc) if not sc:hasCapitalization() and sc:isTransliterated() and text:find("^", 1, true) then return processCarets(text) else return text end end local Language = {} function Language:loadData(modname) return (self._useRequire and require or mw.loadData)(modname) end --[==[Returns the language code of the language. Example: {{code|lua|"fr"}} for French.]==] function Language:getCode() return self._code end --[==[Returns the canonical name of the language. This is the name used to represent that language on Wiktionary, and is guaranteed to be unique to that language alone. Example: {{code|lua|"French"}} for French.]==] function Language:getCanonicalName() local name = self._name if name == nil then name = self._rawData[1] self._name = name end return name end --[==[ Return the display form of the language. The display form of a language, family or script is the form it takes when appearing as the <code><var>source</var></code> in categories such as <code>English terms derived from <var>source</var></code> or <code>English given names from <var>source</var></code>, and is also the displayed text in {makeCategoryLink()} links. For full and etymology-only languages, this is the same as the canonical name, but for families, it reads <code>"<var>name</var> languages"</code> (e.g. {"Indo-Iranian languages"}), and for scripts, it reads <code>"<var>name</var> script"</code> (e.g. {"Arabic script"}). ]==] function Language:getDisplayForm() local form = self._displayForm if form == nil then form = self:getCanonicalName() -- Add article and " substrate" to substrates that lack them. if self:getFamilyCode() == "qfa-sub" then if not (match(form, "^[Tt]he ") or match(form, "^[Aa] ")) then form = "a " .. form end if not match(form, "[Ss]ubstrate") then form = form .. " substrate" end end self._displayForm = form end return form end --[==[Returns the value which should be used in the HTML lang= attribute for tagged text in the language.]==] function Language:getHTMLAttribute(sc, region) local code = self._code if not find(code, "-", 1, true) then return code .. "-" .. sc:getCode() .. (region and "-" .. region or "") end local parent = self:getParent() region = region or match(code, "%f[%u][%u-]+%f[%U]") if parent then return parent:getHTMLAttribute(sc, region) end -- TODO: ISO family codes can also be used. return "mis-" .. sc:getCode() .. (region and "-" .. region or "") end --[==[Returns a table of the "other names" that the language is known by, excluding the canonical name. The names are not guaranteed to be unique, in that sometimes more than one language is known by the same name. Example: {{code|lua|{"Manx Gaelic", "Northern Manx", "Southern Manx"} }} for [[:Category:Manx language|Manx]]. If <code>onlyOtherNames</code> is given and is non-{{code|lua|nil}}, only names explicitly listed in the <code>otherNames</code> field are returned; otherwise, names listed under <code>otherNames</code>, <code>aliases</code> and <code>varieties</code> are combined together and returned. For example, for Manx, Manx Gaelic is listed as an alias, while Northern Manx and Southern Manx are listed as varieties. It should be noted that the <code>otherNames</code> field itself is deprecated, and entries listed there should eventually be moved to either <code>aliases</code> or <code>varieties</code>.]==] function Language:getOtherNames(onlyOtherNames) if #self._stack == 1 then self:loadInExtraData() end return require("Module:language-like").getOtherNames(self, onlyOtherNames) end --[==[Returns a table of the aliases that the language is known by, excluding the canonical name. Aliases are synonyms for the language in question. The names are not guaranteed to be unique, in that sometimes more than one language is known by the same name. Example: {{code|lua|{"High German", "New High German", "Deutsch"} }} for [[:Category:German language|German]].]==] function Language:getAliases() if #self._stack == 1 then self:loadInExtraData() end return self._rawData.aliases or (self._extraData and self._extraData.aliases) or {} end --[==[ Return a table of the known subvarieties of a given language, excluding subvarieties that have been given explicit etymology-only language codes. The names are not guaranteed to be unique, in that sometimes a given name refers to a subvariety of more than one language. Example: {{code|lua|{"Southern Aymara", "Central Aymara"} }} for [[:Category:Aymara language|Aymara]]. Note that the returned value can have nested tables in it, when a subvariety goes by more than one name. Example: {{code|lua|{"North Azerbaijani", "South Azerbaijani", {"Afshar", "Afshari", "Afshar Azerbaijani", "Afchar"}, {"Qashqa'i", "Qashqai", "Kashkay"}, "Sonqor"} }} for [[:Category:Azerbaijani language|Azerbaijani]]. Here, for example, Afshar, Afshari, Afshar Azerbaijani and Afchar all refer to the same subvariety, whose preferred name is Afshar (the one listed first). To avoid a return value with nested tables in it, specify a non-{{code|lua|nil}} value for the <code>flatten</code> parameter; in that case, the return value would be {{code|lua|{"North Azerbaijani", "South Azerbaijani", "Afshar", "Afshari", "Afshar Azerbaijani", "Afchar", "Qashqa'i", "Qashqai", "Kashkay", "Sonqor"} }}. ]==] function Language:getVarieties(flatten) if #self._stack == 1 then self:loadInExtraData() end return require("Module:language-like").getVarieties(self, flatten) end --[==[Returns a table of types as a lookup table (with the types as keys). The possible types are * {language}: This is a language, either full or etymology-only. * {full}: This is a "full" (not etymology-only) language, i.e. the union of {regular}, {reconstructed} and {appendix-constructed}. Note that the types {full} and {etymology-only} also exist for families, so if you want to check specifically for a full language and you have an object that might be a family, you should use {{lua|hasType("language", "full")}} and not simply {{lua|hasType("full")}}. * {etymology-only}: This is an etymology-only (not full) language, whose parent is another etymology-only language or a full language. Note that the types {full} and {etymology-only} also exist for families, so if you want to check specifically for an etymology-only language and you have an object that might be a family, you should use {{lua|hasType("language", "etymology-only")}} and not simply {{lua|hasType("etymology-only")}}. * {regular}: This indicates a full language that is attested according to [[WT:CFI]] and therefore permitted in the main namespace. There may also be reconstructed terms for the language, which are placed in the {Reconstruction} namespace and must be prefixed with * to indicate a reconstruction. Most full languages are natural (not constructed) languages, but a few constructed languages (e.g. Esperanto and Volapük, among others) are also allowed in the mainspace and considered regular languages. * {reconstructed}: This language is not attested according to [[WT:CFI]], and therefore is allowed only in the {Reconstruction} namespace. All terms in this language are reconstructed, and must be prefixed with *. Languages such as Proto-Indo-European and Proto-Germanic are in this category. * {appendix-constructed}: This language is attested but does not meet the additional requirements set out for constructed languages ([[WT:CFI#Constructed languages]]). Its entries must therefore be in the Appendix namespace, but they are not reconstructed and therefore should not have * prefixed in links. ]==] function Language:getTypes() local types = self._types if types == nil then types = {language = true} if self:getFullCode() == self._code then types.full = true else types["etymology-only"] = true end for t in gmatch(self._rawData.type, "[^,]+") do types[t] = true end self._types = types end return types end --[==[Given a list of types as strings, returns true if the language has all of them.]==] function Language:hasType(...) local args, types = {...}, self:getTypes() for i = 1, #args do if not types[args[i]] then return false end end return true end --[==[Returns a table containing <code>WikimediaLanguage</code> objects (see [[Module:wikimedia languages]]), which represent languages and their codes as they are used in Wikimedia projects for interwiki linking and such. More than one object may be returned, as a single Wiktionary language may correspond to multiple Wikimedia languages. For example, Wiktionary's single code <code>sh</code> (Serbo-Croatian) maps to four Wikimedia codes: <code>sh</code> (Serbo-Croatian), <code>bs</code> (Bosnian), <code>hr</code> (Croatian) and <code>sr</code> (Serbian). The code for the Wikimedia language is retrieved from the <code>wikimedia_codes</code> property in the data modules. If that property is not present, the code of the current language is used. If none of the available codes is actually a valid Wikimedia code, an empty table is returned.]==] function Language:getWikimediaLanguages() local wm_langs = self._wikimediaLanguageObjects if wm_langs == nil then local get_wm_lang = require("Module:wikimedia languages").getByCode local codes = self:getWikimediaLanguageCodes() wm_langs = {} for i = 1, #codes do wm_langs[i] = get_wm_lang(codes[i]) end self._wikimediaLanguageObjects = wm_langs end return wm_langs end function Language:getWikimediaLanguageCodes() local wm_langs = self._wikimediaLanguageCodes if wm_langs == nil then wm_langs = self._rawData.wikimedia_codes wm_langs = wm_langs and split(wm_langs, ",", true, true) or {self._code} self._wikimediaLanguageCodes = wm_langs end return wm_langs end --[==[ Returns the name of the Wikipedia article for the language. `project` specifies the language and project to retrieve the article from, defaulting to {"enwiki"} for the English Wikipedia. Normally if specified it should be the project code for a specific-language Wikipedia e.g. "zhwiki" for the Chinese Wikipedia, but it can be any project, including non-Wikipedia ones. If the project is the English Wikipedia and the property {wikipedia_article} is present in the data module it will be used first. In all other cases, a sitelink will be generated from {:getWikidataItem} (if set). The resulting value (or lack of value) is cached so that subsequent calls are fast. If no value could be determined, and `noCategoryFallback` is {false}, {:getCategoryName} is used as fallback; otherwise, {nil} is returned. Note that if `noCategoryFallback` is {nil} or omitted, it defaults to {false} if the project is the English Wikipedia, otherwise to {true}. In other words, under normal circumstances, if the English Wikipedia article couldn't be retrieved, the return value will fall back to a link to the language's category, but this won't normally happen for any other project. ]==] function Language:getWikipediaArticle(noCategoryFallback, project) return require("Module:language-like").getWikipediaArticle(self, noCategoryFallback, project) end function Language:makeWikipediaLink() return "[[w:" .. self:getWikipediaArticle() .. "|" .. self:getCanonicalName() .. "]]" end --[==[Returns the name of the Wikimedia Commons category page for the language.]==] function Language:getCommonsCategory() return require("Module:language-like").getCommonsCategory(self) end --[==[Returns the Wikidata item id for the language or <code>nil</code>. This corresponds to the the second field in the data modules.]==] function Language:getWikidataItem() return require("Module:language-like").getWikidataItem(self) end --[==[Returns a table of <code>Script</code> objects for all scripts that the language is written in. See [[Module:scripts]].]==] function Language:getScripts() local scripts = self._scriptObjects if scripts == nil then local codes = self:getScriptCodes() if codes[1] == "All" then scripts = self:loadData("Module:scripts/data") else local get_script = require("Module:scripts").getByCode scripts = {} for i = 1, #codes do scripts[i] = get_script(codes[i], nil, nil, self._useRequire) end end self._scriptObjects = scripts end return scripts end --[==[Returns the table of script codes in the language's data file.]==] function Language:getScriptCodes() local scripts = self._scriptCodes if scripts == nil then scripts = self._rawData[4] if scripts then local codes, n = {}, 0 for code in gmatch(scripts, "[^,]+") do n = n + 1 -- Special handling of "Hants", which represents "Hani", "Hant" and "Hans" collectively. if code == "Hants" then codes[n] = "Hani" codes[n + 1] = "Hant" codes[n + 2] = "Hans" n = n + 2 else codes[n] = code end end scripts = codes else scripts = {"None"} end self._scriptCodes = scripts end return scripts end --[==[Given some text, this function iterates through the scripts of a given language and tries to find the script that best matches the text. It returns a {{code|lua|Script}} object representing the script. If no match is found at all, it returns the {{code|lua|None}} script object.]==] function Language:findBestScript(text, forceDetect) local useRequire = self._useRequire if not text or text == "" or text == "-" then return require("Module:scripts").getByCode("None", nil, nil, useRequire) end -- Differs from table returned by getScriptCodes, as Hants is not normalized into its constituents. local codes = self._bestScriptCodes if codes == nil then codes = self._rawData[4] codes = codes and split(codes, ",", true, true) or {"None"} self._bestScriptCodes = codes end local first_sc = codes[1] if first_sc == "All" then return require("Module:scripts").findBestScriptWithoutLang(text) end local get_script = require("Module:scripts").getByCode local codes_len = #codes if not (forceDetect or first_sc == "Hants" or codes_len > 1) then first_sc = get_script(first_sc, nil, nil, useRequire) local charset = first_sc.characters return charset and umatch(text, "[" .. charset .. "]") and first_sc or get_script("None", nil, nil, useRequire) end -- Remove all formatting characters. text = require("Module:utilities").get_plaintext(text) -- Remove all spaces and any ASCII punctuation. Some non-ASCII punctuation is script-specific, so can't be removed. text = ugsub(text, "[%s!\"#%%&'()*,%-./:;?@[\\%]_{}]+", "") if #text == 0 then return get_script("None", nil, nil, useRequire) end -- Try to match every script against the text, -- and return the one with the most matching characters. local bestcount, bestscript, length = 0 for i = 1, codes_len do local sc = codes[i] -- Special case for "Hants", which is a special code that represents whichever of "Hant" or "Hans" best matches, or "Hani" if they match equally. This avoids having to list all three. In addition, "Hants" will be treated as the best match if there is at least one matching character, under the assumption that a Han script is desirable in terms that contain a mix of Han and other scripts (not counting those which use Jpan or Kore). if sc == "Hants" then local Hani = get_script("Hani", nil, nil, useRequire) if not Hant_chars then Hant_chars = self:loadData("Module:zh/data/ts") Hans_chars = self:loadData("Module:zh/data/st") end local t, s, found = 0, 0 -- This is faster than using mw.ustring.gmatch directly. for ch in gmatch(ugsub(text, "[" .. Hani.characters .. "]", "\255%0"), "\255(.[\128-\191]*)") do found = true if Hant_chars[ch] then t = t + 1 if Hans_chars[ch] then s = s + 1 end elseif Hans_chars[ch] then s = s + 1 else t, s = t + 1, s + 1 end end if found then if t == s then return Hani end return get_script(t > s and "Hant" or "Hans", nil, nil, useRequire) end else sc = get_script(sc, nil, nil, useRequire) if not length then length = ulen(text) end -- Count characters by removing everything in the script's charset and comparing to the original length. local charset = sc.characters local count = charset and length - ulen(ugsub(text, "[" .. charset .. "]+", "")) or 0 if count >= length then return sc elseif count > bestcount then bestcount = count bestscript = sc end end end -- Return best matching script, or otherwise None. return bestscript or get_script("None", nil, nil, useRequire) end --[==[Returns a <code>Family</code> object for the language family that the language belongs to. See [[Module:families]].]==] function Language:getFamily() local family = self._familyObject if family == nil then family = self:getFamilyCode() -- If the value is nil, it's cached as false. family = family and require("Module:families").getByCode(family, self._useRequire) or false self._familyObject = family end return family or nil end --[==[Returns the family code in the language's data file.]==] function Language:getFamilyCode() local family = self._familyCode if family == nil then -- If the value is nil, it's cached as false. family = self._rawData[3] or false self._familyCode = family end return family or nil end function Language:getFamilyName() local family = self._familyName if family == nil then family = self:getFamily() -- If the value is nil, it's cached as false. family = family and family:getCanonicalName() or false self._familyName = family end return family or nil end --[==[Check whether the language belongs to `family` (which can be a family code or object). A list of objects can be given in place of `family`; in that case, return true if the language belongs to any of the specified families. Note that some languages (in particular, certain creoles) can have multiple immediate ancestors potentially belonging to different families; in that case, return true if the language belongs to any of the specified families.]==] function Language:inFamily(...) --check_object("family", nil, ...) for _, family in ipairs{...} do if type(family) == "table" then family = family:getCode() end local self_family_code = self:getFamilyCode() if not self_family_code then return false elseif self_family_code == family then return true end local self_family = self:getFamily() if self_family:inFamily(family) then return true -- If the family isn't a real family (e.g. creoles) check any ancestors. elseif self_family:getFamilyCode() == "qfa-not" then local ancestors = self:getAncestors() for _, ancestor in ipairs(ancestors) do if ancestor:inFamily(family) then return true end end end end return false end function Language:getParent() local parent = self._parentObject if parent == nil then parent = self:getParentCode() -- If the value is nil, it's cached as false. parent = parent and export.getByCode(parent, nil, true, true, self._useRequire) or false self._parentObject = parent end return parent or nil end function Language:getParentCode() local parent = self._parentCode if parent == nil then -- If the value is nil, it's cached as false. parent = self._rawData[5] or false self._parentCode = parent end return parent or nil end function Language:getParentName() local parent = self._parentName if parent == nil then parent = self:getParent() -- If the value is nil, it's cached as false. parent = parent and parent:getCanonicalName() or false self._parentName = parent end return parent or nil end function Language:getParentChain() local chain = self._parentChain if chain == nil then chain = {} local parent, n = self:getParent(), 0 while parent do n = n + 1 chain[n] = parent parent = parent:getParent() end self._parentChain = chain end return chain end function Language:hasParent(...) --check_object("language", nil, ...) for _, otherlang in ipairs{...} do for _, parent in ipairs(self:getParentChain()) do if type(otherlang) == "string" then if otherlang == parent:getCode() then return true end else if otherlang:getCode() == parent:getCode() then return true end end end end return false end --[==[ If the language is etymology-only, this iterates through parents until a full language or family is found, and the corresponding object is returned. If the language is a full language, then it simply returns itself. ]==] function Language:getFull() local full = self._fullObject if full == nil then full = self:getFullCode() full = full == self._code and self or export.getByCode(full, nil, nil, nil, self._useRequire) self._fullObject = full end return full end --[==[ If the language is an etymology-only language, this iterates through parents until a full language or family is found, and the corresponding code is returned. If the language is a full language, then it simply returns the language code. ]==] function Language:getFullCode() return self._fullCode or self._code end --[==[ If the language is an etymology-only language, this iterates through parents until a full language or family is found, and the corresponding canonical name is returned. If the language is a full language, then it simply returns the canonical name of the language. ]==] function Language:getFullName() local full = self._fullName if full == nil then full = self:getFull():getCanonicalName() self._fullName = full end return full end --[==[Returns a table of <code class="nf">Language</code> objects for all languages that this language is directly descended from. Generally this is only a single language, but creoles, pidgins and mixed languages can have multiple ancestors.]==] function Language:getAncestors() if not self._ancestorObjects then self._ancestorObjects = {} local ancestors = shallowcopy(self:getAncestorCodes()) if #ancestors > 0 then for _, ancestor in ipairs(ancestors) do insert(self._ancestorObjects, export.getByCode(ancestor, nil, true, nil, self._useRequire)) end else local fam = self:getFamily() local protoLang = fam and fam:getProtoLanguage() or nil -- For the cases where the current language is the proto-language -- of its family, or an etymology-only language that is ancestral to that -- proto-language, we need to step up a level higher right from the -- start. if protoLang and ( protoLang:getCode() == self._code or (self:hasType("etymology-only") and protoLang:hasAncestor(self)) ) then fam = fam:getFamily() protoLang = fam and fam:getProtoLanguage() or nil end while not protoLang and not (not fam or fam:getCode() == "qfa-not") do fam = fam:getFamily() protoLang = fam and fam:getProtoLanguage() or nil end insert(self._ancestorObjects, protoLang) end end return self._ancestorObjects end do -- Avoid a language being its own ancestor via class inheritance. We only need to check for this if the language has inherited an ancestor table from its parent, because we never want to drop ancestors that have been explicitly set in the data. -- Recursively iterate over ancestors until we either find self or run out. If self is found, return true. local function check_ancestor(self, lang) local codes = lang:getAncestorCodes() if not codes then return nil end for i = 1, #codes do local code = codes[i] if code == self._code then return true end local anc = export.getByCode(code, nil, true, nil, self._useRequire) if check_ancestor(self, anc) then return true end end end --[==[Returns a table of <code class="nf">Language</code> codes for all languages that this language is directly descended from. Generally this is only a single language, but creoles, pidgins and mixed languages can have multiple ancestors.]==] function Language:getAncestorCodes() if self._ancestorCodes then return self._ancestorCodes end local codes = self._rawData.ancestors if not codes then codes = {} self._ancestorCodes = codes return codes end codes = split(codes, ",", true, true) self._ancestorCodes = codes if ( #codes == 0 or #self._stack == 1 or self._stack[#self._stack].ancestors ) then return codes end local i, code = 1 while i <= #codes do code = codes[i] if check_ancestor(self, self) then remove(codes, i) else i = i + 1 end end return codes end end --[==[Given a list of language objects or codes, returns true if at least one of them is an ancestor. This includes any etymology-only children of that ancestor. If the language's ancestor(s) are etymology-only languages, it will also return true for those language parent(s) (e.g. if Vulgar Latin is the ancestor, it will also return true for its parent, Latin). However, a parent is excluded from this if the ancestor is also ancestral to that parent (e.g. if Classical Persian is the ancestor, Persian would return false, because Classical Persian is also ancestral to Persian).]==] function Language:hasAncestor(...) --check_object("language", nil, ...) local function iterateOverAncestorTree(node, func, parent_check) local ancestors = node:getAncestors() local ancestorsParents = {} for _, ancestor in ipairs(ancestors) do local ret = func(ancestor) or iterateOverAncestorTree(ancestor, func, parent_check) if ret then return ret end end -- Check the parents of any ancestors. We don't do this if checking the parents of the other language, so that we exclude any etymology-only children of those parents that are not directly related (e.g. if the ancestor is Vulgar Latin and we are checking New Latin, we want it to return false because they are on different ancestral branches. As such, if we're already checking the parent of New Latin (Latin) we don't want to compare it to the parent of the ancestor (Latin), as this would be a false positive; it should be one or the other). if not parent_check then return nil end for _, ancestor in ipairs(ancestors) do local ancestorParents = ancestor:getParentChain() for _, ancestorParent in ipairs(ancestorParents) do if ancestorParent:getCode() == self._code or ancestorParent:hasAncestor(ancestor) then break else insert(ancestorsParents, ancestorParent) end end end for _, ancestorParent in ipairs(ancestorsParents) do local ret = func(ancestorParent) if ret then return ret end end end local function do_iteration(otherlang, parent_check) -- otherlang can't be self if (type(otherlang) == "string" and otherlang or otherlang:getCode()) == self._code then return false end repeat if iterateOverAncestorTree( self, function(ancestor) return ancestor:getCode() == (type(otherlang) == "string" and otherlang or otherlang:getCode()) end, parent_check ) then return true elseif type(otherlang) == "string" then otherlang = export.getByCode(otherlang, nil, true, nil, self._useRequire) end otherlang = otherlang:getParent() parent_check = false until not otherlang end local parent_check = true for _, otherlang in ipairs{...} do local ret = do_iteration(otherlang, parent_check) if ret then return true end end return false end function Language:getAncestorChain() if not self._ancestorChain then self._ancestorChain = {} local step = self while true do local ancestors = step:getAncestors() step = #ancestors == 1 and ancestors[1] or nil if not step then break end insert(self._ancestorChain, 1, step) end end return self._ancestorChain end local function fetch_descendants(self, format) local languages = require("Module:languages/code to canonical name") local etymology_languages = require("Module:etymology languages/code to canonical name") local families = require("Module:families/code to canonical name") local descendants = {} local family = self:getFamily() -- Iterate over all three datasets. for _, data in ipairs{languages, etymology_languages, families} do for code in pairs(data) do local lang = export.getByCode(code, nil, true, true, self._useRequire) -- Test for a descendant. Earlier tests weed out most candidates, while the more intensive tests are only used sparingly. if ( code ~= self._code and -- Not self. lang:inFamily(family) and -- In the same family. ( family:getProtoLanguageCode() == self._code or -- Self is the protolanguage. self:hasDescendant(lang) or -- Full hasDescendant check. (lang:getFullCode() == self._code and not self:hasAncestor(lang)) -- Etymology-only child which isn't an ancestor. ) ) then if format == "object" then insert(descendants, lang) elseif format == "code" then insert(descendants, code) elseif format == "name" then insert(descendants, lang:getCanonicalName()) end end end end return descendants end function Language:getDescendants() if not self._descendantObjects then self._descendantObjects = fetch_descendants(self, "object") end return self._descendantObjects end function Language:getDescendantCodes() if not self._descendantCodes then self._descendantCodes = fetch_descendants(self, "code") end return self._descendantCodes end function Language:getDescendantNames() if not self._descendantNames then self._descendantNames = fetch_descendants(self, "name") end return self._descendantNames end function Language:hasDescendant(...) for _, lang in ipairs{...} do if type(lang) == "string" then lang = export.getByCode(lang, nil, true, nil, self._useRequire) end if lang:hasAncestor(self) then return true end end return false end local function fetch_children(self, format) local m_etym_data = require("Module:etymology languages/data") local self_code = self._code local children = {} for code, data in pairs(m_etym_data) do local _data = data repeat local parent = _data[5] if parent == self_code then if format == "object" then insert(children, export.getByCode(code, nil, true, nil, self._useRequire)) elseif format == "code" then insert(children, code) elseif format == "name" then insert(children, data[1]) end break end _data = m_etym_data[parent] until not _data end return children end function Language:getChildren() if not self._childObjects then self._childObjects = fetch_children(self, "object") end return self._childObjects end function Language:getChildrenCodes() if not self._childCodes then self._childCodes = fetch_children(self, "code") end return self._childCodes end function Language:getChildrenNames() if not self._childNames then self._childNames = fetch_children(self, "name") end return self._childNames end function Language:hasChild(...) local lang = ... if not lang then return false elseif type(lang) == "string" then lang = export.getByCode(lang, nil, true, nil, self._useRequire) end if lang:hasParent(self) then return true end return self:hasChild(select(2, ...)) end --[==[Returns the name of the main category of that language. Example: {{code|lua|"French language"}} for French, whose category is at [[:Category:French language]]. Unless optional argument <code>nocap</code> is given, the language name at the beginning of the returned value will be capitalized. This capitalization is correct for category names, but not if the language name is lowercase and the returned value of this function is used in the middle of a sentence.]==] function Language:getCategoryName(nocap) if not self._categoryName then local name = self:getCanonicalName() -- Only add " language" if a full language. if #self._stack == 1 then -- If the name already has "language" in it, don't add it. if not match(name, "[Ll]anguage$") then name = name .. " language" end end self._categoryName = name end if nocap then return self._categoryName else return mw.getContentLanguage():ucfirst(self._categoryName) end end --[==[Creates a link to the category; the link text is the canonical name.]==] function Language:makeCategoryLink() return "[[:Category:" .. self:getCategoryName() .. "|" .. self:getDisplayForm() .. "]]" end function Language:getStandardCharacters(sc) if type(self._rawData.standardChars) ~= "table" then return self._rawData.standardChars else if sc and type(sc) ~= "string" then check_object("script", nil, sc) sc = sc:getCode() end if (not sc) or sc == "None" then local scripts = {} for _, script in pairs(self._rawData.standardChars) do insert(scripts, script) end return concat(scripts) end if self._rawData.standardChars[sc] then return self._rawData.standardChars[sc] .. (self._rawData.standardChars[1] or "") end end end --[==[Make the entry name (i.e. the correct page name).]==] function Language:makeEntryName(text, sc) if (not text) or text == "" then return text, nil, {} end -- Set `unsupported` as true if certain conditions are met. local unsupported -- Check if there's an unsupported character. \239\191\189 is the replacement character U+FFFD, which can't be typed directly here due to an abuse filter. Unix-style dot-slash notation is also unsupported, as it is used for relative paths in links, as are 3 or more consecutive tildes. -- Note: match is faster with magic characters/charsets; find is faster with plaintext. if ( match(text, "[#<>%[%]_{|}]") or find(text, "\239\191\189") or match(text, "%f[^%z/]%.%.?%f[%z/]") or find(text, "~~~") ) then unsupported = true -- If it looks like an interwiki link. elseif find(text, ":") then local prefix = gsub(text, "^:*(.-):.*", ulower) if ( self:loadData("Module:data/namespaces")[prefix] or self:loadData("Module:data/interwikis")[prefix] ) then unsupported = true end end -- Check if the text is a listed unsupported title. local unsupportedTitles = self:loadData("Module:links/data").unsupported_titles if unsupportedTitles[text] then return "Unsupported titles/" .. unsupportedTitles[text], nil, {} end sc = checkScript(text, self, sc) local fail, cats text = normalize(text, sc) text, fail, cats = iterateSectionSubstitutions(text, nil, nil, self, sc, self._rawData.entry_name, "makeEntryName") text = umatch(text, "^[¿¡]?(.-[^%s%p].-)%s*[؟?!;՛՜ ՞ ՟?!︖︕।॥။၊་།]?$") or text -- Escape unsupported characters so they can be used in titles. ` is used as a delimiter for this, so a raw use of it in an unsupported title is also escaped here to prevent interference; this is only done with unsupported titles, though, so inclusion won't in itself mean a title is treated as unsupported (which is why it's excluded from the earlier test). if unsupported then local unsupported_characters = self:loadData("Module:links/data").unsupported_characters text = text:gsub("[#<>%[%]_`{|}\239]\191?\189?", unsupported_characters) :gsub("%f[^%z/]%.%.?%f[%z/]", function(m) return gsub(m, "%.", "`period`") end) :gsub("~~~+", function(m) return gsub(m, "~", "`tilde`") end) text = "Unsupported titles/" .. text end return text, fail, cats end --[==[Generates alternative forms using a specified method, and returns them as a table. If no method is specified, returns a table containing only the input term.]==] function Language:generateForms(text, sc) if self._rawData.generate_forms then sc = checkScript(text, self, sc) return require("Module:" .. self._rawData.generate_forms).generateForms(text, self._code, sc:getCode()) else return {text} end end --[==[Creates a sort key for the given entry name, following the rules appropriate for the language. This removes diacritical marks from the entry name if they are not considered significant for sorting, and may perform some other changes. Any initial hyphen is also removed, and anything parentheses is removed as well. The <code>sort_key</code> setting for each language in the data modules defines the replacements made by this function, or it gives the name of the module that takes the entry name and returns a sortkey.]==] function Language:makeSortKey(text, sc) if (not text) or text == "" then return text, nil, {} end if match(text, "<[^<>]+>") then track("track HTML tag") end -- Remove directional characters, soft hyphens, strip markers and HTML tags. text = ugsub(text, "[\194\173\226\128\170-\226\128\174\226\129\166-\226\129\169]", "") text = gsub(mw.text.unstrip(text), "<[^<>]+>", "") text = decode_uri(text, "PATH") text = checkNoEntities(self, text) -- Remove initial hyphens and * unless the term only consists of spacing + punctuation characters. text = ugsub(text, "^([􀀀-􏿽]*)[-־ـ᠊*]+([􀀀-􏿽]*)(.*[^%s%p].*)", "%1%2%3") sc = checkScript(text, self, sc) text = normalize(text, sc) text = removeCarets(text, sc) -- For languages with dotted dotless i, ensure that "İ" is sorted as "i", and "I" is sorted as "ı". if self:hasDottedDotlessI() then text = gsub(text, "I\204\135", "i") -- decomposed "İ" :gsub("I", "ı") text = sc:toFixedNFD(text) end -- Convert to lowercase, make the sortkey, then convert to uppercase. Where the language has dotted dotless i, it is usually not necessary to convert "i" to "İ" and "ı" to "I" first, because "I" will always be interpreted as conventional "I" (not dotless "İ") by any sorting algorithms, which will have been taken into account by the sortkey substitutions themselves. However, if no sortkey substitutions have been specified, then conversion is necessary so as to prevent "i" and "ı" both being sorted as "I". -- An exception is made for scripts that (sometimes) sort by scraping page content, as that means they are sensitive to changes in capitalization (as it changes the target page). local fail, cats if not sc:sortByScraping() then text = ulower(text) end text, fail, cats = iterateSectionSubstitutions(text, nil, nil, self, sc, self._rawData.sort_key, "makeSortKey") if not sc:sortByScraping() then if self:hasDottedDotlessI() and not self._rawData.sort_key then text = gsub(gsub(text, "ı", "I"), "i", "İ") text = sc:toFixedNFC(text) end text = uupper(text) end -- Remove parentheses, as long as they are either preceded or followed by something. text = gsub(text, "(.)[()]+", "%1") :gsub("[()]+(.)", "%1") text = escape_risky_characters(text) return text, fail, cats end --[==[Create the form used as as a basis for display text and transliteration.]==] local function processDisplayText(text, self, sc, keepCarets, keepPrefixes) local subbedChars = {} text, subbedChars = doTempSubstitutions(text, subbedChars, keepCarets) text = decode_uri(text, "PATH") text = checkNoEntities(self, text) sc = checkScript(text, self, sc) local fail, cats text = normalize(text, sc) text, fail, cats, subbedChars = iterateSectionSubstitutions(text, subbedChars, keepCarets, self, sc, self._rawData.display_text, "makeDisplayText") text = removeCarets(text, sc) -- Remove any interwiki link prefixes (unless they have been escaped or this has been disabled). if find(text, ":") and not keepPrefixes then local rep repeat text, rep = gsub(text, "\\\\(\\*:)", "\3%1") until rep == 0 text = gsub(text, "\\:", "\4") while true do local prefix = gsub(text, "^(.-):.+", function(m1) return gsub(m1, "\244[\128-\191]*", "") end) if not prefix or prefix == text then break end local lower_prefix = ulower(prefix) if not (self:loadData("Module:data/interwikis")[lower_prefix] or prefix == "") then break end text = gsub(text, "^(.-):(.*)", function(m1, m2) local ret = {} for subbedChar in gmatch(m1, "\244[\128-\191]*") do insert(ret, subbedChar) end return concat(ret) .. m2 end) end text = gsub(text, "\3", "\\") :gsub("\4", ":") end return text, fail, cats, subbedChars end --[==[Make the display text (i.e. what is displayed on the page).]==] function Language:makeDisplayText(text, sc, keepPrefixes) if (not text) or text == "" then return text, nil, {} end local fail, cats, subbedChars text, fail, cats, subbedChars = processDisplayText(text, self, sc, nil, keepPrefixes) text = escape_risky_characters(text) return undoTempSubstitutions(text, subbedChars), fail, cats end --[==[Transliterates the text from the given script into the Latin script (see [[Wiktionary:Transliteration and romanization]]). The language must have the <code>translit</code> property for this to work; if it is not present, {{code|lua|nil}} is returned. Returns three values: # The transliteration. # A boolean which indicates whether the transliteration failed for an unexpected reason. If {{code|lua|false}}, then the transliteration either succeeded, or the module is returning nothing in a controlled way (e.g. the input was {{code|lua|"-"}}). Generally, this means that no maintenance action is required. If {{code|lua|true}}, then the transliteration is {{code|lua|nil}} because either the input or output was defective in some way (e.g. [[Module:ar-translit]] will not transliterate non-vocalised inputs, and this module will fail partially-completed transliterations in all languages). Note that this value can be manually set by the transliteration module, so make sure to cross-check to ensure it is accurate. # A table of categories selected by the transliteration module, which should be in the format expected by {{code|lua|format_categories}} in [[Module:utilities]]. The <code>sc</code> parameter is handled by the transliteration module, and how it is handled is specific to that module. Some transliteration modules may tolerate {{code|lua|nil}} as the script, others require it to be one of the possible scripts that the module can transliterate, and will show an error if it's not one of them. For this reason, the <code>sc</code> parameter should always be provided when writing non-language-specific code. The <code>module_override</code> parameter is used to override the default module that is used to provide the transliteration. This is useful in cases where you need to demonstrate a particular module in use, but there is no default module yet, or you want to demonstrate an alternative version of a transliteration module before making it official. It should not be used in real modules or templates, only for testing. All uses of this parameter are tracked by [[Wiktionary:Tracking/module_override]]. '''Known bugs''': * This function assumes {tr(s1) .. tr(s2) == tr(s1 .. s2)}. When this assertion fails, wikitext markups like <nowiki>'''</nowiki> can cause wrong transliterations. * HTML entities like <code>&amp;apos;</code>, often used to escape wikitext markups, do not work.]==] function Language:transliterate(text, sc, module_override) -- If there is no text, or the language doesn't have transliteration data and there's no override, return nil. if not (self._rawData.translit or module_override) then return nil, false, {} elseif (not text) or text == "" or text == "-" then return text, false, {} end -- If the script is not transliteratable (and no override is given), return nil. sc = checkScript(text, self, sc) if not (sc:isTransliterated() or module_override) then -- temporary tracking to see if/when this gets triggered track("non-transliterable") track("non-transliterable/" .. self:getCode()) track("non-transliterable/" .. sc:getCode()) track("non-transliterable/" .. sc:getCode() .. "/" .. self:getCode()) return nil, true, {} end -- Remove any strip markers. text = mw.text.unstrip(text) -- Get the display text with the keepCarets flag set. local fail, cats, subbedChars text, fail, cats, subbedChars = processDisplayText(text, self, sc, true) -- Transliterate (using the module override if applicable). text, fail, cats, subbedChars = iterateSectionSubstitutions(text, subbedChars, true, self, sc, module_override or self._rawData.translit, "tr") if not text then return nil, true, cats end -- Incomplete transliterations return nil. local charset = sc.characters if charset and umatch(text, "[" .. charset .. "]") then -- Remove any characters in Latin, which includes Latin characters also included in other scripts (as these are false positives), as well as any PUA substitutions. Anything remaining should only be script code "None" (e.g. numerals). local check_text = ugsub(text, "[" .. require("Module:scripts").getByCode("Latn").characters .. "􀀀-􏿽]+", "") -- Set none_is_last_resort_only flag, so that any non-None chars will cause a script other than "None" to be returned. if require("Module:scripts").findBestScriptWithoutLang(check_text, true):getCode() ~= "None" then return nil, true, cats end end text = escape_risky_characters(text) text = undoTempSubstitutions(text, subbedChars) -- If the script does not use capitalization, then capitalize any letters of the transliteration which are immediately preceded by a caret (and remove the caret). if text and not sc:hasCapitalization() and text:find("^", 1, true) then text = processCarets(text, "%^([\128-\191\244]*%*?)([^\128-\191\244][\128-\191]*)", function(m1, m2) return m1 .. uupper(m2) end) end -- Track module overrides. if module_override ~= nil then track("module_override") end fail = text == nil and (not not fail) or false return text, fail, cats end do local function handle_language_spec(self, spec, sc) local ret = self["_" .. spec] if ret == nil then ret = self._rawData[spec] if type(ret) == "string" then ret = list_to_set(split(ret, ",", true, true)) end self["_" .. spec] = ret end if type(ret) == "table" then ret = ret[sc:getCode()] end return not not ret end function Language:overrideManualTranslit(sc) return handle_language_spec(self, "override_translit", sc) end function Language:link_tr(sc) return handle_language_spec(self, "link_tr", sc) end end --[==[Returns {{code|lua|true}} if the language has a transliteration module, or {{code|lua|false}} if it doesn't.]==] function Language:hasTranslit() return not not self._rawData.translit end --[==[Returns {{code|lua|true}} if the language uses the letters I/ı and İ/i, or {{code|lua|false}} if it doesn't.]==] function Language:hasDottedDotlessI() return not not self._rawData.dotted_dotless_i end function Language:toJSON(returnTable) local entryNamePatterns = nil local entryNameRemoveDiacritics = nil if self._rawData.entry_name then entryNameRemoveDiacritics = self._rawData.entry_name.remove_diacritics if self._rawData.entry_name.from then entryNamePatterns = {} for i, from in ipairs(self._rawData.entry_name.from) do insert(entryNamePatterns, {from = from, to = self._rawData.entry_name.to[i] or ""}) end end end -- mainCode should only end up non-nil if dontCanonicalizeAliases is passed to make_object(). local ret = m_table.deepcopy{ ancestors = self:getAncestorCodes(), canonicalName = self:getCanonicalName(), categoryName = self:getCategoryName("nocap"), code = self._code, mainCode = self._main_code, entryNamePatterns = entryNamePatterns, entryNameRemoveDiacritics = entryNameRemoveDiacritics, family = self:getFamilyCode(), otherNames = self:getOtherNames(true), aliases = self:getAliases(), varieties = self:getVarieties(), scripts = self:getScriptCodes(), parent = self._parentCode or nil, full = self._fullCode or nil, type = m_table.keysToList(self:getTypes()), wikimediaLanguages = self:getWikimediaLanguageCodes(), wikidataItem = self:getWikidataItem(), } if returnTable then return ret else return require("Module:JSON").toJSON(ret) end end --[==[ <span style="color: #BA0000">This function is not for use in entries or other content pages.</span> Returns a blob of data about the language. The format of this blob is undocumented, and perhaps unstable; it's intended for things like the module's own unit-tests, which are "close friends" with the module and will be kept up-to-date as the format changes. -- Do NOT use these methods! -- All uses should be pre-approved on the talk page! ]==] function Language:getRawData() local rawData = {} for _, element in ipairs(self._stack) do for k, v in pairs(element) do rawData[k] = v end end return rawData end --[==[<span style="color: #BA0000">This function is not for use in entries or other content pages.</span> Returns a blob of data about the language that contains the "extra data". Much like with getRawData, the format of this blob is undocumented, and perhaps unstable; it's intended for things like the module's own unit-tests, which are "close friends" with the module and will be kept up-to-date as the format changes.]==] function Language:getRawExtraData() if #self._stack == 1 then self:loadInExtraData() end return self._extraData end local function getRawExtraLanguageData(self, code) local modulename = export.getExtraDataModuleName(code) return modulename and self:loadData("Module:" .. modulename)[code] or nil end function Language:loadInExtraData() if not self._extraData then -- load extra data from module and assign to _extraData field -- use empty table as a fallback if extra data is nil self._extraData = getRawExtraLanguageData(self, self._code) or {} end end function export.getDataModuleName(code) local letter = match(code, "^(%l)[%l-]+$") if not letter then return nil elseif find(code, "-", 1, true) then return "languages/data/exceptional" end local code_len = #code return code_len == 2 and "languages/data/2" or code_len == 3 and "languages/data/3/" .. letter or nil end function export.getExtraDataModuleName(code) local dataModule = export.getDataModuleName(code) return dataModule and dataModule .. "/extra" or nil end do local key_types = { [2] = "unique", aliases = "unique", otherNames = "unique", type = "append", varieties = "unique" } function export.makeObject(code, data, useRequire, dontCanonicalizeAliases) if not data then return nil end -- Convert any aliases. local input_code = code code = normalize_code(code, useRequire) input_code = dontCanonicalizeAliases and input_code or code if find(data.type, "family") and not data[5] then return require("Module:families").makeObject(code, data, useRequire) end local parent if data[5] then parent = export.getByCode(data[5], nil, true, true, useRequire) else parent = Language end parent.__index = parent local lang = { _code = input_code, _useRequire = useRequire or nil } -- This can only happen if dontCanonicalizeAliases is passed to make_object(). if code ~= input_code then lang._main_code = code end -- Full language. if not parent._stack then -- Create stack, accessed with rawData metamethod. local stack = parent._rawData and {parent._rawData, data} or {data} lang._stack = stack lang._rawData = setmetatable({}, { __index = function(t, k) local key_type = key_types[k] -- Data that isn't inherited from the parent. if key_type == "unique" then return stack[#stack][k] -- Data that is appended by each generation. elseif key_type == "append" then local parts = {} for i = 1, #stack do insert(parts, stack[i][k]) end if type(parts[1]) == "string" then return concat(parts, ","), true end -- Otherwise, iterate down the stack, looking for a match. else local i = #stack while not stack[i][k] and i > 1 do i = i - 1 end return stack[i][k] end end, -- Retain immutability (as writing to rawData will break functionality). __newindex = function() error("not allowed to edit rawData") end }) -- Full code is the parent code. lang._fullCode = parent._code or code -- Etymology-only. else -- Copy over rawData and stack to the new object, and add new layer to stack. lang._rawData = parent._rawData lang._stack = parent._stack insert(lang._stack, data) -- Copy full code. lang._fullCode = parent._fullCode end return setmetatable(lang, parent) end end --[==[Finds the language whose code matches the one provided. If it exists, it returns a <code class="nf">Language</code> object representing the language. Otherwise, it returns {{code|lua|nil}}, unless <code class="n">paramForError</code> is given, in which case an error is generated. If <code class="n">paramForError</code> is {{code|lua|true}}, a generic error message mentioning the bad code is generated; otherwise <code class="n">paramForError</code> should be a string or number specifying the parameter that the code came from, and this parameter will be mentioned in the error message along with the bad code. If <code class="n">allowEtymLang</code> is specified, etymology-only language codes are allowed and looked up along with normal language codes. If <code class="n">allowFamily</code> is specified, language family codes are allowed and looked up along with normal language codes.]==] function export.getByCode(code, paramForError, allowEtymLang, allowFamily, useRequire) -- Track uses of paramForError, ultimately so it can be removed, as error-handling should be done by [[Module:parameters]], not here. if paramForError ~= nil then require("Module:debug/track")("languages/paramForError") end if type(code) ~= "string" then local typ if not code then typ = "nil" elseif check_object("language", true, code) then typ = "a language object" elseif check_object("family", true, code) then typ = "a family object" else typ = "a " .. type(code) end error("The function getByCode expects a string as its first argument, but received " .. typ .. ".") end local m_data = conditionalRequire("Module:languages/data", useRequire) if m_data.aliases[code] or m_data.track[code] then track(code) end local norm_code = normalize_code(code, useRequire) local modulename = export.getDataModuleName(norm_code) local data = modulename and conditionalRequire("Module:" .. modulename, useRequire)[norm_code] or (allowEtymLang and require("Module:etymology languages/track-bad-etym-code")(norm_code) and conditionalRequire("Module:etymology languages/data", useRequire)[norm_code]) or (allowFamily and conditionalRequire("Module:families/data", useRequire)[norm_code]) or (allowEtymLang and allowFamily and require("Module:families/track-bad-etym-code")(norm_code) and conditionalRequire("Module:families/data/etymology", useRequire)[norm_code]) local retval = code and data and export.makeObject(code, data, useRequire) if not retval and paramForError then require("Module:languages/errorGetBy").code(code, paramForError, allowEtymLang, allowFamily) end return retval end --[==[Finds the language whose canonical name (the name used to represent that language on Wiktionary) or other name matches the one provided. If it exists, it returns a <code class="nf">Language</code> object representing the language. Otherwise, it returns {{code|lua|nil}}, unless <code class="n">paramForError</code> is given, in which case an error is generated. If <code class="n">allowEtymLang</code> is specified, etymology-only language codes are allowed and looked up along with normal language codes. If <code class="n">allowFamily</code> is specified, language family codes are allowed and looked up along with normal language codes. The canonical name of languages should always be unique (it is an error for two languages on Wiktionary to share the same canonical name), so this is guaranteed to give at most one result. This function is powered by [[Module:languages/canonical names]], which contains a pre-generated mapping of full-language canonical names to codes. It is generated by going through the [[:Category:Language data modules]] for full languages. When <code class="n">allowEtymLang</code> is specified for the above function, [[Module:etymology languages/canonical names]] may also be used, and when <code class="n">allowFamily</code> is specified for the above function, [[Module:families/canonical names]] may also be used.]==] function export.getByCanonicalName(name, errorIfInvalid, allowEtymLang, allowFamily, useRequire) local byName = conditionalRequire("Module:languages/canonical names", useRequire) local code = byName and byName[name] if not code and allowEtymLang then byName = conditionalRequire("Module:etymology languages/canonical names", useRequire) code = byName and byName[name] or byName[gsub(name, " [Ss]ubstrate$", "")] or byName[gsub(name, "^a ", "")] or byName[gsub(name, "^a ", "") :gsub(" [Ss]ubstrate$", "")] or -- For etymology families like "ira-pro". -- FIXME: This is not ideal, as it allows " languages" to be appended to any etymology-only language, too. byName[match(name, "^(.*) languages$")] end if not code and allowFamily then byName = conditionalRequire("Module:families/canonical names", useRequire) code = byName and byName[name] or byName[match(name, "^(.*) languages$")] end local retval = code and export.getByCode(code, errorIfInvalid, allowEtymLang, allowFamily, useRequire) if not retval and errorIfInvalid then require("Module:languages/errorGetBy").canonicalName(name, allowEtymLang, allowFamily) end return retval end --[==[Used by [[Module:languages/data/2]] (et al.) to add default types to the entities returned.]==] function export.addDefaultTypes(data, regular, ...) local n = arg.n local types = n > 0 and concat(arg, ",") or "" for _, entity in next, data do -- "regular" encompasses everything that doesn't have another type already assigned. if regular then entity.type = entity.type or "regular" end if n > 0 then entity.type = types .. (entity.type and ("," .. entity.type) or "") end end return data end --[==[Used by [[Module:languages/data/2]] (et al.) and [[Module:etymology languages/data]] to finalize language-related data into the format that is actually returned.]==] function export.finalizeLanguageData(data) -- 4 is scripts. local fields = {4, "ancestors", "link_tr", "override_translit", "type", "wikimedia_codes"} local fields_len = #fields for _, entity in next, data do for i = 1, fields_len do local key = fields[i] local field = entity[key] if field and type(field) == "string" then entity[key] = gsub(field, "%s+", "") end end end return data end --[==[Used by [[Module:etymology languages/data]] and [[Module:families/data/etymology]] to finalize etymology-related data into the format that is actually returned.]==] function export.finalizeEtymologyData(data) local aliases = {} for _, entity in next, data do -- Move parent to 5 and family to 3. entity[5] = entity[3] entity[3] = entity.family entity.family = nil end for code, alias in next, aliases do data[code] = alias end return data end --[==[For backwards compatibility only; modules should require the error themselves.]==] function export.err(lang_code, param, code_desc, template_tag, not_real_lang) return require("Module:languages/error")(lang_code, param, code_desc, template_tag, not_real_lang) end return export 2ud235ky1bxzajeuney2fygnbe1dk02 192570 192569 2024-11-17T14:06:47Z Lee 19 පැරණි සංස්කරණයකින් ගත් කොටස්... 192570 Scribunto text/plain local require = require local m_str_utils = require("Module:string utilities") local m_table = require("Module:table") local mw = mw local string = string local table = table local ustring = mw.ustring local char = string.char local check_object = require("Module:utilities").check_object local concat = table.concat local decode_entities = m_str_utils.decode_entities local decode_uri = m_str_utils.decode_uri local find = string.find local floor = math.floor local gmatch = string.gmatch local gsub = string.gsub local insert = table.insert local ipairs = ipairs local list_to_set = m_table.listToSet local load_data = mw.loadData local match = string.match local next = next local pairs = pairs local pattern_escape = m_str_utils.pattern_escape local remove = table.remove local remove_duplicates = m_table.removeDuplicates local replacement_escape = m_str_utils.replacement_escape local select = select local setmetatable = setmetatable local shallowcopy = m_table.shallowcopy local split = m_str_utils.split local type = type local ugsub = ustring.gsub local ulen = m_str_utils.len local ulower = m_str_utils.lower local umatch = ustring.match local uupper = m_str_utils.upper -- Loaded as needed by findBestScript. local Hans_chars local Hant_chars local export = {} --[=[ This module implements fetching of language-specific information and processing text in a given language. There are two types of languages: full languages and etymology-only languages. The essential difference is that only full languages appear in L2 headings in vocabulary entries, and hence categories like [[:Category:French nouns]] exist only for full languages. Etymology-only languages have either a full language or another etymology-only language as their parent (in the parent-child inheritance sense), and for etymology-only languages with another etymology-only language as their parent, a full language can always be derived by following the parent links upwards. For example, "Canadian French", code 'fr-CA', is an etymology-only language whose parent is the full language "French", code 'fr'. An example of an etymology-only language with another etymology-only parent is "Northumbrian Old English", code 'ang-nor', which has "Anglian Old English", code 'ang-ang' as its parent; this is an etymology-only language whose parent is "Old English", code "ang", which is a full language. (This is because Northumbrian Old English is considered a variety of Anglian Old English.) Sometimes the parent is the "Undetermined" language, code 'und'; this is the case, for example, for "substrate" languages such as "Pre-Greek", code 'qsb-grc', and "the BMAC substrate", code 'qsb-bma'. It is important to distinguish language ''parents'' from language ''ancestors''. The parent-child relationship is one of containment, i.e. if X is a child of Y, X is considered a variety of Y. On the other hand, the ancestor-descendant relationship is one of descent in time. For example, "Classical Latin", code 'la-cla', and "Late Latin", code 'la-lat', are both etymology-only languages with "Latin", code 'la', as their parents, because both of the former are varieties of Latin. However, Late Latin does *NOT* have Classical Latin as its parent because Late Latin is *not* a variety of Classical Latin; rather, it is a descendant. There is in fact a separate 'ancestors' field that is used to express the ancestor-descendant relationship, and Late Latin's ancestor is given as Classical Latin. It is also important to note that sometimes an etymology-only language is actually the conceptual ancestor of its parent language. This happens, for example, with "Old Italian" (code 'roa-oit'), which is an etymology-only variant of full language "Italian" (code 'it'), and with "Old Latin" (code 'itc-ola'), which is an etymology-only variant of Latin. In both cases, the full language has the etymology-only variant listed as an ancestor. This allows a Latin term to inherit from Old Latin using the {{tl|inh}} template (where in this template, "inheritance" refers to ancestral inheritance, i.e. inheritance in time, rather than in the parent-child sense); likewise for Italian and Old Italian. Full languages come in three subtypes: * {regular}: This indicates a full language that is attested according to [[WT:CFI]] and therefore permitted in the main namespace. There may also be reconstructed terms for the language, which are placed in the {Reconstruction} namespace and must be prefixed with * to indicate a reconstruction. Most full languages are natural (not constructed) languages, but a few constructed languages (e.g. Esperanto and Volapük, among others) are also allowed in the mainspace and considered regular languages. * {reconstructed}: This language is not attested according to [[WT:CFI]], and therefore is allowed only in the {Reconstruction} namespace. All terms in this language are reconstructed, and must be prefixed with *. Languages such as Proto-Indo-European and Proto-Germanic are in this category. * {appendix-constructed}: This language is attested but does not meet the additional requirements set out for constructed languages ([[WT:CFI#Constructed languages]]). Its entries must therefore be in the Appendix namespace, but they are not reconstructed and therefore should not have * prefixed in links. Most constructed languages are of this subtype. Both full languages and etymology-only languages have a {Language} object associated with them, which is fetched using the {getByCode} function in [[Module:languages]] to convert a language code to a {Language} object. Depending on the options supplied to this function, etymology-only languages may or may not be accepted, and family codes may be accepted (returning a {Family} object as described in [[Module:families]]). There are also separate {getByCanonicalName} functions in [[Module:languages]] and [[Module:etymology languages]] to convert a language's canonical name to a {Language} object (depending on whether the canonical name refers to a full or etymology-only language). Textual strings belonging to a given language come in several different ''text variants'': # The ''input text'' is what the user supplies in wikitext, in the parameters to {{tl|m}}, {{tl|l}}, {{tl|ux}}, {{tl|t}}, {{tl|lang}} and the like. # The ''display text'' is the text in the form as it will be displayed to the user. This can include accent marks that are stripped to form the entry text (see below), as well as embedded bracketed links that are variously processed further. The display text is generated from the input text by applying language-specific transformations; for most languages, there will be no such transformations. Examples of transformations are bad-character replacements for certain languages (e.g. replacing 'l' or '1' to [[palochka]] in certain languages in Cyrillic); and for Thai and Khmer, converting space-separated words to bracketed words and resolving respelling substitutions such as [กรีน/กฺรีน], which indicate how to transliterate given words. # The ''entry text'' is the text in the form used to generate a link to a Wiktionary entry. This is usually generated from the display text by stripping certain sorts of diacritics on a per-language basis, and sometimes doing other transformations. The concept of ''entry text'' only really makes sense for text that does not contain embedded links, meaning that display text containing embedded links will need to have the links individually processed to get per-link entry text in order to generate the resolved display text (see below). # The ''resolved display text'' is the result of resolving embedded links in the display text (e.g. converting them to two-part links where the first part has entry-text transformations applied, and adding appropriate language-specific fragments) and adding appropriate language and script tagging. This text can be passed directly to MediaWiki for display. # The ''source translit text'' is the text as supplied to the language-specific {transliterate()} method. The form of the source translit text may need to be language-specific, e.g Thai and Khmer will need the full unprocessed input text, whereas other languages may need to work off the display text. [FIXME: It's still unclear to me how embedded bracketed links are handled in the existing code.] In general, embedded links need to be removed (i.e. converted to their "bare display" form by taking the right part of two-part links and removing double brackets), but when this happens is unclear to me [FIXME]. Some languages have a chop-up-and-paste-together scheme that sends parts of the text through the transliterate mechanism, and for others (those listed in {contiguous_substition} in [[Module:languages/data]]) they receive the full input text, but preprocessed in certain ways. (The wisdom of this is still unclear to me.) # The ''transliterated text'' (or ''transliteration'') is the result of transliterating the source translit text. Unlike for all the other text variants except the transcribed text, it is always in the Latin script. # The ''transcribed text'' (or ''transcription'') is the result of transcribing the source translit text, where "transcription" here means a close approximation to the phonetic form of the language in languages (e.g. Akkadian, Sumerian, Ancient Egyptian, maybe Tibetan) that have a wide difference between the written letters and spoken form. Unlike for all the other text variants other than the transliterated text, it is always in the Latin script. Currently, the transcribed text is always supplied manually be the user; there is no such thing as a {lua|transcribe()} method on language objects. # The ''sort key'' is the text used in sort keys for determining the placing of pages in categories they belong to. The sort key is generated from the pagename or a specified ''sort base'' by lowercasing, doing language-specific transformations and then uppercasing the result. If the sort base is supplied and is generated from input text, it needs to be converted to display text, have embedded links removed (i.e. resolving them to their right side if they are two-part links) and have entry text transformations applied. # There are other text variants that occur in usexes (specifically, there are normalized variants of several of the above text variants), but we can skip them for now. The following methods exist on {Language} objects to convert between different text variants: # {makeDisplayText}: This converts input text to display text. # {lua|makeEntryName}: This converts input or display text to entry text. [FIXME: This needs some rethinking. In particular, {lua|makeEntryName} is sometimes called on display text (in some paths inside of [[Module:links]]) and sometimes called on input text (in other paths inside of [[Module:links]], and usually from other modules). We need to make sure we don't try to convert input text to display text twice, but at the same time we need to support calling it directly on input text since so many modules do this. This means we need to add a parameter indicating whether the passed-in text is input or display text; if that former, we call {lua|makeDisplayText} ourselves.] # {lua|transliterate}: This appears to convert input text with embedded brackets removed into a transliteration. [FIXME: This needs some rethinking. In particular, it calls {lua|processDisplayText} on its input, which won't work for Thai and Khmer, so we may need language-specific flags indicating whether to pass the input text directly to the language transliterate method. In addition, I'm not sure how embedded links are handled in the existing translit code; a lot of callers remove the links themselves before calling {lua|transliterate()}, which I assume is wrong.] # {lua|makeSortKey}: This converts entry text (?) to a sort key. [FIXME: Clarify this.] ]=] local function track(page) require("Module:debug/track")("languages/" .. page) return true end local function conditionalRequire(modname, useRequire) return (useRequire and require or load_data)(modname) end local function normalize_code(code, useRequire) return conditionalRequire("Module:languages/data", useRequire).aliases[code] or code end -- Convert risky characters to HTML entities, which minimizes interference once returned (e.g. for "sms:a", "<!-- -->" etc.). local function escape_risky_characters(text) local encode_entities = require("Module:string/encode entities") -- Spacing characters in isolation generally need to be escaped in order to be properly processed by the MediaWiki software. if umatch(text, "^%s*$") then return encode_entities(text, text) else return encode_entities(text, "!#%&*+/:;<=>?@[\\]_{|}") end end -- Temporarily convert various formatting characters to PUA to prevent them from being disrupted by the substitution process. local function doTempSubstitutions(text, subbedChars, keepCarets, noTrim) -- Clone so that we don't insert any extra patterns into the table in package.loaded. For some reason, using require seems to keep memory use down; probably because the table is always cloned. local patterns = shallowcopy(require("Module:languages/data/patterns")) if keepCarets then insert(patterns, "((\\+)%^)") insert(patterns, "((%^))") end -- Ensure any whitespace at the beginning and end is temp substituted, to prevent it from being accidentally trimmed. We only want to trim any final spaces added during the substitution process (e.g. by a module), which means we only do this during the first round of temp substitutions. if not noTrim then insert(patterns, "^([\128-\191\244]*(%s+))") insert(patterns, "((%s+)[\128-\191\244]*)$") end -- Pre-substitution, of "[[" and "]]", which makes pattern matching more accurate. text = gsub(text, "%f[%[]%[%[", "\1") :gsub("%f[%]]%]%]", "\2") local i = #subbedChars for _, pattern in ipairs(patterns) do -- Patterns ending in \0 stand are for things like "[[" or "]]"), so the inserted PUA are treated as breaks between terms by modules that scrape info from pages. local term_divider pattern = gsub(pattern, "%z$", function(divider) term_divider = divider == "\0" return "" end) text = gsub(text, pattern, function(...) local m = {...} local m1New = m[1] for k = 2, #m do local n = i + k - 1 subbedChars[n] = m[k] local byte2 = floor(n / 4096) % 64 + (term_divider and 128 or 136) local byte3 = floor(n / 64) % 64 + 128 local byte4 = n % 64 + 128 m1New = gsub(m1New, pattern_escape(m[k]), "\244" .. char(byte2) .. char(byte3) .. char(byte4), 1) end i = i + #m - 1 return m1New end) end text = gsub(text, "\1", "%[%[") :gsub("\2", "%]%]") return text, subbedChars end -- Reinsert any formatting that was temporarily substituted. local function undoTempSubstitutions(text, subbedChars) for i = 1, #subbedChars do local byte2 = floor(i / 4096) % 64 + 128 local byte3 = floor(i / 64) % 64 + 128 local byte4 = i % 64 + 128 text = gsub(text, "\244[" .. char(byte2) .. char(byte2+8) .. "]" .. char(byte3) .. char(byte4), replacement_escape(subbedChars[i])) end text = gsub(text, "\1", "%[%[") :gsub("\2", "%]%]") return text end -- Check if the raw text is an unsupported title, and if so return that. Otherwise, remove HTML entities. We do the pre-conversion to avoid loading the unsupported title list unnecessarily. local function checkNoEntities(self, text) local textNoEnc = decode_entities(text) if textNoEnc ~= text and self:loadData("Module:links/data").unsupported_titles[text] then return text else return textNoEnc end end -- If no script object is provided (or if it's invalid or None), get one. local function checkScript(text, self, sc) if not check_object("script", true, sc) or sc:getCode() == "None" then return self:findBestScript(text) else return sc end end local function normalize(text, sc) text = sc:fixDiscouragedSequences(text) return sc:toFixedNFD(text) end -- Split the text into sections, based on the presence of temporarily substituted formatting characters, then iterate over each one to apply substitutions. This avoids putting PUA characters through language-specific modules, which may be unequipped for them. local function iterateSectionSubstitutions(text, subbedChars, keepCarets, self, sc, substitution_data, function_name) local fail, cats, sections = nil, {} -- See [[Module:languages/data]]. if not find(text, "\244") or self:loadData("Module:languages/data").contiguous_substitution[self._code] then sections = {text} else sections = split(text, "\244[\128-\143][\128-\191]*", true) end for _, section in ipairs(sections) do -- Don't bother processing empty strings or whitespace (which may also not be handled well by dedicated modules). if gsub(section, "%s+", "") ~= "" then local sub, sub_fail, sub_cats = require("Module:languages/doSubstitutions")(section, self, sc, substitution_data, function_name) -- Second round of temporary substitutions, in case any formatting was added by the main substitution process. However, don't do this if the section contains formatting already (as it would have had to have been escaped to reach this stage, and therefore should be given as raw text). if sub and subbedChars then local noSub for _, pattern in ipairs(require("Module:languages/data/patterns")) do if match(section, pattern .. "%z?") then noSub = true end end if not noSub then sub, subbedChars = doTempSubstitutions(sub, subbedChars, keepCarets, true) end end if (not sub) or sub_fail then text = sub fail = sub_fail cats = sub_cats or {} break end text = sub and gsub(text, pattern_escape(section), replacement_escape(sub), 1) or text if type(sub_cats) == "table" then for _, cat in ipairs(sub_cats) do insert(cats, cat) end end end end -- Trim, unless there are only spacing characters, while ignoring any final formatting characters. text = text and text:gsub("^([\128-\191\244]*)%s+(%S)", "%1%2") :gsub("(%S)%s+([\128-\191\244]*)$", "%1%2") -- Remove duplicate categories. if #cats > 1 then cats = remove_duplicates(cats) end return text, fail, cats, subbedChars end -- Process carets (and any escapes). Default to simple removal, if no pattern/replacement is given. local function processCarets(text, pattern, repl) local rep repeat text, rep = gsub(text, "\\\\(\\*^)", "\3%1") until rep == 0 return text:gsub("\\^", "\4") :gsub(pattern or "%^", repl or "") :gsub("\3", "\\") :gsub("\4", "^") end -- Remove carets if they are used to capitalize parts of transliterations (unless they have been escaped). local function removeCarets(text, sc) if not sc:hasCapitalization() and sc:isTransliterated() and text:find("^", 1, true) then return processCarets(text) else return text end end local Language = {} function Language:loadData(modname) return (self._useRequire and require or mw.loadData)(modname) end --[==[Returns the language code of the language. Example: {{code|lua|"fr"}} for French.]==] function Language:getCode() return self._code end --[==[Returns the canonical name of the language. This is the name used to represent that language on Wiktionary, and is guaranteed to be unique to that language alone. Example: {{code|lua|"French"}} for French.]==] function Language:getCanonicalName() local name = self._name if name == nil then name = self._rawData[1] self._name = name end return name end --[==[ Return the display form of the language. The display form of a language, family or script is the form it takes when appearing as the <code><var>source</var></code> in categories such as <code>English terms derived from <var>source</var></code> or <code>English given names from <var>source</var></code>, and is also the displayed text in {makeCategoryLink()} links. For full and etymology-only languages, this is the same as the canonical name, but for families, it reads <code>"<var>name</var> languages"</code> (e.g. {"Indo-Iranian languages"}), and for scripts, it reads <code>"<var>name</var> script"</code> (e.g. {"Arabic script"}). ]==] function Language:getDisplayForm() local form = self._displayForm if form == nil then form = self:getCanonicalName() -- Add article and " substrate" to substrates that lack them. if self:getFamilyCode() == "qfa-sub" then if not (match(form, "^[Tt]he ") or match(form, "^[Aa] ")) then form = "a " .. form end if not match(form, "[Ss]ubstrate") then form = form .. " substrate" end end self._displayForm = form end return form end --[==[Returns the value which should be used in the HTML lang= attribute for tagged text in the language.]==] function Language:getHTMLAttribute(sc, region) local code = self._code if not find(code, "-", 1, true) then return code .. "-" .. sc:getCode() .. (region and "-" .. region or "") end local parent = self:getParent() region = region or match(code, "%f[%u][%u-]+%f[%U]") if parent then return parent:getHTMLAttribute(sc, region) end -- TODO: ISO family codes can also be used. return "mis-" .. sc:getCode() .. (region and "-" .. region or "") end --[==[Returns a table of the "other names" that the language is known by, excluding the canonical name. The names are not guaranteed to be unique, in that sometimes more than one language is known by the same name. Example: {{code|lua|{"Manx Gaelic", "Northern Manx", "Southern Manx"} }} for [[:Category:Manx language|Manx]]. If <code>onlyOtherNames</code> is given and is non-{{code|lua|nil}}, only names explicitly listed in the <code>otherNames</code> field are returned; otherwise, names listed under <code>otherNames</code>, <code>aliases</code> and <code>varieties</code> are combined together and returned. For example, for Manx, Manx Gaelic is listed as an alias, while Northern Manx and Southern Manx are listed as varieties. It should be noted that the <code>otherNames</code> field itself is deprecated, and entries listed there should eventually be moved to either <code>aliases</code> or <code>varieties</code>.]==] function Language:getOtherNames(onlyOtherNames) if #self._stack == 1 then self:loadInExtraData() end return require("Module:language-like").getOtherNames(self, onlyOtherNames) end --[==[Returns a table of the aliases that the language is known by, excluding the canonical name. Aliases are synonyms for the language in question. The names are not guaranteed to be unique, in that sometimes more than one language is known by the same name. Example: {{code|lua|{"High German", "New High German", "Deutsch"} }} for [[:Category:German language|German]].]==] function Language:getAliases() if #self._stack == 1 then self:loadInExtraData() end return self._rawData.aliases or (self._extraData and self._extraData.aliases) or {} end --[==[ Return a table of the known subvarieties of a given language, excluding subvarieties that have been given explicit etymology-only language codes. The names are not guaranteed to be unique, in that sometimes a given name refers to a subvariety of more than one language. Example: {{code|lua|{"Southern Aymara", "Central Aymara"} }} for [[:Category:Aymara language|Aymara]]. Note that the returned value can have nested tables in it, when a subvariety goes by more than one name. Example: {{code|lua|{"North Azerbaijani", "South Azerbaijani", {"Afshar", "Afshari", "Afshar Azerbaijani", "Afchar"}, {"Qashqa'i", "Qashqai", "Kashkay"}, "Sonqor"} }} for [[:Category:Azerbaijani language|Azerbaijani]]. Here, for example, Afshar, Afshari, Afshar Azerbaijani and Afchar all refer to the same subvariety, whose preferred name is Afshar (the one listed first). To avoid a return value with nested tables in it, specify a non-{{code|lua|nil}} value for the <code>flatten</code> parameter; in that case, the return value would be {{code|lua|{"North Azerbaijani", "South Azerbaijani", "Afshar", "Afshari", "Afshar Azerbaijani", "Afchar", "Qashqa'i", "Qashqai", "Kashkay", "Sonqor"} }}. ]==] function Language:getVarieties(flatten) if #self._stack == 1 then self:loadInExtraData() end return require("Module:language-like").getVarieties(self, flatten) end --[==[Returns a table of types as a lookup table (with the types as keys). The possible types are * {language}: This is a language, either full or etymology-only. * {full}: This is a "full" (not etymology-only) language, i.e. the union of {regular}, {reconstructed} and {appendix-constructed}. Note that the types {full} and {etymology-only} also exist for families, so if you want to check specifically for a full language and you have an object that might be a family, you should use {{lua|hasType("language", "full")}} and not simply {{lua|hasType("full")}}. * {etymology-only}: This is an etymology-only (not full) language, whose parent is another etymology-only language or a full language. Note that the types {full} and {etymology-only} also exist for families, so if you want to check specifically for an etymology-only language and you have an object that might be a family, you should use {{lua|hasType("language", "etymology-only")}} and not simply {{lua|hasType("etymology-only")}}. * {regular}: This indicates a full language that is attested according to [[WT:CFI]] and therefore permitted in the main namespace. There may also be reconstructed terms for the language, which are placed in the {Reconstruction} namespace and must be prefixed with * to indicate a reconstruction. Most full languages are natural (not constructed) languages, but a few constructed languages (e.g. Esperanto and Volapük, among others) are also allowed in the mainspace and considered regular languages. * {reconstructed}: This language is not attested according to [[WT:CFI]], and therefore is allowed only in the {Reconstruction} namespace. All terms in this language are reconstructed, and must be prefixed with *. Languages such as Proto-Indo-European and Proto-Germanic are in this category. * {appendix-constructed}: This language is attested but does not meet the additional requirements set out for constructed languages ([[WT:CFI#Constructed languages]]). Its entries must therefore be in the Appendix namespace, but they are not reconstructed and therefore should not have * prefixed in links. ]==] function Language:getTypes() local types = self._types if types == nil then types = {language = true} if self:getFullCode() == self._code then types.full = true else types["etymology-only"] = true end for t in gmatch(self._rawData.type, "[^,]+") do types[t] = true end self._types = types end return types end --[==[Given a list of types as strings, returns true if the language has all of them.]==] function Language:hasType(...) local args, types = {...}, self:getTypes() for i = 1, #args do if not types[args[i]] then return false end end return true end --[==[Returns a table containing <code>WikimediaLanguage</code> objects (see [[Module:wikimedia languages]]), which represent languages and their codes as they are used in Wikimedia projects for interwiki linking and such. More than one object may be returned, as a single Wiktionary language may correspond to multiple Wikimedia languages. For example, Wiktionary's single code <code>sh</code> (Serbo-Croatian) maps to four Wikimedia codes: <code>sh</code> (Serbo-Croatian), <code>bs</code> (Bosnian), <code>hr</code> (Croatian) and <code>sr</code> (Serbian). The code for the Wikimedia language is retrieved from the <code>wikimedia_codes</code> property in the data modules. If that property is not present, the code of the current language is used. If none of the available codes is actually a valid Wikimedia code, an empty table is returned.]==] function Language:getWikimediaLanguages() local wm_langs = self._wikimediaLanguageObjects if wm_langs == nil then local get_wm_lang = require("Module:wikimedia languages").getByCode local codes = self:getWikimediaLanguageCodes() wm_langs = {} for i = 1, #codes do wm_langs[i] = get_wm_lang(codes[i]) end self._wikimediaLanguageObjects = wm_langs end return wm_langs end function Language:getWikimediaLanguageCodes() local wm_langs = self._wikimediaLanguageCodes if wm_langs == nil then wm_langs = self._rawData.wikimedia_codes wm_langs = wm_langs and split(wm_langs, ",", true, true) or {self._code} self._wikimediaLanguageCodes = wm_langs end return wm_langs end --[==[ Returns the name of the Wikipedia article for the language. `project` specifies the language and project to retrieve the article from, defaulting to {"enwiki"} for the English Wikipedia. Normally if specified it should be the project code for a specific-language Wikipedia e.g. "zhwiki" for the Chinese Wikipedia, but it can be any project, including non-Wikipedia ones. If the project is the English Wikipedia and the property {wikipedia_article} is present in the data module it will be used first. In all other cases, a sitelink will be generated from {:getWikidataItem} (if set). The resulting value (or lack of value) is cached so that subsequent calls are fast. If no value could be determined, and `noCategoryFallback` is {false}, {:getCategoryName} is used as fallback; otherwise, {nil} is returned. Note that if `noCategoryFallback` is {nil} or omitted, it defaults to {false} if the project is the English Wikipedia, otherwise to {true}. In other words, under normal circumstances, if the English Wikipedia article couldn't be retrieved, the return value will fall back to a link to the language's category, but this won't normally happen for any other project. ]==] function Language:getWikipediaArticle(noCategoryFallback, project) return require("Module:language-like").getWikipediaArticle(self, noCategoryFallback, project) end function Language:makeWikipediaLink() return "[[w:" .. self:getWikipediaArticle() .. "|" .. self:getCanonicalName() .. "]]" end --[==[Returns the name of the Wikimedia Commons category page for the language.]==] function Language:getCommonsCategory() return require("Module:language-like").getCommonsCategory(self) end --[==[Returns the Wikidata item id for the language or <code>nil</code>. This corresponds to the the second field in the data modules.]==] function Language:getWikidataItem() return require("Module:language-like").getWikidataItem(self) end --[==[Returns a table of <code>Script</code> objects for all scripts that the language is written in. See [[Module:scripts]].]==] function Language:getScripts() local scripts = self._scriptObjects if scripts == nil then local codes = self:getScriptCodes() if codes[1] == "All" then scripts = self:loadData("Module:scripts/data") else local get_script = require("Module:scripts").getByCode scripts = {} for i = 1, #codes do scripts[i] = get_script(codes[i], nil, nil, self._useRequire) end end self._scriptObjects = scripts end return scripts end --[==[Returns the table of script codes in the language's data file.]==] function Language:getScriptCodes() local scripts = self._scriptCodes if scripts == nil then scripts = self._rawData[4] if scripts then local codes, n = {}, 0 for code in gmatch(scripts, "[^,]+") do n = n + 1 -- Special handling of "Hants", which represents "Hani", "Hant" and "Hans" collectively. if code == "Hants" then codes[n] = "Hani" codes[n + 1] = "Hant" codes[n + 2] = "Hans" n = n + 2 else codes[n] = code end end scripts = codes else scripts = {"None"} end self._scriptCodes = scripts end return scripts end --[==[Given some text, this function iterates through the scripts of a given language and tries to find the script that best matches the text. It returns a {{code|lua|Script}} object representing the script. If no match is found at all, it returns the {{code|lua|None}} script object.]==] function Language:findBestScript(text, forceDetect) local useRequire = self._useRequire if not text or text == "" or text == "-" then return require("Module:scripts").getByCode("None", nil, nil, useRequire) end -- Differs from table returned by getScriptCodes, as Hants is not normalized into its constituents. local codes = self._bestScriptCodes if codes == nil then codes = self._rawData[4] codes = codes and split(codes, ",", true, true) or {"None"} self._bestScriptCodes = codes end local first_sc = codes[1] if first_sc == "All" then return require("Module:scripts").findBestScriptWithoutLang(text) end local get_script = require("Module:scripts").getByCode local codes_len = #codes if not (forceDetect or first_sc == "Hants" or codes_len > 1) then first_sc = get_script(first_sc, nil, nil, useRequire) local charset = first_sc.characters return charset and umatch(text, "[" .. charset .. "]") and first_sc or get_script("None", nil, nil, useRequire) end -- Remove all formatting characters. text = require("Module:utilities").get_plaintext(text) -- Remove all spaces and any ASCII punctuation. Some non-ASCII punctuation is script-specific, so can't be removed. text = ugsub(text, "[%s!\"#%%&'()*,%-./:;?@[\\%]_{}]+", "") if #text == 0 then return get_script("None", nil, nil, useRequire) end -- Try to match every script against the text, -- and return the one with the most matching characters. local bestcount, bestscript, length = 0 for i = 1, codes_len do local sc = codes[i] -- Special case for "Hants", which is a special code that represents whichever of "Hant" or "Hans" best matches, or "Hani" if they match equally. This avoids having to list all three. In addition, "Hants" will be treated as the best match if there is at least one matching character, under the assumption that a Han script is desirable in terms that contain a mix of Han and other scripts (not counting those which use Jpan or Kore). if sc == "Hants" then local Hani = get_script("Hani", nil, nil, useRequire) if not Hant_chars then Hant_chars = self:loadData("Module:zh/data/ts") Hans_chars = self:loadData("Module:zh/data/st") end local t, s, found = 0, 0 -- This is faster than using mw.ustring.gmatch directly. for ch in gmatch(ugsub(text, "[" .. Hani.characters .. "]", "\255%0"), "\255(.[\128-\191]*)") do found = true if Hant_chars[ch] then t = t + 1 if Hans_chars[ch] then s = s + 1 end elseif Hans_chars[ch] then s = s + 1 else t, s = t + 1, s + 1 end end if found then if t == s then return Hani end return get_script(t > s and "Hant" or "Hans", nil, nil, useRequire) end else sc = get_script(sc, nil, nil, useRequire) if not length then length = ulen(text) end -- Count characters by removing everything in the script's charset and comparing to the original length. local charset = sc.characters local count = charset and length - ulen(ugsub(text, "[" .. charset .. "]+", "")) or 0 if count >= length then return sc elseif count > bestcount then bestcount = count bestscript = sc end end end -- Return best matching script, or otherwise None. return bestscript or get_script("None", nil, nil, useRequire) end --[==[Returns a <code>Family</code> object for the language family that the language belongs to. See [[Module:families]].]==] function Language:getFamily() local family = self._familyObject if family == nil then family = self:getFamilyCode() -- If the value is nil, it's cached as false. family = family and require("Module:families").getByCode(family, self._useRequire) or false self._familyObject = family end return family or nil end --[==[Returns the family code in the language's data file.]==] function Language:getFamilyCode() local family = self._familyCode if family == nil then -- If the value is nil, it's cached as false. family = self._rawData[3] or false self._familyCode = family end return family or nil end function Language:getFamilyName() local family = self._familyName if family == nil then family = self:getFamily() -- If the value is nil, it's cached as false. family = family and family:getCanonicalName() or false self._familyName = family end return family or nil end --[==[Check whether the language belongs to `family` (which can be a family code or object). A list of objects can be given in place of `family`; in that case, return true if the language belongs to any of the specified families. Note that some languages (in particular, certain creoles) can have multiple immediate ancestors potentially belonging to different families; in that case, return true if the language belongs to any of the specified families.]==] function Language:inFamily(...) --check_object("family", nil, ...) for _, family in ipairs{...} do if type(family) == "table" then family = family:getCode() end local self_family_code = self:getFamilyCode() if not self_family_code then return false elseif self_family_code == family then return true end local self_family = self:getFamily() if self_family:inFamily(family) then return true -- If the family isn't a real family (e.g. creoles) check any ancestors. elseif self_family:getFamilyCode() == "qfa-not" then local ancestors = self:getAncestors() for _, ancestor in ipairs(ancestors) do if ancestor:inFamily(family) then return true end end end end return false end function Language:getParent() local parent = self._parentObject if parent == nil then parent = self:getParentCode() -- If the value is nil, it's cached as false. parent = parent and export.getByCode(parent, nil, true, true, self._useRequire) or false self._parentObject = parent end return parent or nil end function Language:getParentCode() local parent = self._parentCode if parent == nil then -- If the value is nil, it's cached as false. parent = self._rawData[5] or false self._parentCode = parent end return parent or nil end function Language:getParentName() local parent = self._parentName if parent == nil then parent = self:getParent() -- If the value is nil, it's cached as false. parent = parent and parent:getCanonicalName() or false self._parentName = parent end return parent or nil end function Language:getParentChain() local chain = self._parentChain if chain == nil then chain = {} local parent, n = self:getParent(), 0 while parent do n = n + 1 chain[n] = parent parent = parent:getParent() end self._parentChain = chain end return chain end function Language:hasParent(...) --check_object("language", nil, ...) for _, otherlang in ipairs{...} do for _, parent in ipairs(self:getParentChain()) do if type(otherlang) == "string" then if otherlang == parent:getCode() then return true end else if otherlang:getCode() == parent:getCode() then return true end end end end return false end --[==[ If the language is etymology-only, this iterates through parents until a full language or family is found, and the corresponding object is returned. If the language is a full language, then it simply returns itself. ]==] function Language:getFull() local full = self._fullObject if full == nil then full = self:getFullCode() full = full == self._code and self or export.getByCode(full, nil, nil, nil, self._useRequire) self._fullObject = full end return full end --[==[ If the language is an etymology-only language, this iterates through parents until a full language or family is found, and the corresponding code is returned. If the language is a full language, then it simply returns the language code. ]==] function Language:getFullCode() return self._fullCode or self._code end --[==[ If the language is an etymology-only language, this iterates through parents until a full language or family is found, and the corresponding canonical name is returned. If the language is a full language, then it simply returns the canonical name of the language. ]==] function Language:getFullName() local full = self._fullName if full == nil then full = self:getFull():getCanonicalName() self._fullName = full end return full end --[==[Returns a table of <code class="nf">Language</code> objects for all languages that this language is directly descended from. Generally this is only a single language, but creoles, pidgins and mixed languages can have multiple ancestors.]==] function Language:getAncestors() if not self._ancestorObjects then self._ancestorObjects = {} local ancestors = shallowcopy(self:getAncestorCodes()) if #ancestors > 0 then for _, ancestor in ipairs(ancestors) do insert(self._ancestorObjects, export.getByCode(ancestor, nil, true, nil, self._useRequire)) end else local fam = self:getFamily() local protoLang = fam and fam:getProtoLanguage() or nil -- For the cases where the current language is the proto-language -- of its family, or an etymology-only language that is ancestral to that -- proto-language, we need to step up a level higher right from the -- start. if protoLang and ( protoLang:getCode() == self._code or (self:hasType("etymology-only") and protoLang:hasAncestor(self)) ) then fam = fam:getFamily() protoLang = fam and fam:getProtoLanguage() or nil end while not protoLang and not (not fam or fam:getCode() == "qfa-not") do fam = fam:getFamily() protoLang = fam and fam:getProtoLanguage() or nil end insert(self._ancestorObjects, protoLang) end end return self._ancestorObjects end do -- Avoid a language being its own ancestor via class inheritance. We only need to check for this if the language has inherited an ancestor table from its parent, because we never want to drop ancestors that have been explicitly set in the data. -- Recursively iterate over ancestors until we either find self or run out. If self is found, return true. local function check_ancestor(self, lang) local codes = lang:getAncestorCodes() if not codes then return nil end for i = 1, #codes do local code = codes[i] if code == self._code then return true end local anc = export.getByCode(code, nil, true, nil, self._useRequire) if check_ancestor(self, anc) then return true end end end --[==[Returns a table of <code class="nf">Language</code> codes for all languages that this language is directly descended from. Generally this is only a single language, but creoles, pidgins and mixed languages can have multiple ancestors.]==] function Language:getAncestorCodes() if self._ancestorCodes then return self._ancestorCodes end local codes = self._rawData.ancestors if not codes then codes = {} self._ancestorCodes = codes return codes end codes = split(codes, ",", true, true) self._ancestorCodes = codes if ( #codes == 0 or #self._stack == 1 or self._stack[#self._stack].ancestors ) then return codes end local i, code = 1 while i <= #codes do code = codes[i] if check_ancestor(self, self) then remove(codes, i) else i = i + 1 end end return codes end end --[==[Given a list of language objects or codes, returns true if at least one of them is an ancestor. This includes any etymology-only children of that ancestor. If the language's ancestor(s) are etymology-only languages, it will also return true for those language parent(s) (e.g. if Vulgar Latin is the ancestor, it will also return true for its parent, Latin). However, a parent is excluded from this if the ancestor is also ancestral to that parent (e.g. if Classical Persian is the ancestor, Persian would return false, because Classical Persian is also ancestral to Persian).]==] function Language:hasAncestor(...) --check_object("language", nil, ...) local function iterateOverAncestorTree(node, func, parent_check) local ancestors = node:getAncestors() local ancestorsParents = {} for _, ancestor in ipairs(ancestors) do local ret = func(ancestor) or iterateOverAncestorTree(ancestor, func, parent_check) if ret then return ret end end -- Check the parents of any ancestors. We don't do this if checking the parents of the other language, so that we exclude any etymology-only children of those parents that are not directly related (e.g. if the ancestor is Vulgar Latin and we are checking New Latin, we want it to return false because they are on different ancestral branches. As such, if we're already checking the parent of New Latin (Latin) we don't want to compare it to the parent of the ancestor (Latin), as this would be a false positive; it should be one or the other). if not parent_check then return nil end for _, ancestor in ipairs(ancestors) do local ancestorParents = ancestor:getParentChain() for _, ancestorParent in ipairs(ancestorParents) do if ancestorParent:getCode() == self._code or ancestorParent:hasAncestor(ancestor) then break else insert(ancestorsParents, ancestorParent) end end end for _, ancestorParent in ipairs(ancestorsParents) do local ret = func(ancestorParent) if ret then return ret end end end local function do_iteration(otherlang, parent_check) -- otherlang can't be self if (type(otherlang) == "string" and otherlang or otherlang:getCode()) == self._code then return false end repeat if iterateOverAncestorTree( self, function(ancestor) return ancestor:getCode() == (type(otherlang) == "string" and otherlang or otherlang:getCode()) end, parent_check ) then return true elseif type(otherlang) == "string" then otherlang = export.getByCode(otherlang, nil, true, nil, self._useRequire) end otherlang = otherlang:getParent() parent_check = false until not otherlang end local parent_check = true for _, otherlang in ipairs{...} do local ret = do_iteration(otherlang, parent_check) if ret then return true end end return false end function Language:getAncestorChain() if not self._ancestorChain then self._ancestorChain = {} local step = self while true do local ancestors = step:getAncestors() step = #ancestors == 1 and ancestors[1] or nil if not step then break end insert(self._ancestorChain, 1, step) end end return self._ancestorChain end local function fetch_descendants(self, format) local languages = require("Module:languages/code to canonical name") local etymology_languages = require("Module:etymology languages/code to canonical name") local families = require("Module:families/code to canonical name") local descendants = {} local family = self:getFamily() -- Iterate over all three datasets. for _, data in ipairs{languages, etymology_languages, families} do for code in pairs(data) do local lang = export.getByCode(code, nil, true, true, self._useRequire) -- Test for a descendant. Earlier tests weed out most candidates, while the more intensive tests are only used sparingly. if ( code ~= self._code and -- Not self. lang:inFamily(family) and -- In the same family. ( family:getProtoLanguageCode() == self._code or -- Self is the protolanguage. self:hasDescendant(lang) or -- Full hasDescendant check. (lang:getFullCode() == self._code and not self:hasAncestor(lang)) -- Etymology-only child which isn't an ancestor. ) ) then if format == "object" then insert(descendants, lang) elseif format == "code" then insert(descendants, code) elseif format == "name" then insert(descendants, lang:getCanonicalName()) end end end end return descendants end function Language:getDescendants() if not self._descendantObjects then self._descendantObjects = fetch_descendants(self, "object") end return self._descendantObjects end function Language:getDescendantCodes() if not self._descendantCodes then self._descendantCodes = fetch_descendants(self, "code") end return self._descendantCodes end function Language:getDescendantNames() if not self._descendantNames then self._descendantNames = fetch_descendants(self, "name") end return self._descendantNames end function Language:hasDescendant(...) for _, lang in ipairs{...} do if type(lang) == "string" then lang = export.getByCode(lang, nil, true, nil, self._useRequire) end if lang:hasAncestor(self) then return true end end return false end local function fetch_children(self, format) local m_etym_data = require("Module:etymology languages/data") local self_code = self._code local children = {} for code, data in pairs(m_etym_data) do local _data = data repeat local parent = _data[5] if parent == self_code then if format == "object" then insert(children, export.getByCode(code, nil, true, nil, self._useRequire)) elseif format == "code" then insert(children, code) elseif format == "name" then insert(children, data[1]) end break end _data = m_etym_data[parent] until not _data end return children end function Language:getChildren() if not self._childObjects then self._childObjects = fetch_children(self, "object") end return self._childObjects end function Language:getChildrenCodes() if not self._childCodes then self._childCodes = fetch_children(self, "code") end return self._childCodes end function Language:getChildrenNames() if not self._childNames then self._childNames = fetch_children(self, "name") end return self._childNames end function Language:hasChild(...) local lang = ... if not lang then return false elseif type(lang) == "string" then lang = export.getByCode(lang, nil, true, nil, self._useRequire) end if lang:hasParent(self) then return true end return self:hasChild(select(2, ...)) end --[==[Returns the name of the main category of that language. Example: {{code|lua|"French language"}} for French, whose category is at [[:Category:French language]]. Unless optional argument <code>nocap</code> is given, the language name at the beginning of the returned value will be capitalized. This capitalization is correct for category names, but not if the language name is lowercase and the returned value of this function is used in the middle of a sentence.]==] function Language:getCategoryName(nocap) if not self._categoryName then local name = self:getCanonicalName() -- Only add " language" if a full language. if #self._stack == 1 then -- If the name already has "language" in it, don't add it. if not match(name, "භාෂාව$") then name = name .. " භාෂාව" end end self._categoryName = name end if nocap then return self._categoryName else return mw.getContentLanguage():ucfirst(self._categoryName) end end --[==[Creates a link to the category; the link text is the canonical name.]==] function Language:makeCategoryLink() return "[[:Category:" .. self:getCategoryName() .. "|" .. self:getDisplayForm() .. "]]" end function Language:getStandardCharacters(sc) if type(self._rawData.standardChars) ~= "table" then return self._rawData.standardChars else if sc and type(sc) ~= "string" then check_object("script", nil, sc) sc = sc:getCode() end if (not sc) or sc == "None" then local scripts = {} for _, script in pairs(self._rawData.standardChars) do insert(scripts, script) end return concat(scripts) end if self._rawData.standardChars[sc] then return self._rawData.standardChars[sc] .. (self._rawData.standardChars[1] or "") end end end --[==[Make the entry name (i.e. the correct page name).]==] function Language:makeEntryName(text, sc) if (not text) or text == "" then return text, nil, {} end -- Set `unsupported` as true if certain conditions are met. local unsupported -- Check if there's an unsupported character. \239\191\189 is the replacement character U+FFFD, which can't be typed directly here due to an abuse filter. Unix-style dot-slash notation is also unsupported, as it is used for relative paths in links, as are 3 or more consecutive tildes. -- Note: match is faster with magic characters/charsets; find is faster with plaintext. if ( match(text, "[#<>%[%]_{|}]") or find(text, "\239\191\189") or match(text, "%f[^%z/]%.%.?%f[%z/]") or find(text, "~~~") ) then unsupported = true -- If it looks like an interwiki link. elseif find(text, ":") then local prefix = gsub(text, "^:*(.-):.*", ulower) if ( self:loadData("Module:data/namespaces")[prefix] or self:loadData("Module:data/interwikis")[prefix] ) then unsupported = true end end -- Check if the text is a listed unsupported title. local unsupportedTitles = self:loadData("Module:links/data").unsupported_titles if unsupportedTitles[text] then return "Unsupported titles/" .. unsupportedTitles[text], nil, {} end sc = checkScript(text, self, sc) local fail, cats text = normalize(text, sc) text, fail, cats = iterateSectionSubstitutions(text, nil, nil, self, sc, self._rawData.entry_name, "makeEntryName") text = umatch(text, "^[¿¡]?(.-[^%s%p].-)%s*[؟?!;՛՜ ՞ ՟?!︖︕।॥။၊་།]?$") or text -- Escape unsupported characters so they can be used in titles. ` is used as a delimiter for this, so a raw use of it in an unsupported title is also escaped here to prevent interference; this is only done with unsupported titles, though, so inclusion won't in itself mean a title is treated as unsupported (which is why it's excluded from the earlier test). if unsupported then local unsupported_characters = self:loadData("Module:links/data").unsupported_characters text = text:gsub("[#<>%[%]_`{|}\239]\191?\189?", unsupported_characters) :gsub("%f[^%z/]%.%.?%f[%z/]", function(m) return gsub(m, "%.", "`period`") end) :gsub("~~~+", function(m) return gsub(m, "~", "`tilde`") end) text = "Unsupported titles/" .. text end return text, fail, cats end --[==[Generates alternative forms using a specified method, and returns them as a table. If no method is specified, returns a table containing only the input term.]==] function Language:generateForms(text, sc) if self._rawData.generate_forms then sc = checkScript(text, self, sc) return require("Module:" .. self._rawData.generate_forms).generateForms(text, self._code, sc:getCode()) else return {text} end end --[==[Creates a sort key for the given entry name, following the rules appropriate for the language. This removes diacritical marks from the entry name if they are not considered significant for sorting, and may perform some other changes. Any initial hyphen is also removed, and anything parentheses is removed as well. The <code>sort_key</code> setting for each language in the data modules defines the replacements made by this function, or it gives the name of the module that takes the entry name and returns a sortkey.]==] function Language:makeSortKey(text, sc) if (not text) or text == "" then return text, nil, {} end if match(text, "<[^<>]+>") then track("track HTML tag") end -- Remove directional characters, soft hyphens, strip markers and HTML tags. text = ugsub(text, "[\194\173\226\128\170-\226\128\174\226\129\166-\226\129\169]", "") text = gsub(mw.text.unstrip(text), "<[^<>]+>", "") text = decode_uri(text, "PATH") text = checkNoEntities(self, text) -- Remove initial hyphens and * unless the term only consists of spacing + punctuation characters. text = ugsub(text, "^([􀀀-􏿽]*)[-־ـ᠊*]+([􀀀-􏿽]*)(.*[^%s%p].*)", "%1%2%3") sc = checkScript(text, self, sc) text = normalize(text, sc) text = removeCarets(text, sc) -- For languages with dotted dotless i, ensure that "İ" is sorted as "i", and "I" is sorted as "ı". if self:hasDottedDotlessI() then text = gsub(text, "I\204\135", "i") -- decomposed "İ" :gsub("I", "ı") text = sc:toFixedNFD(text) end -- Convert to lowercase, make the sortkey, then convert to uppercase. Where the language has dotted dotless i, it is usually not necessary to convert "i" to "İ" and "ı" to "I" first, because "I" will always be interpreted as conventional "I" (not dotless "İ") by any sorting algorithms, which will have been taken into account by the sortkey substitutions themselves. However, if no sortkey substitutions have been specified, then conversion is necessary so as to prevent "i" and "ı" both being sorted as "I". -- An exception is made for scripts that (sometimes) sort by scraping page content, as that means they are sensitive to changes in capitalization (as it changes the target page). local fail, cats if not sc:sortByScraping() then text = ulower(text) end text, fail, cats = iterateSectionSubstitutions(text, nil, nil, self, sc, self._rawData.sort_key, "makeSortKey") if not sc:sortByScraping() then if self:hasDottedDotlessI() and not self._rawData.sort_key then text = gsub(gsub(text, "ı", "I"), "i", "İ") text = sc:toFixedNFC(text) end text = uupper(text) end -- Remove parentheses, as long as they are either preceded or followed by something. text = gsub(text, "(.)[()]+", "%1") :gsub("[()]+(.)", "%1") text = escape_risky_characters(text) return text, fail, cats end --[==[Create the form used as as a basis for display text and transliteration.]==] local function processDisplayText(text, self, sc, keepCarets, keepPrefixes) local subbedChars = {} text, subbedChars = doTempSubstitutions(text, subbedChars, keepCarets) text = decode_uri(text, "PATH") text = checkNoEntities(self, text) sc = checkScript(text, self, sc) local fail, cats text = normalize(text, sc) text, fail, cats, subbedChars = iterateSectionSubstitutions(text, subbedChars, keepCarets, self, sc, self._rawData.display_text, "makeDisplayText") text = removeCarets(text, sc) -- Remove any interwiki link prefixes (unless they have been escaped or this has been disabled). if find(text, ":") and not keepPrefixes then local rep repeat text, rep = gsub(text, "\\\\(\\*:)", "\3%1") until rep == 0 text = gsub(text, "\\:", "\4") while true do local prefix = gsub(text, "^(.-):.+", function(m1) return gsub(m1, "\244[\128-\191]*", "") end) if not prefix or prefix == text then break end local lower_prefix = ulower(prefix) if not (self:loadData("Module:data/interwikis")[lower_prefix] or prefix == "") then break end text = gsub(text, "^(.-):(.*)", function(m1, m2) local ret = {} for subbedChar in gmatch(m1, "\244[\128-\191]*") do insert(ret, subbedChar) end return concat(ret) .. m2 end) end text = gsub(text, "\3", "\\") :gsub("\4", ":") end return text, fail, cats, subbedChars end --[==[Make the display text (i.e. what is displayed on the page).]==] function Language:makeDisplayText(text, sc, keepPrefixes) if (not text) or text == "" then return text, nil, {} end local fail, cats, subbedChars text, fail, cats, subbedChars = processDisplayText(text, self, sc, nil, keepPrefixes) text = escape_risky_characters(text) return undoTempSubstitutions(text, subbedChars), fail, cats end --[==[Transliterates the text from the given script into the Latin script (see [[Wiktionary:Transliteration and romanization]]). The language must have the <code>translit</code> property for this to work; if it is not present, {{code|lua|nil}} is returned. Returns three values: # The transliteration. # A boolean which indicates whether the transliteration failed for an unexpected reason. If {{code|lua|false}}, then the transliteration either succeeded, or the module is returning nothing in a controlled way (e.g. the input was {{code|lua|"-"}}). Generally, this means that no maintenance action is required. If {{code|lua|true}}, then the transliteration is {{code|lua|nil}} because either the input or output was defective in some way (e.g. [[Module:ar-translit]] will not transliterate non-vocalised inputs, and this module will fail partially-completed transliterations in all languages). Note that this value can be manually set by the transliteration module, so make sure to cross-check to ensure it is accurate. # A table of categories selected by the transliteration module, which should be in the format expected by {{code|lua|format_categories}} in [[Module:utilities]]. The <code>sc</code> parameter is handled by the transliteration module, and how it is handled is specific to that module. Some transliteration modules may tolerate {{code|lua|nil}} as the script, others require it to be one of the possible scripts that the module can transliterate, and will show an error if it's not one of them. For this reason, the <code>sc</code> parameter should always be provided when writing non-language-specific code. The <code>module_override</code> parameter is used to override the default module that is used to provide the transliteration. This is useful in cases where you need to demonstrate a particular module in use, but there is no default module yet, or you want to demonstrate an alternative version of a transliteration module before making it official. It should not be used in real modules or templates, only for testing. All uses of this parameter are tracked by [[Wiktionary:Tracking/module_override]]. '''Known bugs''': * This function assumes {tr(s1) .. tr(s2) == tr(s1 .. s2)}. When this assertion fails, wikitext markups like <nowiki>'''</nowiki> can cause wrong transliterations. * HTML entities like <code>&amp;apos;</code>, often used to escape wikitext markups, do not work.]==] function Language:transliterate(text, sc, module_override) -- If there is no text, or the language doesn't have transliteration data and there's no override, return nil. if not (self._rawData.translit or module_override) then return nil, false, {} elseif (not text) or text == "" or text == "-" then return text, false, {} end -- If the script is not transliteratable (and no override is given), return nil. sc = checkScript(text, self, sc) if not (sc:isTransliterated() or module_override) then -- temporary tracking to see if/when this gets triggered track("non-transliterable") track("non-transliterable/" .. self:getCode()) track("non-transliterable/" .. sc:getCode()) track("non-transliterable/" .. sc:getCode() .. "/" .. self:getCode()) return nil, true, {} end -- Remove any strip markers. text = mw.text.unstrip(text) -- Get the display text with the keepCarets flag set. local fail, cats, subbedChars text, fail, cats, subbedChars = processDisplayText(text, self, sc, true) -- Transliterate (using the module override if applicable). text, fail, cats, subbedChars = iterateSectionSubstitutions(text, subbedChars, true, self, sc, module_override or self._rawData.translit, "tr") if not text then return nil, true, cats end -- Incomplete transliterations return nil. local charset = sc.characters if charset and umatch(text, "[" .. charset .. "]") then -- Remove any characters in Latin, which includes Latin characters also included in other scripts (as these are false positives), as well as any PUA substitutions. Anything remaining should only be script code "None" (e.g. numerals). local check_text = ugsub(text, "[" .. require("Module:scripts").getByCode("Latn").characters .. "􀀀-􏿽]+", "") -- Set none_is_last_resort_only flag, so that any non-None chars will cause a script other than "None" to be returned. if require("Module:scripts").findBestScriptWithoutLang(check_text, true):getCode() ~= "None" then return nil, true, cats end end text = escape_risky_characters(text) text = undoTempSubstitutions(text, subbedChars) -- If the script does not use capitalization, then capitalize any letters of the transliteration which are immediately preceded by a caret (and remove the caret). if text and not sc:hasCapitalization() and text:find("^", 1, true) then text = processCarets(text, "%^([\128-\191\244]*%*?)([^\128-\191\244][\128-\191]*)", function(m1, m2) return m1 .. uupper(m2) end) end -- Track module overrides. if module_override ~= nil then track("module_override") end fail = text == nil and (not not fail) or false return text, fail, cats end do local function handle_language_spec(self, spec, sc) local ret = self["_" .. spec] if ret == nil then ret = self._rawData[spec] if type(ret) == "string" then ret = list_to_set(split(ret, ",", true, true)) end self["_" .. spec] = ret end if type(ret) == "table" then ret = ret[sc:getCode()] end return not not ret end function Language:overrideManualTranslit(sc) return handle_language_spec(self, "override_translit", sc) end function Language:link_tr(sc) return handle_language_spec(self, "link_tr", sc) end end --[==[Returns {{code|lua|true}} if the language has a transliteration module, or {{code|lua|false}} if it doesn't.]==] function Language:hasTranslit() return not not self._rawData.translit end --[==[Returns {{code|lua|true}} if the language uses the letters I/ı and İ/i, or {{code|lua|false}} if it doesn't.]==] function Language:hasDottedDotlessI() return not not self._rawData.dotted_dotless_i end function Language:toJSON(returnTable) local entryNamePatterns = nil local entryNameRemoveDiacritics = nil if self._rawData.entry_name then entryNameRemoveDiacritics = self._rawData.entry_name.remove_diacritics if self._rawData.entry_name.from then entryNamePatterns = {} for i, from in ipairs(self._rawData.entry_name.from) do insert(entryNamePatterns, {from = from, to = self._rawData.entry_name.to[i] or ""}) end end end -- mainCode should only end up non-nil if dontCanonicalizeAliases is passed to make_object(). local ret = m_table.deepcopy{ ancestors = self:getAncestorCodes(), canonicalName = self:getCanonicalName(), categoryName = self:getCategoryName("nocap"), code = self._code, mainCode = self._main_code, entryNamePatterns = entryNamePatterns, entryNameRemoveDiacritics = entryNameRemoveDiacritics, family = self:getFamilyCode(), otherNames = self:getOtherNames(true), aliases = self:getAliases(), varieties = self:getVarieties(), scripts = self:getScriptCodes(), parent = self._parentCode or nil, full = self._fullCode or nil, type = m_table.keysToList(self:getTypes()), wikimediaLanguages = self:getWikimediaLanguageCodes(), wikidataItem = self:getWikidataItem(), } if returnTable then return ret else return require("Module:JSON").toJSON(ret) end end --[==[ <span style="color: #BA0000">This function is not for use in entries or other content pages.</span> Returns a blob of data about the language. The format of this blob is undocumented, and perhaps unstable; it's intended for things like the module's own unit-tests, which are "close friends" with the module and will be kept up-to-date as the format changes. -- Do NOT use these methods! -- All uses should be pre-approved on the talk page! ]==] function Language:getRawData() local rawData = {} for _, element in ipairs(self._stack) do for k, v in pairs(element) do rawData[k] = v end end return rawData end --[==[<span style="color: #BA0000">This function is not for use in entries or other content pages.</span> Returns a blob of data about the language that contains the "extra data". Much like with getRawData, the format of this blob is undocumented, and perhaps unstable; it's intended for things like the module's own unit-tests, which are "close friends" with the module and will be kept up-to-date as the format changes.]==] function Language:getRawExtraData() if #self._stack == 1 then self:loadInExtraData() end return self._extraData end local function getRawExtraLanguageData(self, code) local modulename = export.getExtraDataModuleName(code) return modulename and self:loadData("Module:" .. modulename)[code] or nil end function Language:loadInExtraData() if not self._extraData then -- load extra data from module and assign to _extraData field -- use empty table as a fallback if extra data is nil self._extraData = getRawExtraLanguageData(self, self._code) or {} end end function export.getDataModuleName(code) local letter = match(code, "^(%l)[%l-]+$") if not letter then return nil elseif find(code, "-", 1, true) then return "languages/data/exceptional" end local code_len = #code return code_len == 2 and "languages/data/2" or code_len == 3 and "languages/data/3/" .. letter or nil end function export.getExtraDataModuleName(code) local dataModule = export.getDataModuleName(code) return dataModule and dataModule .. "/extra" or nil end do local key_types = { [2] = "unique", aliases = "unique", otherNames = "unique", type = "append", varieties = "unique" } function export.makeObject(code, data, useRequire, dontCanonicalizeAliases) if not data then return nil end -- Convert any aliases. local input_code = code code = normalize_code(code, useRequire) input_code = dontCanonicalizeAliases and input_code or code if find(data.type, "family") and not data[5] then return require("Module:families").makeObject(code, data, useRequire) end local parent if data[5] then parent = export.getByCode(data[5], nil, true, true, useRequire) else parent = Language end parent.__index = parent local lang = { _code = input_code, _useRequire = useRequire or nil } -- This can only happen if dontCanonicalizeAliases is passed to make_object(). if code ~= input_code then lang._main_code = code end -- Full language. if not parent._stack then -- Create stack, accessed with rawData metamethod. local stack = parent._rawData and {parent._rawData, data} or {data} lang._stack = stack lang._rawData = setmetatable({}, { __index = function(t, k) local key_type = key_types[k] -- Data that isn't inherited from the parent. if key_type == "unique" then return stack[#stack][k] -- Data that is appended by each generation. elseif key_type == "append" then local parts = {} for i = 1, #stack do insert(parts, stack[i][k]) end if type(parts[1]) == "string" then return concat(parts, ","), true end -- Otherwise, iterate down the stack, looking for a match. else local i = #stack while not stack[i][k] and i > 1 do i = i - 1 end return stack[i][k] end end, -- Retain immutability (as writing to rawData will break functionality). __newindex = function() error("not allowed to edit rawData") end }) -- Full code is the parent code. lang._fullCode = parent._code or code -- Etymology-only. else -- Copy over rawData and stack to the new object, and add new layer to stack. lang._rawData = parent._rawData lang._stack = parent._stack insert(lang._stack, data) -- Copy full code. lang._fullCode = parent._fullCode end return setmetatable(lang, parent) end end --[==[Finds the language whose code matches the one provided. If it exists, it returns a <code class="nf">Language</code> object representing the language. Otherwise, it returns {{code|lua|nil}}, unless <code class="n">paramForError</code> is given, in which case an error is generated. If <code class="n">paramForError</code> is {{code|lua|true}}, a generic error message mentioning the bad code is generated; otherwise <code class="n">paramForError</code> should be a string or number specifying the parameter that the code came from, and this parameter will be mentioned in the error message along with the bad code. If <code class="n">allowEtymLang</code> is specified, etymology-only language codes are allowed and looked up along with normal language codes. If <code class="n">allowFamily</code> is specified, language family codes are allowed and looked up along with normal language codes.]==] function export.getByCode(code, paramForError, allowEtymLang, allowFamily, useRequire) -- Track uses of paramForError, ultimately so it can be removed, as error-handling should be done by [[Module:parameters]], not here. if paramForError ~= nil then require("Module:debug/track")("languages/paramForError") end if type(code) ~= "string" then local typ if not code then typ = "nil" elseif check_object("language", true, code) then typ = "a language object" elseif check_object("family", true, code) then typ = "a family object" else typ = "a " .. type(code) end error("The function getByCode expects a string as its first argument, but received " .. typ .. ".") end local m_data = conditionalRequire("Module:languages/data", useRequire) if m_data.aliases[code] or m_data.track[code] then track(code) end local norm_code = normalize_code(code, useRequire) local modulename = export.getDataModuleName(norm_code) local data = modulename and conditionalRequire("Module:" .. modulename, useRequire)[norm_code] or (allowEtymLang and require("Module:etymology languages/track-bad-etym-code")(norm_code) and conditionalRequire("Module:etymology languages/data", useRequire)[norm_code]) or (allowFamily and conditionalRequire("Module:families/data", useRequire)[norm_code]) or (allowEtymLang and allowFamily and require("Module:families/track-bad-etym-code")(norm_code) and conditionalRequire("Module:families/data/etymology", useRequire)[norm_code]) local retval = code and data and export.makeObject(code, data, useRequire) if not retval and paramForError then require("Module:languages/errorGetBy").code(code, paramForError, allowEtymLang, allowFamily) end return retval end --[==[Finds the language whose canonical name (the name used to represent that language on Wiktionary) or other name matches the one provided. If it exists, it returns a <code class="nf">Language</code> object representing the language. Otherwise, it returns {{code|lua|nil}}, unless <code class="n">paramForError</code> is given, in which case an error is generated. If <code class="n">allowEtymLang</code> is specified, etymology-only language codes are allowed and looked up along with normal language codes. If <code class="n">allowFamily</code> is specified, language family codes are allowed and looked up along with normal language codes. The canonical name of languages should always be unique (it is an error for two languages on Wiktionary to share the same canonical name), so this is guaranteed to give at most one result. This function is powered by [[Module:languages/canonical names]], which contains a pre-generated mapping of full-language canonical names to codes. It is generated by going through the [[:Category:Language data modules]] for full languages. When <code class="n">allowEtymLang</code> is specified for the above function, [[Module:etymology languages/canonical names]] may also be used, and when <code class="n">allowFamily</code> is specified for the above function, [[Module:families/canonical names]] may also be used.]==] function export.getByCanonicalName(name, errorIfInvalid, allowEtymLang, allowFamily, useRequire) local byName = conditionalRequire("Module:languages/canonical names", useRequire) local code = byName and byName[name] if not code and allowEtymLang then byName = conditionalRequire("Module:etymology languages/canonical names", useRequire) code = byName and byName[name] or byName[gsub(name, " [Ss]ubstrate$", "")] or byName[gsub(name, "^a ", "")] or byName[gsub(name, "^a ", "") :gsub(" [Ss]ubstrate$", "")] or -- For etymology families like "ira-pro". -- FIXME: This is not ideal, as it allows " languages" to be appended to any etymology-only language, too. byName[match(name, "^(.*) භාෂා$")] end if not code and allowFamily then byName = conditionalRequire("Module:families/canonical names", useRequire) code = byName and byName[name] or byName[match(name, "^(.*) භාෂා$")] end local retval = code and export.getByCode(code, errorIfInvalid, allowEtymLang, allowFamily, useRequire) if not retval and errorIfInvalid then require("Module:languages/errorGetBy").canonicalName(name, allowEtymLang, allowFamily) end return retval end --[==[Used by [[Module:languages/data/2]] (et al.) to add default types to the entities returned.]==] function export.addDefaultTypes(data, regular, ...) local n = arg.n local types = n > 0 and concat(arg, ",") or "" for _, entity in next, data do -- "regular" encompasses everything that doesn't have another type already assigned. if regular then entity.type = entity.type or "regular" end if n > 0 then entity.type = types .. (entity.type and ("," .. entity.type) or "") end end return data end --[==[Used by [[Module:languages/data/2]] (et al.) and [[Module:etymology languages/data]] to finalize language-related data into the format that is actually returned.]==] function export.finalizeLanguageData(data) -- 4 is scripts. local fields = {4, "ancestors", "link_tr", "override_translit", "type", "wikimedia_codes"} local fields_len = #fields for _, entity in next, data do for i = 1, fields_len do local key = fields[i] local field = entity[key] if field and type(field) == "string" then entity[key] = gsub(field, "%s+", "") end end end return data end --[==[Used by [[Module:etymology languages/data]] and [[Module:families/data/etymology]] to finalize etymology-related data into the format that is actually returned.]==] function export.finalizeEtymologyData(data) local aliases = {} for _, entity in next, data do -- Move parent to 5 and family to 3. entity[5] = entity[3] entity[3] = entity.family entity.family = nil end for code, alias in next, aliases do data[code] = alias end return data end --[==[For backwards compatibility only; modules should require the error themselves.]==] function export.err(lang_code, param, code_desc, template_tag, not_real_lang) return require("Module:languages/error")(lang_code, param, code_desc, template_tag, not_real_lang) end return export du5c4jf26py6yvq7opyit9rlm7gdz1n Module:category tree/poscatboiler/data/languages 828 7928 192616 191277 2024-11-17T15:28:40Z Lee 19 192616 Scribunto text/plain local new_title = mw.title.new local ucfirst = require("Module:string utilities").ucfirst local raw_categories = {} local raw_handlers = {} local m_languages = require("Module:languages") local m_sc_getByCode = require("Module:scripts").getByCode local m_table = require("Module:table") local Hang = m_sc_getByCode("Hang") local Hani = m_sc_getByCode("Hani") local Hira = m_sc_getByCode("Hira") local Hrkt = m_sc_getByCode("Hrkt") local Kana = m_sc_getByCode("Kana") local function track(page) -- [[Special:WhatLinksHere/Wiktionary:Tracking/poscatboiler/languages/PAGE]] return require("Module:debug/track")("poscatboiler/languages/" .. page) end -- This handles language categories of the form e.g. [[:ප්‍රවර්ගය:French language]] and -- [[:ප්‍රවර්ගය:British Sign Language]]; categories like [[:ප්‍රවර්ගය:Languages of Indonesia]]; categories like -- [[:ප්‍රවර්ගය:English-based creole or pidgin languages]]; and categories like -- [[:ප්‍රවර්ගය:English-based constructed languages]]. ----------------------------------------------------------------------------- -- -- -- RAW CATEGORIES -- -- -- ----------------------------------------------------------------------------- raw_categories["භාෂා සියල්ල"] = { topright = "{{commonscat|Languages}}\n[[File:Languages world map-transparent background.svg|thumb|right|250px|Rough world map of language families]]", description = "This category contains the categories for every language on Wiktionary.", additional = "Not all languages that Wiktionary recognises may have a category here yet. There are many that have " .. "not yet received any attention from editors, mainly because not all Wiktionary users know about every single " .. "language. See [[Wiktionary:List of languages]] for a full list.", parents = { "මූලධර්ම", }, } raw_categories["All extinct languages"] = { description = "This category contains the categories for every [[extinct language]] on Wiktionary.", additional = "Do not confuse this category with [[:ප්‍රවර්ගය:Extinct languages]], which is an umbrella category for the names of extinct languages in specific other languages (e.g. {{m+|de|Langobardisch}} for the ancient [[Lombardic]] language).", parents = { "භාෂා සියල්ල", }, } raw_categories["රට අනුව භාෂා"] = { topright = "{{commonscat|Languages by continent}}", description = "රට අනුව භාෂා සමූහනය සිදු කරන ප්‍රවර්ග.", additional = "{{{umbrella_meta_msg}}}", parents = { "භාෂා සියල්ල", }, } raw_categories["Language isolates"] = { topright = "{{wikipedia|Language isolate}}\n{{commonscat|Language isolates}}", description = "Languages with no known relatives.", parents = { {name = "Languages by family", sort = "*Isolates"}, {name = "All language families", sort = "Isolates"}, }, } ----------------------------------------------------------------------------- -- -- -- RAW HANDLERS -- -- -- ----------------------------------------------------------------------------- local function linkbox(lang, setwiki, setwikt, setsister, entryname) local wiktionarylinks = {} local canonicalName = lang:getCanonicalName() local wikimediaLanguages = lang:getWikimediaLanguages() local wikipediaArticle = setwiki or lang:getWikipediaArticle() setsister = setsister and ucfirst(setsister) or nil if setwikt then track("setwikt") if setwikt == "-" then track("setwikt/hyphen") end end if setwikt ~= "-" and wikimediaLanguages and wikimediaLanguages[1] then for _, wikimedialang in ipairs(wikimediaLanguages) do local check = new_title(wikimedialang:getCode() .. ":") if check and check.isExternal then table.insert(wiktionarylinks, (wikimedialang:getCanonicalName() ~= canonicalName and "(''" .. wikimedialang:getCanonicalName() .. "'') " or "") .. "'''[[:" .. wikimedialang:getCode() .. ":|" .. wikimedialang:getCode() .. ".wiktionary.org]]'''") end end wiktionarylinks = table.concat(wiktionarylinks, "<br/>") end local wikt_plural = wikimediaLanguages[2] and "s" or "" if #wiktionarylinks == 0 then wiktionarylinks = "''None.''" end if setsister then track("setsister") if setsister == "-" then track("setsister/hyphen") else setsister = "ප්‍රවර්ගය:" .. setsister end else setsister = lang:getCommonsCategory() or "-" end return table.concat{ [=[<div class="wikitable" style="float: right; clear: right; margin: 0 0 0.5em 1em; width: 320px; padding: 5px;"> <div style="text-align: center; margin-bottom: 10px; margin-top: 5px">''']=], canonicalName, [=[ භාෂා සබැඳි'''</div> {| style="font-size: 90%" |- | style="vertical-align: top; height: 35px; border-bottom: 1px solid lightgray;" | [[File:Wikipedia-logo.png|35px|none|විකිපීඩියා]] | style="border-bottom: 1px solid lightgray;" | '''සිංහල විකිපීඩියා ලිපිය''': <div style="padding: 5px 10px">]=], (setwiki == "-" and "''None.''" or "'''[[w:" .. wikipediaArticle .. "|" .. wikipediaArticle .. "]]'''"), [=[</div> |- | style="vertical-align: top; height: 35px; border-bottom: 1px solid lightgray;" | [[File:Wikimedia-logo.svg|35px|none|Wikimedia Commons]] | style="border-bottom: 1px solid lightgray;" | '''විකිමීඩියා කොමන්ස්''' තුළ ]=], canonicalName, [=[ හා සබැඳි අන්තර්ගතය: <div style="padding: 5px 10px">]=], (setsister == "-" and "''None.''" or "'''[[commons:" .. setsister .. "|" .. setsister .. "]]'''"), [=[</div> |- | style="vertical-align: top; height: 35px; width: 40px; border-bottom: 1px solid lightgray;" | [[File:Wiktionary-logo-v2.svg|35px|none|Wiktionary]] |style="border-bottom: 1px solid lightgray;" | ]=], wikt_plural, [=[ ]=], canonicalName, [=[ භාෂා '''වික්ෂණරි සංස්කරණය''': <div style="padding: 5px 10px">]=], wiktionarylinks, [=[</div> |- | style="vertical-align: top; height: 35px; border-bottom: 1px solid lightgray;" | [[File:Open book nae 02.svg|35px|none|ප්‍රවේශය]] | style="border-bottom: 1px solid lightgray;" | මෙම භාෂාවේ සිංහල නාමය සඳහා වන ''වික්ෂණරි ප්‍රවේශය''': <div style="padding: 5px 10px">''']=], require("Module:links").full_link({lang = m_languages.getByCode("si"), term = entryname or canonicalName}), [=['''</div> |- | style="vertical-align: top; height: 35px;" | [[File:Crystal kfind.png|35px|none|අභ්‍යර්ථ]] || ]=], canonicalName, [=[ ප්‍රවේශ සඳහා දායකත්වය සපයන සංස්කාරකවරු සඳහා වන '''වික්ෂණරි සම්පත්''': <div style="padding: 5px 0"> * '''[[වික්ෂනරි:]=], canonicalName, [=[ බස පිළිබඳව]]''' * '''[[:ප්‍රවර්ගය:]=], canonicalName, [=[ මූලාශ්‍ර සැකිලි|මූලාශ්‍ර සැකිලි]] ({{PAGESINCAT:]=], canonicalName, [=[ මූලාශ්‍ර සැකිලි}})''' * '''[[Appendix:]=], canonicalName, [=[ bibliography|ග්‍රන්ථනාමාවලිය]]''' |} </div>]=] } end local function edit_link(title, text) return '<span class="plainlinks">[' .. tostring(mw.uri.fullUrl(title, { action = "edit" })) .. ' ' .. text .. ']</span>' end -- Should perhaps use wiki syntax. local function infobox(lang) local ret = {} table.insert(ret, '<table class="wikitable language-category-info"') if type(lang.getRawData) == "function" then local raw_data = lang:getRawData() if raw_data then local replacements = { [1] = "canonical-name", [2] = "wikidata-item", [3] = "family", } local function replacer(letter1, letter2) return letter1:lower() .. "-" .. letter2:lower() end -- For each key in the language data modules, returns a descriptive -- kebab-case version (containing ASCII lowercase words separated -- by hyphens). local function kebab_case(key) key = replacements[key] or key key = key:gsub("(%l)(%u)", replacer):gsub("(%l)_(%l)", replacer) return key end local function html_attribute_encode(str) str = mw.text.jsonEncode(str) :gsub('"', "&quot;") -- & in attributes is automatically escaped. -- :gsub("&", "&amp;") :gsub("<", "&lt;") :gsub(">", "&gt;") return str end pcall(function () table.insert(ret, ' data-code="' .. lang:getCode() .. '"') for k, v in m_table.sortedPairs(lang:getRawData()) do table.insert(ret, " data-" .. kebab_case(k) .. '="' .. html_attribute_encode(v) .. '"') end end) end end table.insert(ret, '>\n') table.insert(ret, '<tr class="language-category-data">\n<th colspan="2">' .. edit_link("Module:" .. m_languages.getDataModuleName(lang:getCode()), "භාෂා දත්ත සංස්කරණය") .. "</th>\n</tr>\n") table.insert(ret, "<tr>\n<th>කැනොනිකල් නාමය</th><td>" .. lang:getCanonicalName() .. "</td>\n</tr>\n") local otherNames = lang:getOtherNames(true) if otherNames then local names = {} for _, name in ipairs(otherNames) do table.insert(names, "<li>" .. name .. "</li>") end if #names > 0 then table.insert(ret, "<tr>\n<th>Other names</th><td><ul>" .. table.concat(names, "\n") .. "</ul></td>\n</tr>\n") end end local aliases = lang:getAliases() if aliases then local names = {} for _, name in ipairs(aliases) do table.insert(names, "<li>" .. name .. "</li>") end if #names > 0 then table.insert(ret, "<tr>\n<th>Aliases</th><td><ul>" .. table.concat(names, "\n") .. "</ul></td>\n</tr>\n") end end local varieties = lang:getVarieties() if varieties then local names = {} for _, name in ipairs(varieties) do if type(name) == "string" then table.insert(names, "<li>" .. name .. "</li>") else assert(type(name) == "table") local first_var local subvars = {} for i, var in ipairs(name) do if i == 1 then first_var = var else table.insert(subvars, "<li>" .. var .. "</li>") end end if #subvars > 0 then table.insert(names, "<li><dl><dt>" .. first_var .. "</dt>\n<dd><ul>" .. table.concat(subvars, "\n") .. "</ul></dd></dl></li>") elseif first_var then table.insert(names, "<li>" .. first_var .. "</li>") end end end if #names > 0 then table.insert(ret, "<tr>\n<th>Varieties</th><td><ul>" .. table.concat(names, "\n") .. "</ul></td>\n</tr>\n") end end table.insert(ret, "<tr>\n<th>[[Wiktionary:Languages|භාෂා කේතය]]</th><td><code>" .. lang:getCode() .. "</code></td>\n</tr>\n") table.insert(ret, "<tr>\n<th>[[Wiktionary:Families|භාෂා පවුල]]</th>\n") local fam = lang:getFamily() local famCode = fam and fam:getCode() if not fam then table.insert(ret, "<td>unclassified</td>") elseif famCode == "qfa-iso" then table.insert(ret, "<td>[[:ප්‍රවර්ගය:Language isolates|language isolate]]</td>") elseif famCode == "qfa-mix" then table.insert(ret, "<td>[[:ප්‍රවර්ගය:Mixed languages|mixed language]]</td>") elseif famCode == "sgn" then table.insert(ret, "<td>[[:ප්‍රවර්ගය:Sign languages|sign language]]</td>") elseif famCode == "crp" then table.insert(ret, "<td>[[:ප්‍රවර්ගය:Creole or pidgin languages|creole or pidgin]]</td>") elseif famCode == "art" then table.insert(ret, "<td>[[:ප්‍රවර්ගය:Constructed languages|constructed language]]</td>") else table.insert(ret, "<td>" .. fam:makeCategoryLink() .. "</td>") end table.insert(ret, "\n</tr>\n<tr>\n<th>පූර්වජයෝ</th>\n") local ancestors, ancestorChain = lang:getAncestors(), lang:getAncestorChain() if ancestors[2] then local ancestorList = {} for i, anc in ipairs(ancestors) do ancestorList[i] = "<li>" .. anc:makeCategoryLink() .. "</li>" end table.insert(ret, "<td><ul>\n" .. table.concat(ancestorList, "\n") .. "</ul></td>\n") elseif ancestorChain[1] then table.insert(ret, "<td><ul>\n") local chain = {} for i, anc in ipairs(ancestorChain) do chain[i] = "<li>" .. anc:makeCategoryLink() .. "</li>" end table.insert(ret, table.concat(chain, "\n<ul>\n")) for _, _ in ipairs(chain) do table.insert(ret, "</ul>") end table.insert(ret, "</td>\n") else table.insert(ret, "<td>unknown</td>\n") end table.insert(ret, "</tr>\n") local scripts = lang:getScripts() if scripts[1] then local script_text = {} local function makeScriptLine(sc) local code = sc:getCode() local url = tostring(mw.uri.fullUrl('Special:Search', { search = 'contentmodel:css insource:"' .. code .. '" insource:/\\.' .. code .. '/', ns8 = '1' })) return sc:makeCategoryLink() .. ' (<span class="plainlinks" title="Search for stylesheets referencing this script">[' .. url .. ' <code>' .. code .. '</code>]</span>)' end local function add_Hrkt(text) table.insert(text, "<li>" .. makeScriptLine(Hrkt)) table.insert(text, "<ul>") table.insert(text, "<li>" .. makeScriptLine(Hira) .. "</li>") table.insert(text, "<li>" .. makeScriptLine(Kana) .. "</li>") table.insert(text, "</ul>") table.insert(text, "</li>") end for _, sc in ipairs(scripts) do local text = {} local code = sc:getCode() if code == "Hrkt" then add_Hrkt(text) else table.insert(text, "<li>" .. makeScriptLine(sc)) if code == "Jpan" then table.insert(text, "<ul>") table.insert(text, "<li>" .. makeScriptLine(Hani) .. "</li>") add_Hrkt(text) table.insert(text, "</ul>") elseif code == "Kore" then table.insert(text, "<ul>") table.insert(text, "<li>" .. makeScriptLine(Hang) .. "</li>") table.insert(text, "<li>" .. makeScriptLine(Hani) .. "</li>") table.insert(text, "</ul>") end table.insert(text, "</li>") end table.insert(script_text, table.concat(text, "\n")) end table.insert(ret, "<tr>\n<th>[[වික්ෂනරි:අක්ෂර ක්‍රම|අක්ෂරක්‍රම]]</th>\n<td><ul>\n" .. table.concat(script_text, "\n") .. "</ul></td>\n</tr>\n") else table.insert(ret, "<tr>\n<th>[[වික්ෂනරි:අක්ෂර ක්‍රම|අක්ෂරක්‍රම]]</th>\n<td>not specified</td>\n</tr>\n") end local function add_module_info(raw_data, heading) if raw_data then local scripts = lang:getScriptCodes() local module_info, n, add = {}, 0, false if type(raw_data) == "string" then table.insert(module_info, ("[[Module:%s]]"):format(raw_data)) add = true elseif type(raw_data) == "table" and m_table.size(scripts) == 1 and type(raw_data[scripts[1]]) == "string" then table.insert(module_info, ("[[Module:%s]]"):format(raw_data[scripts[1]])) add = true elseif type(raw_data) == "table" then table.insert(module_info, "<ul>") for script, data in m_table.sortedPairs(raw_data) do local script_info if m_sc_getByCode(script) then if type(data) == "string" then script_info = ("[[Module:%s]]</li>"):format(data) else n = n + 1 script_info = "(none)\n" end table.insert(module_info, ("<li><code>%s</code>: %s"):format(script, script_info)) end end table.insert(module_info, "</ul>") if m_table.size(module_info) > 2 and n < (m_table.size(module_info) - 2) then add = true end end if add then table.insert(ret, [=[ <tr> <th>]=] .. heading .. [=[</th> <td>]=] .. table.concat(module_info) .. [=[</td> </tr> ]=]) end end end add_module_info(lang._rawData.generate_forms, "Form-generating<br>module") add_module_info(lang._rawData.translit, "[[Wiktionary:Transliteration and romanization|Transliteration<br>module]]") add_module_info(lang._rawData.display_text, "Display text<br>module") add_module_info(lang._rawData.entry_name, "Entry name<br>module") add_module_info(lang._rawData.sort_key, "[[sortkey|Sortkey]]<br>module") local wikidataItem = lang:getWikidataItem() if lang:getWikidataItem() and mw.wikibase then local URL = mw.wikibase.getEntityUrl(wikidataItem) local link if URL then link = '[' .. URL .. ' ' .. wikidataItem .. ']' else link = '<span class="error">Invalid Wikidata item: <code>' .. wikidataItem .. '</code></span>' end table.insert(ret, "<tr><th>විකි දත්ත</th><td>" .. link .. "</td></tr>") end table.insert(ret, "</table>") return table.concat(ret) end local function NavFrame(content, title) return '<div class="NavFrame"><div class="NavHead">' .. (title or '{{{title}}}') .. '</div>' .. '<div class="NavContent" style="text-align: left;">' .. content .. '</div></div>' end local function get_description_topright_additional(lang, countries, extinct, setwiki, setwikt, setsister, entryname) local nameWithLanguage = lang:getCategoryName("nocap") if lang:getCode() == "und" then local description = "This is the main category of the '''" .. nameWithLanguage .. "''', represented in Wiktionary by the [[Wiktionary:Languages|code]] '''" .. lang:getCode() .. "'''. " .. "This language contains terms in historical writing, whose meaning has not yet been determined by scholars." return description, nil, nil end local canonicalName = lang:getCanonicalName() local topright = linkbox(lang, setwiki, setwikt, setsister, entryname) local the_prefix if canonicalName:find(" භාෂාව$") then the_prefix = "" else -- the_prefix = "the " -- දැනට අවශ්‍ය නොවේ the_prefix = "" end local description = "මෙය " .. the_prefix .. "'''" .. nameWithLanguage .. "''' සඳහා වන ප්‍රධාන ප්‍රවර්ගය වේ." local country_links = {} local prep for _, country in ipairs(countries) do local this_prep if country == "the world" then this_prep = "across" table.insert(country_links, country) elseif country ~= "UNKNOWN" then this_prep = "තුළ" local country_without_the = country:match("^the (.*)$") if country_without_the then table.insert(country_links, "the [[" .. country_without_the .. "]]") else table.insert(country_links, "[[" .. country .. "]]") end end if this_prep then if prep and this_prep ~= prep then error("Can't handle country 'the world' along with another country (clashing prepositions)") end prep = this_prep end end local country_desc if #country_links > 0 then local country_link_text = m_table.serialCommaJoin(country_links) country_desc = ("එය %s %s %s.\n\n"):format( country_link_text, prep, extinct and "an [[extinct language]] that was formerly spoken" or "භාවිතා වන භාෂාවකි") elseif extinct then country_desc = "It is an [[extinct language]].\n\n" else country_desc = "" end local add = country_desc .. canonicalName .. " බස පිළිබඳ තොරතුරු" .. ":\n\n" .. infobox(lang) if lang:hasType("reconstructed") then add = add .. "\n\n" .. ucfirst(canonicalName) .. " is a reconstructed language. Its words and roots are not directly attested in any written works, but have been reconstructed through the ''comparative method'', " .. "which finds regular similarities between languages that cannot be explained by coincidence or word-borrowing, and extrapolates ancient forms from these similarities.\n\n" .. "According to our [[Wiktionary:Criteria for inclusion|criteria for inclusion]], terms in " .. canonicalName .. " should '''not''' be present in entries in the main namespace, but may be added to the Reconstruction: namespace." elseif lang:hasType("appendix-constructed") then add = add .. "\n\n" .. ucfirst(canonicalName) .. " is a constructed language that is only in sporadic use. " .. "According to our [[Wiktionary:Criteria for inclusion|criteria for inclusion]], terms in " .. canonicalName .. " should '''not''' be present in entries in the main namespace, but may be added to the උපග්‍රන්ථය: namespace. " .. "All terms in this language may be available at [[උපග්‍රන්ථය:" .. ucfirst(canonicalName) .. "]]." end local about = new_title("Wiktionary:About " .. canonicalName) if about.exists then add = add .. "\n\n" .. "Please see '''[[Wiktionary:About " .. canonicalName .. "]]''' for information and special considerations for creating " .. nameWithLanguage .. " entries." end local ok, tree_of_descendants = pcall( require("Module:family tree").print_children, lang:getCode(), { protolanguage_under_family = true, must_have_descendants = true }) if ok then if tree_of_descendants then add = add .. NavFrame( tree_of_descendants, "Family tree") else add = add .. "\n\n" .. ucfirst(lang:getCanonicalName()) .. " has no descendants or varieties listed in Wiktionary's language data modules." end else mw.log("error while generating tree: " .. tostring(tree_of_descendants)) end return description, topright, add end local function get_parents(lang, countries, extinct) local canonicalName = lang:getCanonicalName() local sortkey = {sort_base = canonicalName, lang = "si"} local ret = {{name = "භාෂා සියල්ල", sort = sortkey}} local fam = lang:getFamily() local famCode = fam and fam:getCode() -- FIXME: Some of the following categories should be added to this module. if not fam then table.insert(ret, {name = "ප්‍රවර්ගය:Unclassified languages", sort = sortkey}) elseif famCode == "qfa-iso" then table.insert(ret, {name = "ප්‍රවර්ගය:Language isolates", sort = sortkey}) elseif famCode == "qfa-mix" then table.insert(ret, {name = "ප්‍රවර්ගය:Mixed languages", sort = sortkey}) elseif famCode == "sgn" then table.insert(ret, {name = "ප්‍රවර්ගය:All sign languages", sort = sortkey}) elseif famCode == "crp" then table.insert(ret, {name = "ප්‍රවර්ගය:Creole or pidgin languages", sort = sortkey}) for _, anc in ipairs(lang:getAncestors()) do -- Avoid Haitian Creole being categorised in [[:ප්‍රවර්ගය:Haitian Creole-based creole or pidgin languages]], as one of its ancestors is an etymology-only variety of it. -- Use that ancestor's ancestors instead. if anc:getFullCode() == lang:getCode() then for _, anc_extra in ipairs(anc:getAncestors()) do table.insert(ret, {name = "ප්‍රවර්ගය:" .. ucfirst(anc_extra:getFullName()) .. "-based creole or pidgin languages", sort = sortkey}) end else table.insert(ret, {name = "ප්‍රවර්ගය:" .. ucfirst(anc:getFullName()) .. "-based creole or pidgin languages", sort = sortkey}) end end elseif famCode == "art" then if lang:hasType("appendix-constructed") then table.insert(ret, {name = "ප්‍රවර්ගය:Appendix-only constructed languages", sort = sortkey}) else table.insert(ret, {name = "ප්‍රවර්ගය:Constructed languages", sort = sortkey}) end for _, anc in ipairs(lang:getAncestors()) do if anc:getFullCode() == lang:getCode() then for _, anc_extra in ipairs(anc:getAncestors()) do table.insert(ret, {name = "ප්‍රවර්ගය:" .. ucfirst(anc_extra:getFullName()) .. "-based constructed languages", sort = sortkey}) end else table.insert(ret, {name = "ප්‍රවර්ගය:" .. ucfirst(anc:getFullName()) .. "-based constructed languages", sort = sortkey}) end end else table.insert(ret, {name = "ප්‍රවර්ගය:" .. fam:getCategoryName(), sort = sortkey}) if lang:hasType("reconstructed") then table.insert(ret, { name = "ප්‍රවර්ගය:Reconstructed languages", sort = {sort_base = canonicalName:gsub("^Proto%-", ""), lang = "si"} }) end end local function add_sc_cat(sc) table.insert(ret, {name = "ප්‍රවර්ගය:" .. sc:getCategoryName() .. " භාවිතාවන භාෂා", sort = sortkey}) end local function add_Hrkt() add_sc_cat(Hrkt) add_sc_cat(Hira) add_sc_cat(Kana) end for _, sc in ipairs(lang:getScripts()) do if sc:getCode() == "Hrkt" then add_Hrkt() else add_sc_cat(sc) if sc:getCode() == "Jpan" then add_sc_cat(Hani) add_Hrkt() elseif sc:getCode() == "Kore" then add_sc_cat(Hang) add_sc_cat(Hani) end end end if lang:hasTranslit() then table.insert(ret, {name = "ප්‍රවර්ගය:Languages with automatic transliteration", sort = sortkey}) end local saw_country = false for _, country in ipairs(countries) do if country ~= "UNKNOWN" then table.insert(ret, {name = "ප්‍රවර්ගය:" .. country .. " තුළ භාවිතා වන භාෂා", sort = sortkey}) saw_country = true end end if extinct then table.insert(ret, {name = "ප්‍රවර්ගය:All extinct languages", sort = sortkey}) end if not saw_country then table.insert(ret, {name = "ප්‍රවර්ගය:Languages not sorted into a country category", sort = sortkey}) end return ret end local function get_children() local ret = {} -- FIXME: We should work on the children mechanism so it isn't necessary to manually specify these. for _, label in ipairs({"උපග්‍රන්ථ", "ප්‍රවේශ නඩත්තුව", "පාඨ", "නාම", "වාක්‍ය ඛණ්ඩ", "rhymes", "සංකේත", "සැකිලි", "යෙදුම්, නිරුක්තිය අනුව", "terms by usage"}) do table.insert(ret, {name = label, is_label = true}) end table.insert(ret, {name = "යෙදුම්, {{{langname}}} වෙතින් ව්‍යුත්පන්න", is_label = true, lang = false}) table.insert(ret, {module = "topic cat", args = {code = "{{{langcode}}}", label = "මාතෘකා සියල්ල"}, sort = "මාතෘකා සියල්ල"}) table.insert(ret, {name = "Varieties of {{{langname}}}"}) table.insert(ret, {name = "Requests concerning {{{langname}}}"}) table.insert(ret, {name = "ප්‍රවර්ගය:Rhymes:{{{langname}}}", description = "Lists of {{{langname}}} words by their rhymes."}) table.insert(ret, {name = "ප්‍රවර්ගය:User {{{langcode}}}", description = "Wiktionary users categorized by fluency levels in {{{langname}}}."}) return ret end -- Handle language categories of the form e.g. [[:ප්‍රවර්ගය:French language]] and -- [[:ප්‍රවර්ගය:British Sign Language]]. table.insert(raw_handlers, function(data) local lang local langname = data.category:match("^(.*) භාෂාව$") if langname then lang = m_languages.getByCanonicalName(langname) elseif data.category:find(" භාෂාව$") then lang = m_languages.getByCanonicalName(data.category) end if not lang then return nil end local args = require("Module:parameters").process(data.args, { [1] = {list = true}, ["setwiki"] = true, ["setwikt"] = true, ["setsister"] = true, ["entryname"] = true, ["extinct"] = {type = "boolean"}, }) -- If called from inside, don't require any arguments, as they can't be known -- in general and aren't needed just to generate the first parent (used for -- breadcrumbs). if #args[1] == 0 and not data.called_from_inside then -- At least one country must be specified unless the language is constructed (e.g. Esperanto) or reconstructed (e.g. Proto-Indo-European). local fam = lang:getFamily() if not (lang:hasType("reconstructed") or (fam and fam:getCode() == "art")) then error("At least one country (param 1=) must be specified for language '" .. lang:getCanonicalName() .. "' (code '" .. lang:getCode() .. "'). " .. "Use the value UNKNOWN if the language's location is truly unknown.") end end local description, topright, additional = "", "", "" -- If called from inside the category tree system, it's called when generating -- parents or children, and we don't need to generate the description or additional -- text (which is very expensive in terms of memory because it calls [[Module:family tree]], -- which calls [[Module:languages/data/all]]). if not data.called_from_inside then description, topright, additional = get_description_topright_additional( lang, args[1], args.extinct, args.setwiki, args.setwikt, args.setsister, args.entryname ) end return { description = description, lang = lang:getCode(), topright = topright, additional = additional, breadcrumb = lang:getCanonicalName(), parents = get_parents(lang, args[1], args.extinct), extra_children = get_children(lang), umbrella = false, can_be_empty = true, }, true end) -- Handle categories such as [[:ප්‍රවර්ගය:Languages of Indonesia]]. -- ප්‍රවර්ගය:වියට්නාමය තුළ භාවිතා වන භාෂා table.insert(raw_handlers, function(data) local country = data.category:match("^(.*) තුළ භාවිතා වන භාෂා$") if country then local args, topright = require("Module:parameters").process(data.args, { ["flagfile"] = true, ["commonscat"] = true, ["wp"] = true, }) if args.flagfile ~= "-" then local flagfile = args.flagfile and "File:" .. args.flagfile or ("File:Flag of %s.svg"):format(country) local flagfile_page = new_title(flagfile) if flagfile_page and flagfile_page.file.exists then topright = ("[[%s|right|100px|border]]"):format(flagfile) elseif args.flagfile then error(("Explicit flagfile '%s' doesn't exist"):format(flagfile)) end end if args.wp then local wp = require("Module:yesno")(args.wp, "+") if wp == "+" or wp == true then wp = data.category end if wp then local wp_topright = ("{{wikipedia|%s}}"):format(wp) if topright then topright = topright .. wp_topright else topright = wp_topright end end end if args.commonscat then local commonscat = require("Module:yesno")(args.commonscat, "+") if commonscat == "+" or commonscat == true then commonscat = data.category end if commonscat then local commons_topright = ("{{commonscat|%s}}"):format(commonscat) if topright then topright = topright .. commons_topright else topright = commons_topright end end end local country_no_the = country:match("^the (.*)$") local base_country = country_no_the or country local country_link if country_no_the then country_link = ("the [[%s]]"):format(country_no_the) else country_link = ("[[%s]]"):format(country) end local parents = {{name = "රට අනුව භාෂා", sort = {sort_base = base_country, lang = "en"}}} local country_cat = ("ප්‍රවර්ගය:%s"):format(base_country) local country_page = new_title(country_cat) if country_page and country_page.exists then table.insert(parents, {name = country_cat, sort = "Languages"}) end local description = ("%s තුළ භාවිතා වන භාෂා (including sublects) සඳහා වන ප්‍රවර්ග."):format(country_link) return { topright = topright, description = description, parents = parents, breadcrumb = country, additional = "{{{umbrella_msg}}}", }, true end end) -- Handle categories such as [[:ප්‍රවර්ගය:English-based creole or pidgin languages]]. table.insert(raw_handlers, function(data) local langname = data.category:match("(.*)%-based creole or pidgin languages$") if langname then local lang = require("Module:languages").getByCanonicalName(langname) if lang then return { lang = lang:getCode(), description = "Languages which developed as a [[creole]] or [[pidgin]] from " .. lang:makeCategoryLink() .. ".", parents = {{name = "Creole or pidgin languages", sort = {sort_base = "*" .. langname, lang = "si"}}}, breadcrumb = lang:getCanonicalName() .. "-based", } end end end) -- Handle categories such as [[:ප්‍රවර්ගය:English-based constructed languages]]. table.insert(raw_handlers, function(data) local langname = data.category:match("(.*)%-based constructed languages$") if langname then local lang = require("Module:languages").getByCanonicalName(langname) if lang then return { lang = lang:getCode(), description = "Constructed languages which are based on " .. lang:makeCategoryLink() .. ".", parents = {{name = "Constructed languages", sort = {sort_base = "*" .. langname, lang = "si"}}}, breadcrumb = lang:getCanonicalName() .. "-based", } end end end) return {RAW_CATEGORIES = raw_categories, RAW_HANDLERS = raw_handlers} 5h1n13z4fjvysdcxgdldxd9qgtto2td Module:category tree 828 9502 192617 186112 2024-11-14T03:58:47Z en>Theknightwho 0 Always use getCatfixInfo() method. 192617 Scribunto text/plain -- Prevent substitution. if mw.isSubsting() then return require("Module:unsubst") end local export = {} local m_str_utils = require("Module:string utilities") local m_template_parser = require("Module:template parser") local m_utilities = require("Module:utilities") local class_else_type = m_template_parser.class_else_type local concat = table.concat local deepcopy = require("Module:table").deepcopy local full_url = mw.uri.fullUrl local insert = table.insert local new_title = mw.title.new local pages_in_category = mw.site.stats.pagesInCategory local parse = m_template_parser.parse local remove_comments = m_str_utils.remove_comments local sort = table.sort local split = m_str_utils.split local string_sort = require("Module:collation").string_sort local trim = m_str_utils.trim local uupper = m_str_utils.upper local yesno = require("Module:yesno") local current_frame = mw.getCurrentFrame() local current_title = mw.title.getCurrentTitle() local inFundamental = mw.loadData("Module:category tree/data") local namespace = current_title.namespace local poscatboiler = "poscatboiler" local topic_cat = "topic cat" local ws_topic_cat = "ws topic cat" local extra_args_error = "Extra arguments to {{((}}auto cat{{))}} are not allowed for this category." function export.split_lang_label(title_text) local getByCanonicalName = require("Module:languages").getByCanonicalName -- Progressively remove a word from the potential canonical name until it -- matches an actual canonical name. local words = split(title_text, " ", true) for i = #words - 1, 1, -1 do local lang = getByCanonicalName(concat(words, " ", 1, i)) if lang then return lang, concat(words, " ", i + 1) end end return nil, title_text end local function show_error(text) return require("Module:message box").maintenance( "red", "[[File:Ambox warning pn.svg|50px]]", "This category is not defined in Wiktionary's category tree.", text ) end -- Show the text that goes at the very top right of the page. local function show_topright(current) return current.getTopright and current:getTopright() or nil end local function link_box(content) return ("<div class=\"noprint plainlinks\" style=\"float: right; clear: both; margin: 0 0 .5em 1em; background: var(--wikt-palette-paleblue, #f9f9f9); border: 1px var(--border-color-base, #aaaaaa) solid; margin-top: -1px; padding: 5px; font-weight: bold;\">%s</div>"):format(content) end local function show_editlink(current) return link_box(("[%s Edit category data]"):format(tostring(full_url(current:getDataModule(), "action=edit")))) end function show_related_changes() local title = current_title.fullText return link_box(("[%s <span title=\"Recent edits and other changes to pages in %s\">Recent changes</span>]"):format( tostring(full_url("Special:RecentChangesLinked", { target = title, showlinkedto = 0, })), title )) end local function show_pagelist(current) local namespace = "namespace=" local info = current:getInfo() local lang_code = info.code if info.label == "citations" or info.label == "citations of undefined terms" then namespace = namespace .. "Citations" elseif lang_code then local lang = require("Module:languages").getByCode(lang_code, true, nil, nil, true) if lang then -- Proto-Norse (gmq-pro) is the probably language with a code ending in -pro -- that's intended to have mostly non-reconstructed entries. if (lang_code:find("%-pro$") and lang_code ~= "gmq-pro") or lang:hasType("reconstructed") then namespace = namespace .. "Reconstruction" elseif lang:hasType("appendix-constructed") then namespace = namespace .. "Appendix" end end elseif info.label:match("templates") then namespace = namespace .. "Template" elseif info.label:match("modules") then namespace = namespace .. "Module" elseif info.label:match("^Wiktionary") or info.label:match("^Pages") then namespace = "" end return ([=[ {| id="newest-and-oldest-pages" class="wikitable mw-collapsible" style="float: right; clear: both; margin: 0 0 .5em 1em;" ! Newest and oldest pages&nbsp; |- | id="recent-additions" style="font-size:0.9em;" | '''Newest pages ordered by last [[mw:Manual:Categorylinks table#cl_timestamp|category link update]]:''' %s |- | id="oldest-pages" style="font-size:0.9em;" | '''Oldest pages ordered by last edit:''' %s |}]=]):format( current_frame:extensionTag( "DynamicPageList", ([=[ category=%s %s count=10 mode=ordered ordermethod=categoryadd order=descending]=] ):format(current_title.text, namespace) ), current_frame:extensionTag( "DynamicPageList", ([=[ category=%s %s count=10 mode=ordered ordermethod=lastedit order=ascending]=] ):format(current_title.text, namespace) ) ) end -- Show navigational "breadcrumbs" at the top of the page. local function show_breadcrumbs(current) local steps = {} -- Start at the current label and move our way up the "chain" from child to parent, until we can't go further. while current do local category, display_name, nocap if type(current) == "string" then category = current display_name = current:gsub("^Category:", "") else if not current.getCategoryName then error("Internal error: Bad format in breadcrumb chain structure, probably a misformatted value for `parents`: " .. mw.dumpObject(current)) end category = "Category:" .. current:getCategoryName() display_name, nocap = current:getBreadcrumbName() end if not nocap then display_name = mw.getContentLanguage():ucfirst(display_name) end insert(steps, 1, ("[[:%s|%s]]"):format(category, display_name)) -- Move up the "chain" by one level. if type(current) == "string" then current = nil else current = current:getParents() end if current then current = current[1].name elseif inFundamental[category] then current = "Category:Fundamental" end end local templateStyles = require("Module:TemplateStyles")("Module:category tree/styles.css") local ol = mw.html.create("ol") for i, step in ipairs(steps) do local li = mw.html.create("li") if i ~= 1 then local span = mw.html.create("span") :attr("aria-hidden", "true") :addClass("ts-categoryBreadcrumbs-separator") :wikitext(" » ") li:node(span) end li:wikitext(step) ol:node(li) end return templateStyles .. tostring(mw.html.create("div") :attr("role", "navigation") :attr("aria-label", "Breadcrumb") :addClass("ts-categoryBreadcrumbs") :node(ol)) end local function show_also(current) local also = current._info.also if also and #also > 0 then return ('<div style="margin-top:-1em;margin-bottom:1.5em">%s</div>'):format(require("Module:also").main(also)) end return nil end -- Show a short description text for the category. local function show_description(current) return current.getDescription and current:getDescription() or nil end local function show_appendix(current) local appendix = current.getAppendix and current:getAppendix() return appendix and ("For more information, see [[%s]]."):format(appendix) or nil end local function sort_children(child1, child2) return string_sort(uupper(child1.sort), uupper(child2.sort)) end -- Show a list of child categories. local function show_children(current) local children = current.getChildren and current:getChildren() or nil if not children then return nil end sort(children, sort_children) local children_list = {} for _, child in ipairs(children) do local child_name, child_pagetitle = child.name if type(child_name) == "string" then child_pagetitle = child_name else child_pagetitle = "Category:" .. child_name:getCategoryName() end if new_title(child_pagetitle).exists then insert(children_list, ("* [[:%s]]: %s"):format( child_pagetitle, child.description or type(child_name) == "string" and child_name:gsub("^Category:", "") .. "." or child_name:getDescription("child") )) end end return concat(children_list, "\n") end -- Show a table of contents with links to each letter in the language's script. local function show_TOC(current) local titleText = current_title.text local inCategoryPages = pages_in_category(titleText, "pages") local inCategorySubcats = pages_in_category(titleText, "subcats") local TOC_type -- Compute type of table of contents required. if inCategoryPages > 2500 or inCategorySubcats > 2500 then TOC_type = "full" elseif inCategoryPages > 200 or inCategorySubcats > 200 then TOC_type = "normal" else -- No (usual) need for a TOC if all pages or subcategories can fit on one page; -- but allow this to be overridden by a custom TOC handler. TOC_type = "none" end if current.getTOC then local TOC_text = current:getTOC(TOC_type) if TOC_text ~= true then return TOC_text or nil end end if TOC_type ~= "none" then local templatename = current:getTOCTemplateName() local TOC_template if TOC_type == "full" then -- This category is very large, see if there is a "full" version of the TOC. local TOC_template_full = new_title(templatename .. "/full") if TOC_template_full.exists then TOC_template = TOC_template_full end end if not TOC_template then local TOC_template_normal = new_title(templatename) if TOC_template_normal.exists then TOC_template = TOC_template_normal end end if TOC_template then return current_frame:expandTemplate{title = TOC_template.text, args = {}} end end return nil end -- Show the "catfix" that adds language attributes and script classes to the page. local function show_catfix(current) local lang, sc = current:getCatfixInfo() return lang and m_utilities.catfix(lang, sc) or nil end -- Show the parent categories that the current category should be placed in. local function show_categories(current, categories) local parents = current.getParents and current:getParents() or nil if not parents then return nil end for _, parent in ipairs(parents) do local parent_name = parent.name local sortkey = type(parent.sort) == "table" and parent.sort:makeSortKey() or parent.sort if type(parent_name) == "string" then insert(categories, ("[[%s|%s]]"):format(parent_name, sortkey)) else insert(categories, ("[[Category:%s|%s]]"):format(parent_name:getCategoryName(), sortkey)) end end -- Also put the category in its corresponding "umbrella" or "by language" category. local umbrella = current:getUmbrella() if umbrella then -- FIXME: use a language-neutral sorting function like the Unicode Collation Algorithm. local sortkey = current._lang and current._lang:getCanonicalName() or current:getCategoryName() sortkey = require("Module:languages").getByCode("en", true, nil, nil, true):makeSortKey(sortkey) if type(umbrella) == "string" then insert(categories, ("[[%s|%s]]"):format(umbrella, sortkey)) else insert(categories, ("[[Category:%s|%s]]"):format(umbrella:getCategoryName(), sortkey)) end end -- Check for various unwanted parser functions, which should be integrated into the category tree data instead. -- Note: HTML comments shouldn't be removed from `content` until after this step, as they can affect the result. local content = current_title:getContent() if not content then -- This happens when using [[Special:ExpandTemplates]] to call {{auto cat}} on a nonexistent category page, -- which is needed by Benwing's create_wanted_categories.py script. return end local defaultsort, displaytitle, page_has_param for node in parse(content):__pairs("next_node") do local node_class = class_else_type(node) if node_class == "template" then local name = node:get_name() if name == "DEFAULTSORT:" and not defaultsort then insert(categories, "[[Category:Pages with DEFAULTSORT conflicts]]") defaultsort = true elseif name == "DISPLAYTITLE:" and not displaytitle then insert(categories,"[[Category:Pages with DISPLAYTITLE conflicts]]") displaytitle = true end elseif node_class == "parameter" and not page_has_param then insert(categories,"[[Category:Pages with raw triple-brace template parameters]]") page_has_param = true end end -- Check for raw category markup, which should also be integrated into the category tree data. content = remove_comments(content, "BOTH") local head = content:find("[[", 1, true) while head do local close = content:find("]]", head + 2, true) if not close then break end -- Make sure there are no intervening "[[" between head and close. local open = content:find("[[", head + 2, true) while open and open < close do head = open open = content:find("[[", head + 2, true) end local cat = content:sub(head + 2, close - 1) local colon = cat:match("^[ _\128-\244]*[Cc][Aa][Tt][EeGgOoRrYy _\128-\244]*():") if colon then local pipe = cat:find("|", colon + 1, true) if pipe ~= #cat then local title = new_title(pipe and cat:sub(1, pipe - 1) or cat) if title and title.namespace == 14 then insert(categories,"[[Category:Categories with categories using raw markup]]") break end end end head = open end end local function generate_output(current) if current then for _, functionName in pairs{ "getBreadcrumbName", "getDataModule", "canBeEmpty", "getDescription", "getParents", "getChildren", "getUmbrella", "getAppendix", "getTOCTemplateName", } do if type(current[functionName]) ~= "function" then require("Module:debug").track{"category tree/missing function", "category tree/missing function/" .. functionName} end end end local boxes, display, categories = {}, {}, {} -- Categories should never show files as a gallery. insert(categories, "__NOGALLERY__") if current_frame:getParent():getTitle() == "Template:auto cat" then insert(categories, "[[Category:Categories calling Template:auto cat]]") end -- Check if the category is empty local totalPages = pages_in_category(current_title.text, "all") local hugeCategory = totalPages > 1000000 -- 1 million -- Categorize huge categories, as they cause DynamicPageList to time out and make the category inaccessible. if hugeCategory then insert(categories, "[[Category:Huge categories]]") end -- Are the parameters valid? if not current then insert(categories, "[[Category:Categories that are not defined in the category tree]]") insert(categories, totalPages == 0 and "[[Category:Empty categories]]" or nil) insert(display, show_error( "Double-check the category name for typos. <br>" .. "[[Special:Search/Category: " .. current_title.text:gsub("^.+:", ""):gsub(" ", "~2 ") .. '~2|Search existing categories]] to check if this category should be created under a different name (for example, "Fruits" instead of "Fruit"). <br>' .. "To add a new category to Wiktionary's category tree, please consult " .. current_frame:expandTemplate{title = "section link", args = { "Help:Category#How_to_create_a_category", }} .. ".")) -- Exit here, as all code beyond here relies on current not being nil return concat(categories, "") .. concat(display, "\n\n"), true end -- Does the category have the correct name? local currentName = current:getCategoryName() local correctName = current_title.text == currentName if not correctName then insert(categories, "[[Category:Categories with incorrect names]]") insert(display, show_error(("Based on the data in the category tree, this category should be called '''[[:Category:%s]]'''."):format(currentName))) end -- Add cleanup category for empty categories. local canBeEmpty = current:canBeEmpty() if canBeEmpty and correctName then insert(categories, " __EXPECTUNUSEDCATEGORY__") elseif totalPages == 0 then insert(categories, "[[Category:Empty categories]]") end if current:isHidden() then insert(categories, "__HIDDENCAT__") end -- Put all the float-right stuff into a <div> that does not clear, so that float-left stuff like the breadcrumbs and -- description can go opposite the float-right stuff without vertical space. insert(boxes, "<div style=\"float: right;\">") insert(boxes, show_topright(current)) insert(boxes, show_editlink(current)) insert(boxes, show_related_changes()) -- Show pagelist, unless it's a huge category (since they can't use DynamicPageList - see above). if not hugeCategory then insert(boxes, show_pagelist(current)) end insert(boxes, "</div>") -- Generate the displayed information insert(display, show_breadcrumbs(current)) insert(display, show_also(current)) insert(display, show_description(current)) insert(display, show_appendix(current)) insert(display, show_children(current)) insert(display, show_TOC(current)) insert(display, show_catfix(current)) insert(display, '<br class="clear-both-in-vector-2022-only">') show_categories(current, categories) return concat(boxes, "\n") .. "\n" .. concat(display, "\n\n") .. concat(categories, "") end --[==[ List of handler functions that try to match the page name. A handler should return the name of a submodule to [[Module:category tree]] and an info table which is passed as an argument to the submodule. If a handler does not recognize the page name, it should return nil. Note that the order of handlers matters! ]==] local handlers = {} -- ws topic cat insert(handlers, function(title) local code, label = title:match("^Thesaurus:(%l[%a-]*%a):(.+)") if code then return ws_topic_cat, {label = label, code = code} end end) -- Topical categories insert(handlers, function(title) local code, label = title:match("^(%l[%a-]*%a):(.+)") if code then return topic_cat, {label = label, code = code} end end) -- Lect categories e.g. for [[:Category:New Zealand English]] or [[:Category:Issime Walser]] insert(handlers, function(title, args) local lect = args.lect or args.dialect if lect ~= "" and yesno(lect, true) then -- Same as boolean in [[Module:parameters]]. return poscatboiler, {label = title, args = args, raw = true} end end) -- poscatboiler lang-specific insert(handlers, function(title, args) local lang, label = export.split_lang_label(title) if not lang then return end local baseLabel, script = label:match("(.+) in (.-) script$") if script and baseLabel ~= "terms" then local scriptObj = require("Module:scripts").getByCanonicalName(script) if scriptObj then return poscatboiler, {label = baseLabel, code = lang:getCode(), sc = scriptObj:getCode(), args = args} end end return poscatboiler, {label = label, code = lang:getCode(), args = args} end) -- poscatboiler umbrella category insert(handlers, function(title, args) local label = title:match("(.+) by language$") if label then -- The poscatboiler code will appropriately lowercase if needed. return poscatboiler, {label = label, args = args} end end) -- ws topic cat insert(handlers, function(title) local label = title:match("^Thesaurus:(.+)") if label then return ws_topic_cat, {label = label} end end) -- topic cat insert(handlers, function(title) return topic_cat, {label = title} end) -- poscatboiler raw handlers insert(handlers, function(title, args) return poscatboiler, {label = title, args = args, raw = true} end) -- poscatboiler umbrella handlers without 'by language' insert(handlers, function(title, args) return poscatboiler, {label = title, args = args} end) function export.show(frame) local args, other_args = require("Module:parameters").process(frame:getParent().args, { ["also"] = {type = "title", sublist = "comma without whitespace", namespace = 14} }, true) if args.also then for k, arg in next, args.also do args.also[k] = arg.prefixedText end end for k, arg in next, other_args do other_args[k] = trim(arg) end if namespace == 10 then -- Template return "(This template should be used on pages in the [[Help:Namespaces#Category|Category:]] namespace.)" elseif namespace ~= 14 then -- Category error("This template/module can only be used on pages in the [[mw:Help:Namespaces#Category|Category:]] namespace.") end local first_fail_args_handled, first_fail_cattext -- Go through each handler in turn. If a handler doesn't recognize the format of the -- category, it will return nil, and we will consider the next handler. Otherwise, -- it returns a template name and arguments to call it with, but even then, that template -- might return an error, and we need to consider the next handler. This happens, -- for example, with the category "CAT:Mato Grosso, Brazil", where "Mato" is the name of -- a language, so the handler for {{poscatboiler}} fires and tries to find a label -- "Grosso, Brazil". This throws an error, and previously, this blocked fruther handler -- consideration, but now we check for the error and continue checking handlers; -- eventually, {{topic cat}} will fire and correctly handle the category. for _, handler in ipairs(handlers) do -- Use a new title object and args table for each handler, to keep them isolated. local submodule, info = handler(current_title.text, deepcopy(other_args)) if submodule then info.also = deepcopy(args.also) require("Module:debug").track("auto cat/" .. submodule) -- `failed` is true if no match was found. submodule = require("Module:category tree/" .. submodule) local cattext, failed = generate_output(submodule.main(info)) if failed then if not first_fail_cattext then first_fail_cattext = cattext first_fail_args_handled = info.args and true or false end elseif not info.args and next(other_args) then error(extra_args_error) else return cattext end end end -- If there were no matches, throw an error if any arguments were given, or otherwise return the cattext -- from the first fail encountered. The final handlers call the boilers unconditionally, so there should -- always be something to return. if not first_fail_args_handled and next(other_args) then error(extra_args_error) end return first_fail_cattext end -- TODO: new test entrypoint. return export on192dz1ihi5mcrerut7hnvdc9ef1se 192618 192617 2024-11-18T03:49:51Z Lee 19 [[:en:Module:category_tree]] වෙතින් එක් සංශෝධනයක් 192617 Scribunto text/plain -- Prevent substitution. if mw.isSubsting() then return require("Module:unsubst") end local export = {} local m_str_utils = require("Module:string utilities") local m_template_parser = require("Module:template parser") local m_utilities = require("Module:utilities") local class_else_type = m_template_parser.class_else_type local concat = table.concat local deepcopy = require("Module:table").deepcopy local full_url = mw.uri.fullUrl local insert = table.insert local new_title = mw.title.new local pages_in_category = mw.site.stats.pagesInCategory local parse = m_template_parser.parse local remove_comments = m_str_utils.remove_comments local sort = table.sort local split = m_str_utils.split local string_sort = require("Module:collation").string_sort local trim = m_str_utils.trim local uupper = m_str_utils.upper local yesno = require("Module:yesno") local current_frame = mw.getCurrentFrame() local current_title = mw.title.getCurrentTitle() local inFundamental = mw.loadData("Module:category tree/data") local namespace = current_title.namespace local poscatboiler = "poscatboiler" local topic_cat = "topic cat" local ws_topic_cat = "ws topic cat" local extra_args_error = "Extra arguments to {{((}}auto cat{{))}} are not allowed for this category." function export.split_lang_label(title_text) local getByCanonicalName = require("Module:languages").getByCanonicalName -- Progressively remove a word from the potential canonical name until it -- matches an actual canonical name. local words = split(title_text, " ", true) for i = #words - 1, 1, -1 do local lang = getByCanonicalName(concat(words, " ", 1, i)) if lang then return lang, concat(words, " ", i + 1) end end return nil, title_text end local function show_error(text) return require("Module:message box").maintenance( "red", "[[File:Ambox warning pn.svg|50px]]", "This category is not defined in Wiktionary's category tree.", text ) end -- Show the text that goes at the very top right of the page. local function show_topright(current) return current.getTopright and current:getTopright() or nil end local function link_box(content) return ("<div class=\"noprint plainlinks\" style=\"float: right; clear: both; margin: 0 0 .5em 1em; background: var(--wikt-palette-paleblue, #f9f9f9); border: 1px var(--border-color-base, #aaaaaa) solid; margin-top: -1px; padding: 5px; font-weight: bold;\">%s</div>"):format(content) end local function show_editlink(current) return link_box(("[%s Edit category data]"):format(tostring(full_url(current:getDataModule(), "action=edit")))) end function show_related_changes() local title = current_title.fullText return link_box(("[%s <span title=\"Recent edits and other changes to pages in %s\">Recent changes</span>]"):format( tostring(full_url("Special:RecentChangesLinked", { target = title, showlinkedto = 0, })), title )) end local function show_pagelist(current) local namespace = "namespace=" local info = current:getInfo() local lang_code = info.code if info.label == "citations" or info.label == "citations of undefined terms" then namespace = namespace .. "Citations" elseif lang_code then local lang = require("Module:languages").getByCode(lang_code, true, nil, nil, true) if lang then -- Proto-Norse (gmq-pro) is the probably language with a code ending in -pro -- that's intended to have mostly non-reconstructed entries. if (lang_code:find("%-pro$") and lang_code ~= "gmq-pro") or lang:hasType("reconstructed") then namespace = namespace .. "Reconstruction" elseif lang:hasType("appendix-constructed") then namespace = namespace .. "Appendix" end end elseif info.label:match("templates") then namespace = namespace .. "Template" elseif info.label:match("modules") then namespace = namespace .. "Module" elseif info.label:match("^Wiktionary") or info.label:match("^Pages") then namespace = "" end return ([=[ {| id="newest-and-oldest-pages" class="wikitable mw-collapsible" style="float: right; clear: both; margin: 0 0 .5em 1em;" ! Newest and oldest pages&nbsp; |- | id="recent-additions" style="font-size:0.9em;" | '''Newest pages ordered by last [[mw:Manual:Categorylinks table#cl_timestamp|category link update]]:''' %s |- | id="oldest-pages" style="font-size:0.9em;" | '''Oldest pages ordered by last edit:''' %s |}]=]):format( current_frame:extensionTag( "DynamicPageList", ([=[ category=%s %s count=10 mode=ordered ordermethod=categoryadd order=descending]=] ):format(current_title.text, namespace) ), current_frame:extensionTag( "DynamicPageList", ([=[ category=%s %s count=10 mode=ordered ordermethod=lastedit order=ascending]=] ):format(current_title.text, namespace) ) ) end -- Show navigational "breadcrumbs" at the top of the page. local function show_breadcrumbs(current) local steps = {} -- Start at the current label and move our way up the "chain" from child to parent, until we can't go further. while current do local category, display_name, nocap if type(current) == "string" then category = current display_name = current:gsub("^Category:", "") else if not current.getCategoryName then error("Internal error: Bad format in breadcrumb chain structure, probably a misformatted value for `parents`: " .. mw.dumpObject(current)) end category = "Category:" .. current:getCategoryName() display_name, nocap = current:getBreadcrumbName() end if not nocap then display_name = mw.getContentLanguage():ucfirst(display_name) end insert(steps, 1, ("[[:%s|%s]]"):format(category, display_name)) -- Move up the "chain" by one level. if type(current) == "string" then current = nil else current = current:getParents() end if current then current = current[1].name elseif inFundamental[category] then current = "Category:Fundamental" end end local templateStyles = require("Module:TemplateStyles")("Module:category tree/styles.css") local ol = mw.html.create("ol") for i, step in ipairs(steps) do local li = mw.html.create("li") if i ~= 1 then local span = mw.html.create("span") :attr("aria-hidden", "true") :addClass("ts-categoryBreadcrumbs-separator") :wikitext(" » ") li:node(span) end li:wikitext(step) ol:node(li) end return templateStyles .. tostring(mw.html.create("div") :attr("role", "navigation") :attr("aria-label", "Breadcrumb") :addClass("ts-categoryBreadcrumbs") :node(ol)) end local function show_also(current) local also = current._info.also if also and #also > 0 then return ('<div style="margin-top:-1em;margin-bottom:1.5em">%s</div>'):format(require("Module:also").main(also)) end return nil end -- Show a short description text for the category. local function show_description(current) return current.getDescription and current:getDescription() or nil end local function show_appendix(current) local appendix = current.getAppendix and current:getAppendix() return appendix and ("For more information, see [[%s]]."):format(appendix) or nil end local function sort_children(child1, child2) return string_sort(uupper(child1.sort), uupper(child2.sort)) end -- Show a list of child categories. local function show_children(current) local children = current.getChildren and current:getChildren() or nil if not children then return nil end sort(children, sort_children) local children_list = {} for _, child in ipairs(children) do local child_name, child_pagetitle = child.name if type(child_name) == "string" then child_pagetitle = child_name else child_pagetitle = "Category:" .. child_name:getCategoryName() end if new_title(child_pagetitle).exists then insert(children_list, ("* [[:%s]]: %s"):format( child_pagetitle, child.description or type(child_name) == "string" and child_name:gsub("^Category:", "") .. "." or child_name:getDescription("child") )) end end return concat(children_list, "\n") end -- Show a table of contents with links to each letter in the language's script. local function show_TOC(current) local titleText = current_title.text local inCategoryPages = pages_in_category(titleText, "pages") local inCategorySubcats = pages_in_category(titleText, "subcats") local TOC_type -- Compute type of table of contents required. if inCategoryPages > 2500 or inCategorySubcats > 2500 then TOC_type = "full" elseif inCategoryPages > 200 or inCategorySubcats > 200 then TOC_type = "normal" else -- No (usual) need for a TOC if all pages or subcategories can fit on one page; -- but allow this to be overridden by a custom TOC handler. TOC_type = "none" end if current.getTOC then local TOC_text = current:getTOC(TOC_type) if TOC_text ~= true then return TOC_text or nil end end if TOC_type ~= "none" then local templatename = current:getTOCTemplateName() local TOC_template if TOC_type == "full" then -- This category is very large, see if there is a "full" version of the TOC. local TOC_template_full = new_title(templatename .. "/full") if TOC_template_full.exists then TOC_template = TOC_template_full end end if not TOC_template then local TOC_template_normal = new_title(templatename) if TOC_template_normal.exists then TOC_template = TOC_template_normal end end if TOC_template then return current_frame:expandTemplate{title = TOC_template.text, args = {}} end end return nil end -- Show the "catfix" that adds language attributes and script classes to the page. local function show_catfix(current) local lang, sc = current:getCatfixInfo() return lang and m_utilities.catfix(lang, sc) or nil end -- Show the parent categories that the current category should be placed in. local function show_categories(current, categories) local parents = current.getParents and current:getParents() or nil if not parents then return nil end for _, parent in ipairs(parents) do local parent_name = parent.name local sortkey = type(parent.sort) == "table" and parent.sort:makeSortKey() or parent.sort if type(parent_name) == "string" then insert(categories, ("[[%s|%s]]"):format(parent_name, sortkey)) else insert(categories, ("[[Category:%s|%s]]"):format(parent_name:getCategoryName(), sortkey)) end end -- Also put the category in its corresponding "umbrella" or "by language" category. local umbrella = current:getUmbrella() if umbrella then -- FIXME: use a language-neutral sorting function like the Unicode Collation Algorithm. local sortkey = current._lang and current._lang:getCanonicalName() or current:getCategoryName() sortkey = require("Module:languages").getByCode("en", true, nil, nil, true):makeSortKey(sortkey) if type(umbrella) == "string" then insert(categories, ("[[%s|%s]]"):format(umbrella, sortkey)) else insert(categories, ("[[Category:%s|%s]]"):format(umbrella:getCategoryName(), sortkey)) end end -- Check for various unwanted parser functions, which should be integrated into the category tree data instead. -- Note: HTML comments shouldn't be removed from `content` until after this step, as they can affect the result. local content = current_title:getContent() if not content then -- This happens when using [[Special:ExpandTemplates]] to call {{auto cat}} on a nonexistent category page, -- which is needed by Benwing's create_wanted_categories.py script. return end local defaultsort, displaytitle, page_has_param for node in parse(content):__pairs("next_node") do local node_class = class_else_type(node) if node_class == "template" then local name = node:get_name() if name == "DEFAULTSORT:" and not defaultsort then insert(categories, "[[Category:Pages with DEFAULTSORT conflicts]]") defaultsort = true elseif name == "DISPLAYTITLE:" and not displaytitle then insert(categories,"[[Category:Pages with DISPLAYTITLE conflicts]]") displaytitle = true end elseif node_class == "parameter" and not page_has_param then insert(categories,"[[Category:Pages with raw triple-brace template parameters]]") page_has_param = true end end -- Check for raw category markup, which should also be integrated into the category tree data. content = remove_comments(content, "BOTH") local head = content:find("[[", 1, true) while head do local close = content:find("]]", head + 2, true) if not close then break end -- Make sure there are no intervening "[[" between head and close. local open = content:find("[[", head + 2, true) while open and open < close do head = open open = content:find("[[", head + 2, true) end local cat = content:sub(head + 2, close - 1) local colon = cat:match("^[ _\128-\244]*[Cc][Aa][Tt][EeGgOoRrYy _\128-\244]*():") if colon then local pipe = cat:find("|", colon + 1, true) if pipe ~= #cat then local title = new_title(pipe and cat:sub(1, pipe - 1) or cat) if title and title.namespace == 14 then insert(categories,"[[Category:Categories with categories using raw markup]]") break end end end head = open end end local function generate_output(current) if current then for _, functionName in pairs{ "getBreadcrumbName", "getDataModule", "canBeEmpty", "getDescription", "getParents", "getChildren", "getUmbrella", "getAppendix", "getTOCTemplateName", } do if type(current[functionName]) ~= "function" then require("Module:debug").track{"category tree/missing function", "category tree/missing function/" .. functionName} end end end local boxes, display, categories = {}, {}, {} -- Categories should never show files as a gallery. insert(categories, "__NOGALLERY__") if current_frame:getParent():getTitle() == "Template:auto cat" then insert(categories, "[[Category:Categories calling Template:auto cat]]") end -- Check if the category is empty local totalPages = pages_in_category(current_title.text, "all") local hugeCategory = totalPages > 1000000 -- 1 million -- Categorize huge categories, as they cause DynamicPageList to time out and make the category inaccessible. if hugeCategory then insert(categories, "[[Category:Huge categories]]") end -- Are the parameters valid? if not current then insert(categories, "[[Category:Categories that are not defined in the category tree]]") insert(categories, totalPages == 0 and "[[Category:Empty categories]]" or nil) insert(display, show_error( "Double-check the category name for typos. <br>" .. "[[Special:Search/Category: " .. current_title.text:gsub("^.+:", ""):gsub(" ", "~2 ") .. '~2|Search existing categories]] to check if this category should be created under a different name (for example, "Fruits" instead of "Fruit"). <br>' .. "To add a new category to Wiktionary's category tree, please consult " .. current_frame:expandTemplate{title = "section link", args = { "Help:Category#How_to_create_a_category", }} .. ".")) -- Exit here, as all code beyond here relies on current not being nil return concat(categories, "") .. concat(display, "\n\n"), true end -- Does the category have the correct name? local currentName = current:getCategoryName() local correctName = current_title.text == currentName if not correctName then insert(categories, "[[Category:Categories with incorrect names]]") insert(display, show_error(("Based on the data in the category tree, this category should be called '''[[:Category:%s]]'''."):format(currentName))) end -- Add cleanup category for empty categories. local canBeEmpty = current:canBeEmpty() if canBeEmpty and correctName then insert(categories, " __EXPECTUNUSEDCATEGORY__") elseif totalPages == 0 then insert(categories, "[[Category:Empty categories]]") end if current:isHidden() then insert(categories, "__HIDDENCAT__") end -- Put all the float-right stuff into a <div> that does not clear, so that float-left stuff like the breadcrumbs and -- description can go opposite the float-right stuff without vertical space. insert(boxes, "<div style=\"float: right;\">") insert(boxes, show_topright(current)) insert(boxes, show_editlink(current)) insert(boxes, show_related_changes()) -- Show pagelist, unless it's a huge category (since they can't use DynamicPageList - see above). if not hugeCategory then insert(boxes, show_pagelist(current)) end insert(boxes, "</div>") -- Generate the displayed information insert(display, show_breadcrumbs(current)) insert(display, show_also(current)) insert(display, show_description(current)) insert(display, show_appendix(current)) insert(display, show_children(current)) insert(display, show_TOC(current)) insert(display, show_catfix(current)) insert(display, '<br class="clear-both-in-vector-2022-only">') show_categories(current, categories) return concat(boxes, "\n") .. "\n" .. concat(display, "\n\n") .. concat(categories, "") end --[==[ List of handler functions that try to match the page name. A handler should return the name of a submodule to [[Module:category tree]] and an info table which is passed as an argument to the submodule. If a handler does not recognize the page name, it should return nil. Note that the order of handlers matters! ]==] local handlers = {} -- ws topic cat insert(handlers, function(title) local code, label = title:match("^Thesaurus:(%l[%a-]*%a):(.+)") if code then return ws_topic_cat, {label = label, code = code} end end) -- Topical categories insert(handlers, function(title) local code, label = title:match("^(%l[%a-]*%a):(.+)") if code then return topic_cat, {label = label, code = code} end end) -- Lect categories e.g. for [[:Category:New Zealand English]] or [[:Category:Issime Walser]] insert(handlers, function(title, args) local lect = args.lect or args.dialect if lect ~= "" and yesno(lect, true) then -- Same as boolean in [[Module:parameters]]. return poscatboiler, {label = title, args = args, raw = true} end end) -- poscatboiler lang-specific insert(handlers, function(title, args) local lang, label = export.split_lang_label(title) if not lang then return end local baseLabel, script = label:match("(.+) in (.-) script$") if script and baseLabel ~= "terms" then local scriptObj = require("Module:scripts").getByCanonicalName(script) if scriptObj then return poscatboiler, {label = baseLabel, code = lang:getCode(), sc = scriptObj:getCode(), args = args} end end return poscatboiler, {label = label, code = lang:getCode(), args = args} end) -- poscatboiler umbrella category insert(handlers, function(title, args) local label = title:match("(.+) by language$") if label then -- The poscatboiler code will appropriately lowercase if needed. return poscatboiler, {label = label, args = args} end end) -- ws topic cat insert(handlers, function(title) local label = title:match("^Thesaurus:(.+)") if label then return ws_topic_cat, {label = label} end end) -- topic cat insert(handlers, function(title) return topic_cat, {label = title} end) -- poscatboiler raw handlers insert(handlers, function(title, args) return poscatboiler, {label = title, args = args, raw = true} end) -- poscatboiler umbrella handlers without 'by language' insert(handlers, function(title, args) return poscatboiler, {label = title, args = args} end) function export.show(frame) local args, other_args = require("Module:parameters").process(frame:getParent().args, { ["also"] = {type = "title", sublist = "comma without whitespace", namespace = 14} }, true) if args.also then for k, arg in next, args.also do args.also[k] = arg.prefixedText end end for k, arg in next, other_args do other_args[k] = trim(arg) end if namespace == 10 then -- Template return "(This template should be used on pages in the [[Help:Namespaces#Category|Category:]] namespace.)" elseif namespace ~= 14 then -- Category error("This template/module can only be used on pages in the [[mw:Help:Namespaces#Category|Category:]] namespace.") end local first_fail_args_handled, first_fail_cattext -- Go through each handler in turn. If a handler doesn't recognize the format of the -- category, it will return nil, and we will consider the next handler. Otherwise, -- it returns a template name and arguments to call it with, but even then, that template -- might return an error, and we need to consider the next handler. This happens, -- for example, with the category "CAT:Mato Grosso, Brazil", where "Mato" is the name of -- a language, so the handler for {{poscatboiler}} fires and tries to find a label -- "Grosso, Brazil". This throws an error, and previously, this blocked fruther handler -- consideration, but now we check for the error and continue checking handlers; -- eventually, {{topic cat}} will fire and correctly handle the category. for _, handler in ipairs(handlers) do -- Use a new title object and args table for each handler, to keep them isolated. local submodule, info = handler(current_title.text, deepcopy(other_args)) if submodule then info.also = deepcopy(args.also) require("Module:debug").track("auto cat/" .. submodule) -- `failed` is true if no match was found. submodule = require("Module:category tree/" .. submodule) local cattext, failed = generate_output(submodule.main(info)) if failed then if not first_fail_cattext then first_fail_cattext = cattext first_fail_args_handled = info.args and true or false end elseif not info.args and next(other_args) then error(extra_args_error) else return cattext end end end -- If there were no matches, throw an error if any arguments were given, or otherwise return the cattext -- from the first fail encountered. The final handlers call the boilers unconditionally, so there should -- always be something to return. if not first_fail_args_handled and next(other_args) then error(extra_args_error) end return first_fail_cattext end -- TODO: new test entrypoint. return export on192dz1ihi5mcrerut7hnvdc9ef1se 192619 192618 2024-11-18T03:56:02Z Lee 19 පැරණි සංස්කරණයකින් ගත් කොටස්... 192619 Scribunto text/plain -- Prevent substitution. if mw.isSubsting() then return require("Module:unsubst") end local export = {} local m_str_utils = require("Module:string utilities") local m_template_parser = require("Module:template parser") local m_utilities = require("Module:utilities") local class_else_type = m_template_parser.class_else_type local concat = table.concat local deepcopy = require("Module:table").deepcopy local full_url = mw.uri.fullUrl local insert = table.insert local new_title = mw.title.new local pages_in_category = mw.site.stats.pagesInCategory local parse = m_template_parser.parse local remove_comments = m_str_utils.remove_comments local sort = table.sort local split = m_str_utils.split local string_sort = require("Module:collation").string_sort local trim = m_str_utils.trim local uupper = m_str_utils.upper local yesno = require("Module:yesno") local current_frame = mw.getCurrentFrame() local current_title = mw.title.getCurrentTitle() local inFundamental = mw.loadData("Module:category tree/data") local namespace = current_title.namespace local poscatboiler = "poscatboiler" local topic_cat = "topic cat" local ws_topic_cat = "ws topic cat" local extra_args_error = "Extra arguments to {{((}}auto cat{{))}} are not allowed for this category." function export.split_lang_label(title_text) local getByCanonicalName = require("Module:languages").getByCanonicalName -- Progressively remove a word from the potential canonical name until it -- matches an actual canonical name. local words = split(title_text, " ", true) for i = #words - 1, 1, -1 do local lang = getByCanonicalName(concat(words, " ", 1, i)) if lang then return lang, concat(words, " ", i + 1) end end return nil, title_text end local function show_error(text) return require("Module:message box").maintenance( "red", "[[File:Ambox warning pn.svg|50px]]", "This category is not defined in Wiktionary's category tree.", text ) end -- Show the text that goes at the very top right of the page. local function show_topright(current) return current.getTopright and current:getTopright() or nil end local function link_box(content) return ("<div class=\"noprint plainlinks\" style=\"float: right; clear: both; margin: 0 0 .5em 1em; background: var(--wikt-palette-paleblue, #f9f9f9); border: 1px var(--border-color-base, #aaaaaa) solid; margin-top: -1px; padding: 5px; font-weight: bold;\">%s</div>"):format(content) end local function show_editlink(current) return link_box(("[%s ප්‍රවර්ග දත්ත සංස්කරණය]"):format(tostring(full_url(current:getDataModule(), "action=edit")))) end function show_related_changes() local title = current_title.fullText return link_box(("[%s <span title=\"Recent edits and other changes to pages in %s\">නව වෙනස්වීම්</span>]"):format( tostring(full_url("Special:RecentChangesLinked", { target = title, showlinkedto = 0, })), title )) end local function show_pagelist(current) local namespace = "namespace=" local info = current:getInfo() local lang_code = info.code if info.label == "citations" or info.label == "citations of undefined terms" then namespace = namespace .. "Citations" elseif lang_code then local lang = require("Module:languages").getByCode(lang_code, true, nil, nil, true) if lang then -- Proto-Norse (gmq-pro) is the probably language with a code ending in -pro -- that's intended to have mostly non-reconstructed entries. if (lang_code:find("%-pro$") and lang_code ~= "gmq-pro") or lang:hasType("reconstructed") then namespace = namespace .. "Reconstruction" elseif lang:hasType("appendix-constructed") then namespace = namespace .. "Appendix" end end elseif info.label:match("templates") then namespace = namespace .. "Template" elseif info.label:match("modules") then namespace = namespace .. "Module" elseif info.label:match("^Wiktionary") or info.label:match("^Pages") then namespace = "" end return ([=[ {| id="newest-and-oldest-pages" class="wikitable mw-collapsible mw-collapsed" style="float: right; clear: both; margin: 0 0 .5em 1em;" ! නවතම සහ පැරණිතම පිටු&nbsp; |- | id="recent-additions" style="font-size:0.9em;" | '''Newest pages ordered by last [[mw:Manual:Categorylinks table#cl_timestamp|category link update]]:''' %s |- | id="oldest-pages" style="font-size:0.9em;" | '''Oldest pages ordered by last edit:''' %s |}]=]):format( current_frame:extensionTag( "DynamicPageList", ([=[ category=%s %s count=10 mode=ordered ordermethod=categoryadd order=descending]=] ):format(current_title.text, namespace) ), current_frame:extensionTag( "DynamicPageList", ([=[ category=%s %s count=10 mode=ordered ordermethod=lastedit order=ascending]=] ):format(current_title.text, namespace) ) ) end -- Show navigational "breadcrumbs" at the top of the page. local function show_breadcrumbs(current) local steps = {} -- Start at the current label and move our way up the "chain" from child to parent, until we can't go further. while current do local category, display_name, nocap if type(current) == "string" then category = current display_name = current:gsub("^ප්‍රවර්ගය:", "") else if not current.getCategoryName then error("Internal error: Bad format in breadcrumb chain structure, probably a misformatted value for `parents`: " .. mw.dumpObject(current)) end category = "ප්‍රවර්ගය:" .. current:getCategoryName() display_name, nocap = current:getBreadcrumbName() end if not nocap then display_name = mw.getContentLanguage():ucfirst(display_name) end insert(steps, 1, ("[[:%s|%s]]"):format(category, display_name)) -- Move up the "chain" by one level. if type(current) == "string" then current = nil else current = current:getParents() end if current then current = current[1].name elseif inFundamental[category] then current = "ප්‍රවර්ගය:මූලධර්ම" end end local templateStyles = require("Module:TemplateStyles")("Module:category tree/styles.css") local ol = mw.html.create("ol") for i, step in ipairs(steps) do local li = mw.html.create("li") if i ~= 1 then local span = mw.html.create("span") :attr("aria-hidden", "true") :addClass("ts-categoryBreadcrumbs-separator") :wikitext(" » ") li:node(span) end li:wikitext(step) ol:node(li) end return templateStyles .. tostring(mw.html.create("div") :attr("role", "navigation") :attr("aria-label", "Breadcrumb") :addClass("ts-categoryBreadcrumbs") :node(ol)) end local function show_also(current) local also = current._info.also if also and #also > 0 then return ('<div style="margin-top:-1em;margin-bottom:1.5em">%s</div>'):format(require("Module:also").main(also)) end return nil end -- Show a short description text for the category. local function show_description(current) return current.getDescription and current:getDescription() or nil end local function show_appendix(current) local appendix = current.getAppendix and current:getAppendix() return appendix and ("For more information, see [[%s]]."):format(appendix) or nil end local function sort_children(child1, child2) return string_sort(uupper(child1.sort), uupper(child2.sort)) end -- Show a list of child categories. local function show_children(current) local children = current.getChildren and current:getChildren() or nil if not children then return nil end sort(children, sort_children) local children_list = {} for _, child in ipairs(children) do local child_name, child_pagetitle = child.name if type(child_name) == "string" then child_pagetitle = child_name else child_pagetitle = "ප්‍රවර්ගය:" .. child_name:getCategoryName() end if new_title(child_pagetitle).exists then insert(children_list, ("* [[:%s]]: %s"):format( child_pagetitle, child.description or type(child_name) == "string" and child_name:gsub("^ප්‍රවර්ගය:", "") .. "." or child_name:getDescription("child") )) end end return concat(children_list, "\n") end -- Show a table of contents with links to each letter in the language's script. local function show_TOC(current) local titleText = current_title.text local inCategoryPages = pages_in_category(titleText, "pages") local inCategorySubcats = pages_in_category(titleText, "subcats") local TOC_type -- Compute type of table of contents required. if inCategoryPages > 2500 or inCategorySubcats > 2500 then TOC_type = "full" elseif inCategoryPages > 200 or inCategorySubcats > 200 then TOC_type = "normal" else -- No (usual) need for a TOC if all pages or subcategories can fit on one page; -- but allow this to be overridden by a custom TOC handler. TOC_type = "none" end if current.getTOC then local TOC_text = current:getTOC(TOC_type) if TOC_text ~= true then return TOC_text or nil end end if TOC_type ~= "none" then local templatename = current:getTOCTemplateName() local TOC_template if TOC_type == "full" then -- This category is very large, see if there is a "full" version of the TOC. local TOC_template_full = new_title(templatename .. "/full") if TOC_template_full.exists then TOC_template = TOC_template_full end end if not TOC_template then local TOC_template_normal = new_title(templatename) if TOC_template_normal.exists then TOC_template = TOC_template_normal end end if TOC_template then return current_frame:expandTemplate{title = TOC_template.text, args = {}} end end return nil end -- Show the "catfix" that adds language attributes and script classes to the page. local function show_catfix(current) local lang, sc = current:getCatfixInfo() return lang and m_utilities.catfix(lang, sc) or nil end -- Show the parent categories that the current category should be placed in. local function show_categories(current, categories) local parents = current.getParents and current:getParents() or nil if not parents then return nil end for _, parent in ipairs(parents) do local parent_name = parent.name local sortkey = type(parent.sort) == "table" and parent.sort:makeSortKey() or parent.sort if type(parent_name) == "string" then insert(categories, ("[[%s|%s]]"):format(parent_name, sortkey)) else insert(categories, ("[[ප්‍රවර්ගය:%s|%s]]"):format(parent_name:getCategoryName(), sortkey)) end end -- Also put the category in its corresponding "umbrella" or "by language" category. local umbrella = current:getUmbrella() if umbrella then -- FIXME: use a language-neutral sorting function like the Unicode Collation Algorithm. local sortkey = current._lang and current._lang:getCanonicalName() or current:getCategoryName() sortkey = require("Module:languages").getByCode("en", true, nil, nil, true):makeSortKey(sortkey) if type(umbrella) == "string" then insert(categories, ("[[%s|%s]]"):format(umbrella, sortkey)) else insert(categories, ("[[ප්‍රවර්ගය:%s|%s]]"):format(umbrella:getCategoryName(), sortkey)) end end -- Check for various unwanted parser functions, which should be integrated into the category tree data instead. -- Note: HTML comments shouldn't be removed from `content` until after this step, as they can affect the result. local content = current_title:getContent() if not content then -- This happens when using [[Special:ExpandTemplates]] to call {{auto cat}} on a nonexistent category page, -- which is needed by Benwing's create_wanted_categories.py script. return end local defaultsort, displaytitle, page_has_param for node in parse(content):__pairs("next_node") do local node_class = class_else_type(node) if node_class == "template" then local name = node:get_name() if name == "DEFAULTSORT:" and not defaultsort then insert(categories, "[[Category:Pages with DEFAULTSORT conflicts]]") defaultsort = true elseif name == "DISPLAYTITLE:" and not displaytitle then insert(categories,"[[Category:Pages with DISPLAYTITLE conflicts]]") displaytitle = true end elseif node_class == "parameter" and not page_has_param then insert(categories,"[[Category:Pages with raw triple-brace template parameters]]") page_has_param = true end end -- Check for raw category markup, which should also be integrated into the category tree data. content = remove_comments(content, "BOTH") local head = content:find("[[", 1, true) while head do local close = content:find("]]", head + 2, true) if not close then break end -- Make sure there are no intervening "[[" between head and close. local open = content:find("[[", head + 2, true) while open and open < close do head = open open = content:find("[[", head + 2, true) end local cat = content:sub(head + 2, close - 1) local colon = cat:match("^[ _\128-\244]*[Cc][Aa][Tt][EeGgOoRrYy _\128-\244]*():") if colon then local pipe = cat:find("|", colon + 1, true) if pipe ~= #cat then local title = new_title(pipe and cat:sub(1, pipe - 1) or cat) if title and title.namespace == 14 then insert(categories,"[[Category:Categories with categories using raw markup]]") break end end end head = open end end local function generate_output(current) if current then for _, functionName in pairs{ "getBreadcrumbName", "getDataModule", "canBeEmpty", "getDescription", "getParents", "getChildren", "getUmbrella", "getAppendix", "getTOCTemplateName", } do if type(current[functionName]) ~= "function" then require("Module:debug").track{"category tree/missing function", "category tree/missing function/" .. functionName} end end end local boxes, display, categories = {}, {}, {} -- Categories should never show files as a gallery. insert(categories, "__NOGALLERY__") if current_frame:getParent():getTitle() == "Template:auto cat" then insert(categories, "[[Category:Categories calling Template:auto cat]]") end -- Check if the category is empty local totalPages = pages_in_category(current_title.text, "all") local hugeCategory = totalPages > 1000000 -- 1 million -- Categorize huge categories, as they cause DynamicPageList to time out and make the category inaccessible. if hugeCategory then insert(categories, "[[Category:Huge categories]]") end -- Are the parameters valid? if not current then insert(categories, "[[ප්‍රවර්ගය:ප්‍රවර්ග පද්ධතිය තුළ අර්ථ දක්වා නොමැති ප්‍රවර්ග]]") insert(categories, totalPages == 0 and "[[ප්‍රවර්ගය:හිස් ප්‍රවර්ග]]" or nil) insert(display, show_error( "Double-check the category name for typos. <br>" .. "[[Special:Search/Category: " .. current_title.text:gsub("^.+:", ""):gsub(" ", "~2 ") .. '~2|Search existing categories]] to check if this category should be created under a different name (for example, "Fruits" instead of "Fruit"). <br>' .. "To add a new category to Wiktionary's category tree, please consult " .. current_frame:expandTemplate{title = "section link", args = { "Help:Category#How_to_create_a_category", }} .. ".")) -- Exit here, as all code beyond here relies on current not being nil return concat(categories, "") .. concat(display, "\n\n"), true end -- Does the category have the correct name? local currentName = current:getCategoryName() local correctName = current_title.text == currentName if not correctName then insert(categories, "[[ප්‍රවර්ගය:දෝෂ සහගත නාම සහිත ප්‍රවර්ග]]") insert(display, show_error(("Based on the data in the category tree, this category should be called '''[[:ප්‍රවර්ගය:%s]]'''."):format(currentName))) end -- Add cleanup category for empty categories. local canBeEmpty = current:canBeEmpty() if canBeEmpty and correctName then insert(categories, " __EXPECTUNUSEDCATEGORY__") elseif totalPages == 0 then insert(categories, "[[ප්‍රවර්ගය:හිස් ප්‍රවර්ග]]") end if current:isHidden() then insert(categories, "__HIDDENCAT__") end -- Put all the float-right stuff into a <div> that does not clear, so that float-left stuff like the breadcrumbs and -- description can go opposite the float-right stuff without vertical space. insert(boxes, "<div style=\"float: right;\">") insert(boxes, show_topright(current)) insert(boxes, show_editlink(current)) insert(boxes, show_related_changes()) -- Show pagelist, unless it's a huge category (since they can't use DynamicPageList - see above). if not hugeCategory then insert(boxes, show_pagelist(current)) end insert(boxes, "</div>") -- Generate the displayed information insert(display, show_breadcrumbs(current)) insert(display, show_also(current)) insert(display, show_description(current)) insert(display, show_appendix(current)) insert(display, show_children(current)) insert(display, show_TOC(current)) insert(display, show_catfix(current)) insert(display, '<br class="clear-both-in-vector-2022-only">') show_categories(current, categories) return concat(boxes, "\n") .. "\n" .. concat(display, "\n\n") .. concat(categories, "") end --[==[ List of handler functions that try to match the page name. A handler should return the name of a submodule to [[Module:category tree]] and an info table which is passed as an argument to the submodule. If a handler does not recognize the page name, it should return nil. Note that the order of handlers matters! ]==] local handlers = {} -- ws topic cat insert(handlers, function(title) local code, label = title:match("^Thesaurus:(%l[%a-]*%a):(.+)") if code then return ws_topic_cat, {label = label, code = code} end end) -- Topical categories insert(handlers, function(title) local code, label = title:match("^(%l[%a-]*%a):(.+)") if code then return topic_cat, {label = label, code = code} end end) -- Lect categories e.g. for [[:Category:New Zealand English]] or [[:Category:Issime Walser]] insert(handlers, function(title, args) local lect = args.lect or args.dialect if lect ~= "" and yesno(lect, true) then -- Same as boolean in [[Module:parameters]]. return poscatboiler, {label = title, args = args, raw = true} end end) -- poscatboiler lang-specific insert(handlers, function(title, args) local lang, label = export.split_lang_label(title) if not lang then return end local baseLabel, script = label:match("(.+) in (.-) script$") if script and baseLabel ~= "terms" then local scriptObj = require("Module:scripts").getByCanonicalName(script) if scriptObj then return poscatboiler, {label = baseLabel, code = lang:getCode(), sc = scriptObj:getCode(), args = args} end end return poscatboiler, {label = label, code = lang:getCode(), args = args} end) -- poscatboiler umbrella category insert(handlers, function(title, args) local label = title:match("(.+) by language$") if label then -- The poscatboiler code will appropriately lowercase if needed. return poscatboiler, {label = label, args = args} end end) -- ws topic cat insert(handlers, function(title) local label = title:match("^Thesaurus:(.+)") if label then return ws_topic_cat, {label = label} end end) -- topic cat insert(handlers, function(title) return topic_cat, {label = title} end) -- poscatboiler raw handlers insert(handlers, function(title, args) return poscatboiler, {label = title, args = args, raw = true} end) -- poscatboiler umbrella handlers without 'by language' insert(handlers, function(title, args) return poscatboiler, {label = title, args = args} end) function export.show(frame) local args, other_args = require("Module:parameters").process(frame:getParent().args, { ["also"] = {type = "title", sublist = "comma without whitespace", namespace = 14} }, true) if args.also then for k, arg in next, args.also do args.also[k] = arg.prefixedText end end for k, arg in next, other_args do other_args[k] = trim(arg) end if namespace == 10 then -- Template return "(This template should be used on pages in the [[Help:Namespaces#Category|Category:]] namespace.)" elseif namespace ~= 14 then -- Category error("This template/module can only be used on pages in the [[mw:Help:Namespaces#Category|Category:]] namespace.") end local first_fail_args_handled, first_fail_cattext -- Go through each handler in turn. If a handler doesn't recognize the format of the -- category, it will return nil, and we will consider the next handler. Otherwise, -- it returns a template name and arguments to call it with, but even then, that template -- might return an error, and we need to consider the next handler. This happens, -- for example, with the category "CAT:Mato Grosso, Brazil", where "Mato" is the name of -- a language, so the handler for {{poscatboiler}} fires and tries to find a label -- "Grosso, Brazil". This throws an error, and previously, this blocked fruther handler -- consideration, but now we check for the error and continue checking handlers; -- eventually, {{topic cat}} will fire and correctly handle the category. for _, handler in ipairs(handlers) do -- Use a new title object and args table for each handler, to keep them isolated. local submodule, info = handler(current_title.text, deepcopy(other_args)) if submodule then info.also = deepcopy(args.also) require("Module:debug").track("auto cat/" .. submodule) -- `failed` is true if no match was found. submodule = require("Module:category tree/" .. submodule) local cattext, failed = generate_output(submodule.main(info)) if failed then if not first_fail_cattext then first_fail_cattext = cattext first_fail_args_handled = info.args and true or false end elseif not info.args and next(other_args) then error(extra_args_error) else return cattext end end end -- If there were no matches, throw an error if any arguments were given, or otherwise return the cattext -- from the first fail encountered. The final handlers call the boilers unconditionally, so there should -- always be something to return. if not first_fail_args_handled and next(other_args) then error(extra_args_error) end return first_fail_cattext end -- TODO: new test entrypoint. return export 6jlwq68mps649wlqmvjro9mkvjzpvjv 192620 192619 2024-11-18T03:58:01Z Lee 19 පැරණි සංස්කරණයකින් ගත් කොටස්... 192620 Scribunto text/plain -- Prevent substitution. if mw.isSubsting() then return require("Module:unsubst") end local export = {} local m_str_utils = require("Module:string utilities") local m_template_parser = require("Module:template parser") local m_utilities = require("Module:utilities") local class_else_type = m_template_parser.class_else_type local concat = table.concat local deepcopy = require("Module:table").deepcopy local full_url = mw.uri.fullUrl local insert = table.insert local new_title = mw.title.new local pages_in_category = mw.site.stats.pagesInCategory local parse = m_template_parser.parse local remove_comments = m_str_utils.remove_comments local sort = table.sort local split = m_str_utils.split local string_sort = require("Module:collation").string_sort local trim = m_str_utils.trim local uupper = m_str_utils.upper local yesno = require("Module:yesno") local current_frame = mw.getCurrentFrame() local current_title = mw.title.getCurrentTitle() local inFundamental = mw.loadData("Module:category tree/data") local namespace = current_title.namespace local poscatboiler = "poscatboiler" local topic_cat = "topic cat" local ws_topic_cat = "ws topic cat" local extra_args_error = "Extra arguments to {{((}}auto cat{{))}} are not allowed for this category." function export.split_lang_label(title_text) local getByCanonicalName = require("Module:languages").getByCanonicalName -- Progressively remove a word from the potential canonical name until it -- matches an actual canonical name. local words = split(title_text, " ", true) for i = #words - 1, 1, -1 do local lang = getByCanonicalName(concat(words, " ", 1, i)) if lang then return lang, concat(words, " ", i + 1) end end return nil, title_text end local function show_error(text) return require("Module:message box").maintenance( "red", "[[File:Ambox warning pn.svg|50px]]", "This category is not defined in Wiktionary's category tree.", text ) end -- Show the text that goes at the very top right of the page. local function show_topright(current) return current.getTopright and current:getTopright() or nil end local function link_box(content) return ("<div class=\"noprint plainlinks\" style=\"float: right; clear: both; margin: 0 0 .5em 1em; background: var(--wikt-palette-paleblue, #f9f9f9); border: 1px var(--border-color-base, #aaaaaa) solid; margin-top: -1px; padding: 5px; font-weight: bold;\">%s</div>"):format(content) end local function show_editlink(current) return link_box(("[%s ප්‍රවර්ග දත්ත සංස්කරණය]"):format(tostring(full_url(current:getDataModule(), "action=edit")))) end function show_related_changes() local title = current_title.fullText return link_box(("[%s <span title=\"Recent edits and other changes to pages in %s\">නව වෙනස්වීම්</span>]"):format( tostring(full_url("Special:RecentChangesLinked", { target = title, showlinkedto = 0, })), title )) end local function show_pagelist(current) local namespace = "namespace=" local info = current:getInfo() local lang_code = info.code if info.label == "citations" or info.label == "citations of undefined terms" then namespace = namespace .. "Citations" elseif lang_code then local lang = require("Module:languages").getByCode(lang_code, true, nil, nil, true) if lang then -- Proto-Norse (gmq-pro) is the probably language with a code ending in -pro -- that's intended to have mostly non-reconstructed entries. if (lang_code:find("%-pro$") and lang_code ~= "gmq-pro") or lang:hasType("reconstructed") then namespace = namespace .. "Reconstruction" elseif lang:hasType("appendix-constructed") then namespace = namespace .. "Appendix" end end elseif info.label:match("templates") then namespace = namespace .. "Template" elseif info.label:match("modules") then namespace = namespace .. "Module" elseif info.label:match("^Wiktionary") or info.label:match("^Pages") then namespace = "" end return ([=[ {| id="newest-and-oldest-pages" class="wikitable mw-collapsible mw-collapsed" style="float: right; clear: both; margin: 0 0 .5em 1em;" ! නවතම සහ පැරණිතම පිටු&nbsp; |- | id="recent-additions" style="font-size:0.9em;" | '''Newest pages ordered by last [[mw:Manual:Categorylinks table#cl_timestamp|category link update]]:''' %s |- | id="oldest-pages" style="font-size:0.9em;" | '''Oldest pages ordered by last edit:''' %s |}]=]):format( current_frame:extensionTag( "DynamicPageList", ([=[ category=%s %s count=10 mode=ordered ordermethod=categoryadd order=descending]=] ):format(current_title.text, namespace) ), current_frame:extensionTag( "DynamicPageList", ([=[ category=%s %s count=10 mode=ordered ordermethod=lastedit order=ascending]=] ):format(current_title.text, namespace) ) ) end -- Show navigational "breadcrumbs" at the top of the page. local function show_breadcrumbs(current) local steps = {} -- Start at the current label and move our way up the "chain" from child to parent, until we can't go further. while current do local category, display_name, nocap if type(current) == "string" then category = current display_name = current:gsub("^ප්‍රවර්ගය:", "") else if not current.getCategoryName then error("Internal error: Bad format in breadcrumb chain structure, probably a misformatted value for `parents`: " .. mw.dumpObject(current)) end category = "ප්‍රවර්ගය:" .. current:getCategoryName() display_name, nocap = current:getBreadcrumbName() end if not nocap then display_name = mw.getContentLanguage():ucfirst(display_name) end insert(steps, 1, ("[[:%s|%s]]"):format(category, display_name)) -- Move up the "chain" by one level. if type(current) == "string" then current = nil else current = current:getParents() end if current then current = current[1].name elseif inFundamental[category] then current = "ප්‍රවර්ගය:මූලධර්ම" end end local templateStyles = require("Module:TemplateStyles")("Module:category tree/styles.css") local ol = mw.html.create("ol") for i, step in ipairs(steps) do local li = mw.html.create("li") if i ~= 1 then local span = mw.html.create("span") :attr("aria-hidden", "true") :addClass("ts-categoryBreadcrumbs-separator") :wikitext(" » ") li:node(span) end li:wikitext(step) ol:node(li) end return templateStyles .. tostring(mw.html.create("div") :attr("role", "navigation") :attr("aria-label", "Breadcrumb") :addClass("ts-categoryBreadcrumbs") :node(ol)) end local function show_also(current) local also = current._info.also if also and #also > 0 then return ('<div style="margin-top:-1em;margin-bottom:1.5em">%s</div>'):format(require("Module:also").main(also)) end return nil end -- Show a short description text for the category. local function show_description(current) return current.getDescription and current:getDescription() or nil end local function show_appendix(current) local appendix = current.getAppendix and current:getAppendix() return appendix and ("For more information, see [[%s]]."):format(appendix) or nil end local function sort_children(child1, child2) return string_sort(uupper(child1.sort), uupper(child2.sort)) end -- Show a list of child categories. local function show_children(current) local children = current.getChildren and current:getChildren() or nil if not children then return nil end sort(children, sort_children) local children_list = {} for _, child in ipairs(children) do local child_name, child_pagetitle = child.name if type(child_name) == "string" then child_pagetitle = child_name else child_pagetitle = "ප්‍රවර්ගය:" .. child_name:getCategoryName() end if new_title(child_pagetitle).exists then insert(children_list, ("* [[:%s]]: %s"):format( child_pagetitle, child.description or type(child_name) == "string" and child_name:gsub("^ප්‍රවර්ගය:", "") .. "." or child_name:getDescription("child") )) end end return concat(children_list, "\n") end -- Show a table of contents with links to each letter in the language's script. local function show_TOC(current) local titleText = current_title.text local inCategoryPages = pages_in_category(titleText, "pages") local inCategorySubcats = pages_in_category(titleText, "subcats") local TOC_type -- Compute type of table of contents required. if inCategoryPages > 2500 or inCategorySubcats > 2500 then TOC_type = "full" elseif inCategoryPages > 200 or inCategorySubcats > 200 then TOC_type = "normal" else -- No (usual) need for a TOC if all pages or subcategories can fit on one page; -- but allow this to be overridden by a custom TOC handler. TOC_type = "none" end if current.getTOC then local TOC_text = current:getTOC(TOC_type) if TOC_text ~= true then return TOC_text or nil end end if TOC_type ~= "none" then local templatename = current:getTOCTemplateName() local TOC_template if TOC_type == "full" then -- This category is very large, see if there is a "full" version of the TOC. local TOC_template_full = new_title(templatename .. "/full") if TOC_template_full.exists then TOC_template = TOC_template_full end end if not TOC_template then local TOC_template_normal = new_title(templatename) if TOC_template_normal.exists then TOC_template = TOC_template_normal end end if TOC_template then return current_frame:expandTemplate{title = TOC_template.text, args = {}} end end return nil end -- Show the "catfix" that adds language attributes and script classes to the page. local function show_catfix(current) local lang, sc = current:getCatfixInfo() return lang and m_utilities.catfix(lang, sc) or nil end -- Show the parent categories that the current category should be placed in. local function show_categories(current, categories) local parents = current.getParents and current:getParents() or nil if not parents then return nil end for _, parent in ipairs(parents) do local parent_name = parent.name local sortkey = type(parent.sort) == "table" and parent.sort:makeSortKey() or parent.sort if type(parent_name) == "string" then insert(categories, ("[[%s|%s]]"):format(parent_name, sortkey)) else insert(categories, ("[[ප්‍රවර්ගය:%s|%s]]"):format(parent_name:getCategoryName(), sortkey)) end end -- Also put the category in its corresponding "umbrella" or "by language" category. local umbrella = current:getUmbrella() if umbrella then -- FIXME: use a language-neutral sorting function like the Unicode Collation Algorithm. local sortkey = current._lang and current._lang:getCanonicalName() or current:getCategoryName() sortkey = require("Module:languages").getByCode("en", true, nil, nil, true):makeSortKey(sortkey) if type(umbrella) == "string" then insert(categories, ("[[%s|%s]]"):format(umbrella, sortkey)) else insert(categories, ("[[ප්‍රවර්ගය:%s|%s]]"):format(umbrella:getCategoryName(), sortkey)) end end -- Check for various unwanted parser functions, which should be integrated into the category tree data instead. -- Note: HTML comments shouldn't be removed from `content` until after this step, as they can affect the result. local content = current_title:getContent() if not content then -- This happens when using [[Special:ExpandTemplates]] to call {{auto cat}} on a nonexistent category page, -- which is needed by Benwing's create_wanted_categories.py script. return end local defaultsort, displaytitle, page_has_param for node in parse(content):__pairs("next_node") do local node_class = class_else_type(node) if node_class == "template" then local name = node:get_name() if name == "DEFAULTSORT:" and not defaultsort then insert(categories, "[[Category:Pages with DEFAULTSORT conflicts]]") defaultsort = true elseif name == "DISPLAYTITLE:" and not displaytitle then insert(categories,"[[Category:Pages with DISPLAYTITLE conflicts]]") displaytitle = true end elseif node_class == "parameter" and not page_has_param then insert(categories,"[[Category:Pages with raw triple-brace template parameters]]") page_has_param = true end end -- Check for raw category markup, which should also be integrated into the category tree data. content = remove_comments(content, "BOTH") local head = content:find("[[", 1, true) while head do local close = content:find("]]", head + 2, true) if not close then break end -- Make sure there are no intervening "[[" between head and close. local open = content:find("[[", head + 2, true) while open and open < close do head = open open = content:find("[[", head + 2, true) end local cat = content:sub(head + 2, close - 1) local colon = cat:match("^[ _\128-\244]*[Cc][Aa][Tt][EeGgOoRrYy _\128-\244]*():") if colon then local pipe = cat:find("|", colon + 1, true) if pipe ~= #cat then local title = new_title(pipe and cat:sub(1, pipe - 1) or cat) if title and title.namespace == 14 then insert(categories,"[[Category:Categories with categories using raw markup]]") break end end end head = open end end local function generate_output(current) if current then for _, functionName in pairs{ "getBreadcrumbName", "getDataModule", "canBeEmpty", "getDescription", "getParents", "getChildren", "getUmbrella", "getAppendix", "getTOCTemplateName", } do if type(current[functionName]) ~= "function" then require("Module:debug").track{"category tree/missing function", "category tree/missing function/" .. functionName} end end end local boxes, display, categories = {}, {}, {} -- Categories should never show files as a gallery. insert(categories, "__NOGALLERY__") if current_frame:getParent():getTitle() == "Template:auto cat" then insert(categories, "[[Category:Categories calling Template:auto cat]]") end -- Check if the category is empty local totalPages = pages_in_category(current_title.text, "all") local hugeCategory = totalPages > 1000000 -- 1 million -- Categorize huge categories, as they cause DynamicPageList to time out and make the category inaccessible. if hugeCategory then insert(categories, "[[Category:Huge categories]]") end -- Are the parameters valid? if not current then insert(categories, "[[ප්‍රවර්ගය:ප්‍රවර්ග පද්ධතිය තුළ අර්ථ දක්වා නොමැති ප්‍රවර්ග]]") insert(categories, totalPages == 0 and "[[ප්‍රවර්ගය:හිස් ප්‍රවර්ග]]" or nil) insert(display, show_error( "Double-check the category name for typos. <br>" .. "[[Special:Search/Category: " .. current_title.text:gsub("^.+:", ""):gsub(" ", "~2 ") .. '~2|Search existing categories]] to check if this category should be created under a different name (for example, "Fruits" instead of "Fruit"). <br>' .. "To add a new category to Wiktionary's category tree, please consult " .. current_frame:expandTemplate{title = "section link", args = { "Help:Category#How_to_create_a_category", }} .. ".")) -- Exit here, as all code beyond here relies on current not being nil return concat(categories, "") .. concat(display, "\n\n"), true end -- Does the category have the correct name? local currentName = current:getCategoryName() local correctName = current_title.text == currentName if not correctName then insert(categories, "[[ප්‍රවර්ගය:දෝෂ සහගත නාම සහිත ප්‍රවර්ග]]") insert(display, show_error(("Based on the data in the category tree, this category should be called '''[[:ප්‍රවර්ගය:%s]]'''."):format(currentName))) end -- Add cleanup category for empty categories. local canBeEmpty = current:canBeEmpty() if canBeEmpty and correctName then insert(categories, " __EXPECTUNUSEDCATEGORY__") elseif totalPages == 0 then insert(categories, "[[ප්‍රවර්ගය:හිස් ප්‍රවර්ග]]") end if current:isHidden() then insert(categories, "__HIDDENCAT__") end -- Put all the float-right stuff into a <div> that does not clear, so that float-left stuff like the breadcrumbs and -- description can go opposite the float-right stuff without vertical space. insert(boxes, "<div style=\"float: right;\">") insert(boxes, show_topright(current)) insert(boxes, show_editlink(current)) insert(boxes, show_related_changes()) -- Show pagelist, unless it's a huge category (since they can't use DynamicPageList - see above). if not hugeCategory then insert(boxes, show_pagelist(current)) end insert(boxes, "</div>") -- Generate the displayed information insert(display, show_breadcrumbs(current)) insert(display, show_also(current)) insert(display, show_description(current)) insert(display, show_appendix(current)) insert(display, show_children(current)) insert(display, show_TOC(current)) insert(display, show_catfix(current)) insert(display, '<br class="clear-both-in-vector-2022-only">') show_categories(current, categories) return concat(boxes, "\n") .. "\n" .. concat(display, "\n\n") .. concat(categories, "") end --[==[ List of handler functions that try to match the page name. A handler should return the name of a submodule to [[Module:category tree]] and an info table which is passed as an argument to the submodule. If a handler does not recognize the page name, it should return nil. Note that the order of handlers matters! ]==] local handlers = {} -- ws topic cat insert(handlers, function(title) local code, label = title:match("^Thesaurus:(%l[%a-]*%a):(.+)") if code then return ws_topic_cat, {label = label, code = code} end end) -- Topical categories insert(handlers, function(title) local code, label = title:match("^(%l[%a-]*%a):(.+)") if code then return topic_cat, {label = label, code = code} end end) -- Lect categories e.g. for [[:Category:New Zealand English]] or [[:Category:Issime Walser]] insert(handlers, function(title, args) local lect = args.lect or args.dialect if lect ~= "" and yesno(lect, true) then -- Same as boolean in [[Module:parameters]]. return poscatboiler, {label = title, args = args, raw = true} end end) -- poscatboiler lang-specific insert(handlers, function(title, args) local lang, label = export.split_lang_label(title) if not lang then return end local baseLabel, script = label:match("(.+), (.-) අක්ෂරක්‍රමය භාවිතා කොට ලියන ලද$") if script and baseLabel ~= "යෙදුම්" then local scriptObj = require("Module:scripts").getByCanonicalName(script) if scriptObj then return poscatboiler, {label = baseLabel, code = lang:getCode(), sc = scriptObj:getCode(), args = args} end end return poscatboiler, {label = label, code = lang:getCode(), args = args} end) -- poscatboiler umbrella category insert(handlers, function(title, args) local label = title:match("භාෂාව අනුව (.+)$") if label then -- The poscatboiler code will appropriately lowercase if needed. return poscatboiler, {label = label, args = args} end end) -- ws topic cat insert(handlers, function(title) local label = title:match("^Thesaurus:(.+)") if label then return ws_topic_cat, {label = label} end end) -- topic cat insert(handlers, function(title) return topic_cat, {label = title} end) -- poscatboiler raw handlers insert(handlers, function(title, args) return poscatboiler, {label = title, args = args, raw = true} end) -- poscatboiler umbrella handlers without 'by language' insert(handlers, function(title, args) return poscatboiler, {label = title, args = args} end) function export.show(frame) local args, other_args = require("Module:parameters").process(frame:getParent().args, { ["also"] = {type = "title", sublist = "comma without whitespace", namespace = 14} }, true) if args.also then for k, arg in next, args.also do args.also[k] = arg.prefixedText end end for k, arg in next, other_args do other_args[k] = trim(arg) end if namespace == 10 then -- Template return "(This template should be used on pages in the [[Help:Namespaces#Category|ප්‍රවර්ගය:]] namespace.)" elseif namespace ~= 14 then -- Category error("This template/module can only be used on pages in the [[mw:Help:Namespaces#Category|ප්‍රවර්ගය:]] namespace.") end local first_fail_args_handled, first_fail_cattext -- Go through each handler in turn. If a handler doesn't recognize the format of the -- category, it will return nil, and we will consider the next handler. Otherwise, -- it returns a template name and arguments to call it with, but even then, that template -- might return an error, and we need to consider the next handler. This happens, -- for example, with the category "CAT:Mato Grosso, Brazil", where "Mato" is the name of -- a language, so the handler for {{poscatboiler}} fires and tries to find a label -- "Grosso, Brazil". This throws an error, and previously, this blocked fruther handler -- consideration, but now we check for the error and continue checking handlers; -- eventually, {{topic cat}} will fire and correctly handle the category. for _, handler in ipairs(handlers) do -- Use a new title object and args table for each handler, to keep them isolated. local submodule, info = handler(current_title.text, deepcopy(other_args)) if submodule then info.also = deepcopy(args.also) require("Module:debug").track("auto cat/" .. submodule) -- `failed` is true if no match was found. submodule = require("Module:category tree/" .. submodule) local cattext, failed = generate_output(submodule.main(info)) if failed then if not first_fail_cattext then first_fail_cattext = cattext first_fail_args_handled = info.args and true or false end elseif not info.args and next(other_args) then error(extra_args_error) else return cattext end end end -- If there were no matches, throw an error if any arguments were given, or otherwise return the cattext -- from the first fail encountered. The final handlers call the boilers unconditionally, so there should -- always be something to return. if not first_fail_args_handled and next(other_args) then error(extra_args_error) end return first_fail_cattext end -- TODO: new test entrypoint. return export mwdnwbei0mmfet59n1m0r03135yrwam ප්‍රවර්ගය:ඉංග්‍රීසි යෙදුම්, ප්‍රොටෝ-ඉන්දු-යුරෝපීය වෙතින් ව්‍යුත්පන්න 14 12424 192573 184900 2024-11-17T14:12:33Z Lee 19 Lee විසින් [[ප්‍රවර්ගය:ඉංග්‍රීසි පද, ප්‍රොටෝ-ඉන්දු-යුරෝපීය වෙතින් ව්‍යුත්පන්න]] සිට [[ප්‍රවර්ගය:ඉංග්‍රීසි යෙදුම්, ප්‍රොටෝ-ඉන්දු-යුරෝපීය වෙතින් ව්‍යුත්පන්න]] වෙත පිටුව ගෙන යන ලදී 39606 wikitext text/x-wiki {{auto cat}} eomzlm5v4j7ond1phrju7cnue91g5qx Module:category tree/poscatboiler/data/affixes and compounds 828 13840 192867 186925 2024-11-09T22:07:39Z en>Theknightwho 0 Minor optimisation. 192867 Scribunto text/plain local labels = {} local raw_categories = {} local handlers = {} ----------------------------------------------------------------------------- -- -- -- LABELS -- -- -- ----------------------------------------------------------------------------- labels["alliterative compounds"] = { description = "{{{langname}}} noun phrases composed of two or more stems that alliterate.", parents = {"compound terms", "alliterative phrases"}, } labels["antonymous compounds"] = { description = "{{{langname}}} compounds in which one part is an antonym of the other.", parents = {"dvandva compounds", sort = "antonym"}, } labels["bahuvrihi compounds"] = { description = "{{{langname}}} compounds in which the first part (A) modifies the second (B), and whose meaning follows a [[metonymic]] pattern: “<person> having a B that is A.”", parents = {"compound terms", "exocentric compounds"}, } -- Add "compound POS" categories for various parts of speech. local compound_poses = { "adjectives", "adverbs", "conjunctions", "determiners", "interjections", "nouns", "numerals", "particles", "postpositions", "prefixes", "prepositions", "pronouns", "proper nouns", "suffixes", "verbs", } for _, pos in ipairs(compound_poses) do labels["compound " .. pos] = { description = "{{{langname}}} " .. pos .. " composed of two or more stems.", parents = {{name = "compound terms", sort = " "}, pos}, } end labels["compound determinatives"] = { description = "{{{langname}}} determinatives composed of two or more stems.", parents = {"compound terms", "determiners"}, } labels["compound terms"] = { description = "{{{langname}}} terms composed of two or more stems.", umbrella_parents = "Terms by etymology subcategories by language", parents = {"terms by etymology"}, } labels["dvandva compounds"] = { description = "{{{langname}}} terms composed of two or more stems whose stems could be connected by an 'and'.", parents = {"compound terms"}, } labels["dvigu compounds"] = { description = "{{{langname}}} [[tatpuruṣa]] compounds where the modifying member is a number", parents = {"tatpurusa compounds"}, } labels["endocentric compounds"] = { description = "{{{langname}}} terms composed of two or more stems, one of which is the [[w:head (linguistics)|head]] of that compound.", parents = {"compound terms"}, } labels["endocentric noun-noun compounds"] = { description = "{{{langname}}} terms composed of two or more stems, one of which is the [[w:head (linguistics)|head]] of that compound.", breadcrumb = "noun-noun", parents = {"endocentric compounds", "compound terms"}, } labels["endocentric verb-noun compounds"] = { description = "{{{langname}}} compounds in which the first element is a verbal stem, the second a nominal stem and the head of the compound.", breadcrumb = "verb-noun", parents = {"endocentric compounds", "verb-noun compounds"}, } labels["exocentric compounds"] = { description = "{{{langname}}} terms composed of two or more stems, none of which is the [[w:head (linguistics)|head]] of that compound.", parents = {"compound terms"}, } labels["exocentric verb-noun compounds"] = { description = "{{{langname}}} compounds in which the first element is a transitive verb, the second a noun functioning as its direct object, and whose referent is the person or thing doing the action.", breadcrumb = "verb-noun", parents = {"exocentric compounds", "verb-noun compounds"}, } labels["karmadharaya compounds"] = { description = "{{{langname}}} terms composed of two or more stems in which the main stem determines the case endings.", parents = {"tatpurusa compounds"}, } labels["itaretara dvandva compounds"] = { description = "{{{langname}}} terms composed of two or more stems whose stems could be connected by an 'and'.", breadcrumb = "itaretara", parents = {"dvandva compounds"}, } labels["rhyming compounds"] = { description = "{{{langname}}} noun phrases composed of two or more stems that rhyme.", parents = {"compound terms", "rhyming phrases"}, } labels["samahara dvandva compounds"] = { description = "{{{langname}}} terms composed of two or more stems whose stems could be connected by an 'and'.", breadcrumb = "samahara", parents = {"dvandva compounds"}, } labels["shitgibbons"] = { description = "{{{langname}}} terms that consist of a single-syllable [[expletive]] followed by a two-syllable [[trochee]] that serves as a [[nominalizer]] or [[intensifier]].", parents = {"endocentric compounds"}, } labels["synonymous compounds"] = { description = "{{{langname}}} compounds in which one part is a synonym of the other.", parents = {"dvandva compounds", sort = "synonym"}, } labels["tatpurusa compounds"] = { description = "{{{langname}}} terms composed of two or more stems", parents = {"compound terms"}, } labels["verb-noun compounds"] = { description = "{{{langname}}} compounds in which the first element is a transitive verb, the second a noun functioning as its direct object, and whose referent is the person or thing doing the action, or an adjective describing such a person or thing.", parents = {"verb-object compounds"}, } labels["verb-object compounds"] = { description = "{{{langname}}} compounds in which the first element is a transitive verb, the second a term (usually but not always a noun) functioning as its (normally direct) object, and whose referent is the person or thing doing the action, or an adjective describing such a person or thing.", additional = "Examples in English are {{m|en|pickpocket|lit=someone who picks pockets}} and {{m|en|catch-all|lit=something that catches everything}}.", parents = {"compound terms"}, } labels["verb-verb compounds"] = { description = "{{{langname}}} compounds composed of two or more verbs in apposition, often either synonyms or antonyms, and whose referent refers to the result of performing those actions.", parents = {"compound terms"}, } labels["vrddhi derivatives"] = { description = "{{{langname}}} terms derived from a Proto-Indo-European root by the process of [[w:vṛddhi|vṛddhi]] derivation.", parents = {"terms by etymology"}, } labels["vrddhi gerundives"] = { description = "{{{langname}}} [[gerundive]]s derived from a Proto-Indo-European root by the process of [[w:vṛddhi|vṛddhi]] derivation.", parents = {"vrddhi derivatives"}, } labels["vyadhikarana compounds"] = { description = "{{{langname}}} terms composed of two or more stems in which the non-main stem determines the case endings.", parents = {"tatpurusa compounds"}, } for _, fixtype in ipairs({"circumfix", "infix", "interfix", "prefix", "suffix",}) do labels["terms by " .. fixtype] = { description = "{{{langname}}} terms categorized by their " .. fixtype .. "es.", umbrella_parents = "Terms by etymology subcategories by language", parents = {{name = "terms by etymology", sort = fixtype}, fixtype .. "es"}, } end -- Add 'umbrella_parents' key if not already present. for key, data in pairs(labels) do -- NOTE: umbrella.parents overrides umbrella_parents if both are given. if not data.umbrella_parents then data.umbrella_parents = "Types of compound terms by language" end end ----------------------------------------------------------------------------- -- -- -- RAW CATEGORIES -- -- -- ----------------------------------------------------------------------------- raw_categories["Types of compound terms by language"] = { description = "Umbrella categories covering topics related to types of compound terms.", additional = "{{{umbrella_meta_msg}}}", parents = { "Umbrella metacategories", {name = "compound terms", is_label = true, sort = " "}, {name = "Terms by etymology subcategories by language", sort = " "}, }, } ----------------------------------------------------------------------------- -- -- -- HANDLERS -- -- -- ----------------------------------------------------------------------------- ----------------------------------------------------------------------------- ------------------------------ Affix handlers ------------------------------- ----------------------------------------------------------------------------- table.insert(handlers, function(data) local labelpref, pos, affixtype, term_and_id = data.label:match("^(([a-z -]+) ([a-z]+fix)ed with )(.+)$") if affixtype then local term, id = term_and_id:match("^(.+) %(([^()]+)%)$") term = term or term_and_id -- Convert term/alt into affixes if needed local desc = { ["prefix"] = "beginning with the prefix", ["suffix"] = "ending with the suffix", ["circumfix"] = "bookended with the circumfix", ["infix"] = "spliced with the infix", ["interfix"] = "joined with the interfix", -- Transfixes not supported currently. -- ["transfix"] = "patterned with the transfix", } if not desc[affixtype] then return nil end -- Here, {LANG} is replaced with the actual language, {TERM_AND_ID} with the actual term (or with 'TERM<id:ID>' -- if there is an ID), {BASE} with '<var>base</var>', {BASE2} with '<var>base2</var>', {BASE_EXPL} with an -- explanation of what "base" means, {BASE_BASE2_EXPL} with an explanation of what "base" and "base2" mean, and -- {POS} with '|pos=POS' if there is a `pos` other than "terms", otherwise a blank string. local what_categorizes = { ["prefix"] = "{{tl|af|{LANG}|{TERM_AND_ID}|{BASE}{POS}}} or {{tl|affix|{LANG}|{TERM_AND_ID}|{BASE}{POS}}} (or the more specific and less-preferred equivalents {{tl|pre}} or {{tl|prefix}}), where {BASE_EXPL}", ["suffix"] = "{{tl|af|{LANG}|{BASE}|{TERM_AND_ID}{POS}}} or {{tl|affix|{LANG}|{BASE}|{TERM_AND_ID}{POS}}} (or the more specific and less-preferred equivalents {{tl|suf}} or {{tl|suffix}}), where {BASE_EXPL}", ["circumfix"] = "{{tl|af|{LANG}|{BASE}|{TERM_AND_ID}{POS}}} or {{tl|affix|{LANG}|{BASE}|{TERM_AND_ID}{POS}}}, where {BASE_EXPL}", ["infix"] = "{{tl|infix|{LANG}|{BASE}|{TERM_AND_ID}{POS}}}, where {BASE_EXPL}", ["interfix"] = "{{tl|af|{LANG}|{BASE}|{TERM_AND_ID}{POS}|{BASE2}}} or {{tl|affix|{LANG}|{BASE}|{TERM_AND_ID}|{BASE2}{POS}}}, where {BASE_BASE2_EXPL}", } local args = require("Module:parameters").process(data.args, { ["alt"] = true, ["sc"] = true, ["sort"] = true, ["tr"] = true, ["ts"] = true, }) local sc = data.sc or args.sc and require("Module:scripts").getByCode(args.sc, "sc") or nil local m_affix = require("Module:affix") -- Call make_affix to add display hyphens if they're not already present. local _, display_term, lookup_term = m_affix.make_affix(term, data.lang, sc, affixtype, nil, true) local _, display_alt = m_affix.make_affix(args.alt, data.lang, sc, affixtype) local _, display_tr = m_affix.make_affix(args.tr, data.lang, require("Module:scripts").getByCode("Latn"), affixtype) local _, display_ts = m_affix.make_affix(args.ts, data.lang, require("Module:scripts").getByCode("Latn"), affixtype) local m_script_utilities = require("Module:script utilities") local id_text = id and " (" .. id .. ")" or "" -- Compute parents. local parents = {} if id then if pos == "words" then -- don't allow formerly-named categories with "words" return nil end if pos == "terms" then table.insert(parents, {name = labelpref .. term, sort = id, args = args}) else table.insert(parents, {name = "terms " .. affixtype .. "ed with " .. term_and_id, sort = id .. ", " .. pos, args = args}) table.insert(parents, {name = labelpref .. term, sort = id, args = args}) end elseif pos == "words" then -- don't allow formerly-named categories with "words" return nil elseif pos ~= "terms" then table.insert(parents, {name = "terms " .. affixtype .. "ed with " .. term, sort = pos, args = args}) end table.insert(parents, {name = "terms by " .. affixtype, sort = (data.lang:makeSortKey((data.lang:makeEntryName(args.sort or term))))}) -- If other affixes are mapped to this one, show them. local additional if data.lang then local langcode = data.lang:getCode() if m_affix.langs_with_lang_specific_data[langcode] then local langdata = mw.loadData(m_affix.affix_lang_data_module_prefix .. langcode) local variants = {} if langdata.affix_mappings then for variant, canonical in pairs(langdata.affix_mappings) do -- Above, we converted the stripped link term as we received it to the lookup form, so we -- can look up the variants that are mapped to this term. Once we find them, map them to -- display form. local is_variant = false if type(canonical) == "table" then for _, canonical_v in pairs(canonical) do if canonical_v == lookup_term then is_variant = true break end end else is_variant = canonical == lookup_term end if is_variant then local _, display_variant = m_affix.make_affix(variant, data.lang, sc, affixtype) table.insert(variants, "{{m|" .. langcode .. "|" .. display_variant .. "}}") end end if #variants > 0 then table.sort(variants) additional = ("This category also includes terms %sed with %s."):format(affixtype, require("Module:table").serialCommaJoin(variants)) end end end end if data.lang then local what_categorizes_msg = what_categorizes[affixtype] if not what_categorizes_msg then error(("Internal error: No what_categorizes value for affixtype '%s' for label '%s', lang '%s'"): format(affixtype, data.label, data.lang:getCode())) end what_categorizes_msg = "Terms are placed in this category using " .. (what_categorizes_msg :gsub("{LANG}", data.lang:getCode()) :gsub("{TERM_AND_ID}", require("Module:string utilities").replacement_escape( id and ("%s<id:%s>"):format(term, id) or term)) :gsub("{POS}", require("Module:string utilities").replacement_escape( pos == "terms" and "" or ("|pos=%s"):format(pos))) :gsub("{BASE}", "<var>base</var>") :gsub("{BASE2}", "<var>base2</var>") :gsub("{BASE_EXPL}", "<code><var>base</var></code> is the base lemma from which this term is derived") :gsub("{BASE_BASE2_EXPL}", "<code><var>base</var></code> and <code><var>base2</var></code> are the " .. "base lemmas from which this term is derived") ) .. "." if additional then additional = additional .. "\n\n" .. what_categorizes_msg else additional = what_categorizes_msg end end return { description = "{{{langname}}} " .. pos .. " " .. desc[affixtype] .. " " .. require("Module:links").full_link({ lang = data.lang, term = display_term, alt = display_alt, sc = sc, id = id, tr = display_tr, ts = display_ts}, "term") .. ".", additional = additional, breadcrumb = pos == "terms" and m_script_utilities.tag_text(display_alt or display_term, data.lang, sc, "term") .. id_text or pos, displaytitle = "{{{langname}}} " .. labelpref .. m_script_utilities.tag_text(term, data.lang, sc, "term") .. id_text, parents = parents, umbrella = false, }, true -- true = args handled end end) return {LABELS = labels, RAW_CATEGORIES = raw_categories, HANDLERS = handlers} 1qscst2uwsyhli8td7mhlz5k1as80kb 192868 192867 2024-11-18T10:45:55Z Lee 19 [[:en:Module:category_tree/poscatboiler/data/affixes_and_compounds]] වෙතින් එක් සංශෝධනයක් 192867 Scribunto text/plain local labels = {} local raw_categories = {} local handlers = {} ----------------------------------------------------------------------------- -- -- -- LABELS -- -- -- ----------------------------------------------------------------------------- labels["alliterative compounds"] = { description = "{{{langname}}} noun phrases composed of two or more stems that alliterate.", parents = {"compound terms", "alliterative phrases"}, } labels["antonymous compounds"] = { description = "{{{langname}}} compounds in which one part is an antonym of the other.", parents = {"dvandva compounds", sort = "antonym"}, } labels["bahuvrihi compounds"] = { description = "{{{langname}}} compounds in which the first part (A) modifies the second (B), and whose meaning follows a [[metonymic]] pattern: “<person> having a B that is A.”", parents = {"compound terms", "exocentric compounds"}, } -- Add "compound POS" categories for various parts of speech. local compound_poses = { "adjectives", "adverbs", "conjunctions", "determiners", "interjections", "nouns", "numerals", "particles", "postpositions", "prefixes", "prepositions", "pronouns", "proper nouns", "suffixes", "verbs", } for _, pos in ipairs(compound_poses) do labels["compound " .. pos] = { description = "{{{langname}}} " .. pos .. " composed of two or more stems.", parents = {{name = "compound terms", sort = " "}, pos}, } end labels["compound determinatives"] = { description = "{{{langname}}} determinatives composed of two or more stems.", parents = {"compound terms", "determiners"}, } labels["compound terms"] = { description = "{{{langname}}} terms composed of two or more stems.", umbrella_parents = "Terms by etymology subcategories by language", parents = {"terms by etymology"}, } labels["dvandva compounds"] = { description = "{{{langname}}} terms composed of two or more stems whose stems could be connected by an 'and'.", parents = {"compound terms"}, } labels["dvigu compounds"] = { description = "{{{langname}}} [[tatpuruṣa]] compounds where the modifying member is a number", parents = {"tatpurusa compounds"}, } labels["endocentric compounds"] = { description = "{{{langname}}} terms composed of two or more stems, one of which is the [[w:head (linguistics)|head]] of that compound.", parents = {"compound terms"}, } labels["endocentric noun-noun compounds"] = { description = "{{{langname}}} terms composed of two or more stems, one of which is the [[w:head (linguistics)|head]] of that compound.", breadcrumb = "noun-noun", parents = {"endocentric compounds", "compound terms"}, } labels["endocentric verb-noun compounds"] = { description = "{{{langname}}} compounds in which the first element is a verbal stem, the second a nominal stem and the head of the compound.", breadcrumb = "verb-noun", parents = {"endocentric compounds", "verb-noun compounds"}, } labels["exocentric compounds"] = { description = "{{{langname}}} terms composed of two or more stems, none of which is the [[w:head (linguistics)|head]] of that compound.", parents = {"compound terms"}, } labels["exocentric verb-noun compounds"] = { description = "{{{langname}}} compounds in which the first element is a transitive verb, the second a noun functioning as its direct object, and whose referent is the person or thing doing the action.", breadcrumb = "verb-noun", parents = {"exocentric compounds", "verb-noun compounds"}, } labels["karmadharaya compounds"] = { description = "{{{langname}}} terms composed of two or more stems in which the main stem determines the case endings.", parents = {"tatpurusa compounds"}, } labels["itaretara dvandva compounds"] = { description = "{{{langname}}} terms composed of two or more stems whose stems could be connected by an 'and'.", breadcrumb = "itaretara", parents = {"dvandva compounds"}, } labels["rhyming compounds"] = { description = "{{{langname}}} noun phrases composed of two or more stems that rhyme.", parents = {"compound terms", "rhyming phrases"}, } labels["samahara dvandva compounds"] = { description = "{{{langname}}} terms composed of two or more stems whose stems could be connected by an 'and'.", breadcrumb = "samahara", parents = {"dvandva compounds"}, } labels["shitgibbons"] = { description = "{{{langname}}} terms that consist of a single-syllable [[expletive]] followed by a two-syllable [[trochee]] that serves as a [[nominalizer]] or [[intensifier]].", parents = {"endocentric compounds"}, } labels["synonymous compounds"] = { description = "{{{langname}}} compounds in which one part is a synonym of the other.", parents = {"dvandva compounds", sort = "synonym"}, } labels["tatpurusa compounds"] = { description = "{{{langname}}} terms composed of two or more stems", parents = {"compound terms"}, } labels["verb-noun compounds"] = { description = "{{{langname}}} compounds in which the first element is a transitive verb, the second a noun functioning as its direct object, and whose referent is the person or thing doing the action, or an adjective describing such a person or thing.", parents = {"verb-object compounds"}, } labels["verb-object compounds"] = { description = "{{{langname}}} compounds in which the first element is a transitive verb, the second a term (usually but not always a noun) functioning as its (normally direct) object, and whose referent is the person or thing doing the action, or an adjective describing such a person or thing.", additional = "Examples in English are {{m|en|pickpocket|lit=someone who picks pockets}} and {{m|en|catch-all|lit=something that catches everything}}.", parents = {"compound terms"}, } labels["verb-verb compounds"] = { description = "{{{langname}}} compounds composed of two or more verbs in apposition, often either synonyms or antonyms, and whose referent refers to the result of performing those actions.", parents = {"compound terms"}, } labels["vrddhi derivatives"] = { description = "{{{langname}}} terms derived from a Proto-Indo-European root by the process of [[w:vṛddhi|vṛddhi]] derivation.", parents = {"terms by etymology"}, } labels["vrddhi gerundives"] = { description = "{{{langname}}} [[gerundive]]s derived from a Proto-Indo-European root by the process of [[w:vṛddhi|vṛddhi]] derivation.", parents = {"vrddhi derivatives"}, } labels["vyadhikarana compounds"] = { description = "{{{langname}}} terms composed of two or more stems in which the non-main stem determines the case endings.", parents = {"tatpurusa compounds"}, } for _, fixtype in ipairs({"circumfix", "infix", "interfix", "prefix", "suffix",}) do labels["terms by " .. fixtype] = { description = "{{{langname}}} terms categorized by their " .. fixtype .. "es.", umbrella_parents = "Terms by etymology subcategories by language", parents = {{name = "terms by etymology", sort = fixtype}, fixtype .. "es"}, } end -- Add 'umbrella_parents' key if not already present. for key, data in pairs(labels) do -- NOTE: umbrella.parents overrides umbrella_parents if both are given. if not data.umbrella_parents then data.umbrella_parents = "Types of compound terms by language" end end ----------------------------------------------------------------------------- -- -- -- RAW CATEGORIES -- -- -- ----------------------------------------------------------------------------- raw_categories["Types of compound terms by language"] = { description = "Umbrella categories covering topics related to types of compound terms.", additional = "{{{umbrella_meta_msg}}}", parents = { "Umbrella metacategories", {name = "compound terms", is_label = true, sort = " "}, {name = "Terms by etymology subcategories by language", sort = " "}, }, } ----------------------------------------------------------------------------- -- -- -- HANDLERS -- -- -- ----------------------------------------------------------------------------- ----------------------------------------------------------------------------- ------------------------------ Affix handlers ------------------------------- ----------------------------------------------------------------------------- table.insert(handlers, function(data) local labelpref, pos, affixtype, term_and_id = data.label:match("^(([a-z -]+) ([a-z]+fix)ed with )(.+)$") if affixtype then local term, id = term_and_id:match("^(.+) %(([^()]+)%)$") term = term or term_and_id -- Convert term/alt into affixes if needed local desc = { ["prefix"] = "beginning with the prefix", ["suffix"] = "ending with the suffix", ["circumfix"] = "bookended with the circumfix", ["infix"] = "spliced with the infix", ["interfix"] = "joined with the interfix", -- Transfixes not supported currently. -- ["transfix"] = "patterned with the transfix", } if not desc[affixtype] then return nil end -- Here, {LANG} is replaced with the actual language, {TERM_AND_ID} with the actual term (or with 'TERM<id:ID>' -- if there is an ID), {BASE} with '<var>base</var>', {BASE2} with '<var>base2</var>', {BASE_EXPL} with an -- explanation of what "base" means, {BASE_BASE2_EXPL} with an explanation of what "base" and "base2" mean, and -- {POS} with '|pos=POS' if there is a `pos` other than "terms", otherwise a blank string. local what_categorizes = { ["prefix"] = "{{tl|af|{LANG}|{TERM_AND_ID}|{BASE}{POS}}} or {{tl|affix|{LANG}|{TERM_AND_ID}|{BASE}{POS}}} (or the more specific and less-preferred equivalents {{tl|pre}} or {{tl|prefix}}), where {BASE_EXPL}", ["suffix"] = "{{tl|af|{LANG}|{BASE}|{TERM_AND_ID}{POS}}} or {{tl|affix|{LANG}|{BASE}|{TERM_AND_ID}{POS}}} (or the more specific and less-preferred equivalents {{tl|suf}} or {{tl|suffix}}), where {BASE_EXPL}", ["circumfix"] = "{{tl|af|{LANG}|{BASE}|{TERM_AND_ID}{POS}}} or {{tl|affix|{LANG}|{BASE}|{TERM_AND_ID}{POS}}}, where {BASE_EXPL}", ["infix"] = "{{tl|infix|{LANG}|{BASE}|{TERM_AND_ID}{POS}}}, where {BASE_EXPL}", ["interfix"] = "{{tl|af|{LANG}|{BASE}|{TERM_AND_ID}{POS}|{BASE2}}} or {{tl|affix|{LANG}|{BASE}|{TERM_AND_ID}|{BASE2}{POS}}}, where {BASE_BASE2_EXPL}", } local args = require("Module:parameters").process(data.args, { ["alt"] = true, ["sc"] = true, ["sort"] = true, ["tr"] = true, ["ts"] = true, }) local sc = data.sc or args.sc and require("Module:scripts").getByCode(args.sc, "sc") or nil local m_affix = require("Module:affix") -- Call make_affix to add display hyphens if they're not already present. local _, display_term, lookup_term = m_affix.make_affix(term, data.lang, sc, affixtype, nil, true) local _, display_alt = m_affix.make_affix(args.alt, data.lang, sc, affixtype) local _, display_tr = m_affix.make_affix(args.tr, data.lang, require("Module:scripts").getByCode("Latn"), affixtype) local _, display_ts = m_affix.make_affix(args.ts, data.lang, require("Module:scripts").getByCode("Latn"), affixtype) local m_script_utilities = require("Module:script utilities") local id_text = id and " (" .. id .. ")" or "" -- Compute parents. local parents = {} if id then if pos == "words" then -- don't allow formerly-named categories with "words" return nil end if pos == "terms" then table.insert(parents, {name = labelpref .. term, sort = id, args = args}) else table.insert(parents, {name = "terms " .. affixtype .. "ed with " .. term_and_id, sort = id .. ", " .. pos, args = args}) table.insert(parents, {name = labelpref .. term, sort = id, args = args}) end elseif pos == "words" then -- don't allow formerly-named categories with "words" return nil elseif pos ~= "terms" then table.insert(parents, {name = "terms " .. affixtype .. "ed with " .. term, sort = pos, args = args}) end table.insert(parents, {name = "terms by " .. affixtype, sort = (data.lang:makeSortKey((data.lang:makeEntryName(args.sort or term))))}) -- If other affixes are mapped to this one, show them. local additional if data.lang then local langcode = data.lang:getCode() if m_affix.langs_with_lang_specific_data[langcode] then local langdata = mw.loadData(m_affix.affix_lang_data_module_prefix .. langcode) local variants = {} if langdata.affix_mappings then for variant, canonical in pairs(langdata.affix_mappings) do -- Above, we converted the stripped link term as we received it to the lookup form, so we -- can look up the variants that are mapped to this term. Once we find them, map them to -- display form. local is_variant = false if type(canonical) == "table" then for _, canonical_v in pairs(canonical) do if canonical_v == lookup_term then is_variant = true break end end else is_variant = canonical == lookup_term end if is_variant then local _, display_variant = m_affix.make_affix(variant, data.lang, sc, affixtype) table.insert(variants, "{{m|" .. langcode .. "|" .. display_variant .. "}}") end end if #variants > 0 then table.sort(variants) additional = ("This category also includes terms %sed with %s."):format(affixtype, require("Module:table").serialCommaJoin(variants)) end end end end if data.lang then local what_categorizes_msg = what_categorizes[affixtype] if not what_categorizes_msg then error(("Internal error: No what_categorizes value for affixtype '%s' for label '%s', lang '%s'"): format(affixtype, data.label, data.lang:getCode())) end what_categorizes_msg = "Terms are placed in this category using " .. (what_categorizes_msg :gsub("{LANG}", data.lang:getCode()) :gsub("{TERM_AND_ID}", require("Module:string utilities").replacement_escape( id and ("%s<id:%s>"):format(term, id) or term)) :gsub("{POS}", require("Module:string utilities").replacement_escape( pos == "terms" and "" or ("|pos=%s"):format(pos))) :gsub("{BASE}", "<var>base</var>") :gsub("{BASE2}", "<var>base2</var>") :gsub("{BASE_EXPL}", "<code><var>base</var></code> is the base lemma from which this term is derived") :gsub("{BASE_BASE2_EXPL}", "<code><var>base</var></code> and <code><var>base2</var></code> are the " .. "base lemmas from which this term is derived") ) .. "." if additional then additional = additional .. "\n\n" .. what_categorizes_msg else additional = what_categorizes_msg end end return { description = "{{{langname}}} " .. pos .. " " .. desc[affixtype] .. " " .. require("Module:links").full_link({ lang = data.lang, term = display_term, alt = display_alt, sc = sc, id = id, tr = display_tr, ts = display_ts}, "term") .. ".", additional = additional, breadcrumb = pos == "terms" and m_script_utilities.tag_text(display_alt or display_term, data.lang, sc, "term") .. id_text or pos, displaytitle = "{{{langname}}} " .. labelpref .. m_script_utilities.tag_text(term, data.lang, sc, "term") .. id_text, parents = parents, umbrella = false, }, true -- true = args handled end end) return {LABELS = labels, RAW_CATEGORIES = raw_categories, HANDLERS = handlers} 1qscst2uwsyhli8td7mhlz5k1as80kb 192869 192868 2024-11-18T10:46:18Z Lee 19 පැරණි සංස්කරණයකින් ගත් කොටස්... 192869 Scribunto text/plain local labels = {} local raw_categories = {} local handlers = {} local m_sinhala = require("Module:sinhala") ----------------------------------------------------------------------------- -- -- -- LABELS -- -- -- ----------------------------------------------------------------------------- labels["alliterative compounds"] = { description = "{{{langname}}} noun phrases composed of two or more stems that alliterate.", parents = {"සංයුක්ත පද", "alliterative phrases"}, } labels["antonymous compounds"] = { description = "{{{langname}}} compounds in which one part is an antonym of the other.", parents = {"dvandva compounds", sort = "antonym"}, } labels["bahuvrihi compounds"] = { description = "{{{langname}}} compounds in which the first part (A) modifies the second (B), and whose meaning follows a [[metonymic]] pattern: “<person> having a B that is A.”", parents = {"සංයුක්ත පද", "exocentric compounds"}, } -- Add "compound POS" categories for various parts of speech. local compound_poses = { "adjectives", "adverbs", "conjunctions", "determiners", "interjections", "නාම පද", "numerals", "particles", "postpositions", "උපසර්ග", "prepositions", "pronouns", "proper nouns", "suffixes", "verbs", } for _, pos in ipairs(compound_poses) do labels["සංයුක්ත " .. pos] = { description = "{{{langname}}} " .. pos .. " composed of two or more stems.", parents = {{name = "සංයුක්ත පද", sort = " "}, pos}, } end labels["compound determinatives"] = { description = "{{{langname}}} determinatives composed of two or more stems.", parents = {"සංයුක්ත පද", "determiners"}, } labels["සංයුක්ත පද"] = { description = "{{{langname}}} terms composed of two or more stems.", umbrella_parents = "භාෂාව අනුව පද, නිරුක්ති උප ප්‍රවර්ග අනුව", parents = {"පද, නිරුක්තිය අනුව"}, } labels["dvandva compounds"] = { description = "{{{langname}}} terms composed of two or more stems whose stems could be connected by an 'and'.", parents = {"සංයුක්ත පද"}, } labels["dvigu compounds"] = { description = "{{{langname}}} [[tatpuruṣa]] compounds where the modifying member is a number", parents = {"tatpurusa compounds"}, } labels["endocentric compounds"] = { description = "{{{langname}}} terms composed of two or more stems, one of which is the [[w:head (linguistics)|head]] of that compound.", parents = {"සංයුක්ත පද"}, } labels["endocentric noun-noun compounds"] = { description = "{{{langname}}} terms composed of two or more stems, one of which is the [[w:head (linguistics)|head]] of that compound.", breadcrumb = "noun-noun", parents = {"endocentric compounds", "සංයුක්ත පද"}, } labels["endocentric verb-noun compounds"] = { description = "{{{langname}}} compounds in which the first element is a verbal stem, the second a nominal stem and the head of the compound.", breadcrumb = "verb-noun", parents = {"endocentric compounds", "verb-noun compounds"}, } labels["exocentric compounds"] = { description = "{{{langname}}} terms composed of two or more stems, none of which is the [[w:head (linguistics)|head]] of that compound.", parents = {"සංයුක්ත පද"}, } labels["exocentric verb-noun compounds"] = { description = "{{{langname}}} compounds in which the first element is a transitive verb, the second a noun functioning as its direct object, and whose referent is the person or thing doing the action.", breadcrumb = "verb-noun", parents = {"exocentric compounds", "verb-noun compounds"}, } labels["karmadharaya compounds"] = { description = "{{{langname}}} terms composed of two or more stems in which the main stem determines the case endings.", parents = {"tatpurusa compounds"}, } labels["itaretara dvandva compounds"] = { description = "{{{langname}}} terms composed of two or more stems whose stems could be connected by an 'and'.", breadcrumb = "itaretara", parents = {"dvandva compounds"}, } labels["rhyming compounds"] = { description = "{{{langname}}} noun phrases composed of two or more stems that rhyme.", parents = {"සංයුක්ත පද", "rhyming phrases"}, } labels["samahara dvandva compounds"] = { description = "{{{langname}}} terms composed of two or more stems whose stems could be connected by an 'and'.", breadcrumb = "samahara", parents = {"dvandva compounds"}, } labels["shitgibbons"] = { description = "{{{langname}}} terms that consist of a single-syllable [[expletive]] followed by a two-syllable [[trochee]] that serves as a [[nominalizer]] or [[intensifier]].", parents = {"endocentric compounds"}, } labels["synonymous compounds"] = { description = "{{{langname}}} compounds in which one part is a synonym of the other.", parents = {"dvandva compounds", sort = "synonym"}, } labels["tatpurusa compounds"] = { description = "{{{langname}}} terms composed of two or more stems", parents = {"සංයුක්ත පද"}, } labels["verb-noun compounds"] = { description = "{{{langname}}} compounds in which the first element is a transitive verb, the second a noun functioning as its direct object, and whose referent is the person or thing doing the action, or an adjective describing such a person or thing.", parents = {"verb-object compounds"}, } labels["verb-object compounds"] = { description = "{{{langname}}} compounds in which the first element is a transitive verb, the second a term (usually but not always a noun) functioning as its (normally direct) object, and whose referent is the person or thing doing the action, or an adjective describing such a person or thing.", additional = "Examples in English are {{m|en|pickpocket|lit=someone who picks pockets}} and {{m|en|catch-all|lit=something that catches everything}}.", parents = {"සංයුක්ත පද"}, } labels["verb-verb compounds"] = { description = "{{{langname}}} compounds composed of two or more verbs in apposition, often either synonyms or antonyms, and whose referent refers to the result of performing those actions.", parents = {"සංයුක්ත පද"}, } labels["vrddhi derivatives"] = { description = "{{{langname}}} terms derived from a Proto-Indo-European root by the process of [[w:vṛddhi|vṛddhi]] derivation.", parents = {"පද, නිරුක්තිය අනුව"}, } labels["vrddhi gerundives"] = { description = "{{{langname}}} [[gerundive]]s derived from a Proto-Indo-European root by the process of [[w:vṛddhi|vṛddhi]] derivation.", parents = {"vrddhi derivatives"}, } labels["vyadhikarana compounds"] = { description = "{{{langname}}} terms composed of two or more stems in which the non-main stem determines the case endings.", parents = {"tatpurusa compounds"}, } for _, fixtype in ipairs({"circumfix", "infix", "interfix", "prefix", "suffix",}) do labels["යෙදුම්, " .. m_sinhala.sinhala(fixtype .. "es") .. " අනුව"] = { description = "{{{langname}}} යෙදුම්, ඒවායේ " .. m_sinhala.sinhala(fixtype .. "es") .. " වලට අනුව කාණ්ඩ වලට වෙන්කොට ඇති.", umbrella_parents = "භාෂාව අනුව පද, නිරුක්ති උප ප්‍රවර්ග අනුව", parents = {{name = "පද, නිරුක්තිය අනුව", sort = fixtype}, m_sinhala.sinhala(fixtype .. "es")}, } end -- Add 'umbrella_parents' key if not already present. for key, data in pairs(labels) do -- NOTE: umbrella.parents overrides umbrella_parents if both are given. if not data.umbrella_parents then data.umbrella_parents = "Types of compound terms by language" end end ----------------------------------------------------------------------------- -- -- -- RAW CATEGORIES -- -- -- ----------------------------------------------------------------------------- raw_categories["Types of compound terms by language"] = { description = "Umbrella categories covering topics related to types of compound terms.", additional = "{{{umbrella_meta_msg}}}", parents = { "ඡත්‍ර මෙටා ප්‍රවර්ග", {name = "සංයුක්ත පද", is_label = true, sort = " "}, {name = "භාෂාව අනුව පද, නිරුක්ති උප ප්‍රවර්ග අනුව", sort = " "}, }, } ----------------------------------------------------------------------------- -- -- -- HANDLERS -- -- -- ----------------------------------------------------------------------------- ----------------------------------------------------------------------------- ------------------------------ Affix handlers ------------------------------- ----------------------------------------------------------------------------- table.insert(handlers, function(data) local labelpref, pos, zz_term_and, affixtype, zz_and_id = data.label:match("^((.*), (.+) (.*) සහිත)(.*)$") local term_and_id if zz_term_and ~= nil then term_and_id = zz_term_and if zz_and_id ~= nil then term_and_id = term_and_id .. zz_and_id end end if labelpref ~= nil then -- නව ආකාරය සඳහා අවශ්‍ය වෙනස labelpref = labelpref:gsub(zz_term_and, "%%s") end if pos == "යෙදුම්" then pos = "terms" end if affixtype == "ප්‍රත්‍ය" then affixtype = "suffix" end if affixtype then local term, id = term_and_id:match("^(.+) %(([^()]+)%)$") term = term or term_and_id -- Convert term/alt into affixes if needed local desc = { ["prefix"] = ", % උපසර්ගයෙන් ආරම්භ වන", ["suffix"] = ", %s ප්‍රත්‍යයෙන් අවසන් වන", ["circumfix"] = "bookended with the circumfix", ["infix"] = "spliced with the infix", ["interfix"] = "joined with the interfix", -- Transfixes not supported currently. -- ["transfix"] = "patterned with the transfix", } if not desc[affixtype] then return nil end -- Here, {LANG} is replaced with the actual language, {TERM_AND_ID} with the actual term (or with 'TERM<id:ID>' -- if there is an ID), {BASE} with '<var>base</var>', {BASE2} with '<var>base2</var>', {BASE_EXPL} with an -- explanation of what "base" means, {BASE_BASE2_EXPL} with an explanation of what "base" and "base2" mean, and -- {POS} with '|pos=POS' if there is a `pos` other than "terms", otherwise a blank string. local what_categorizes = { ["prefix"] = "{{tl|af|{LANG}|{TERM_AND_ID}|{BASE}{POS}}} or {{tl|affix|{LANG}|{TERM_AND_ID}|{BASE}{POS}}} (හෝ වැඩි-කැමැත්තක්-නොදක්වන ආකාර වන {{tl|pre}} හෝ {{tl|prefix}}) මගින් සිදු කරයි. මෙහි {BASE_EXPL}", ["suffix"] = "{{tl|af|{LANG}|{BASE}|{TERM_AND_ID}{POS}}} or {{tl|affix|{LANG}|{BASE}|{TERM_AND_ID}{POS}}} (හෝ වැඩි-කැමැත්තක්-නොදක්වන ආකාර වන {{tl|suf}} හෝ {{tl|suffix}}) මගින් සිදු කරයි. මෙහි {BASE_EXPL}", ["circumfix"] = "{{tl|af|{LANG}|{BASE}|{TERM_AND_ID}{POS}}} or {{tl|affix|{LANG}|{BASE}|{TERM_AND_ID}{POS}}}, where {BASE_EXPL}", ["infix"] = "{{tl|infix|{LANG}|{BASE}|{TERM_AND_ID}{POS}}}, where {BASE_EXPL}", ["interfix"] = "{{tl|af|{LANG}|{BASE}|{TERM_AND_ID}{POS}|{BASE2}}} or {{tl|affix|{LANG}|{BASE}|{TERM_AND_ID}|{BASE2}{POS}}}, where {BASE_BASE2_EXPL}", } local args = require("Module:parameters").process(data.args, { ["alt"] = true, ["sc"] = true, ["sort"] = true, ["tr"] = true, ["ts"] = true, }) local sc = data.sc or args.sc and require("Module:scripts").getByCode(args.sc, "sc") or nil local m_affix = require("Module:affix") -- Call make_affix to add display hyphens if they're not already present. local _, display_term, lookup_term = m_affix.make_affix(term, data.lang, sc, affixtype, nil, true) local _, display_alt = m_affix.make_affix(args.alt, data.lang, sc, affixtype) local _, display_tr = m_affix.make_affix(args.tr, data.lang, require("Module:scripts").getByCode("Latn"), affixtype) local _, display_ts = m_affix.make_affix(args.ts, data.lang, require("Module:scripts").getByCode("Latn"), affixtype) local m_script_utilities = require("Module:script utilities") local id_text = id and " (" .. id .. ")" or "" -- Compute parents. local parents = {} if id then if pos == "words" then -- don't allow formerly-named categories with "words" return nil end if pos == "terms" then table.insert(parents, {name = (labelpref):format(term), sort = id, args = args}) else table.insert(parents, {name = "terms " .. affixtype .. "ed with " .. term_and_id, sort = id .. ", " .. pos, args = args}) table.insert(parents, {name = (labelpref):format(term), sort = id, args = args}) end elseif pos == "words" then -- don't allow formerly-named categories with "words" return nil elseif pos ~= "terms" then table.insert(parents, {name = "terms " .. affixtype .. "ed with " .. term, sort = pos, args = args}) end table.insert(parents, {name = "යෙදුම්, " .. m_sinhala.sinhala(affixtype .. "es") .. " අනුව", sort = (data.lang:makeSortKey((data.lang:makeEntryName(args.sort or term))))}) -- If other affixes are mapped to this one, show them. local additional if data.lang then local langcode = data.lang:getCode() if m_affix.langs_with_lang_specific_data[langcode] then local langdata = mw.loadData(m_affix.affix_lang_data_module_prefix .. langcode) local variants = {} if langdata.affix_mappings then for variant, canonical in pairs(langdata.affix_mappings) do -- Above, we converted the stripped link term as we received it to the lookup form, so we -- can look up the variants that are mapped to this term. Once we find them, map them to -- display form. local is_variant = false if type(canonical) == "table" then for _, canonical_v in pairs(canonical) do if canonical_v == lookup_term then is_variant = true break end end else is_variant = canonical == lookup_term end if is_variant then local _, display_variant = m_affix.make_affix(variant, data.lang, sc, affixtype) table.insert(variants, "{{m|" .. langcode .. "|" .. display_variant .. "}}") end end if #variants > 0 then table.sort(variants) additional = ("This category also includes terms %sed with %s."):format(affixtype, require("Module:table").serialCommaJoin(variants)) end end end end if data.lang then local what_categorizes_msg = what_categorizes[affixtype] if not what_categorizes_msg then error(("Internal error: No what_categorizes value for affixtype '%s' for label '%s', lang '%s'"): format(affixtype, data.label, data.lang:getCode())) end what_categorizes_msg = "මෙම ප්‍රවර්ගය තුළට යෙදුම් එක් කිරීම " .. (what_categorizes_msg :gsub("{LANG}", data.lang:getCode()) :gsub("{TERM_AND_ID}", require("Module:string utilities").replacement_escape( id and ("%s<id:%s>"):format(term, id) or term)) :gsub("{POS}", require("Module:string utilities").replacement_escape( pos == "terms" and "" or ("|pos=%s"):format(pos))) :gsub("{BASE}", "<var>base</var>") :gsub("{BASE2}", "<var>base2</var>") :gsub("{BASE_EXPL}", "<code><var>base</var></code> යනු යෙදුම ව්‍යුත්පන්න වී ඇති මූලික ලෙමාව වෙයි") :gsub("{BASE_BASE2_EXPL}", "<code><var>base</var></code> and <code><var>base2</var></code> are the " .. "යෙදුම ව්‍යුත්පන්න වී ඇති මූලික ලෙමා") ) .. "." if additional then additional = additional .. "\n\n" .. what_categorizes_msg else additional = what_categorizes_msg end end return { description = "{{{langname}}} " .. m_sinhala.sinhala(pos) .. " " .. (desc[affixtype]):format(require("Module:links").full_link({ lang = data.lang, term = display_term, alt = display_alt, sc = sc, id = id, tr = display_tr, ts = display_ts}, "term")) .. ".", additional = additional, breadcrumb = pos == "terms" and m_script_utilities.tag_text(display_alt or display_term, data.lang, sc, "term") .. id_text or pos, displaytitle = "{{{langname}}} " .. (labelpref):format(m_script_utilities.tag_text(term, data.lang, sc, "term")) .. id_text, parents = parents, umbrella = false, }, true -- true = args handled end end) return {LABELS = labels, RAW_CATEGORIES = raw_categories, HANDLERS = handlers} g61t0t2hpx9anq5gr5ovaoz0mcft249 192870 192869 2024-11-18T11:25:04Z Lee 19 "පද, නිරුක්තිය අනුව" සිට "යෙදුම්, නිරුක්තිය අනුව" වෙතට 192870 Scribunto text/plain local labels = {} local raw_categories = {} local handlers = {} local m_sinhala = require("Module:sinhala") ----------------------------------------------------------------------------- -- -- -- LABELS -- -- -- ----------------------------------------------------------------------------- labels["alliterative compounds"] = { description = "{{{langname}}} noun phrases composed of two or more stems that alliterate.", parents = {"සංයුක්ත පද", "alliterative phrases"}, } labels["antonymous compounds"] = { description = "{{{langname}}} compounds in which one part is an antonym of the other.", parents = {"dvandva compounds", sort = "antonym"}, } labels["bahuvrihi compounds"] = { description = "{{{langname}}} compounds in which the first part (A) modifies the second (B), and whose meaning follows a [[metonymic]] pattern: “<person> having a B that is A.”", parents = {"සංයුක්ත පද", "exocentric compounds"}, } -- Add "compound POS" categories for various parts of speech. local compound_poses = { "adjectives", "adverbs", "conjunctions", "determiners", "interjections", "නාම පද", "numerals", "particles", "postpositions", "උපසර්ග", "prepositions", "pronouns", "proper nouns", "suffixes", "verbs", } for _, pos in ipairs(compound_poses) do labels["සංයුක්ත " .. pos] = { description = "{{{langname}}} " .. pos .. " composed of two or more stems.", parents = {{name = "සංයුක්ත පද", sort = " "}, pos}, } end labels["compound determinatives"] = { description = "{{{langname}}} determinatives composed of two or more stems.", parents = {"සංයුක්ත පද", "determiners"}, } labels["සංයුක්ත පද"] = { description = "{{{langname}}} terms composed of two or more stems.", umbrella_parents = "භාෂාව අනුව පද, නිරුක්ති උප ප්‍රවර්ග අනුව", parents = {"යෙදුම්, නිරුක්තිය අනුව"}, } labels["dvandva compounds"] = { description = "{{{langname}}} terms composed of two or more stems whose stems could be connected by an 'and'.", parents = {"සංයුක්ත පද"}, } labels["dvigu compounds"] = { description = "{{{langname}}} [[tatpuruṣa]] compounds where the modifying member is a number", parents = {"tatpurusa compounds"}, } labels["endocentric compounds"] = { description = "{{{langname}}} terms composed of two or more stems, one of which is the [[w:head (linguistics)|head]] of that compound.", parents = {"සංයුක්ත පද"}, } labels["endocentric noun-noun compounds"] = { description = "{{{langname}}} terms composed of two or more stems, one of which is the [[w:head (linguistics)|head]] of that compound.", breadcrumb = "noun-noun", parents = {"endocentric compounds", "සංයුක්ත පද"}, } labels["endocentric verb-noun compounds"] = { description = "{{{langname}}} compounds in which the first element is a verbal stem, the second a nominal stem and the head of the compound.", breadcrumb = "verb-noun", parents = {"endocentric compounds", "verb-noun compounds"}, } labels["exocentric compounds"] = { description = "{{{langname}}} terms composed of two or more stems, none of which is the [[w:head (linguistics)|head]] of that compound.", parents = {"සංයුක්ත පද"}, } labels["exocentric verb-noun compounds"] = { description = "{{{langname}}} compounds in which the first element is a transitive verb, the second a noun functioning as its direct object, and whose referent is the person or thing doing the action.", breadcrumb = "verb-noun", parents = {"exocentric compounds", "verb-noun compounds"}, } labels["karmadharaya compounds"] = { description = "{{{langname}}} terms composed of two or more stems in which the main stem determines the case endings.", parents = {"tatpurusa compounds"}, } labels["itaretara dvandva compounds"] = { description = "{{{langname}}} terms composed of two or more stems whose stems could be connected by an 'and'.", breadcrumb = "itaretara", parents = {"dvandva compounds"}, } labels["rhyming compounds"] = { description = "{{{langname}}} noun phrases composed of two or more stems that rhyme.", parents = {"සංයුක්ත පද", "rhyming phrases"}, } labels["samahara dvandva compounds"] = { description = "{{{langname}}} terms composed of two or more stems whose stems could be connected by an 'and'.", breadcrumb = "samahara", parents = {"dvandva compounds"}, } labels["shitgibbons"] = { description = "{{{langname}}} terms that consist of a single-syllable [[expletive]] followed by a two-syllable [[trochee]] that serves as a [[nominalizer]] or [[intensifier]].", parents = {"endocentric compounds"}, } labels["synonymous compounds"] = { description = "{{{langname}}} compounds in which one part is a synonym of the other.", parents = {"dvandva compounds", sort = "synonym"}, } labels["tatpurusa compounds"] = { description = "{{{langname}}} terms composed of two or more stems", parents = {"සංයුක්ත පද"}, } labels["verb-noun compounds"] = { description = "{{{langname}}} compounds in which the first element is a transitive verb, the second a noun functioning as its direct object, and whose referent is the person or thing doing the action, or an adjective describing such a person or thing.", parents = {"verb-object compounds"}, } labels["verb-object compounds"] = { description = "{{{langname}}} compounds in which the first element is a transitive verb, the second a term (usually but not always a noun) functioning as its (normally direct) object, and whose referent is the person or thing doing the action, or an adjective describing such a person or thing.", additional = "Examples in English are {{m|en|pickpocket|lit=someone who picks pockets}} and {{m|en|catch-all|lit=something that catches everything}}.", parents = {"සංයුක්ත පද"}, } labels["verb-verb compounds"] = { description = "{{{langname}}} compounds composed of two or more verbs in apposition, often either synonyms or antonyms, and whose referent refers to the result of performing those actions.", parents = {"සංයුක්ත පද"}, } labels["vrddhi derivatives"] = { description = "{{{langname}}} terms derived from a Proto-Indo-European root by the process of [[w:vṛddhi|vṛddhi]] derivation.", parents = {"යෙදුම්, නිරුක්තිය අනුව"}, } labels["vrddhi gerundives"] = { description = "{{{langname}}} [[gerundive]]s derived from a Proto-Indo-European root by the process of [[w:vṛddhi|vṛddhi]] derivation.", parents = {"vrddhi derivatives"}, } labels["vyadhikarana compounds"] = { description = "{{{langname}}} terms composed of two or more stems in which the non-main stem determines the case endings.", parents = {"tatpurusa compounds"}, } for _, fixtype in ipairs({"circumfix", "infix", "interfix", "prefix", "suffix",}) do labels["යෙදුම්, " .. m_sinhala.sinhala(fixtype .. "es") .. " අනුව"] = { description = "{{{langname}}} යෙදුම්, ඒවායේ " .. m_sinhala.sinhala(fixtype .. "es") .. " වලට අනුව කාණ්ඩ වලට වෙන්කොට ඇති.", umbrella_parents = "භාෂාව අනුව පද, නිරුක්ති උප ප්‍රවර්ග අනුව", parents = {{name = "යෙදුම්, නිරුක්තිය අනුව", sort = fixtype}, m_sinhala.sinhala(fixtype .. "es")}, } end -- Add 'umbrella_parents' key if not already present. for key, data in pairs(labels) do -- NOTE: umbrella.parents overrides umbrella_parents if both are given. if not data.umbrella_parents then data.umbrella_parents = "Types of compound terms by language" end end ----------------------------------------------------------------------------- -- -- -- RAW CATEGORIES -- -- -- ----------------------------------------------------------------------------- raw_categories["Types of compound terms by language"] = { description = "Umbrella categories covering topics related to types of compound terms.", additional = "{{{umbrella_meta_msg}}}", parents = { "ඡත්‍ර මෙටා ප්‍රවර්ග", {name = "සංයුක්ත පද", is_label = true, sort = " "}, {name = "භාෂාව අනුව පද, නිරුක්ති උප ප්‍රවර්ග අනුව", sort = " "}, }, } ----------------------------------------------------------------------------- -- -- -- HANDLERS -- -- -- ----------------------------------------------------------------------------- ----------------------------------------------------------------------------- ------------------------------ Affix handlers ------------------------------- ----------------------------------------------------------------------------- table.insert(handlers, function(data) local labelpref, pos, zz_term_and, affixtype, zz_and_id = data.label:match("^((.*), (.+) (.*) සහිත)(.*)$") local term_and_id if zz_term_and ~= nil then term_and_id = zz_term_and if zz_and_id ~= nil then term_and_id = term_and_id .. zz_and_id end end if labelpref ~= nil then -- නව ආකාරය සඳහා අවශ්‍ය වෙනස labelpref = labelpref:gsub(zz_term_and, "%%s") end if pos == "යෙදුම්" then pos = "terms" end if affixtype == "ප්‍රත්‍ය" then affixtype = "suffix" end if affixtype then local term, id = term_and_id:match("^(.+) %(([^()]+)%)$") term = term or term_and_id -- Convert term/alt into affixes if needed local desc = { ["prefix"] = ", % උපසර්ගයෙන් ආරම්භ වන", ["suffix"] = ", %s ප්‍රත්‍යයෙන් අවසන් වන", ["circumfix"] = "bookended with the circumfix", ["infix"] = "spliced with the infix", ["interfix"] = "joined with the interfix", -- Transfixes not supported currently. -- ["transfix"] = "patterned with the transfix", } if not desc[affixtype] then return nil end -- Here, {LANG} is replaced with the actual language, {TERM_AND_ID} with the actual term (or with 'TERM<id:ID>' -- if there is an ID), {BASE} with '<var>base</var>', {BASE2} with '<var>base2</var>', {BASE_EXPL} with an -- explanation of what "base" means, {BASE_BASE2_EXPL} with an explanation of what "base" and "base2" mean, and -- {POS} with '|pos=POS' if there is a `pos` other than "terms", otherwise a blank string. local what_categorizes = { ["prefix"] = "{{tl|af|{LANG}|{TERM_AND_ID}|{BASE}{POS}}} or {{tl|affix|{LANG}|{TERM_AND_ID}|{BASE}{POS}}} (හෝ වැඩි-කැමැත්තක්-නොදක්වන ආකාර වන {{tl|pre}} හෝ {{tl|prefix}}) මගින් සිදු කරයි. මෙහි {BASE_EXPL}", ["suffix"] = "{{tl|af|{LANG}|{BASE}|{TERM_AND_ID}{POS}}} or {{tl|affix|{LANG}|{BASE}|{TERM_AND_ID}{POS}}} (හෝ වැඩි-කැමැත්තක්-නොදක්වන ආකාර වන {{tl|suf}} හෝ {{tl|suffix}}) මගින් සිදු කරයි. මෙහි {BASE_EXPL}", ["circumfix"] = "{{tl|af|{LANG}|{BASE}|{TERM_AND_ID}{POS}}} or {{tl|affix|{LANG}|{BASE}|{TERM_AND_ID}{POS}}}, where {BASE_EXPL}", ["infix"] = "{{tl|infix|{LANG}|{BASE}|{TERM_AND_ID}{POS}}}, where {BASE_EXPL}", ["interfix"] = "{{tl|af|{LANG}|{BASE}|{TERM_AND_ID}{POS}|{BASE2}}} or {{tl|affix|{LANG}|{BASE}|{TERM_AND_ID}|{BASE2}{POS}}}, where {BASE_BASE2_EXPL}", } local args = require("Module:parameters").process(data.args, { ["alt"] = true, ["sc"] = true, ["sort"] = true, ["tr"] = true, ["ts"] = true, }) local sc = data.sc or args.sc and require("Module:scripts").getByCode(args.sc, "sc") or nil local m_affix = require("Module:affix") -- Call make_affix to add display hyphens if they're not already present. local _, display_term, lookup_term = m_affix.make_affix(term, data.lang, sc, affixtype, nil, true) local _, display_alt = m_affix.make_affix(args.alt, data.lang, sc, affixtype) local _, display_tr = m_affix.make_affix(args.tr, data.lang, require("Module:scripts").getByCode("Latn"), affixtype) local _, display_ts = m_affix.make_affix(args.ts, data.lang, require("Module:scripts").getByCode("Latn"), affixtype) local m_script_utilities = require("Module:script utilities") local id_text = id and " (" .. id .. ")" or "" -- Compute parents. local parents = {} if id then if pos == "words" then -- don't allow formerly-named categories with "words" return nil end if pos == "terms" then table.insert(parents, {name = (labelpref):format(term), sort = id, args = args}) else table.insert(parents, {name = "terms " .. affixtype .. "ed with " .. term_and_id, sort = id .. ", " .. pos, args = args}) table.insert(parents, {name = (labelpref):format(term), sort = id, args = args}) end elseif pos == "words" then -- don't allow formerly-named categories with "words" return nil elseif pos ~= "terms" then table.insert(parents, {name = "terms " .. affixtype .. "ed with " .. term, sort = pos, args = args}) end table.insert(parents, {name = "යෙදුම්, " .. m_sinhala.sinhala(affixtype .. "es") .. " අනුව", sort = (data.lang:makeSortKey((data.lang:makeEntryName(args.sort or term))))}) -- If other affixes are mapped to this one, show them. local additional if data.lang then local langcode = data.lang:getCode() if m_affix.langs_with_lang_specific_data[langcode] then local langdata = mw.loadData(m_affix.affix_lang_data_module_prefix .. langcode) local variants = {} if langdata.affix_mappings then for variant, canonical in pairs(langdata.affix_mappings) do -- Above, we converted the stripped link term as we received it to the lookup form, so we -- can look up the variants that are mapped to this term. Once we find them, map them to -- display form. local is_variant = false if type(canonical) == "table" then for _, canonical_v in pairs(canonical) do if canonical_v == lookup_term then is_variant = true break end end else is_variant = canonical == lookup_term end if is_variant then local _, display_variant = m_affix.make_affix(variant, data.lang, sc, affixtype) table.insert(variants, "{{m|" .. langcode .. "|" .. display_variant .. "}}") end end if #variants > 0 then table.sort(variants) additional = ("This category also includes terms %sed with %s."):format(affixtype, require("Module:table").serialCommaJoin(variants)) end end end end if data.lang then local what_categorizes_msg = what_categorizes[affixtype] if not what_categorizes_msg then error(("Internal error: No what_categorizes value for affixtype '%s' for label '%s', lang '%s'"): format(affixtype, data.label, data.lang:getCode())) end what_categorizes_msg = "මෙම ප්‍රවර්ගය තුළට යෙදුම් එක් කිරීම " .. (what_categorizes_msg :gsub("{LANG}", data.lang:getCode()) :gsub("{TERM_AND_ID}", require("Module:string utilities").replacement_escape( id and ("%s<id:%s>"):format(term, id) or term)) :gsub("{POS}", require("Module:string utilities").replacement_escape( pos == "terms" and "" or ("|pos=%s"):format(pos))) :gsub("{BASE}", "<var>base</var>") :gsub("{BASE2}", "<var>base2</var>") :gsub("{BASE_EXPL}", "<code><var>base</var></code> යනු යෙදුම ව්‍යුත්පන්න වී ඇති මූලික ලෙමාව වෙයි") :gsub("{BASE_BASE2_EXPL}", "<code><var>base</var></code> and <code><var>base2</var></code> are the " .. "යෙදුම ව්‍යුත්පන්න වී ඇති මූලික ලෙමා") ) .. "." if additional then additional = additional .. "\n\n" .. what_categorizes_msg else additional = what_categorizes_msg end end return { description = "{{{langname}}} " .. m_sinhala.sinhala(pos) .. " " .. (desc[affixtype]):format(require("Module:links").full_link({ lang = data.lang, term = display_term, alt = display_alt, sc = sc, id = id, tr = display_tr, ts = display_ts}, "term")) .. ".", additional = additional, breadcrumb = pos == "terms" and m_script_utilities.tag_text(display_alt or display_term, data.lang, sc, "term") .. id_text or pos, displaytitle = "{{{langname}}} " .. (labelpref):format(m_script_utilities.tag_text(term, data.lang, sc, "term")) .. id_text, parents = parents, umbrella = false, }, true -- true = args handled end end) return {LABELS = labels, RAW_CATEGORIES = raw_categories, HANDLERS = handlers} 6fl86tn65ns43zegkpkymlgdbg7iiav Module:audio 828 114356 192863 187227 2024-11-12T09:16:47Z en>This, that and the other 0 192863 Scribunto text/plain local export = {} local headword_data_module = "Module:headword/data" local IPA_module = "Module:IPA" local labels_module = "Module:labels" local links_module = "Module:links" local parameters_module = "Module:parameters" local qualifier_module = "Module:qualifier" local references_module = "Module:references" local string_utilities_module = "Module:string utilities" local table_module = "Module:table" local template_styles_module = "Module:TemplateStyles" local utilities_module = "Module:utilities" local audio_styles_css = "audio/styles.css" local function track(page) require("Module:debug/track")("audio/" .. page) return true end local function wrap_qualifier_css(text, suffix) return require(qualifier_module).wrap_qualifier_css(text, suffix) end --[==[ Display a box that can be used to play an audio file. `data` is a table containing the following fields: * `lang` ('''required'''): language object for the audio files; * `file` ('''required'''): file containing the audio; * `caption`: Caption to display before the audio box; normally {"Audio"}, and does not usually need to be changed; * `nocaption`: If specified, don't display the caption; * `q`: {nil} or a list of left regular qualifier strings, formatted using {format_qualifier()} in [[Module:qualifier]] and displayed before the audio box and after the caption (and any accent qualifiers); * `qq`: {nil} or a list of right regular qualifier strings, displayed directly after the audio box (and after any accent qualifiers); * `a`: {nil} or a list of left accent qualifier strings, formatted using {format_qualifiers()} in [[Module:accent qualifier]] and displayed before the audio box and after the caption; * `aa`: {nil} or a list of right accent qualifier strings, displayed directly after the homophone in question; * `refs`: {nil} or a list of references or reference specs to add directly after the audio box; the value of a list item is either a string containing the reference text (typically a call to a citation template such as {{tl|cite-book}}, or a template wrapping such a call), or an object with fields `text` (the reference text), `name` (the name of the reference, as in {{cd|<nowiki><ref name="foo">...</ref></nowiki>}} or {{cd|<nowiki><ref name="foo" /></nowiki>}}) and/or `group` (the group of the reference, as in {{cd|<nowiki><ref name="foo" group="bar">...</ref></nowiki>}} or {{cd|<nowiki><ref name="foo" group="bar"/></nowiki>}}); this uses a parser function to format the reference appropriately and insert a footnote number that hyperlinks to the actual reference, located in the {{cd|<nowiki><references /></nowiki>}} section; * `text`: Text of the audio snippet; if specified, should be an object of the form passed to {full_link()} in [[Module:links]], including a `lang` field containing the language of the text (usually the same as `data.lang`); displayed before the audio box, after any regular and accent qualifiers; * `IPA`: IPA of the audio snippet, or a list of IPA specs; if specified, should be surrounded by slashes or brackets, and will be processed using {format_IPA_multiple()} in [[Module:IPA]] and displayed before the audio box, after any regular and accent qualifiers and after the text of the audio snippet, if given; * `nocat`: If true, suppress categorization; * `sort`: Sort key for categorization. ]==] function export.format_audio(data) local cats = { data.lang:getFullName() .. " terms with audio pronunciation" } local function format_a(a) if a and a[1] then return require(labels_module).show_labels { lang = data.lang, labels = a, mode = "accent", nocat = true, open = false, close = false, no_track_already_seen = true, } end return nil end local function format_q(q) if q and q[1] then return require(qualifier_module).format_qualifier(q, false, false) end return nil end local function make_td_if(text) if text == "" then return text end return "<td>" .. text .. "</td>" end -- Generate the full text preceding the audio box. local pretext_parts = {} local function ins(text) table.insert(pretext_parts, text) end local formatted_accent_labels, formatted_qualifiers, formatted_text, formatted_ipa formatted_accent_labels = format_a(data.a) formatted_qualifiers = format_q(data.q) if data.text then formatted_text = require(links_module).full_link(data.text, "term", true) end if data.IPA then local ipa_cats local ipa = data.IPA if type(ipa) == "string" then ipa = {ipa} end local ipa_items = {} for _, ipa_item in ipairs(ipa) do table.insert(ipa_items, {pron = ipa_item}) end formatted_ipa, ipa_cats = require(IPA_module).format_IPA_multiple(data.lang, ipa_items, nil, "no count", "raw") if ipa_cats[1] then require(table_module).extendList(cats, ipa_cats) end end local has_qual = formatted_accent_labels or formatted_qualifiers if not data.nocaption then -- Track uses of caption (3=). Over time as we eliminate most of them, we can use this to find and -- eliminate the remainder. if data.caption then track("caption") end ins(data.caption or "Audio") if has_qual then ins(" " .. wrap_qualifier_css("(", "brac")) end end if formatted_accent_labels then ins(formatted_accent_labels) if formatted_qualifiers then ins(wrap_qualifier_css(",", "comma") .. " ") end end if formatted_qualifiers then ins(formatted_qualifiers) end if has_qual then if not data.nocaption then ins(wrap_qualifier_css(")", "brac")) end end if (formatted_text or formatted_ipa) and (has_qual or not data.nocaption) then ins(wrap_qualifier_css(";", "semicolon") .. " ") end if formatted_text then ins(formatted_text) if formatted_ipa then ins(" ") end end ins(formatted_ipa) if not data.nocaption then ins(wrap_qualifier_css(":", "colon")) end local pretext = make_td_if(table.concat(pretext_parts)) -- Generate the full text following the audio box. local posttext_parts = {} local function ins(text) table.insert(posttext_parts, text) end local formatted_post_accent_labels = format_a(data.aa) local formatted_post_qualifiers = format_q(data.qq) local formatted_references = data.refs and require(references_module).format_references(data.refs) or nil if formatted_references then ins(formatted_references) end if formatted_post_accent_labels or formatted_post_qualifiers then if formatted_references then ins(" ") end ins(wrap_qualifier_css("(", "brac")) if formatted_post_accent_labels then ins(formatted_post_accent_labels) if formatted_post_qualifiers then ins(wrap_qualifier_css(",", "comma") .. " ") end end if formatted_post_qualifiers then ins(formatted_post_qualifiers) end ins(wrap_qualifier_css(")", "brac")) end if data.bad then track("bad-audio") track("bad-audio/" .. data.lang:getCode()) ins(" " .. require(qualifier_module).wrap_css("Note: this pronuncation may be nonstandard or incorrect: " .. data.bad, "bad-audio-note")) end local posttext = make_td_if(table.concat(posttext_parts)) local template = [=[ <tr>%s<td class="audiofile">[[File:%s|noicon|175px]]</td><td class="audiometa" style="font-size: 80%%;">([[:File:%s|file]])</td>%s</tr>]=] local text = template:format(pretext, data.file, data.file, posttext) text = '<table class="audiotable" style="vertical-align: middle; display: inline-block; list-style: none; line-height: 1em; border-collapse: collapse; margin: 0;">' .. text .. "</table>" local stylesheet = require(template_styles_module)(audio_styles_css) local categories = data.nocat and "" or cats[1] and require(utilities_module).format_categories(cats, data.lang, data.sort) or "" return stylesheet .. text .. categories end --[==[ FIXME: Old entry point for formatting multiple audios in a single table. Not used anywhere and needs rewriting to the standard of format_audio(). Meant to be called from a module. `data` is a table containing the following fields: <pre> { lang = LANGUAGE_OBJECT, audios = {{file = "FILENAME", qualifiers = nil or {"QUALIFIER", "QUALIFIER", ...}}, ...}, caption = nil or "CAPTION" } </pre> Here: * `lang` is a language object. * `audios` is the list of audio files to display. FILENAME is the name of the audio file without a namespace. QUALIFIER is a qualifier string to display after the specific audio file in question, formatted using {format_qualifier()} in [[Module:qualifier]]. * `caption`, if specified, adds a caption before the audio file. ]==] function export.format_multiple_audios(data) local audiocats = { data.lang:getFullName() .. " terms with audio pronunciation" } local rows = { } local caption = data.caption for _, audio in ipairs(data.audios) do local qualifiers = audio.qualifiers local function repl(key) if key == "file" then return audio.file elseif key == "caption" then if not caption then return "" end return "<td rowspan=" .. #data.audios .. ">" .. caption .. ":</td>" elseif key == "qualifiers" then if not qualifiers or not qualifiers[1] then return "" end return "<td>" .. require(qualifier_module).format_qualifier(qualifiers) .. "</td>" end end local template = [=[ <tr>{{{caption}}} <td class="audiofile">[[File:{{{file}}}|noicon|175px]]</td> <td class="audiometa" style="font-size: 80%;">([[:File:{{{file}}}|file]])</td> {{{qualifiers}}}</tr>]=] local text = (mw.ustring.gsub(template, "{{{([a-z0-9_:]+)}}}", repl)) table.insert(rows, text) caption = nil end local function repl(key) if key == "rows" then return table.concat(rows, "\n") end end local template = [=[ <table class="audiotable" style="vertical-align: middle; display: inline-block; list-style: none; line-height: 1em; border-collapse: collapse;"> {{{rows}}} </table> ]=] local stylesheet = require(template_styles_module)(audio_styles_css) local text = mw.ustring.gsub(template, "{{{([a-z0-9_:]+)}}}", repl) local categories = data.nocat and "" or #audiocats > 0 and require(utilities_module).format_categories(audiocats, data.lang, data.sort) or "" -- remove newlines due to HTML generator bug in MediaWiki(?) - newlines in tables cause list items to not end correctly text = mw.ustring.gsub(text, "\n", "") return stylesheet .. text .. categories end --[==[ Construct the `text` object passed into {format_audio()}, from raw-ish arguments (essentially, the output of {process()} in [[Module:parameters]]). On entry, `args` contains the following fields: * `lang` ('''required'''): Language object. * `text`: Text. If this isn't defined and neither are any of `gloss`, `tr`, `ts`, `pos`, `lit` or `genders`, the function returns {nil}. * `gloss`: Gloss of text. * `tr`: Manual transliteration of text. * `ts`: Transcription of text. * `pos`: Part of speech of text. * `lit`: Literal meaning of text. * `genders`: List of gender/number spec(s) of text. * `sc`: Optional script object of text (rarely needs to be set). * `pagename`: Pagename; used in place of `text` when `text` is unset but other text-related parameters are set. If not specified, taken from the actual pagename. ]==] function export.construct_audio_textobj(args) local textobj if args.text or args.gloss or args.tr or args.ts or args.pos or args.lit or args.genders and args.genders[1] then local text = args.text or args.pagename or mw.loadData("Module:headword/data").pagename textobj = { lang = args.lang, alt = wrap_qualifier_css("“", "quote") .. text .. wrap_qualifier_css("”", "quote"), gloss = args.gloss, tr = args.tr, ts = args.ts, pos = args.pos, lit = args.lit, genders = args.genders, sc = args.sc, } end return textobj end --[==[ Entry point for {{tl|audio}} template. ]==] function export.show(frame) local parent_args = frame:getParent().args local compat = parent_args.lang local offset = compat and 0 or 1 local params = { [compat and "lang" or 1] = {required = true, type = "language", default = "en"}, [1 + offset] = {required = true, default = "Example.ogg"}, [2 + offset] = {}, ["q"] = {type = "qualifier"}, ["qq"] = {type = "qualifier"}, ["a"] = {type = "labels"}, ["aa"] = {type = "labels"}, ["ref"] = {type = "references"}, ["IPA"] = {sublist = true}, ["text"] = {}, ["t"] = {}, ["gloss"] = {alias_of = "t"}, ["tr"] = {}, ["ts"] = {}, ["pos"] = {}, ["lit"] = {}, ["g"] = {sublist = true}, ["sc"] = {type = "script"}, ["bad"] = {}, ["nocat"] = {type = "boolean"}, ["sort"] = {}, ["pagename"] = {}, } local args = require(parameters_module).process(parent_args, params) local lang = args[compat and "lang" or 1] -- Needed in construct_audio_textobj(). args.lang = lang local textobj = export.construct_audio_textobj(args) local caption = args[2 + offset] local nocaption if caption == "-" then caption = nil nocaption = true end if caption then -- Remove final colon if given, to avoid two colons. caption = caption:gsub(":$", "") end local data = { lang = lang, file = args[1 + offset], caption = caption, nocaption = nocaption, q = args.q, qq = args.qq, a = args.a, aa = args.aa, refs = args.ref, text = textobj, IPA = args.IPA, bad = args.bad, nocat = args.nocat, sort = args.sort, } return export.format_audio(data) end return export t0laoc306ly13w6rhxheneifni1ni4o 192864 192863 2024-11-18T10:40:41Z Lee 19 [[:en:Module:audio]] වෙතින් එක් සංශෝධනයක් 192863 Scribunto text/plain local export = {} local headword_data_module = "Module:headword/data" local IPA_module = "Module:IPA" local labels_module = "Module:labels" local links_module = "Module:links" local parameters_module = "Module:parameters" local qualifier_module = "Module:qualifier" local references_module = "Module:references" local string_utilities_module = "Module:string utilities" local table_module = "Module:table" local template_styles_module = "Module:TemplateStyles" local utilities_module = "Module:utilities" local audio_styles_css = "audio/styles.css" local function track(page) require("Module:debug/track")("audio/" .. page) return true end local function wrap_qualifier_css(text, suffix) return require(qualifier_module).wrap_qualifier_css(text, suffix) end --[==[ Display a box that can be used to play an audio file. `data` is a table containing the following fields: * `lang` ('''required'''): language object for the audio files; * `file` ('''required'''): file containing the audio; * `caption`: Caption to display before the audio box; normally {"Audio"}, and does not usually need to be changed; * `nocaption`: If specified, don't display the caption; * `q`: {nil} or a list of left regular qualifier strings, formatted using {format_qualifier()} in [[Module:qualifier]] and displayed before the audio box and after the caption (and any accent qualifiers); * `qq`: {nil} or a list of right regular qualifier strings, displayed directly after the audio box (and after any accent qualifiers); * `a`: {nil} or a list of left accent qualifier strings, formatted using {format_qualifiers()} in [[Module:accent qualifier]] and displayed before the audio box and after the caption; * `aa`: {nil} or a list of right accent qualifier strings, displayed directly after the homophone in question; * `refs`: {nil} or a list of references or reference specs to add directly after the audio box; the value of a list item is either a string containing the reference text (typically a call to a citation template such as {{tl|cite-book}}, or a template wrapping such a call), or an object with fields `text` (the reference text), `name` (the name of the reference, as in {{cd|<nowiki><ref name="foo">...</ref></nowiki>}} or {{cd|<nowiki><ref name="foo" /></nowiki>}}) and/or `group` (the group of the reference, as in {{cd|<nowiki><ref name="foo" group="bar">...</ref></nowiki>}} or {{cd|<nowiki><ref name="foo" group="bar"/></nowiki>}}); this uses a parser function to format the reference appropriately and insert a footnote number that hyperlinks to the actual reference, located in the {{cd|<nowiki><references /></nowiki>}} section; * `text`: Text of the audio snippet; if specified, should be an object of the form passed to {full_link()} in [[Module:links]], including a `lang` field containing the language of the text (usually the same as `data.lang`); displayed before the audio box, after any regular and accent qualifiers; * `IPA`: IPA of the audio snippet, or a list of IPA specs; if specified, should be surrounded by slashes or brackets, and will be processed using {format_IPA_multiple()} in [[Module:IPA]] and displayed before the audio box, after any regular and accent qualifiers and after the text of the audio snippet, if given; * `nocat`: If true, suppress categorization; * `sort`: Sort key for categorization. ]==] function export.format_audio(data) local cats = { data.lang:getFullName() .. " terms with audio pronunciation" } local function format_a(a) if a and a[1] then return require(labels_module).show_labels { lang = data.lang, labels = a, mode = "accent", nocat = true, open = false, close = false, no_track_already_seen = true, } end return nil end local function format_q(q) if q and q[1] then return require(qualifier_module).format_qualifier(q, false, false) end return nil end local function make_td_if(text) if text == "" then return text end return "<td>" .. text .. "</td>" end -- Generate the full text preceding the audio box. local pretext_parts = {} local function ins(text) table.insert(pretext_parts, text) end local formatted_accent_labels, formatted_qualifiers, formatted_text, formatted_ipa formatted_accent_labels = format_a(data.a) formatted_qualifiers = format_q(data.q) if data.text then formatted_text = require(links_module).full_link(data.text, "term", true) end if data.IPA then local ipa_cats local ipa = data.IPA if type(ipa) == "string" then ipa = {ipa} end local ipa_items = {} for _, ipa_item in ipairs(ipa) do table.insert(ipa_items, {pron = ipa_item}) end formatted_ipa, ipa_cats = require(IPA_module).format_IPA_multiple(data.lang, ipa_items, nil, "no count", "raw") if ipa_cats[1] then require(table_module).extendList(cats, ipa_cats) end end local has_qual = formatted_accent_labels or formatted_qualifiers if not data.nocaption then -- Track uses of caption (3=). Over time as we eliminate most of them, we can use this to find and -- eliminate the remainder. if data.caption then track("caption") end ins(data.caption or "Audio") if has_qual then ins(" " .. wrap_qualifier_css("(", "brac")) end end if formatted_accent_labels then ins(formatted_accent_labels) if formatted_qualifiers then ins(wrap_qualifier_css(",", "comma") .. " ") end end if formatted_qualifiers then ins(formatted_qualifiers) end if has_qual then if not data.nocaption then ins(wrap_qualifier_css(")", "brac")) end end if (formatted_text or formatted_ipa) and (has_qual or not data.nocaption) then ins(wrap_qualifier_css(";", "semicolon") .. " ") end if formatted_text then ins(formatted_text) if formatted_ipa then ins(" ") end end ins(formatted_ipa) if not data.nocaption then ins(wrap_qualifier_css(":", "colon")) end local pretext = make_td_if(table.concat(pretext_parts)) -- Generate the full text following the audio box. local posttext_parts = {} local function ins(text) table.insert(posttext_parts, text) end local formatted_post_accent_labels = format_a(data.aa) local formatted_post_qualifiers = format_q(data.qq) local formatted_references = data.refs and require(references_module).format_references(data.refs) or nil if formatted_references then ins(formatted_references) end if formatted_post_accent_labels or formatted_post_qualifiers then if formatted_references then ins(" ") end ins(wrap_qualifier_css("(", "brac")) if formatted_post_accent_labels then ins(formatted_post_accent_labels) if formatted_post_qualifiers then ins(wrap_qualifier_css(",", "comma") .. " ") end end if formatted_post_qualifiers then ins(formatted_post_qualifiers) end ins(wrap_qualifier_css(")", "brac")) end if data.bad then track("bad-audio") track("bad-audio/" .. data.lang:getCode()) ins(" " .. require(qualifier_module).wrap_css("Note: this pronuncation may be nonstandard or incorrect: " .. data.bad, "bad-audio-note")) end local posttext = make_td_if(table.concat(posttext_parts)) local template = [=[ <tr>%s<td class="audiofile">[[File:%s|noicon|175px]]</td><td class="audiometa" style="font-size: 80%%;">([[:File:%s|file]])</td>%s</tr>]=] local text = template:format(pretext, data.file, data.file, posttext) text = '<table class="audiotable" style="vertical-align: middle; display: inline-block; list-style: none; line-height: 1em; border-collapse: collapse; margin: 0;">' .. text .. "</table>" local stylesheet = require(template_styles_module)(audio_styles_css) local categories = data.nocat and "" or cats[1] and require(utilities_module).format_categories(cats, data.lang, data.sort) or "" return stylesheet .. text .. categories end --[==[ FIXME: Old entry point for formatting multiple audios in a single table. Not used anywhere and needs rewriting to the standard of format_audio(). Meant to be called from a module. `data` is a table containing the following fields: <pre> { lang = LANGUAGE_OBJECT, audios = {{file = "FILENAME", qualifiers = nil or {"QUALIFIER", "QUALIFIER", ...}}, ...}, caption = nil or "CAPTION" } </pre> Here: * `lang` is a language object. * `audios` is the list of audio files to display. FILENAME is the name of the audio file without a namespace. QUALIFIER is a qualifier string to display after the specific audio file in question, formatted using {format_qualifier()} in [[Module:qualifier]]. * `caption`, if specified, adds a caption before the audio file. ]==] function export.format_multiple_audios(data) local audiocats = { data.lang:getFullName() .. " terms with audio pronunciation" } local rows = { } local caption = data.caption for _, audio in ipairs(data.audios) do local qualifiers = audio.qualifiers local function repl(key) if key == "file" then return audio.file elseif key == "caption" then if not caption then return "" end return "<td rowspan=" .. #data.audios .. ">" .. caption .. ":</td>" elseif key == "qualifiers" then if not qualifiers or not qualifiers[1] then return "" end return "<td>" .. require(qualifier_module).format_qualifier(qualifiers) .. "</td>" end end local template = [=[ <tr>{{{caption}}} <td class="audiofile">[[File:{{{file}}}|noicon|175px]]</td> <td class="audiometa" style="font-size: 80%;">([[:File:{{{file}}}|file]])</td> {{{qualifiers}}}</tr>]=] local text = (mw.ustring.gsub(template, "{{{([a-z0-9_:]+)}}}", repl)) table.insert(rows, text) caption = nil end local function repl(key) if key == "rows" then return table.concat(rows, "\n") end end local template = [=[ <table class="audiotable" style="vertical-align: middle; display: inline-block; list-style: none; line-height: 1em; border-collapse: collapse;"> {{{rows}}} </table> ]=] local stylesheet = require(template_styles_module)(audio_styles_css) local text = mw.ustring.gsub(template, "{{{([a-z0-9_:]+)}}}", repl) local categories = data.nocat and "" or #audiocats > 0 and require(utilities_module).format_categories(audiocats, data.lang, data.sort) or "" -- remove newlines due to HTML generator bug in MediaWiki(?) - newlines in tables cause list items to not end correctly text = mw.ustring.gsub(text, "\n", "") return stylesheet .. text .. categories end --[==[ Construct the `text` object passed into {format_audio()}, from raw-ish arguments (essentially, the output of {process()} in [[Module:parameters]]). On entry, `args` contains the following fields: * `lang` ('''required'''): Language object. * `text`: Text. If this isn't defined and neither are any of `gloss`, `tr`, `ts`, `pos`, `lit` or `genders`, the function returns {nil}. * `gloss`: Gloss of text. * `tr`: Manual transliteration of text. * `ts`: Transcription of text. * `pos`: Part of speech of text. * `lit`: Literal meaning of text. * `genders`: List of gender/number spec(s) of text. * `sc`: Optional script object of text (rarely needs to be set). * `pagename`: Pagename; used in place of `text` when `text` is unset but other text-related parameters are set. If not specified, taken from the actual pagename. ]==] function export.construct_audio_textobj(args) local textobj if args.text or args.gloss or args.tr or args.ts or args.pos or args.lit or args.genders and args.genders[1] then local text = args.text or args.pagename or mw.loadData("Module:headword/data").pagename textobj = { lang = args.lang, alt = wrap_qualifier_css("“", "quote") .. text .. wrap_qualifier_css("”", "quote"), gloss = args.gloss, tr = args.tr, ts = args.ts, pos = args.pos, lit = args.lit, genders = args.genders, sc = args.sc, } end return textobj end --[==[ Entry point for {{tl|audio}} template. ]==] function export.show(frame) local parent_args = frame:getParent().args local compat = parent_args.lang local offset = compat and 0 or 1 local params = { [compat and "lang" or 1] = {required = true, type = "language", default = "en"}, [1 + offset] = {required = true, default = "Example.ogg"}, [2 + offset] = {}, ["q"] = {type = "qualifier"}, ["qq"] = {type = "qualifier"}, ["a"] = {type = "labels"}, ["aa"] = {type = "labels"}, ["ref"] = {type = "references"}, ["IPA"] = {sublist = true}, ["text"] = {}, ["t"] = {}, ["gloss"] = {alias_of = "t"}, ["tr"] = {}, ["ts"] = {}, ["pos"] = {}, ["lit"] = {}, ["g"] = {sublist = true}, ["sc"] = {type = "script"}, ["bad"] = {}, ["nocat"] = {type = "boolean"}, ["sort"] = {}, ["pagename"] = {}, } local args = require(parameters_module).process(parent_args, params) local lang = args[compat and "lang" or 1] -- Needed in construct_audio_textobj(). args.lang = lang local textobj = export.construct_audio_textobj(args) local caption = args[2 + offset] local nocaption if caption == "-" then caption = nil nocaption = true end if caption then -- Remove final colon if given, to avoid two colons. caption = caption:gsub(":$", "") end local data = { lang = lang, file = args[1 + offset], caption = caption, nocaption = nocaption, q = args.q, qq = args.qq, a = args.a, aa = args.aa, refs = args.ref, text = textobj, IPA = args.IPA, bad = args.bad, nocat = args.nocat, sort = args.sort, } return export.format_audio(data) end return export t0laoc306ly13w6rhxheneifni1ni4o 192865 192864 2024-11-18T10:41:43Z Lee 19 පැරණි සංස්කරණයකින් ගත් කොටස්... 192865 Scribunto text/plain local export = {} local headword_data_module = "Module:headword/data" local IPA_module = "Module:IPA" local labels_module = "Module:labels" local links_module = "Module:links" local parameters_module = "Module:parameters" local qualifier_module = "Module:qualifier" local references_module = "Module:references" local string_utilities_module = "Module:string utilities" local table_module = "Module:table" local template_styles_module = "Module:TemplateStyles" local utilities_module = "Module:utilities" local audio_styles_css = "audio/styles.css" local function track(page) require("Module:debug/track")("audio/" .. page) return true end local function wrap_qualifier_css(text, suffix) return require(qualifier_module).wrap_qualifier_css(text, suffix) end --[==[ Display a box that can be used to play an audio file. `data` is a table containing the following fields: * `lang` ('''required'''): language object for the audio files; * `file` ('''required'''): file containing the audio; * `caption`: Caption to display before the audio box; normally {"Audio"}, and does not usually need to be changed; * `nocaption`: If specified, don't display the caption; * `q`: {nil} or a list of left regular qualifier strings, formatted using {format_qualifier()} in [[Module:qualifier]] and displayed before the audio box and after the caption (and any accent qualifiers); * `qq`: {nil} or a list of right regular qualifier strings, displayed directly after the audio box (and after any accent qualifiers); * `a`: {nil} or a list of left accent qualifier strings, formatted using {format_qualifiers()} in [[Module:accent qualifier]] and displayed before the audio box and after the caption; * `aa`: {nil} or a list of right accent qualifier strings, displayed directly after the homophone in question; * `refs`: {nil} or a list of references or reference specs to add directly after the audio box; the value of a list item is either a string containing the reference text (typically a call to a citation template such as {{tl|cite-book}}, or a template wrapping such a call), or an object with fields `text` (the reference text), `name` (the name of the reference, as in {{cd|<nowiki><ref name="foo">...</ref></nowiki>}} or {{cd|<nowiki><ref name="foo" /></nowiki>}}) and/or `group` (the group of the reference, as in {{cd|<nowiki><ref name="foo" group="bar">...</ref></nowiki>}} or {{cd|<nowiki><ref name="foo" group="bar"/></nowiki>}}); this uses a parser function to format the reference appropriately and insert a footnote number that hyperlinks to the actual reference, located in the {{cd|<nowiki><references /></nowiki>}} section; * `text`: Text of the audio snippet; if specified, should be an object of the form passed to {full_link()} in [[Module:links]], including a `lang` field containing the language of the text (usually the same as `data.lang`); displayed before the audio box, after any regular and accent qualifiers; * `IPA`: IPA of the audio snippet, or a list of IPA specs; if specified, should be surrounded by slashes or brackets, and will be processed using {format_IPA_multiple()} in [[Module:IPA]] and displayed before the audio box, after any regular and accent qualifiers and after the text of the audio snippet, if given; * `nocat`: If true, suppress categorization; * `sort`: Sort key for categorization. ]==] function export.format_audio(data) local cats = { data.lang:getFullName() .. " යෙදුම්, ඕඩියෝ උච්චාරණ සහිත" } local function format_a(a) if a and a[1] then return require(labels_module).show_labels { lang = data.lang, labels = a, mode = "accent", nocat = true, open = false, close = false, no_track_already_seen = true, } end return nil end local function format_q(q) if q and q[1] then return require(qualifier_module).format_qualifier(q, false, false) end return nil end local function make_td_if(text) if text == "" then return text end return "<td>" .. text .. "</td>" end -- Generate the full text preceding the audio box. local pretext_parts = {} local function ins(text) table.insert(pretext_parts, text) end local formatted_accent_labels, formatted_qualifiers, formatted_text, formatted_ipa formatted_accent_labels = format_a(data.a) formatted_qualifiers = format_q(data.q) if data.text then formatted_text = require(links_module).full_link(data.text, "term", true) end if data.IPA then local ipa_cats local ipa = data.IPA if type(ipa) == "string" then ipa = {ipa} end local ipa_items = {} for _, ipa_item in ipairs(ipa) do table.insert(ipa_items, {pron = ipa_item}) end formatted_ipa, ipa_cats = require(IPA_module).format_IPA_multiple(data.lang, ipa_items, nil, "no count", "raw") if ipa_cats[1] then require(table_module).extendList(cats, ipa_cats) end end local has_qual = formatted_accent_labels or formatted_qualifiers if not data.nocaption then -- Track uses of caption (3=). Over time as we eliminate most of them, we can use this to find and -- eliminate the remainder. if data.caption then track("caption") end ins(data.caption or "Audio") if has_qual then ins(" " .. wrap_qualifier_css("(", "brac")) end end if formatted_accent_labels then ins(formatted_accent_labels) if formatted_qualifiers then ins(wrap_qualifier_css(",", "comma") .. " ") end end if formatted_qualifiers then ins(formatted_qualifiers) end if has_qual then if not data.nocaption then ins(wrap_qualifier_css(")", "brac")) end end if (formatted_text or formatted_ipa) and (has_qual or not data.nocaption) then ins(wrap_qualifier_css(";", "semicolon") .. " ") end if formatted_text then ins(formatted_text) if formatted_ipa then ins(" ") end end ins(formatted_ipa) if not data.nocaption then ins(wrap_qualifier_css(":", "colon")) end local pretext = make_td_if(table.concat(pretext_parts)) -- Generate the full text following the audio box. local posttext_parts = {} local function ins(text) table.insert(posttext_parts, text) end local formatted_post_accent_labels = format_a(data.aa) local formatted_post_qualifiers = format_q(data.qq) local formatted_references = data.refs and require(references_module).format_references(data.refs) or nil if formatted_references then ins(formatted_references) end if formatted_post_accent_labels or formatted_post_qualifiers then if formatted_references then ins(" ") end ins(wrap_qualifier_css("(", "brac")) if formatted_post_accent_labels then ins(formatted_post_accent_labels) if formatted_post_qualifiers then ins(wrap_qualifier_css(",", "comma") .. " ") end end if formatted_post_qualifiers then ins(formatted_post_qualifiers) end ins(wrap_qualifier_css(")", "brac")) end if data.bad then track("bad-audio") track("bad-audio/" .. data.lang:getCode()) ins(" " .. require(qualifier_module).wrap_css("Note: this pronuncation may be nonstandard or incorrect: " .. data.bad, "bad-audio-note")) end local posttext = make_td_if(table.concat(posttext_parts)) local template = [=[ <tr>%s<td class="audiofile">[[File:%s|noicon|175px]]</td><td class="audiometa" style="font-size: 80%%;">([[:File:%s|file]])</td>%s</tr>]=] local text = template:format(pretext, data.file, data.file, posttext) text = '<table class="audiotable" style="vertical-align: middle; display: inline-block; list-style: none; line-height: 1em; border-collapse: collapse; margin: 0;">' .. text .. "</table>" local stylesheet = require(template_styles_module)(audio_styles_css) local categories = data.nocat and "" or cats[1] and require(utilities_module).format_categories(cats, data.lang, data.sort) or "" return stylesheet .. text .. categories end --[==[ FIXME: Old entry point for formatting multiple audios in a single table. Not used anywhere and needs rewriting to the standard of format_audio(). Meant to be called from a module. `data` is a table containing the following fields: <pre> { lang = LANGUAGE_OBJECT, audios = {{file = "FILENAME", qualifiers = nil or {"QUALIFIER", "QUALIFIER", ...}}, ...}, caption = nil or "CAPTION" } </pre> Here: * `lang` is a language object. * `audios` is the list of audio files to display. FILENAME is the name of the audio file without a namespace. QUALIFIER is a qualifier string to display after the specific audio file in question, formatted using {format_qualifier()} in [[Module:qualifier]]. * `caption`, if specified, adds a caption before the audio file. ]==] function export.format_multiple_audios(data) local audiocats = { data.lang:getFullName() .. " terms with audio pronunciation" } local rows = { } local caption = data.caption for _, audio in ipairs(data.audios) do local qualifiers = audio.qualifiers local function repl(key) if key == "file" then return audio.file elseif key == "caption" then if not caption then return "" end return "<td rowspan=" .. #data.audios .. ">" .. caption .. ":</td>" elseif key == "qualifiers" then if not qualifiers or not qualifiers[1] then return "" end return "<td>" .. require(qualifier_module).format_qualifier(qualifiers) .. "</td>" end end local template = [=[ <tr>{{{caption}}} <td class="audiofile">[[File:{{{file}}}|noicon|175px]]</td> <td class="audiometa" style="font-size: 80%;">([[:File:{{{file}}}|file]])</td> {{{qualifiers}}}</tr>]=] local text = (mw.ustring.gsub(template, "{{{([a-z0-9_:]+)}}}", repl)) table.insert(rows, text) caption = nil end local function repl(key) if key == "rows" then return table.concat(rows, "\n") end end local template = [=[ <table class="audiotable" style="vertical-align: middle; display: inline-block; list-style: none; line-height: 1em; border-collapse: collapse;"> {{{rows}}} </table> ]=] local stylesheet = require(template_styles_module)(audio_styles_css) local text = mw.ustring.gsub(template, "{{{([a-z0-9_:]+)}}}", repl) local categories = data.nocat and "" or #audiocats > 0 and require(utilities_module).format_categories(audiocats, data.lang, data.sort) or "" -- remove newlines due to HTML generator bug in MediaWiki(?) - newlines in tables cause list items to not end correctly text = mw.ustring.gsub(text, "\n", "") return stylesheet .. text .. categories end --[==[ Construct the `text` object passed into {format_audio()}, from raw-ish arguments (essentially, the output of {process()} in [[Module:parameters]]). On entry, `args` contains the following fields: * `lang` ('''required'''): Language object. * `text`: Text. If this isn't defined and neither are any of `gloss`, `tr`, `ts`, `pos`, `lit` or `genders`, the function returns {nil}. * `gloss`: Gloss of text. * `tr`: Manual transliteration of text. * `ts`: Transcription of text. * `pos`: Part of speech of text. * `lit`: Literal meaning of text. * `genders`: List of gender/number spec(s) of text. * `sc`: Optional script object of text (rarely needs to be set). * `pagename`: Pagename; used in place of `text` when `text` is unset but other text-related parameters are set. If not specified, taken from the actual pagename. ]==] function export.construct_audio_textobj(args) local textobj if args.text or args.gloss or args.tr or args.ts or args.pos or args.lit or args.genders and args.genders[1] then local text = args.text or args.pagename or mw.loadData("Module:headword/data").pagename textobj = { lang = args.lang, alt = wrap_qualifier_css("“", "quote") .. text .. wrap_qualifier_css("”", "quote"), gloss = args.gloss, tr = args.tr, ts = args.ts, pos = args.pos, lit = args.lit, genders = args.genders, sc = args.sc, } end return textobj end --[==[ Entry point for {{tl|audio}} template. ]==] function export.show(frame) local parent_args = frame:getParent().args local compat = parent_args.lang local offset = compat and 0 or 1 local params = { [compat and "lang" or 1] = {required = true, type = "language", default = "en"}, [1 + offset] = {required = true, default = "Example.ogg"}, [2 + offset] = {}, ["q"] = {type = "qualifier"}, ["qq"] = {type = "qualifier"}, ["a"] = {type = "labels"}, ["aa"] = {type = "labels"}, ["ref"] = {type = "references"}, ["IPA"] = {sublist = true}, ["text"] = {}, ["t"] = {}, ["gloss"] = {alias_of = "t"}, ["tr"] = {}, ["ts"] = {}, ["pos"] = {}, ["lit"] = {}, ["g"] = {sublist = true}, ["sc"] = {type = "script"}, ["bad"] = {}, ["nocat"] = {type = "boolean"}, ["sort"] = {}, ["pagename"] = {}, } local args = require(parameters_module).process(parent_args, params) local lang = args[compat and "lang" or 1] -- Needed in construct_audio_textobj(). args.lang = lang local textobj = export.construct_audio_textobj(args) local caption = args[2 + offset] local nocaption if caption == "-" then caption = nil nocaption = true end if caption then -- Remove final colon if given, to avoid two colons. caption = caption:gsub(":$", "") end local data = { lang = lang, file = args[1 + offset], caption = caption, nocaption = nocaption, q = args.q, qq = args.qq, a = args.a, aa = args.aa, refs = args.ref, text = textobj, IPA = args.IPA, bad = args.bad, nocat = args.nocat, sort = args.sort, } return export.format_audio(data) end return export dlnql2r0c6r4m6prxi0k9hxteh3fz68 192866 192865 2024-11-18T10:42:11Z Lee 19 192866 Scribunto text/plain local export = {} local headword_data_module = "Module:headword/data" local IPA_module = "Module:IPA" local labels_module = "Module:labels" local links_module = "Module:links" local parameters_module = "Module:parameters" local qualifier_module = "Module:qualifier" local references_module = "Module:references" local string_utilities_module = "Module:string utilities" local table_module = "Module:table" local template_styles_module = "Module:TemplateStyles" local utilities_module = "Module:utilities" local audio_styles_css = "audio/styles.css" local function track(page) require("Module:debug/track")("audio/" .. page) return true end local function wrap_qualifier_css(text, suffix) return require(qualifier_module).wrap_qualifier_css(text, suffix) end --[==[ Display a box that can be used to play an audio file. `data` is a table containing the following fields: * `lang` ('''required'''): language object for the audio files; * `file` ('''required'''): file containing the audio; * `caption`: Caption to display before the audio box; normally {"Audio"}, and does not usually need to be changed; * `nocaption`: If specified, don't display the caption; * `q`: {nil} or a list of left regular qualifier strings, formatted using {format_qualifier()} in [[Module:qualifier]] and displayed before the audio box and after the caption (and any accent qualifiers); * `qq`: {nil} or a list of right regular qualifier strings, displayed directly after the audio box (and after any accent qualifiers); * `a`: {nil} or a list of left accent qualifier strings, formatted using {format_qualifiers()} in [[Module:accent qualifier]] and displayed before the audio box and after the caption; * `aa`: {nil} or a list of right accent qualifier strings, displayed directly after the homophone in question; * `refs`: {nil} or a list of references or reference specs to add directly after the audio box; the value of a list item is either a string containing the reference text (typically a call to a citation template such as {{tl|cite-book}}, or a template wrapping such a call), or an object with fields `text` (the reference text), `name` (the name of the reference, as in {{cd|<nowiki><ref name="foo">...</ref></nowiki>}} or {{cd|<nowiki><ref name="foo" /></nowiki>}}) and/or `group` (the group of the reference, as in {{cd|<nowiki><ref name="foo" group="bar">...</ref></nowiki>}} or {{cd|<nowiki><ref name="foo" group="bar"/></nowiki>}}); this uses a parser function to format the reference appropriately and insert a footnote number that hyperlinks to the actual reference, located in the {{cd|<nowiki><references /></nowiki>}} section; * `text`: Text of the audio snippet; if specified, should be an object of the form passed to {full_link()} in [[Module:links]], including a `lang` field containing the language of the text (usually the same as `data.lang`); displayed before the audio box, after any regular and accent qualifiers; * `IPA`: IPA of the audio snippet, or a list of IPA specs; if specified, should be surrounded by slashes or brackets, and will be processed using {format_IPA_multiple()} in [[Module:IPA]] and displayed before the audio box, after any regular and accent qualifiers and after the text of the audio snippet, if given; * `nocat`: If true, suppress categorization; * `sort`: Sort key for categorization. ]==] function export.format_audio(data) local cats = { data.lang:getFullName() .. " යෙදුම්, ඕඩියෝ උච්චාරණ සහිත" } local function format_a(a) if a and a[1] then return require(labels_module).show_labels { lang = data.lang, labels = a, mode = "accent", nocat = true, open = false, close = false, no_track_already_seen = true, } end return nil end local function format_q(q) if q and q[1] then return require(qualifier_module).format_qualifier(q, false, false) end return nil end local function make_td_if(text) if text == "" then return text end return "<td>" .. text .. "</td>" end -- Generate the full text preceding the audio box. local pretext_parts = {} local function ins(text) table.insert(pretext_parts, text) end local formatted_accent_labels, formatted_qualifiers, formatted_text, formatted_ipa formatted_accent_labels = format_a(data.a) formatted_qualifiers = format_q(data.q) if data.text then formatted_text = require(links_module).full_link(data.text, "term", true) end if data.IPA then local ipa_cats local ipa = data.IPA if type(ipa) == "string" then ipa = {ipa} end local ipa_items = {} for _, ipa_item in ipairs(ipa) do table.insert(ipa_items, {pron = ipa_item}) end formatted_ipa, ipa_cats = require(IPA_module).format_IPA_multiple(data.lang, ipa_items, nil, "no count", "raw") if ipa_cats[1] then require(table_module).extendList(cats, ipa_cats) end end local has_qual = formatted_accent_labels or formatted_qualifiers if not data.nocaption then -- Track uses of caption (3=). Over time as we eliminate most of them, we can use this to find and -- eliminate the remainder. if data.caption then track("caption") end ins(data.caption or "ඕඩියෝ") if has_qual then ins(" " .. wrap_qualifier_css("(", "brac")) end end if formatted_accent_labels then ins(formatted_accent_labels) if formatted_qualifiers then ins(wrap_qualifier_css(",", "comma") .. " ") end end if formatted_qualifiers then ins(formatted_qualifiers) end if has_qual then if not data.nocaption then ins(wrap_qualifier_css(")", "brac")) end end if (formatted_text or formatted_ipa) and (has_qual or not data.nocaption) then ins(wrap_qualifier_css(";", "semicolon") .. " ") end if formatted_text then ins(formatted_text) if formatted_ipa then ins(" ") end end ins(formatted_ipa) if not data.nocaption then ins(wrap_qualifier_css(":", "colon")) end local pretext = make_td_if(table.concat(pretext_parts)) -- Generate the full text following the audio box. local posttext_parts = {} local function ins(text) table.insert(posttext_parts, text) end local formatted_post_accent_labels = format_a(data.aa) local formatted_post_qualifiers = format_q(data.qq) local formatted_references = data.refs and require(references_module).format_references(data.refs) or nil if formatted_references then ins(formatted_references) end if formatted_post_accent_labels or formatted_post_qualifiers then if formatted_references then ins(" ") end ins(wrap_qualifier_css("(", "brac")) if formatted_post_accent_labels then ins(formatted_post_accent_labels) if formatted_post_qualifiers then ins(wrap_qualifier_css(",", "comma") .. " ") end end if formatted_post_qualifiers then ins(formatted_post_qualifiers) end ins(wrap_qualifier_css(")", "brac")) end if data.bad then track("bad-audio") track("bad-audio/" .. data.lang:getCode()) ins(" " .. require(qualifier_module).wrap_css("Note: this pronuncation may be nonstandard or incorrect: " .. data.bad, "bad-audio-note")) end local posttext = make_td_if(table.concat(posttext_parts)) local template = [=[ <tr>%s<td class="audiofile">[[File:%s|noicon|175px]]</td><td class="audiometa" style="font-size: 80%%;">([[:File:%s|file]])</td>%s</tr>]=] local text = template:format(pretext, data.file, data.file, posttext) text = '<table class="audiotable" style="vertical-align: middle; display: inline-block; list-style: none; line-height: 1em; border-collapse: collapse; margin: 0;">' .. text .. "</table>" local stylesheet = require(template_styles_module)(audio_styles_css) local categories = data.nocat and "" or cats[1] and require(utilities_module).format_categories(cats, data.lang, data.sort) or "" return stylesheet .. text .. categories end --[==[ FIXME: Old entry point for formatting multiple audios in a single table. Not used anywhere and needs rewriting to the standard of format_audio(). Meant to be called from a module. `data` is a table containing the following fields: <pre> { lang = LANGUAGE_OBJECT, audios = {{file = "FILENAME", qualifiers = nil or {"QUALIFIER", "QUALIFIER", ...}}, ...}, caption = nil or "CAPTION" } </pre> Here: * `lang` is a language object. * `audios` is the list of audio files to display. FILENAME is the name of the audio file without a namespace. QUALIFIER is a qualifier string to display after the specific audio file in question, formatted using {format_qualifier()} in [[Module:qualifier]]. * `caption`, if specified, adds a caption before the audio file. ]==] function export.format_multiple_audios(data) local audiocats = { data.lang:getFullName() .. " terms with audio pronunciation" } local rows = { } local caption = data.caption for _, audio in ipairs(data.audios) do local qualifiers = audio.qualifiers local function repl(key) if key == "file" then return audio.file elseif key == "caption" then if not caption then return "" end return "<td rowspan=" .. #data.audios .. ">" .. caption .. ":</td>" elseif key == "qualifiers" then if not qualifiers or not qualifiers[1] then return "" end return "<td>" .. require(qualifier_module).format_qualifier(qualifiers) .. "</td>" end end local template = [=[ <tr>{{{caption}}} <td class="audiofile">[[File:{{{file}}}|noicon|175px]]</td> <td class="audiometa" style="font-size: 80%;">([[:File:{{{file}}}|file]])</td> {{{qualifiers}}}</tr>]=] local text = (mw.ustring.gsub(template, "{{{([a-z0-9_:]+)}}}", repl)) table.insert(rows, text) caption = nil end local function repl(key) if key == "rows" then return table.concat(rows, "\n") end end local template = [=[ <table class="audiotable" style="vertical-align: middle; display: inline-block; list-style: none; line-height: 1em; border-collapse: collapse;"> {{{rows}}} </table> ]=] local stylesheet = require(template_styles_module)(audio_styles_css) local text = mw.ustring.gsub(template, "{{{([a-z0-9_:]+)}}}", repl) local categories = data.nocat and "" or #audiocats > 0 and require(utilities_module).format_categories(audiocats, data.lang, data.sort) or "" -- remove newlines due to HTML generator bug in MediaWiki(?) - newlines in tables cause list items to not end correctly text = mw.ustring.gsub(text, "\n", "") return stylesheet .. text .. categories end --[==[ Construct the `text` object passed into {format_audio()}, from raw-ish arguments (essentially, the output of {process()} in [[Module:parameters]]). On entry, `args` contains the following fields: * `lang` ('''required'''): Language object. * `text`: Text. If this isn't defined and neither are any of `gloss`, `tr`, `ts`, `pos`, `lit` or `genders`, the function returns {nil}. * `gloss`: Gloss of text. * `tr`: Manual transliteration of text. * `ts`: Transcription of text. * `pos`: Part of speech of text. * `lit`: Literal meaning of text. * `genders`: List of gender/number spec(s) of text. * `sc`: Optional script object of text (rarely needs to be set). * `pagename`: Pagename; used in place of `text` when `text` is unset but other text-related parameters are set. If not specified, taken from the actual pagename. ]==] function export.construct_audio_textobj(args) local textobj if args.text or args.gloss or args.tr or args.ts or args.pos or args.lit or args.genders and args.genders[1] then local text = args.text or args.pagename or mw.loadData("Module:headword/data").pagename textobj = { lang = args.lang, alt = wrap_qualifier_css("“", "quote") .. text .. wrap_qualifier_css("”", "quote"), gloss = args.gloss, tr = args.tr, ts = args.ts, pos = args.pos, lit = args.lit, genders = args.genders, sc = args.sc, } end return textobj end --[==[ Entry point for {{tl|audio}} template. ]==] function export.show(frame) local parent_args = frame:getParent().args local compat = parent_args.lang local offset = compat and 0 or 1 local params = { [compat and "lang" or 1] = {required = true, type = "language", default = "en"}, [1 + offset] = {required = true, default = "Example.ogg"}, [2 + offset] = {}, ["q"] = {type = "qualifier"}, ["qq"] = {type = "qualifier"}, ["a"] = {type = "labels"}, ["aa"] = {type = "labels"}, ["ref"] = {type = "references"}, ["IPA"] = {sublist = true}, ["text"] = {}, ["t"] = {}, ["gloss"] = {alias_of = "t"}, ["tr"] = {}, ["ts"] = {}, ["pos"] = {}, ["lit"] = {}, ["g"] = {sublist = true}, ["sc"] = {type = "script"}, ["bad"] = {}, ["nocat"] = {type = "boolean"}, ["sort"] = {}, ["pagename"] = {}, } local args = require(parameters_module).process(parent_args, params) local lang = args[compat and "lang" or 1] -- Needed in construct_audio_textobj(). args.lang = lang local textobj = export.construct_audio_textobj(args) local caption = args[2 + offset] local nocaption if caption == "-" then caption = nil nocaption = true end if caption then -- Remove final colon if given, to avoid two colons. caption = caption:gsub(":$", "") end local data = { lang = lang, file = args[1 + offset], caption = caption, nocaption = nocaption, q = args.q, qq = args.qq, a = args.a, aa = args.aa, refs = args.ref, text = textobj, IPA = args.IPA, bad = args.bad, nocat = args.nocat, sort = args.sort, } return export.format_audio(data) end return export 8bk9hh0t0f8m720hmwgocx5lpgnzufo ප්‍රවර්ගය:භාෂාව අනුව යෙදුම්, ප්‍රොටෝ-ඉන්දු-යුරෝපීය වෙතින් ව්‍යුත්පන්න 14 114889 192575 185762 2024-11-17T14:13:29Z Lee 19 Lee විසින් [[ප්‍රවර්ගය:භාෂාව අනුව පද, ප්‍රොටෝ-ඉන්දු-යුරෝපීය වෙතින් ව්‍යුත්පන්න]] සිට [[ප්‍රවර්ගය:භාෂාව අනුව යෙදුම්, ප්‍රොටෝ-ඉන්දු-යුරෝපීය වෙතින් ව්‍යුත්පන්න]] වෙත පිටුව ගෙන යන ලදී 169915 wikitext text/x-wiki {{auto cat}} eomzlm5v4j7ond1phrju7cnue91g5qx Module:zh-see 828 120648 192858 184262 2024-10-17T05:24:37Z en>Octahedron80 0 both bg and color are needed to rm lint error 192858 Scribunto text/plain local m_str_utils = require("Module:string utilities") local categorize = require("Module:zh-cat").categorize local change_to_variant = require("Module:zh-forms").change_to_variant local concat = table.concat local extract_gloss = require("Module:zh/extract").extract_gloss local find_templates = require("Module:template parser").find_templates local format_cat = require("Module:utilities").format_categories local full_link = require("Module:links").full_link local get_lang = require("Module:languages").getByCode local get_section = require("Module:pages").get_section local gsplit = mw.text.gsplit local html_create = mw.html.create local insert = table.insert local ipairs = ipairs local maintenance_cats = require("Module:headword").maintenance_cats local pairs = pairs local tostring = tostring local track = require('Module:debug').track local trim = m_str_utils.trim local ulen = m_str_utils.len local usub = m_str_utils.sub local m_data = mw.loadData("Module:zh-see/data") local lect_codes = mw.loadData("Module:zh/data/lect codes") local headword_data = mw.loadData("Module:headword/data") local namespace = mw.title.getCurrentTitle().namespace local langs = setmetatable({}, { __index = function(t, k) local lang = get_lang(k) t[k] = lang return lang end }) local function get_content(title) local content = mw.title.new(title) if not content then return false end return get_section(content:getContent(), "Chinese", 2) end local function process_zh_forms(data, abbrevs, args) for k, v in pairs(args) do if k == "alt" then for altform in gsplit(v, "%s*,%s*") do if altform:match("^" .. data.pagename .. "%f[%z%-]") then abbrevs.v = true end end elseif v == data.pagename then if k:match("^s%d*$") then abbrevs.s = true elseif k:match("^ss%d*$") then abbrevs.ss = true elseif k:match("^t%d*$") then abbrevs.v = true abbrevs.t = true end end end end local function process_categories(template, name) local cat_type = m_data.cat_type[name] if not cat_type then return end local args = template:get_arguments() local code = lect_codes.langcode_to_abbr[args[1]] and args[1] if not code then return end local lang = langs[code] local cat_prefix = ( cat_type == "topics" and (lang:getCode() .. ":") or cat_type == "catlangname" and (lang:getCanonicalName() .. " ") or "" ) local categories = {} for i = 2, #args do insert(categories, cat_prefix .. trim(args[i])) end return format_cat(categories, lang) end local function iterate_templates(frame, data, abbrev, chained) local zh_forms, zh_see, zh_pron, zh_char_comp local abbrevs if not abbrev then abbrevs = {} end for template in find_templates(data.content) do local name = template:get_name() if name == "zh-forms" then zh_forms = true if not abbrev then process_zh_forms(data, abbrevs, template:get_arguments()) end elseif name == "zh-see" and not chained then local args = template:get_arguments() zh_see = args[1] data.new_abbrev = args[2] elseif name == "zh-pron" then zh_pron = zh_pron or template:get_arguments() elseif data.abbrev ~= "poj" then if name == "zh-character component" then zh_char_comp = true else local cats = process_categories(template, name) if cats then insert(data.categories, cats) end end end end if zh_forms then if not abbrev then -- Note: Don't mention second-round simplified if there's a match for (first-round) simplified. abbrev = (abbrevs.s and "s" or "") .. (abbrevs.ss and not abbrevs.s and "ss" or "") .. (abbrevs.v and "v" or "") .. (abbrevs.t and "t" or "") if abbrev ~= "" then if chained then data.new_abbrev = abbrev else data.abbrev = abbrev end end end elseif zh_see then data.new_title = zh_see data.content = get_content(zh_see) if data.content then data.chain = true return iterate_templates(frame, data, data.new_abbrev, true) end end if zh_pron then local data_abbrev = data.abbrev if data_abbrev == "poj" or data_abbrev == "trc" then local new_zh_pron = {} for k, v in pairs(zh_pron) do if k == "mn" or k == "cat" then new_zh_pron[k] = v end end zh_pron = new_zh_pron if data_abbrev == "poj" then zh_pron.poj_form_zh_see = "yes" end end zh_pron.only_cat = "yes" -- FIXME: this should be a callable function. local cats = frame:expandTemplate{ title = "Template:zh-pron", args = zh_pron } if cats then insert(data.categories, cats) end end if zh_char_comp then insert(data.categories, format_cat({"zh:Chinese character components"}, langs.zh)) end if not data.chain then data.new_title = nil data.new_abbrev = nil end if not (chained or zh_forms or zh_pron) then track("zh-see/unidirectional reference to variant") elseif not (chained or data.content:match(data.pagename)) then track("zh-see/unidirectional reference variant→orthodox") end end local export = {} function export.show(frame) local data = { args = frame:getParent().args, pagename = headword_data.pagename, categories = {} } data.title = data.args[1] data.abbrev = data.args[2] ~= "" and data.args[2] data.simp = data.args.simp or false if data.title == data.pagename then return error("The soft-directed item is the same as the page title.") end data.content = get_content(data.title) if not data.content then insert(data.categories, format_cat({"Chinese redlinks/zh-see"}, langs.zh)) else iterate_templates(frame, data, data.abbrev) end -- automatically generated |t2= if not data.abbrev and change_to_variant(data.title) == data.pagename then data.abbrev = "vt" end local non_lemma_cat = m_data.non_lemma_type[data.abbrev or "s"] if not non_lemma_cat then error("Please specify a valid type of non-lemma; the value \"" .. data.abbrev .. "\" is not valid (see [[Template:zh-see]]).") end local self_link_chars if data.abbrev == "poj" then self_link_chars = full_link{ term = data.pagename .. "//", lang = langs["nan-hbl"], tr = "-" } else self_link_chars = full_link{ term = data.pagename:gsub(".[\128-\191]*", "[[%0]]") .. "//", lang = langs.zh, tr = "-" } end local title_link = full_link{ term = data.title .. "//", lang = langs.zh, tr = "-" } local new_title_link if data.chain then new_title_link = full_link{ term = data.new_title .. "//", lang = langs.zh, tr = "-" } end local gloss_text = data.args[3] or (data.content and extract_gloss(data.content, true)) local wikitext1 = "'''For pronunciation and definitions of '''" .. self_link_chars .. "''' – see " .. (new_title_link or title_link) if gloss_text and #gloss_text > 0 then wikitext1 = wikitext1 .. " (“" .. gloss_text .. "”)" end wikitext1 = wikitext1 .. ".'''" local wikitext2 = "(''This " .. (data.abbrev ~= "poj" and ulen(data.pagename) == 1 and "character" or "term") .. " is " .. non_lemma_cat .. " form of'' " .. title_link if data.simp then local link1 = full_link{ term = usub(data.simp, 1, 1) .. "//", lang = langs.zh, tr = "-" } local link2 = full_link{ term = usub(data.simp, 2, 2) .. "//", lang = langs.zh, tr = "-" } data.simp = html_create("small") :wikitext(":&nbsp; " .. link1 .. " → " .. link2) :allDone() end if data.chain then data.chain = ", which is in turn ''" .. m_data.non_lemma_type[data.new_abbrev ~= "" and data.new_abbrev or "v"] .. "'' form of " .. new_title_link end local box = html_create("table") :addClass("wikitable") :addClass("zh-see") :allDone() if non_lemma_cat:match("simplified") then box = box:addClass("mw-collapsible") :addClass("mw-collapsed") end box = box:css("border", "1px") :css("border", "1px solid #797979") :css("margin-left", "1px") :css("text-align", "left") :css("min-width", (data.chain and "80" or "70") .. "%") :tag("tr") :tag("td") :css("background-color", "var(--wikt-palette-dullcyan,#eaecf0)") :css("color", "inherit") :css("padding-left", "0.5em") :wikitext(wikitext1) :tag("br") :done() :wikitext(wikitext2) :node(data.simp) :wikitext(data.chain) :wikitext(").") :allDone() if non_lemma_cat:match("simplified") then box = box:tag("tr") :tag("td") :addClass("mw-collapsible-content") :css("background-color", "var(--wikt-palette-lightyellow,#FFFFe0)") :css("color", "inherit") :css("font-size", "smaller") :tag("b") :wikitext("Notes:") :done() :tag("ul") :tag("li") :wikitext("[[w:Simplified Chinese|Simplified Chinese]] is mainly used in Mainland China, Malaysia") :tag("span") :addClass("serial-comma") :wikitext(",") :done() :wikitext(" and Singapore.") :done() :tag("li") :wikitext("[[w:Traditional Chinese|Traditional Chinese]] is mainly used in Hong Kong, Macau") :tag("span") :addClass("serial-comma") :wikitext(",") :done() :wikitext(" and Taiwan.") :allDone() end box = tostring(box) if not data.content and (namespace == 0 or namespace == 118) then insert(data.categories, format_cat({"Chinese terms with uncreated forms"}, langs.zh)) end for _, word in ipairs(m_data.categorize) do if non_lemma_cat:match(word) then insert(data.categories, categorize(word)) end end local lang if data.abbrev == "poj" then lang = langs["nan-hbl"] insert(data.categories, format_cat({"Hokkien pe̍h-ōe-jī forms"}, lang)) else lang = langs.zh end -- Standard maintenance categories usually done by [[Module:headword]]. local lang_maintenance_cats = {} local page_maintenance_cats = {} maintenance_cats( headword_data.page, lang, lang_maintenance_cats, page_maintenance_cats ) lang_maintenance_cats = format_cat(lang_maintenance_cats, lang) page_maintenance_cats = format_cat(page_maintenance_cats, nil, "-") return box .. concat(data.categories) .. lang_maintenance_cats .. page_maintenance_cats end return export 2n9gl2k9ddwbc9n2eogkt17427dhjdg 192859 192858 2024-11-18T10:09:16Z Lee 19 [[:en:Module:zh-see]] වෙතින් එක් සංශෝධනයක් 192858 Scribunto text/plain local m_str_utils = require("Module:string utilities") local categorize = require("Module:zh-cat").categorize local change_to_variant = require("Module:zh-forms").change_to_variant local concat = table.concat local extract_gloss = require("Module:zh/extract").extract_gloss local find_templates = require("Module:template parser").find_templates local format_cat = require("Module:utilities").format_categories local full_link = require("Module:links").full_link local get_lang = require("Module:languages").getByCode local get_section = require("Module:pages").get_section local gsplit = mw.text.gsplit local html_create = mw.html.create local insert = table.insert local ipairs = ipairs local maintenance_cats = require("Module:headword").maintenance_cats local pairs = pairs local tostring = tostring local track = require('Module:debug').track local trim = m_str_utils.trim local ulen = m_str_utils.len local usub = m_str_utils.sub local m_data = mw.loadData("Module:zh-see/data") local lect_codes = mw.loadData("Module:zh/data/lect codes") local headword_data = mw.loadData("Module:headword/data") local namespace = mw.title.getCurrentTitle().namespace local langs = setmetatable({}, { __index = function(t, k) local lang = get_lang(k) t[k] = lang return lang end }) local function get_content(title) local content = mw.title.new(title) if not content then return false end return get_section(content:getContent(), "Chinese", 2) end local function process_zh_forms(data, abbrevs, args) for k, v in pairs(args) do if k == "alt" then for altform in gsplit(v, "%s*,%s*") do if altform:match("^" .. data.pagename .. "%f[%z%-]") then abbrevs.v = true end end elseif v == data.pagename then if k:match("^s%d*$") then abbrevs.s = true elseif k:match("^ss%d*$") then abbrevs.ss = true elseif k:match("^t%d*$") then abbrevs.v = true abbrevs.t = true end end end end local function process_categories(template, name) local cat_type = m_data.cat_type[name] if not cat_type then return end local args = template:get_arguments() local code = lect_codes.langcode_to_abbr[args[1]] and args[1] if not code then return end local lang = langs[code] local cat_prefix = ( cat_type == "topics" and (lang:getCode() .. ":") or cat_type == "catlangname" and (lang:getCanonicalName() .. " ") or "" ) local categories = {} for i = 2, #args do insert(categories, cat_prefix .. trim(args[i])) end return format_cat(categories, lang) end local function iterate_templates(frame, data, abbrev, chained) local zh_forms, zh_see, zh_pron, zh_char_comp local abbrevs if not abbrev then abbrevs = {} end for template in find_templates(data.content) do local name = template:get_name() if name == "zh-forms" then zh_forms = true if not abbrev then process_zh_forms(data, abbrevs, template:get_arguments()) end elseif name == "zh-see" and not chained then local args = template:get_arguments() zh_see = args[1] data.new_abbrev = args[2] elseif name == "zh-pron" then zh_pron = zh_pron or template:get_arguments() elseif data.abbrev ~= "poj" then if name == "zh-character component" then zh_char_comp = true else local cats = process_categories(template, name) if cats then insert(data.categories, cats) end end end end if zh_forms then if not abbrev then -- Note: Don't mention second-round simplified if there's a match for (first-round) simplified. abbrev = (abbrevs.s and "s" or "") .. (abbrevs.ss and not abbrevs.s and "ss" or "") .. (abbrevs.v and "v" or "") .. (abbrevs.t and "t" or "") if abbrev ~= "" then if chained then data.new_abbrev = abbrev else data.abbrev = abbrev end end end elseif zh_see then data.new_title = zh_see data.content = get_content(zh_see) if data.content then data.chain = true return iterate_templates(frame, data, data.new_abbrev, true) end end if zh_pron then local data_abbrev = data.abbrev if data_abbrev == "poj" or data_abbrev == "trc" then local new_zh_pron = {} for k, v in pairs(zh_pron) do if k == "mn" or k == "cat" then new_zh_pron[k] = v end end zh_pron = new_zh_pron if data_abbrev == "poj" then zh_pron.poj_form_zh_see = "yes" end end zh_pron.only_cat = "yes" -- FIXME: this should be a callable function. local cats = frame:expandTemplate{ title = "Template:zh-pron", args = zh_pron } if cats then insert(data.categories, cats) end end if zh_char_comp then insert(data.categories, format_cat({"zh:Chinese character components"}, langs.zh)) end if not data.chain then data.new_title = nil data.new_abbrev = nil end if not (chained or zh_forms or zh_pron) then track("zh-see/unidirectional reference to variant") elseif not (chained or data.content:match(data.pagename)) then track("zh-see/unidirectional reference variant→orthodox") end end local export = {} function export.show(frame) local data = { args = frame:getParent().args, pagename = headword_data.pagename, categories = {} } data.title = data.args[1] data.abbrev = data.args[2] ~= "" and data.args[2] data.simp = data.args.simp or false if data.title == data.pagename then return error("The soft-directed item is the same as the page title.") end data.content = get_content(data.title) if not data.content then insert(data.categories, format_cat({"Chinese redlinks/zh-see"}, langs.zh)) else iterate_templates(frame, data, data.abbrev) end -- automatically generated |t2= if not data.abbrev and change_to_variant(data.title) == data.pagename then data.abbrev = "vt" end local non_lemma_cat = m_data.non_lemma_type[data.abbrev or "s"] if not non_lemma_cat then error("Please specify a valid type of non-lemma; the value \"" .. data.abbrev .. "\" is not valid (see [[Template:zh-see]]).") end local self_link_chars if data.abbrev == "poj" then self_link_chars = full_link{ term = data.pagename .. "//", lang = langs["nan-hbl"], tr = "-" } else self_link_chars = full_link{ term = data.pagename:gsub(".[\128-\191]*", "[[%0]]") .. "//", lang = langs.zh, tr = "-" } end local title_link = full_link{ term = data.title .. "//", lang = langs.zh, tr = "-" } local new_title_link if data.chain then new_title_link = full_link{ term = data.new_title .. "//", lang = langs.zh, tr = "-" } end local gloss_text = data.args[3] or (data.content and extract_gloss(data.content, true)) local wikitext1 = "'''For pronunciation and definitions of '''" .. self_link_chars .. "''' – see " .. (new_title_link or title_link) if gloss_text and #gloss_text > 0 then wikitext1 = wikitext1 .. " (“" .. gloss_text .. "”)" end wikitext1 = wikitext1 .. ".'''" local wikitext2 = "(''This " .. (data.abbrev ~= "poj" and ulen(data.pagename) == 1 and "character" or "term") .. " is " .. non_lemma_cat .. " form of'' " .. title_link if data.simp then local link1 = full_link{ term = usub(data.simp, 1, 1) .. "//", lang = langs.zh, tr = "-" } local link2 = full_link{ term = usub(data.simp, 2, 2) .. "//", lang = langs.zh, tr = "-" } data.simp = html_create("small") :wikitext(":&nbsp; " .. link1 .. " → " .. link2) :allDone() end if data.chain then data.chain = ", which is in turn ''" .. m_data.non_lemma_type[data.new_abbrev ~= "" and data.new_abbrev or "v"] .. "'' form of " .. new_title_link end local box = html_create("table") :addClass("wikitable") :addClass("zh-see") :allDone() if non_lemma_cat:match("simplified") then box = box:addClass("mw-collapsible") :addClass("mw-collapsed") end box = box:css("border", "1px") :css("border", "1px solid #797979") :css("margin-left", "1px") :css("text-align", "left") :css("min-width", (data.chain and "80" or "70") .. "%") :tag("tr") :tag("td") :css("background-color", "var(--wikt-palette-dullcyan,#eaecf0)") :css("color", "inherit") :css("padding-left", "0.5em") :wikitext(wikitext1) :tag("br") :done() :wikitext(wikitext2) :node(data.simp) :wikitext(data.chain) :wikitext(").") :allDone() if non_lemma_cat:match("simplified") then box = box:tag("tr") :tag("td") :addClass("mw-collapsible-content") :css("background-color", "var(--wikt-palette-lightyellow,#FFFFe0)") :css("color", "inherit") :css("font-size", "smaller") :tag("b") :wikitext("Notes:") :done() :tag("ul") :tag("li") :wikitext("[[w:Simplified Chinese|Simplified Chinese]] is mainly used in Mainland China, Malaysia") :tag("span") :addClass("serial-comma") :wikitext(",") :done() :wikitext(" and Singapore.") :done() :tag("li") :wikitext("[[w:Traditional Chinese|Traditional Chinese]] is mainly used in Hong Kong, Macau") :tag("span") :addClass("serial-comma") :wikitext(",") :done() :wikitext(" and Taiwan.") :allDone() end box = tostring(box) if not data.content and (namespace == 0 or namespace == 118) then insert(data.categories, format_cat({"Chinese terms with uncreated forms"}, langs.zh)) end for _, word in ipairs(m_data.categorize) do if non_lemma_cat:match(word) then insert(data.categories, categorize(word)) end end local lang if data.abbrev == "poj" then lang = langs["nan-hbl"] insert(data.categories, format_cat({"Hokkien pe̍h-ōe-jī forms"}, lang)) else lang = langs.zh end -- Standard maintenance categories usually done by [[Module:headword]]. local lang_maintenance_cats = {} local page_maintenance_cats = {} maintenance_cats( headword_data.page, lang, lang_maintenance_cats, page_maintenance_cats ) lang_maintenance_cats = format_cat(lang_maintenance_cats, lang) page_maintenance_cats = format_cat(page_maintenance_cats, nil, "-") return box .. concat(data.categories) .. lang_maintenance_cats .. page_maintenance_cats end return export 2n9gl2k9ddwbc9n2eogkt17427dhjdg 192860 192859 2024-11-18T10:16:04Z Lee 19 [[蓝色]] සඳහා සහාය 192860 Scribunto text/plain local m_str_utils = require("Module:string utilities") local categorize = require("Module:zh-cat").categorize local change_to_variant = require("Module:zh-forms").change_to_variant local concat = table.concat local extract_gloss = require("Module:zh/extract").extract_gloss local find_templates = require("Module:template parser").find_templates local format_cat = require("Module:utilities").format_categories local full_link = require("Module:links").full_link local get_lang = require("Module:languages").getByCode local get_section = require("Module:pages").get_section local gsplit = mw.text.gsplit local html_create = mw.html.create local insert = table.insert local ipairs = ipairs local maintenance_cats = require("Module:headword").maintenance_cats local pairs = pairs local tostring = tostring local track = require('Module:debug').track local trim = m_str_utils.trim local ulen = m_str_utils.len local usub = m_str_utils.sub local m_data = mw.loadData("Module:zh-see/data") local lect_codes = mw.loadData("Module:zh/data/lect codes") local headword_data = mw.loadData("Module:headword/data") local namespace = mw.title.getCurrentTitle().namespace local langs = setmetatable({}, { __index = function(t, k) local lang = get_lang(k) t[k] = lang return lang end }) local function get_content(title) local content = mw.title.new(title) if not content then return false end return get_section(content:getContent(), "Chinese", 2) end local function process_zh_forms(data, abbrevs, args) for k, v in pairs(args) do if k == "alt" then for altform in gsplit(v, "%s*,%s*") do if altform:match("^" .. data.pagename .. "%f[%z%-]") then abbrevs.v = true end end elseif v == data.pagename then if k:match("^s%d*$") then abbrevs.s = true elseif k:match("^ss%d*$") then abbrevs.ss = true elseif k:match("^t%d*$") then abbrevs.v = true abbrevs.t = true end end end end local function process_categories(template, name) local cat_type = m_data.cat_type[name] if not cat_type then return end local args = template:get_arguments() local code = lect_codes.langcode_to_abbr[args[1]] and args[1] if not code then return end local lang = langs[code] local cat_prefix = ( cat_type == "topics" and (lang:getCode() .. ":") or cat_type == "catlangname" and (lang:getCanonicalName() .. " ") or "" ) local categories = {} for i = 2, #args do insert(categories, cat_prefix .. trim(args[i])) end return format_cat(categories, lang) end local function iterate_templates(frame, data, abbrev, chained) local zh_forms, zh_see, zh_pron, zh_char_comp local abbrevs if not abbrev then abbrevs = {} end for template in find_templates(data.content) do local name = template:get_name() if name == "zh-forms" then zh_forms = true if not abbrev then process_zh_forms(data, abbrevs, template:get_arguments()) end elseif name == "zh-see" and not chained then local args = template:get_arguments() zh_see = args[1] data.new_abbrev = args[2] elseif name == "zh-pron" then zh_pron = zh_pron or template:get_arguments() elseif data.abbrev ~= "poj" then if name == "zh-character component" then zh_char_comp = true else local cats = process_categories(template, name) if cats then insert(data.categories, cats) end end end end if zh_forms then if not abbrev then -- Note: Don't mention second-round simplified if there's a match for (first-round) simplified. abbrev = (abbrevs.s and "s" or "") .. (abbrevs.ss and not abbrevs.s and "ss" or "") .. (abbrevs.v and "v" or "") .. (abbrevs.t and "t" or "") if abbrev ~= "" then if chained then data.new_abbrev = abbrev else data.abbrev = abbrev end end end elseif zh_see then data.new_title = zh_see data.content = get_content(zh_see) if data.content then data.chain = true return iterate_templates(frame, data, data.new_abbrev, true) end end if zh_pron then local data_abbrev = data.abbrev if data_abbrev == "poj" or data_abbrev == "trc" then local new_zh_pron = {} for k, v in pairs(zh_pron) do if k == "mn" or k == "cat" then new_zh_pron[k] = v end end zh_pron = new_zh_pron if data_abbrev == "poj" then zh_pron.poj_form_zh_see = "yes" end end zh_pron.only_cat = "yes" -- FIXME: this should be a callable function. local cats = frame:expandTemplate{ title = "Template:zh-pron", args = zh_pron } if cats then insert(data.categories, cats) end end if zh_char_comp then insert(data.categories, format_cat({"zh:Chinese character components"}, langs.zh)) end if not data.chain then data.new_title = nil data.new_abbrev = nil end if not (chained or zh_forms or zh_pron) then track("zh-see/unidirectional reference to variant") elseif not (chained or data.content:match(data.pagename)) then track("zh-see/unidirectional reference variant→orthodox") end end local export = {} function export.show(frame) local data = { args = frame:getParent().args, pagename = headword_data.pagename, categories = {} } data.title = data.args[1] data.abbrev = data.args[2] ~= "" and data.args[2] data.simp = data.args.simp or false if data.title == data.pagename then return error("The soft-directed item is the same as the page title.") end data.content = get_content(data.title) if not data.content then insert(data.categories, format_cat({"Chinese redlinks/zh-see"}, langs.zh)) else iterate_templates(frame, data, data.abbrev) end -- automatically generated |t2= if not data.abbrev and change_to_variant(data.title) == data.pagename then data.abbrev = "vt" end local non_lemma_cat = m_data.non_lemma_type[data.abbrev or "s"] if not non_lemma_cat then error("Please specify a valid type of non-lemma; the value \"" .. data.abbrev .. "\" is not valid (see [[Template:zh-see]]).") end local self_link_chars if data.abbrev == "poj" then self_link_chars = full_link{ term = data.pagename .. "//", lang = langs["nan-hbl"], tr = "-" } else self_link_chars = full_link{ term = data.pagename:gsub(".[\128-\191]*", "[[%0]]") .. "//", lang = langs.zh, tr = "-" } end local title_link = full_link{ term = data.title .. "//", lang = langs.zh, tr = "-" } local new_title_link if data.chain then new_title_link = full_link{ term = data.new_title .. "//", lang = langs.zh, tr = "-" } end local gloss_text = data.args[3] or (data.content and extract_gloss(data.content, true)) local wikitext1 = "'''For pronunciation and definitions of '''" .. self_link_chars .. "''' – see " .. (new_title_link or title_link) if gloss_text and #gloss_text > 0 then wikitext1 = wikitext1 .. " (“" .. gloss_text .. "”)" end wikitext1 = wikitext1 .. ".'''" local wikitext2 = "(''This " .. (data.abbrev ~= "poj" and ulen(data.pagename) == 1 and "character" or "term") .. " is " .. non_lemma_cat .. " form of'' " .. title_link if data.simp then local link1 = full_link{ term = usub(data.simp, 1, 1) .. "//", lang = langs.zh, tr = "-" } local link2 = full_link{ term = usub(data.simp, 2, 2) .. "//", lang = langs.zh, tr = "-" } data.simp = html_create("small") :wikitext(":&nbsp; " .. link1 .. " → " .. link2) :allDone() end if data.chain then data.chain = ", which is in turn ''" .. m_data.non_lemma_type[data.new_abbrev ~= "" and data.new_abbrev or "v"] .. "'' form of " .. new_title_link end local box = html_create("table") :addClass("wikitable") :addClass("zh-see") :allDone() if non_lemma_cat:match("simplified") then box = box:addClass("mw-collapsible") :addClass("mw-collapsed") end box = box:css("border", "1px") :css("border", "1px solid #797979") :css("margin-left", "1px") :css("text-align", "left") :css("min-width", (data.chain and "80" or "70") .. "%") :tag("tr") :tag("td") :css("background-color", "var(--wikt-palette-dullcyan,#eaecf0)") :css("color", "inherit") :css("padding-left", "0.5em") :wikitext(wikitext1) :tag("br") :done() :wikitext(wikitext2) :node(data.simp) :wikitext(data.chain) :wikitext(").") :allDone() if non_lemma_cat:match("simplified") then box = box:tag("tr") :tag("td") :addClass("mw-collapsible-content") :css("background-color", "var(--wikt-palette-lightyellow,#FFFFe0)") :css("color", "inherit") :css("font-size", "smaller") :tag("b") :wikitext("සටහන:") :done() :tag("ul") :tag("li") :wikitext("[[w:Simplified Chinese|සරලීකෘත චීන]] මූලිකවම භාවිතා වන්නේ චීන ප්‍රධාන භූමිය, මැලේසියාව") :tag("span") :addClass("serial-comma") :wikitext(",") :done() :wikitext(" සහ සිංගපූරුව යන ස්ථාන වල ය.") :done() :tag("li") :wikitext("[[w:Traditional Chinese|සාම්ප්‍රදායික චීන]] මූලිකවම භාවිතා වන්නේ හොංකොං, මකාවෝ") :tag("span") :addClass("serial-comma") :wikitext(",") :done() :wikitext(" සහ තායිවානය යන ස්ථාන වල ය.") :allDone() end box = tostring(box) if not data.content and (namespace == 0 or namespace == 118) then insert(data.categories, format_cat({"Chinese terms with uncreated forms"}, langs.zh)) end for _, word in ipairs(m_data.categorize) do if non_lemma_cat:match(word) then insert(data.categories, categorize(word)) end end local lang if data.abbrev == "poj" then lang = langs["nan-hbl"] insert(data.categories, format_cat({"Hokkien pe̍h-ōe-jī forms"}, lang)) else lang = langs.zh end -- Standard maintenance categories usually done by [[Module:headword]]. local lang_maintenance_cats = {} local page_maintenance_cats = {} maintenance_cats( headword_data.page, lang, lang_maintenance_cats, page_maintenance_cats ) lang_maintenance_cats = format_cat(lang_maintenance_cats, lang) page_maintenance_cats = format_cat(page_maintenance_cats, nil, "-") return box .. concat(data.categories) .. lang_maintenance_cats .. page_maintenance_cats end return export p8krkme2qidw1ajqcaj6ig68qbe6duk 192862 192860 2024-11-18T10:36:31Z Lee 19 [[蓝色]] සඳහා සහාය 192862 Scribunto text/plain local m_sinhala = require("Module:sinhala") local m_str_utils = require("Module:string utilities") local categorize = require("Module:zh-cat").categorize local change_to_variant = require("Module:zh-forms").change_to_variant local concat = table.concat local extract_gloss = require("Module:zh/extract").extract_gloss local find_templates = require("Module:template parser").find_templates local format_cat = require("Module:utilities").format_categories local full_link = require("Module:links").full_link local get_lang = require("Module:languages").getByCode local get_section = require("Module:pages").get_section local gsplit = mw.text.gsplit local html_create = mw.html.create local insert = table.insert local ipairs = ipairs local maintenance_cats = require("Module:headword").maintenance_cats local pairs = pairs local tostring = tostring local track = require('Module:debug').track local trim = m_str_utils.trim local ulen = m_str_utils.len local usub = m_str_utils.sub local m_data = mw.loadData("Module:zh-see/data") local lect_codes = mw.loadData("Module:zh/data/lect codes") local headword_data = mw.loadData("Module:headword/data") local namespace = mw.title.getCurrentTitle().namespace local langs = setmetatable({}, { __index = function(t, k) local lang = get_lang(k) t[k] = lang return lang end }) local function get_content(title) local content = mw.title.new(title) if not content then return false end return get_section(content:getContent(), "Chinese", 2) end local function process_zh_forms(data, abbrevs, args) for k, v in pairs(args) do if k == "alt" then for altform in gsplit(v, "%s*,%s*") do if altform:match("^" .. data.pagename .. "%f[%z%-]") then abbrevs.v = true end end elseif v == data.pagename then if k:match("^s%d*$") then abbrevs.s = true elseif k:match("^ss%d*$") then abbrevs.ss = true elseif k:match("^t%d*$") then abbrevs.v = true abbrevs.t = true end end end end local function process_categories(template, name) local cat_type = m_data.cat_type[name] if not cat_type then return end local args = template:get_arguments() local code = lect_codes.langcode_to_abbr[args[1]] and args[1] if not code then return end local lang = langs[code] local cat_prefix = ( cat_type == "topics" and (lang:getCode() .. ":") or cat_type == "catlangname" and (lang:getCanonicalName() .. " ") or "" ) local categories = {} for i = 2, #args do insert(categories, cat_prefix .. trim(args[i])) end return format_cat(categories, lang) end local function iterate_templates(frame, data, abbrev, chained) local zh_forms, zh_see, zh_pron, zh_char_comp local abbrevs if not abbrev then abbrevs = {} end for template in find_templates(data.content) do local name = template:get_name() if name == "zh-forms" then zh_forms = true if not abbrev then process_zh_forms(data, abbrevs, template:get_arguments()) end elseif name == "zh-see" and not chained then local args = template:get_arguments() zh_see = args[1] data.new_abbrev = args[2] elseif name == "zh-pron" then zh_pron = zh_pron or template:get_arguments() elseif data.abbrev ~= "poj" then if name == "zh-character component" then zh_char_comp = true else local cats = process_categories(template, name) if cats then insert(data.categories, cats) end end end end if zh_forms then if not abbrev then -- Note: Don't mention second-round simplified if there's a match for (first-round) simplified. abbrev = (abbrevs.s and "s" or "") .. (abbrevs.ss and not abbrevs.s and "ss" or "") .. (abbrevs.v and "v" or "") .. (abbrevs.t and "t" or "") if abbrev ~= "" then if chained then data.new_abbrev = abbrev else data.abbrev = abbrev end end end elseif zh_see then data.new_title = zh_see data.content = get_content(zh_see) if data.content then data.chain = true return iterate_templates(frame, data, data.new_abbrev, true) end end if zh_pron then local data_abbrev = data.abbrev if data_abbrev == "poj" or data_abbrev == "trc" then local new_zh_pron = {} for k, v in pairs(zh_pron) do if k == "mn" or k == "cat" then new_zh_pron[k] = v end end zh_pron = new_zh_pron if data_abbrev == "poj" then zh_pron.poj_form_zh_see = "yes" end end zh_pron.only_cat = "yes" -- FIXME: this should be a callable function. local cats = frame:expandTemplate{ title = "Template:zh-pron", args = zh_pron } if cats then insert(data.categories, cats) end end if zh_char_comp then insert(data.categories, format_cat({"zh:Chinese character components"}, langs.zh)) end if not data.chain then data.new_title = nil data.new_abbrev = nil end if not (chained or zh_forms or zh_pron) then track("zh-see/unidirectional reference to variant") elseif not (chained or data.content:match(data.pagename)) then track("zh-see/unidirectional reference variant→orthodox") end end local export = {} function export.show(frame) local data = { args = frame:getParent().args, pagename = headword_data.pagename, categories = {} } data.title = data.args[1] data.abbrev = data.args[2] ~= "" and data.args[2] data.simp = data.args.simp or false if data.title == data.pagename then return error("The soft-directed item is the same as the page title.") end data.content = get_content(data.title) if not data.content then insert(data.categories, format_cat({"Chinese redlinks/zh-see"}, langs.zh)) else iterate_templates(frame, data, data.abbrev) end -- automatically generated |t2= if not data.abbrev and change_to_variant(data.title) == data.pagename then data.abbrev = "vt" end local non_lemma_cat = m_data.non_lemma_type[data.abbrev or "s"] if not non_lemma_cat then error("Please specify a valid type of non-lemma; the value \"" .. data.abbrev .. "\" is not valid (see [[Template:zh-see]]).") end local self_link_chars if data.abbrev == "poj" then self_link_chars = full_link{ term = data.pagename .. "//", lang = langs["nan-hbl"], tr = "-" } else self_link_chars = full_link{ term = data.pagename:gsub(".[\128-\191]*", "[[%0]]") .. "//", lang = langs.zh, tr = "-" } end local title_link = full_link{ term = data.title .. "//", lang = langs.zh, tr = "-" } local new_title_link if data.chain then new_title_link = full_link{ term = data.new_title .. "//", lang = langs.zh, tr = "-" } end local gloss_text = data.args[3] or (data.content and extract_gloss(data.content, true)) local wikitext1 = self_link_chars .. "''' යෙදුමේ උච්චාරණය සහ නිර්වචනය සඳහා '''" if gloss_text and #gloss_text > 0 then wikitext1 = wikitext1 .. " (“" .. gloss_text .. "”)" end wikitext1 = wikitext1 .. "'' – " .. (new_title_link or title_link) .." වෙතට යොමු වන්න" .. ".'''" local wikitext2 = "(''මෙම " .. (data.abbrev ~= "poj" and ulen(data.pagename) == 1 and "character" or "යෙදුම") .. ", " .. title_link .. " යන්නේ " .. m_sinhala.sinhala(non_lemma_cat) .. " ස්වරූපය වෙයි" if data.simp then local link1 = full_link{ term = usub(data.simp, 1, 1) .. "//", lang = langs.zh, tr = "-" } local link2 = full_link{ term = usub(data.simp, 2, 2) .. "//", lang = langs.zh, tr = "-" } data.simp = html_create("small") :wikitext(":&nbsp; " .. link1 .. " → " .. link2) :allDone() end if data.chain then data.chain = ", which is in turn ''" .. m_data.non_lemma_type[data.new_abbrev ~= "" and data.new_abbrev or "v"] .. "'' form of " .. new_title_link end local box = html_create("table") :addClass("wikitable") :addClass("zh-see") :allDone() if non_lemma_cat:match("simplified") then box = box:addClass("mw-collapsible") :addClass("mw-collapsed") end box = box:css("border", "1px") :css("border", "1px solid #797979") :css("margin-left", "1px") :css("text-align", "left") :css("min-width", (data.chain and "80" or "70") .. "%") :tag("tr") :tag("td") :css("background-color", "var(--wikt-palette-dullcyan,#eaecf0)") :css("color", "inherit") :css("padding-left", "0.5em") :wikitext(wikitext1) :tag("br") :done() :wikitext(wikitext2) :node(data.simp) :wikitext(data.chain) :wikitext(").") :allDone() if non_lemma_cat:match("simplified") then box = box:tag("tr") :tag("td") :addClass("mw-collapsible-content") :css("background-color", "var(--wikt-palette-lightyellow,#FFFFe0)") :css("color", "inherit") :css("font-size", "smaller") :tag("b") :wikitext("සටහන:") :done() :tag("ul") :tag("li") :wikitext("[[w:Simplified Chinese|සරලීකෘත චීන]] මූලිකවම භාවිතා වන්නේ චීන ප්‍රධාන භූමිය, මැලේසියාව") :tag("span") :addClass("serial-comma") :wikitext(",") :done() :wikitext(" සහ සිංගපූරුව යන ස්ථාන වල ය.") :done() :tag("li") :wikitext("[[w:Traditional Chinese|සාම්ප්‍රදායික චීන]] මූලිකවම භාවිතා වන්නේ හොංකොං, මකාවෝ") :tag("span") :addClass("serial-comma") :wikitext(",") :done() :wikitext(" සහ තායිවානය යන ස්ථාන වල ය.") :allDone() end box = tostring(box) if not data.content and (namespace == 0 or namespace == 118) then insert(data.categories, format_cat({"Chinese terms with uncreated forms"}, langs.zh)) end for _, word in ipairs(m_data.categorize) do if non_lemma_cat:match(word) then insert(data.categories, categorize(word)) end end local lang if data.abbrev == "poj" then lang = langs["nan-hbl"] insert(data.categories, format_cat({"Hokkien pe̍h-ōe-jī forms"}, lang)) else lang = langs.zh end -- Standard maintenance categories usually done by [[Module:headword]]. local lang_maintenance_cats = {} local page_maintenance_cats = {} maintenance_cats( headword_data.page, lang, lang_maintenance_cats, page_maintenance_cats ) lang_maintenance_cats = format_cat(lang_maintenance_cats, lang) page_maintenance_cats = format_cat(page_maintenance_cats, nil, "-") return box .. concat(data.categories) .. lang_maintenance_cats .. page_maintenance_cats end return export jsx0ckzxc1vs83fbuzyxpud6cm0o2o0 ප්‍රවර්ගය:ඉංග්‍රීසි ප්‍රත්‍ය ස්වරූප 14 121511 192795 186783 2024-11-18T09:25:27Z Pinthura 2424 Pinthura විසින් [[ප්‍රවර්ගය:English suffix forms]] සිට [[ප්‍රවර්ගය:ඉංග්‍රීසි ප්‍රත්‍ය ස්වරූප]] වෙත පිටුව ගෙන යන ලදී: සේවා: නව ප්‍රවර්ග නාමය වෙත ගෙනයාම. 186782 wikitext text/x-wiki {{auto cat}} eomzlm5v4j7ond1phrju7cnue91g5qx 192797 192795 2024-11-18T09:25:36Z Pinthura 2424 සේවා: ඉංග්‍රීසි ව්‍යාපෘතිය වෙත සබැඳියක් එක් කිරීම. 192797 wikitext text/x-wiki {{auto cat}} [[en:Category:English suffix forms]] ecak9hhsgwoiuewo0sz4j7xzjkxro8n ප්‍රවර්ගය:ඉංග්‍රීසි යෙදුම්, ප්‍රොටෝ-ඉන්දු-යුරෝපීය වෙතින් උරුම වූ 14 124593 192571 190959 2024-11-17T14:11:21Z Lee 19 Lee විසින් [[ප්‍රවර්ගය:English terms inherited from Proto-Indo-European]] සිට [[ප්‍රවර්ගය:ඉංග්‍රීසි යෙදුම්, ප්‍රොටෝ-ඉන්දු-යුරෝපීය වෙතින් උරුම වූ]] වෙත පිටුව ගෙන යන ලදී 190958 wikitext text/x-wiki {{auto cat}} eomzlm5v4j7ond1phrju7cnue91g5qx සැකිල්ල:standard spelling of 10 124629 192885 191045 2024-11-18T11:49:32Z Lee 19 192885 wikitext text/x-wiki {{ {{#if:{{{lang|}}}|check deprecated lang param usage|no deprecated lang param usage}}|lang={{{lang|}}}|<!-- -->{{#invoke:form of/templates|form_of_t|ignore=from:list|{{#invoke:labels/templates/show_from|show_from}} , යන යෙදුමේ සම්මත අක්ෂර වින්‍යාසය|withcap=1|withdot=1}}<!-- -->}}<!-- --><noinclude>{{documentation}}</noinclude> kfwxow7g8jc7lekupw3okkd07a6m01t ප්‍රවර්ගය:English terms derived from Germanic languages 14 125126 192587 192424 2024-11-17T15:13:31Z Pinthura 2424 රොබෝ: යළියොමුව, මෘදු ප්‍රවර්ග යළියොමුවක් බවට හැරවීම 192587 wikitext text/x-wiki {{category redirect|ඉංග්‍රීසි යෙදුම්, ජර්මානු භාෂා වෙතින් ව්‍යුත්පන්න}} opln4meyu0m0a4izbtdibnulzkpjb3c ප්‍රවර්ගය:Terms derived from Germanic languages by language 14 125128 192588 192428 2024-11-17T15:13:41Z Pinthura 2424 රොබෝ: යළියොමුව, මෘදු ප්‍රවර්ග යළියොමුවක් බවට හැරවීම 192588 wikitext text/x-wiki {{category redirect|භාෂාව අනුව යෙදුම්, ජර්මානු භාෂා වෙතින් ව්‍යුත්පන්න}} 42a43x67lz68cw2ea2ozkrleyf63t70 ප්‍රවර්ගය:West Germanic භාෂා 14 125129 192589 192442 2024-11-17T15:13:51Z Pinthura 2424 රොබෝ: යළියොමුව, මෘදු ප්‍රවර්ග යළියොමුවක් බවට හැරවීම 192589 wikitext text/x-wiki {{category redirect|බටහිර ජර්මානු භාෂා}} jijyre26i46nd9f3mlwww9dis1xa7re ප්‍රවර්ගය:English terms derived from West Germanic languages 14 125131 192590 192446 2024-11-17T15:14:01Z Pinthura 2424 රොබෝ: යළියොමුව, මෘදු ප්‍රවර්ග යළියොමුවක් බවට හැරවීම 192590 wikitext text/x-wiki {{category redirect|ඉංග්‍රීසි යෙදුම්, බටහිර ජර්මානු භාෂා වෙතින් ව්‍යුත්පන්න}} 7r2cfy08qq58kv1wwxn34x7bzbup3cq ප්‍රවර්ගය:Terms derived from West Germanic languages by language 14 125133 192591 192450 2024-11-17T15:14:11Z Pinthura 2424 රොබෝ: යළියොමුව, මෘදු ප්‍රවර්ග යළියොමුවක් බවට හැරවීම 192591 wikitext text/x-wiki {{category redirect|භාෂාව අනුව යෙදුම්, බටහිර ජර්මානු භාෂා වෙතින් ව්‍යුත්පන්න}} iara4jjlermxfy4ldf2c9674mcrriyw ප්‍රවර්ගය:Proto-West Germanic සැකිලි 14 125135 192593 192500 2024-11-17T15:14:31Z Pinthura 2424 රොබෝ: යළියොමුව, මෘදු ප්‍රවර්ග යළියොමුවක් බවට හැරවීම 192593 wikitext text/x-wiki {{category redirect|ප්‍රොටෝ-බටහිර ජර්මානු සැකිලි}} j8ns8fkliuv05zp1i82noe259wql104 ප්‍රවර්ගය:Proto-West Germanic මොඩියුල 14 125137 192594 192504 2024-11-17T15:14:41Z Pinthura 2424 රොබෝ: යළියොමුව, මෘදු ප්‍රවර්ග යළියොමුවක් බවට හැරවීම 192594 wikitext text/x-wiki {{category redirect|ප්‍රොටෝ-බටහිර ජර්මානු මොඩියුල}} p89hnpa0xdzrtazn5x8v5p4ds9rbpmd ප්‍රවර්ගය:Proto-West Germanic දත්ත මොඩියුල 14 125139 192595 192508 2024-11-17T15:14:51Z Pinthura 2424 රොබෝ: යළියොමුව, මෘදු ප්‍රවර්ග යළියොමුවක් බවට හැරවීම 192595 wikitext text/x-wiki {{category redirect|ප්‍රොටෝ-බටහිර ජර්මානු දත්ත මොඩියුල}} 72vikm0lazmplap7u599vn6mwnyk1km ප්‍රවර්ගය:Proto-West Germanic භාෂාව 14 125141 192592 192512 2024-11-17T15:14:21Z Pinthura 2424 රොබෝ: යළියොමුව, මෘදු ප්‍රවර්ග යළියොමුවක් බවට හැරවීම 192592 wikitext text/x-wiki {{category redirect|ප්‍රොටෝ-බටහිර ජර්මානු භාෂාව}} c77rncvixggk2jwc69n2s0t0p9m737l ප්‍රවර්ගය:English terms derived from Anglic languages 14 125143 192596 192524 2024-11-17T15:15:01Z Pinthura 2424 රොබෝ: යළියොමුව, මෘදු ප්‍රවර්ග යළියොමුවක් බවට හැරවීම 192596 wikitext text/x-wiki {{category redirect|ඉංග්‍රීසි යෙදුම්, ඇන්ග්ලික් භාෂා වෙතින් ව්‍යුත්පන්න}} 1c3var9wqxx4bbdamkgd1jexu9z4g1k ප්‍රවර්ගය:Terms derived from Anglic languages by language 14 125145 192597 192528 2024-11-17T15:15:11Z Pinthura 2424 රොබෝ: යළියොමුව, මෘදු ප්‍රවර්ග යළියොමුවක් බවට හැරවීම 192597 wikitext text/x-wiki {{category redirect|භාෂාව අනුව යෙදුම්, ඇන්ග්ලික් භාෂා වෙතින් ව්‍යුත්පන්න}} 9zhtbdz839zfeicvizpk3nf2vz18kyq ප්‍රවර්ගය:Anglic languages 14 125147 192598 192532 2024-11-17T15:15:21Z Pinthura 2424 රොබෝ: යළියොමුව, මෘදු ප්‍රවර්ග යළියොමුවක් බවට හැරවීම 192598 wikitext text/x-wiki {{category redirect|ඇන්ග්ලික් භාෂා}} 3hmtnkm5hfgrng6g5fxe3qritmvaytj ප්‍රවර්ගය:Anglo-Frisian languages 14 125149 192599 192536 2024-11-17T15:15:31Z Pinthura 2424 රොබෝ: යළියොමුව, මෘදු ප්‍රවර්ග යළියොමුවක් බවට හැරවීම 192599 wikitext text/x-wiki {{category redirect|ඇන්ග්ලෝ-ෆ්‍රිසියන් භාෂා}} qdohtmeodj2p0kloi240x3lgpa9xc2h ප්‍රවර්ගය:English terms derived from Anglo-Frisian languages 14 125151 192600 192540 2024-11-17T15:15:41Z Pinthura 2424 රොබෝ: යළියොමුව, මෘදු ප්‍රවර්ග යළියොමුවක් බවට හැරවීම 192600 wikitext text/x-wiki {{category redirect|ඉංග්‍රීසි යෙදුම්, ඇන්ග්ලෝ-ෆ්‍රිසියන් භාෂා වෙතින් ව්‍යුත්පන්න}} dwxeps8la8915fvhyjdjj16dfv9761y ප්‍රවර්ගය:Terms derived from Anglo-Frisian languages by language 14 125153 192601 192544 2024-11-17T15:15:51Z Pinthura 2424 රොබෝ: යළියොමුව, මෘදු ප්‍රවර්ග යළියොමුවක් බවට හැරවීම 192601 wikitext text/x-wiki {{category redirect|භාෂාව අනුව යෙදුම්, ඇන්ග්ලෝ-ෆ්‍රිසියන් භාෂා වෙතින් ව්‍යුත්පන්න}} 46ifu9naibx3yad2gpmwuf38aueemhi backronym 0 125154 192561 2024-11-17T13:56:47Z Lee 19 නිර්මාණය 192561 wikitext text/x-wiki ==English== ===Alternative forms=== * {{l|en|bacronym}} ===Etymology=== {{blend|en|back|acronym}}. ===Pronunciation=== * {{IPA|en|/ˈbæk.ɹəˌnɪm/}} * {{rhymes|en|ækɹənɪm|s=3}} ===Noun=== {{examples| * {{l|en|BASIC|gloss=Beginner's All-purpose Symbolic Instruction Code}} * {{l|en|MADD|gloss=Mothers Against Drunk Driving}} * {{l|en|posh|POSH|gloss=Port Out, Starboard Home}} (folk etymology) * {{l|en|SAD|gloss=Seasonal Affective Disorder}} * {{w|Patriot Act|USA PATRIOT Act}} * {{l|en|WASH|gloss=Water, Sanitation and Hygiene}} }} {{en-noun}} # {{rfdef|en}} ====Derived terms==== * {{l|en|backronymic}} ====See also==== * {{l|en|anacronym}} * {{l|en|recursive acronym}} {{cln|en|terms suffixed with -onym}} {{cln|en|terms suffixed with -nym}} 3nky7qypxmzqldq1a4umuymxt4priqf 192586 192561 2024-11-17T15:09:42Z Pinthura 2424 යොමු තොරතුරු පරිවර්තනය 192586 wikitext text/x-wiki == ඉංග්‍රීසි == === වෙනත් ආකාර === * {{l|en|bacronym}} === නිරුක්තිය === {{blend|en|back|acronym}}. === උච්චාරණය === * {{IPA|en|/ˈbæk.ɹəˌnɪm/}} * {{rhymes|en|ækɹənɪm|s=3}} === නාම පදය === {{examples| * {{l|en|BASIC|gloss=Beginner's All-purpose Symbolic Instruction Code}} * {{l|en|MADD|gloss=Mothers Against Drunk Driving}} * {{l|en|posh|POSH|gloss=Port Out, Starboard Home}} (folk etymology) * {{l|en|SAD|gloss=Seasonal Affective Disorder}} * {{w|Patriot Act|USA PATRIOT Act}} * {{l|en|WASH|gloss=Water, Sanitation and Hygiene}} }} {{en-noun}} # {{rfdef|en}} ==== ව්‍යුත්පන්න යෙදුම් ==== * {{l|en|backronymic}} ==== අමතර අවධානයට ==== * {{l|en|anacronym}} * {{l|en|recursive acronym}} {{cln|en|terms suffixed with -onym}} {{cln|en|terms suffixed with -nym}} 1edt9udicd961lmcbbajlplc3fsbzjz bacronym 0 125155 192562 2024-11-17T13:57:16Z Lee 19 නිර්මාණය 192562 wikitext text/x-wiki ==English== ===Noun=== {{en-noun}} # {{alt sp|en|backronym#Noun}}. ===Verb=== {{en-verb|pres_ptc2=bacronymming|past2=bacronymmed}} # {{alt sp|en|backronym#Verb}}. 09ylj9yygl6u9p4efxmuu4otsnh7oj4 192585 192562 2024-11-17T15:09:32Z Pinthura 2424 යොමු තොරතුරු පරිවර්තනය 192585 wikitext text/x-wiki == ඉංග්‍රීසි == === නාම පදය === {{en-noun}} # {{alt sp|en|backronym#Noun}}. === ක්‍රියා පදය === {{en-verb|pres_ptc2=bacronymming|past2=bacronymmed}} # {{alt sp|en|backronym#Verb}}. g1qglwjo07rhzd1rrc1ra5toemtbr6l backronyms 0 125156 192563 2024-11-17T13:57:37Z Lee 19 නිර්මාණය 192563 wikitext text/x-wiki ==English== ===Noun=== {{head|en|noun form}} # {{plural of|en|backronym}} h7zmgcgx2ntjt39msui2x2xqj90hz6v 192584 192563 2024-11-17T15:09:22Z Pinthura 2424 යොමු තොරතුරු පරිවර්තනය 192584 wikitext text/x-wiki == ඉංග්‍රීසි == === නාම පදය === {{head|en|noun form}} # {{plural of|en|backronym}} 1ssa4glq4fh89uxpa67f3up8gbokl9e retronym 0 125157 192564 2024-11-17T13:59:45Z Lee 19 නිර්මාණය 192564 wikitext text/x-wiki {{also|Retronym}} ==English== {{examples|* [[acoustic guitar]] * dial telephone * [[plain text]] * [[snail mail]] * [[silent film]] * [[steam locomotive]] * [[Old English]] * film camera * book book ([[reduplicative]]) }} ===Etymology=== * {{audio|en|LL-Q1860 (eng)-Vealhurl-retronym.wav|a=Southern England}} From {{affix|en|retro-|-onym}}; coined by Frank Mankiewicz<ref>{{cite-web |title = Frankly Speaking |date = March 2001 |work = Business Forward |author = Jeremy M. Brosowsky |url = http://www.bizforward.com/wdc/issues/2001-03/interview/ |archiveurl = https://web.archive.org/web/20020920161005/http://www.bizforward.com/wdc/issues/2001-03/interview/ |archivedate = 20 September 2002 |accessdate = November 8, 2017 }}</ref> and popularized by {{w|William Safire}}.<ref> {{cite-journal |author=William Safire |authorlink=William Safire |title=On Language: Watch what you say |newspaper=New York Times |url=http://www.nytimes.com/1982/12/26/magazine/on-language-william-safire-watch-what-you-say.html |date=December 26, 1982 }}</ref><ref>{{cite-journal |title=On Language: Retronym |date=January 7, 2007 |work=New York Times |author=William Safire |authorlink=William Safire |url=http://www.nytimes.com/2007/01/07/magazine/07wwln_safire.t.html |accessdate=November 8, 2017}}</ref> ===Noun=== {{en-noun}} # {{rfdef|en}} ====Derived terms==== {{der3|en |retronymic |retronymically |retronymous }} ====See also==== * {{l|en|avant la lettre}} * [[anachronism]] * [[:Category:English retronyms]] ===References=== <references/> {{cln|en|terms suffixed with -nym}} c2bedlt50k187g6d6ljw3tbu12akfl4 192583 192564 2024-11-17T15:09:12Z Pinthura 2424 යොමු තොරතුරු පරිවර්තනය 192583 wikitext text/x-wiki {{also|Retronym}} == ඉංග්‍රීසි == {{examples|* [[acoustic guitar]] * dial telephone * [[plain text]] * [[snail mail]] * [[silent film]] * [[steam locomotive]] * [[Old English]] * film camera * book book ([[reduplicative]]) }} === නිරුක්තිය === * {{audio|en|LL-Q1860 (eng)-Vealhurl-retronym.wav|a=Southern England}} From {{affix|en|retro-|-onym}}; coined by Frank Mankiewicz<ref>{{cite-web |title = Frankly Speaking |date = March 2001 |work = Business Forward |author = Jeremy M. Brosowsky |url = http://www.bizforward.com/wdc/issues/2001-03/interview/ |archiveurl = https://web.archive.org/web/20020920161005/http://www.bizforward.com/wdc/issues/2001-03/interview/ |archivedate = 20 September 2002 |accessdate = November 8, 2017 }}</ref> and popularized by {{w|William Safire}}.<ref> {{cite-journal |author=William Safire |authorlink=William Safire |title=On Language: Watch what you say |newspaper=New York Times |url=http://www.nytimes.com/1982/12/26/magazine/on-language-william-safire-watch-what-you-say.html |date=December 26, 1982 }}</ref><ref>{{cite-journal |title=On Language: Retronym |date=January 7, 2007 |work=New York Times |author=William Safire |authorlink=William Safire |url=http://www.nytimes.com/2007/01/07/magazine/07wwln_safire.t.html |accessdate=November 8, 2017}}</ref> === නාම පදය === {{en-noun}} # {{rfdef|en}} ==== ව්‍යුත්පන්න යෙදුම් ==== {{der3|en |retronymic |retronymically |retronymous }} ==== අමතර අවධානයට ==== * {{l|en|avant la lettre}} * [[anachronism]] * [[:Category:English retronyms]] === මූලාශ්‍ර === <references/> {{cln|en|terms suffixed with -nym}} km92eexoir0r1lkc07q5apo2beayr7k retronyms 0 125158 192565 2024-11-17T14:00:18Z Lee 19 නිර්මාණය 192565 wikitext text/x-wiki {{also|Retronyms}} ==English== ===Noun=== {{head|en|noun form}} # {{plural of|en|retronym}} ==Danish== ===Noun=== {{head|da|noun form}} # {{inflection of|da|retronym||indef|gen|s}} ==Swedish== ===Noun=== {{head|sv|noun form}} # {{noun form of|sv|retronym||indef|gen|s}} 3kntgw9m8u1bu86nb1zft0k8l5btt7f 192582 192565 2024-11-17T15:09:02Z Pinthura 2424 යොමු තොරතුරු පරිවර්තනය 192582 wikitext text/x-wiki {{also|Retronyms}} == ඉංග්‍රීසි == === නාම පදය === {{head|en|noun form}} # {{plural of|en|retronym}} == ඩෙන්මාර්ක == === නාම පදය === {{head|da|noun form}} # {{inflection of|da|retronym||indef|gen|s}} == ස්වීඩන් == === නාම පදය === {{head|sv|noun form}} # {{noun form of|sv|retronym||indef|gen|s}} 9il0wv2t7g7mdoh9yzup0s0tf2ntrul ප්‍රවර්ගය:English terms inherited from Proto-Indo-European 14 125159 192572 2024-11-17T14:11:21Z Lee 19 Lee විසින් [[ප්‍රවර්ගය:English terms inherited from Proto-Indo-European]] සිට [[ප්‍රවර්ගය:ඉංග්‍රීසි යෙදුම්, ප්‍රොටෝ-ඉන්දු-යුරෝපීය වෙතින් උරුම වූ]] වෙත පිටුව ගෙන යන ලදී 192572 wikitext text/x-wiki #යළියොමුව [[:ප්‍රවර්ගය:ඉංග්‍රීසි යෙදුම්, ප්‍රොටෝ-ඉන්දු-යුරෝපීය වෙතින් උරුම වූ]] i0r0783t0qe34sdc9yz3fhy8vrvdj81 192602 192572 2024-11-17T15:16:01Z Pinthura 2424 රොබෝ: යළියොමුව, මෘදු ප්‍රවර්ග යළියොමුවක් බවට හැරවීම 192602 wikitext text/x-wiki {{category redirect|ඉංග්‍රීසි යෙදුම්, ප්‍රොටෝ-ඉන්දු-යුරෝපීය වෙතින් උරුම වූ}} mcllbai4h7k4iqii103ifssuo920ku5 ප්‍රවර්ගය:ඉංග්‍රීසි පද, ප්‍රොටෝ-ඉන්දු-යුරෝපීය වෙතින් ව්‍යුත්පන්න 14 125160 192574 2024-11-17T14:12:34Z Lee 19 Lee විසින් [[ප්‍රවර්ගය:ඉංග්‍රීසි පද, ප්‍රොටෝ-ඉන්දු-යුරෝපීය වෙතින් ව්‍යුත්පන්න]] සිට [[ප්‍රවර්ගය:ඉංග්‍රීසි යෙදුම්, ප්‍රොටෝ-ඉන්දු-යුරෝපීය වෙතින් ව්‍යුත්පන්න]] වෙත පිටුව ගෙන යන ලදී 192574 wikitext text/x-wiki #යළියොමුව [[:ප්‍රවර්ගය:ඉංග්‍රීසි යෙදුම්, ප්‍රොටෝ-ඉන්දු-යුරෝපීය වෙතින් ව්‍යුත්පන්න]] 4sjw55qqagupe6ixm1nxfv8olrzybz1 192603 192574 2024-11-17T15:16:11Z Pinthura 2424 රොබෝ: යළියොමුව, මෘදු ප්‍රවර්ග යළියොමුවක් බවට හැරවීම 192603 wikitext text/x-wiki {{category redirect|ඉංග්‍රීසි යෙදුම්, ප්‍රොටෝ-ඉන්දු-යුරෝපීය වෙතින් ව්‍යුත්පන්න}} px4smcqdzvzpsozeqg1vuhjag5s6bqy ප්‍රවර්ගය:භාෂාව අනුව පද, ප්‍රොටෝ-ඉන්දු-යුරෝපීය වෙතින් ව්‍යුත්පන්න 14 125161 192576 2024-11-17T14:13:30Z Lee 19 Lee විසින් [[ප්‍රවර්ගය:භාෂාව අනුව පද, ප්‍රොටෝ-ඉන්දු-යුරෝපීය වෙතින් ව්‍යුත්පන්න]] සිට [[ප්‍රවර්ගය:භාෂාව අනුව යෙදුම්, ප්‍රොටෝ-ඉන්දු-යුරෝපීය වෙතින් ව්‍යුත්පන්න]] වෙත පිටුව ගෙන යන ලදී 192576 wikitext text/x-wiki #යළියොමුව [[:ප්‍රවර්ගය:භාෂාව අනුව යෙදුම්, ප්‍රොටෝ-ඉන්දු-යුරෝපීය වෙතින් ව්‍යුත්පන්න]] 1smhrfisxbyc3612mx9kodcbhbhsud7 192604 192576 2024-11-17T15:16:21Z Pinthura 2424 රොබෝ: යළියොමුව, මෘදු ප්‍රවර්ග යළියොමුවක් බවට හැරවීම 192604 wikitext text/x-wiki {{category redirect|භාෂාව අනුව යෙදුම්, ප්‍රොටෝ-ඉන්දු-යුරෝපීය වෙතින් ව්‍යුත්පන්න}} dxaaf8sjifxf3qve3go9m4di8aypae2 ප්‍රවර්ගය:භාෂාව අනුව යෙදුම්, ප්‍රොටෝ-ඉන්දු-යුරෝපීය වෙතින් උරුම වූ 14 125162 192577 2024-08-30T04:15:06Z en>WingerBot 0 WingerBot moved page [[Category:Terms inherited from Proto-Indo-European]] to [[Category:Terms inherited from Proto-Indo-European by language]] without leaving a redirect: rename 'Terms inherited from LANG' -> 'Terms inherited from LANG by language' per [[Wiktionary:Beer parlour/2024/August#planning to standardize names of categories like Category:Semantic loans from English]] 192577 wikitext text/x-wiki {{auto cat}} eomzlm5v4j7ond1phrju7cnue91g5qx 192578 192577 2024-11-17T14:14:24Z Lee 19 [[:en:Category:Terms_inherited_from_Proto-Indo-European_by_language]] වෙතින් එක් සංශෝධනයක් 192577 wikitext text/x-wiki {{auto cat}} eomzlm5v4j7ond1phrju7cnue91g5qx 192579 192578 2024-11-17T14:15:43Z Lee 19 Lee විසින් [[ප්‍රවර්ගය:Terms inherited from Proto-Indo-European by language]] සිට [[ප්‍රවර්ගය:භාෂාව අනුව යෙදුම්, ප්‍රොටෝ-ඉන්දු-යුරෝපීය වෙතින් උරුම වූ]] වෙත පිටුව ගෙන යන ලදී 192577 wikitext text/x-wiki {{auto cat}} eomzlm5v4j7ond1phrju7cnue91g5qx ප්‍රවර්ගය:Terms inherited from Proto-Indo-European by language 14 125163 192580 2024-11-17T14:15:44Z Lee 19 Lee විසින් [[ප්‍රවර්ගය:Terms inherited from Proto-Indo-European by language]] සිට [[ප්‍රවර්ගය:භාෂාව අනුව යෙදුම්, ප්‍රොටෝ-ඉන්දු-යුරෝපීය වෙතින් උරුම වූ]] වෙත පිටුව ගෙන යන ලදී 192580 wikitext text/x-wiki #යළියොමුව [[:ප්‍රවර්ගය:භාෂාව අනුව යෙදුම්, ප්‍රොටෝ-ඉන්දු-යුරෝපීය වෙතින් උරුම වූ]] s1fda19cl3vwg5evc2i8lkxim4dbo05 192605 192580 2024-11-17T15:16:31Z Pinthura 2424 රොබෝ: යළියොමුව, මෘදු ප්‍රවර්ග යළියොමුවක් බවට හැරවීම 192605 wikitext text/x-wiki {{category redirect|භාෂාව අනුව යෙදුම්, ප්‍රොටෝ-ඉන්දු-යුරෝපීය වෙතින් උරුම වූ}} ffy7ufc26jqc7lzzlhfei3hzgdu57j5 bibliography 0 125164 192606 2024-11-17T15:19:52Z Lee 19 නිර්මාණය 192606 wikitext text/x-wiki ==English== ===Etymology=== From {{uder|en|grc|βιβλιογραφία||the act or habit of writing books}}, from {{m|grc|βιβλιογράφος||a writer of books}}, from {{m|grc|βιβλίον||small book}} + {{m|grc|γράφω||I write}}. ===Pronunciation=== * {{IPA|en|/bɪbliɒɡɹəfi/}} * {{audio|en|LL-Q1860 (eng)-Vealhurl-bibliography.wav|a=Southern England}} * {{rhymes|en|ɒɡɹəfi|s=5}} ===Noun=== {{en-noun}} # [[ග්‍රන්ථනාමාවලිය]] ====Derived terms==== {{col-auto|en|bibliographick|biobibliography|cartobibliography|hyperbibliography|webliography |annotated bibliography |autobibliography |bibliographer |bibliographic |bio-bibliography }} ====Related terms==== * {{l|en|bibliology}} * {{l|en|reference list}} {{cln|en|terms prefixed with biblio-|sort=graphy}} {{cln|en|terms suffixed with -graphy}} {{C|en|Bibliography|Writing}} a1uso74f02babwx78vu4lwpqkev3cgt 192615 192606 2024-11-17T15:25:18Z Pinthura 2424 යොමු තොරතුරු පරිවර්තනය 192615 wikitext text/x-wiki == ඉංග්‍රීසි == === නිරුක්තිය === From {{uder|en|grc|βιβλιογραφία||the act or habit of writing books}}, from {{m|grc|βιβλιογράφος||a writer of books}}, from {{m|grc|βιβλίον||small book}} + {{m|grc|γράφω||I write}}. === උච්චාරණය === * {{IPA|en|/bɪbliɒɡɹəfi/}} * {{audio|en|LL-Q1860 (eng)-Vealhurl-bibliography.wav|a=Southern England}} * {{rhymes|en|ɒɡɹəfi|s=5}} === නාම පදය === {{en-noun}} # [[ග්‍රන්ථනාමාවලිය]] ==== ව්‍යුත්පන්න යෙදුම් ==== {{col-auto|en|bibliographick|biobibliography|cartobibliography|hyperbibliography|webliography |annotated bibliography |autobibliography |bibliographer |bibliographic |bio-bibliography }} ==== ආශ්‍රිත යෙදුම් ==== * {{l|en|bibliology}} * {{l|en|reference list}} {{cln|en|terms prefixed with biblio-|sort=graphy}} {{cln|en|terms suffixed with -graphy}} {{C|en|Bibliography|Writing}} 70o6qi49ntzdlcgjncpcrh71fb220lj ග්‍රන්ථනාමාවලිය 0 125165 192607 2024-11-17T15:20:19Z Lee 19 '== සිංහල == === නිරුක්තිය === {{rfe|si}} === නාම පදය === {{si-noun}} # {{rfdef|si}} <!-- ==== පරිවර්තන ==== {{trans-top|පරිවර්තන}} * ඉංග්‍රීසි: {{t|en|<<ඉංග්‍රීසි වචනය>>}} {{trans-bottom}} === අමතර අවධානයට === * {{l|si|<<ආශ්‍රිත පවතින වෙනත් ව...' යොදමින් නව පිටුවක් තනන ලදි 192607 wikitext text/x-wiki == සිංහල == === නිරුක්තිය === {{rfe|si}} === නාම පදය === {{si-noun}} # {{rfdef|si}} <!-- ==== පරිවර්තන ==== {{trans-top|පරිවර්තන}} * ඉංග්‍රීසි: {{t|en|<<ඉංග්‍රීසි වචනය>>}} {{trans-bottom}} === අමතර අවධානයට === * {{l|si|<<ආශ්‍රිත පවතින වෙනත් වචන>>}} --> 37g9s13iio6w9i2yw7aw46v28viw7h4 192608 192607 2024-11-17T15:20:40Z Lee 19 192608 wikitext text/x-wiki == සිංහල == === නිරුක්තිය === {{rfe|si}} === නාම පදය === {{si-noun}} # {{rfdef|si}} ==== පරිවර්තන ==== {{trans-top|පරිවර්තන}} * ඉංග්‍රීසි: {{t|en|bibliography}} {{trans-bottom}} <!-- === අමතර අවධානයට === * {{l|si|<<ආශ්‍රිත පවතින වෙනත් වචන>>}} --> 0rqd5xbmjc4ixqioi5j4iqxxuzpa4t8 192611 192608 2024-11-17T15:23:43Z Lee 19 192611 wikitext text/x-wiki == සිංහල == === නිරුක්තිය === {{rfe|si}} === නාම පදය === {{si-noun}} # {{rfdef|si}} ==== පරිවර්තන ==== {{trans-top|පරිවර්තන}} * ඉංග්‍රීසි: {{t|en|bibliography}} * ප්‍රංශ: {{t+|fr|bibliographie|f}} {{trans-bottom}} <!-- === අමතර අවධානයට === * {{l|si|<<ආශ්‍රිත පවතින වෙනත් වචන>>}} --> jbgspbuye9xehyc8r2a455qzuw3nrxl 192612 192611 2024-11-17T15:24:03Z Lee 19 192612 wikitext text/x-wiki == සිංහල == === නිරුක්තිය === {{rfe|si}} === නාම පදය === {{si-noun}} # {{rfdef|si}} ==== පරිවර්තන ==== {{trans-top|පරිවර්තන}} * ඉංග්‍රීසි: {{t|en|bibliography}} * ප්‍රංශ: {{t+|fr|bibliographie|f}} * ජපන්: {{t+|ja|書誌|tr=shoshi}} {{trans-bottom}} <!-- === අමතර අවධානයට === * {{l|si|<<ආශ්‍රිත පවතින වෙනත් වචන>>}} --> jrykq2ncnl5yk08ukoqi2rw704sn2pv bibliographies 0 125166 192609 2024-11-17T15:21:34Z Lee 19 නිර්මාණය 192609 wikitext text/x-wiki ==English== ===Noun=== {{head|en|noun form}} # {{plural of|en|bibliography}} ==French== ===Noun=== {{head|fr|noun form|g=f}} # {{plural of|fr|bibliographie}} q8623bmrkse6jzl2rcmgb99om3z6xe0 192614 192609 2024-11-17T15:25:08Z Pinthura 2424 යොමු තොරතුරු පරිවර්තනය 192614 wikitext text/x-wiki == ඉංග්‍රීසි == === නාම පදය === {{head|en|noun form}} # {{plural of|en|bibliography}} == ප්‍රංශ == === නාම පදය === {{head|fr|noun form|g=f}} # {{plural of|fr|bibliographie}} 4h2nevptsznt235asxeqqzy5vx2mr8r bibliographie 0 125167 192610 2024-11-17T15:22:30Z Lee 19 නිර්මාණය 192610 wikitext text/x-wiki {{also|Bibliographie}} ==French== ===Etymology=== From {{af|fr|biblio-|-graphie}}. ===Pronunciation=== * {{fr-IPA}} * {{audio|fr|LL-Q150 (fra)-WikiLucas00-bibliographie.wav}} ===Noun=== {{fr-noun|f}} # [[ග්‍රන්ථනාමාවලිය]] ([[bibliography]]) ====Related terms==== * {{l|fr|bibliographe}} ===Further reading=== * {{R:fr:TLFi}} {{C|fr|Bibliography}} s9cxb4ehuz24johe0dsschufdlgair5 192613 192610 2024-11-17T15:24:58Z Pinthura 2424 යොමු තොරතුරු පරිවර්තනය 192613 wikitext text/x-wiki {{also|Bibliographie}} == ප්‍රංශ == === නිරුක්තිය === From {{af|fr|biblio-|-graphie}}. === උච්චාරණය === * {{fr-IPA}} * {{audio|fr|LL-Q150 (fra)-WikiLucas00-bibliographie.wav}} === නාම පදය === {{fr-noun|f}} # [[ග්‍රන්ථනාමාවලිය]] ([[bibliography]]) ==== ආශ්‍රිත යෙදුම් ==== * {{l|fr|bibliographe}} === වැඩිදුර් කියවීම සඳහා === * {{R:fr:TLFi}} {{C|fr|Bibliography}} 45hueds7ei53nw9u3wg7sd3u7fphwer උදවු:Namespaces 12 125168 192625 2021-03-05T04:00:57Z en>JackBot 0 Bot: Fixing double redirect to [[Wiktionary:Namespace]] 192625 wikitext text/x-wiki #REDIRECT [[Wiktionary:Namespace]] gzmq2kerlxx7w127vel81hiqymforg5 192626 192625 2024-11-18T04:00:43Z Lee 19 [[:en:Help:Namespaces]] වෙතින් එක් සංශෝධනයක් 192625 wikitext text/x-wiki #REDIRECT [[Wiktionary:Namespace]] gzmq2kerlxx7w127vel81hiqymforg5 ප්‍රවර්ගය:Latin terms suffixed with -inus 14 125169 192627 2022-09-02T05:59:15Z en>WingerBot 0 WingerBot moved page [[Category:Latin words suffixed with -inus]] to [[Category:Latin terms suffixed with -inus]] without leaving a redirect: rename 'words' -> 'terms' in affix and compound categories (see [[Wiktionary:Beer parlour/2022/August]]) 192627 wikitext text/x-wiki {{auto cat|alt=-īnus}} br2pqm9enrbj3a628n3u8aoft0gdumo 192628 192627 2024-11-18T04:06:01Z Lee 19 [[:en:Category:Latin_terms_suffixed_with_-inus]] වෙතින් එක් සංශෝධනයක් 192627 wikitext text/x-wiki {{auto cat|alt=-īnus}} br2pqm9enrbj3a628n3u8aoft0gdumo ප්‍රවර්ගය:Japanese terms prefixed with 真っ 14 125170 192629 2024-10-12T00:07:25Z en>Eirikr 0 +rfc 192629 wikitext text/x-wiki {{rfc|ja|2=The form 真っ is a phantom -- see [[Talk:ま]], and see the description in the etymology at {{m|ja|真っ白い}} about the excrescent gemination for emphasis.}} {{auto cat|sort=まっ}} hfaivwn2ruth3y48k8ve3jddd0l5tlx 192630 192629 2024-11-18T04:06:41Z Lee 19 [[:en:Category:Japanese_terms_prefixed_with_真っ]] වෙතින් එක් සංශෝධනයක් 192629 wikitext text/x-wiki {{rfc|ja|2=The form 真っ is a phantom -- see [[Talk:ま]], and see the description in the etymology at {{m|ja|真っ白い}} about the excrescent gemination for emphasis.}} {{auto cat|sort=まっ}} hfaivwn2ruth3y48k8ve3jddd0l5tlx ප්‍රවර්ගය:Japanese terms by prefix 14 125171 192631 2022-09-02T05:35:56Z en>WingerBot 0 WingerBot moved page [[Category:Japanese words by prefix]] to [[Category:Japanese terms by prefix]] without leaving a redirect: rename 'words' -> 'terms' in affix and compound categories (see [[Wiktionary:Beer parlour/2022/August]]) 192631 wikitext text/x-wiki {{auto cat}} eomzlm5v4j7ond1phrju7cnue91g5qx 192632 192631 2024-11-18T04:07:15Z Lee 19 [[:en:Category:Japanese_terms_by_prefix]] වෙතින් එක් සංශෝධනයක් 192631 wikitext text/x-wiki {{auto cat}} eomzlm5v4j7ond1phrju7cnue91g5qx ප්‍රවර්ගය:Latin American Spanish 14 125172 192633 2024-09-17T08:50:37Z en>WingerBot 0 rename dialect= to lect= in {{auto cat}} 192633 wikitext text/x-wiki {{auto cat|lect=1}} ertee7cys9kcm61xm19ibbz6xr74sxz 192634 192633 2024-11-18T04:07:41Z Lee 19 [[:en:Category:Latin_American_Spanish]] වෙතින් එක් සංශෝධනයක් 192633 wikitext text/x-wiki {{auto cat|lect=1}} ertee7cys9kcm61xm19ibbz6xr74sxz ප්‍රවර්ගය:Early Modern English 14 125173 192635 2024-09-17T10:08:19Z en>WingerBot 0 rename dialect= to lect= in {{auto cat}} 192635 wikitext text/x-wiki {{auto cat|lect=1}} ertee7cys9kcm61xm19ibbz6xr74sxz 192636 192635 2024-11-18T04:08:11Z Lee 19 [[:en:Category:Early_Modern_English]] වෙතින් එක් සංශෝධනයක් 192635 wikitext text/x-wiki {{auto cat|lect=1}} ertee7cys9kcm61xm19ibbz6xr74sxz ප්‍රවර්ගය:Provençal 14 125174 192637 2024-09-17T09:01:00Z en>WingerBot 0 rename dialect= to lect= in {{auto cat}} 192637 wikitext text/x-wiki {{auto cat|lect=1|Provence}} ar4tahs923ztwuia8vzxjgine3inlcf 192638 192637 2024-11-18T04:08:49Z Lee 19 [[:en:Category:Provençal]] වෙතින් එක් සංශෝධනයක් 192637 wikitext text/x-wiki {{auto cat|lect=1|Provence}} ar4tahs923ztwuia8vzxjgine3inlcf ප්‍රවර්ගය:Dari 14 125175 192639 2024-10-29T09:25:20Z en>WingerBot 0 use plain {{auto cat|lect=1}} so description and Wikipedia links are pulled from [[Module:labels/data/lang/fa]] (manually assisted) 192639 wikitext text/x-wiki {{auto cat|lect=1}} ertee7cys9kcm61xm19ibbz6xr74sxz 192640 192639 2024-11-18T04:09:20Z Lee 19 [[:en:Category:Dari]] වෙතින් එක් සංශෝධනයක් 192639 wikitext text/x-wiki {{auto cat|lect=1}} ertee7cys9kcm61xm19ibbz6xr74sxz ප්‍රවර්ගය:Classical Persian 14 125176 192641 2024-10-29T09:25:17Z en>WingerBot 0 use plain {{auto cat|lect=1}} so description and Wikipedia links are pulled from [[Module:labels/data/lang/fa]] (manually assisted) 192641 wikitext text/x-wiki {{auto cat|lect=1}} ertee7cys9kcm61xm19ibbz6xr74sxz 192642 192641 2024-11-18T04:09:49Z Lee 19 [[:en:Category:Classical_Persian]] වෙතින් එක් සංශෝධනයක් 192641 wikitext text/x-wiki {{auto cat|lect=1}} ertee7cys9kcm61xm19ibbz6xr74sxz ප්‍රවර්ගය:Walser German 14 125177 192643 2024-09-17T09:23:38Z en>WingerBot 0 rename dialect= to lect= in {{auto cat}} 192643 wikitext text/x-wiki {{auto cat|lect=1|the canton of [[Valais]], [[Switzerland]]; {{w|Triesenberg}}, [[Liechtenstein]]; nine communities in northern Italy; and 14 communities in [[Vorarlberg]], [[Austria]]|cat=Highest Alemannic German|breadcrumb=Walser}} q5pfvkkyde2vwtufs2poirmr4ka5cmk 192644 192643 2024-11-18T04:10:18Z Lee 19 [[:en:Category:Walser_German]] වෙතින් එක් සංශෝධනයක් 192643 wikitext text/x-wiki {{auto cat|lect=1|the canton of [[Valais]], [[Switzerland]]; {{w|Triesenberg}}, [[Liechtenstein]]; nine communities in northern Italy; and 14 communities in [[Vorarlberg]], [[Austria]]|cat=Highest Alemannic German|breadcrumb=Walser}} q5pfvkkyde2vwtufs2poirmr4ka5cmk ප්‍රවර්ගය:Jakarta Indonesian 14 125178 192645 2024-09-17T09:33:22Z en>WingerBot 0 rename dialect= to lect= in {{auto cat}} 192645 wikitext text/x-wiki {{auto cat|lect=1}} ertee7cys9kcm61xm19ibbz6xr74sxz 192646 192645 2024-11-18T04:10:49Z Lee 19 [[:en:Category:Jakarta_Indonesian]] වෙතින් එක් සංශෝධනයක් 192645 wikitext text/x-wiki {{auto cat|lect=1}} ertee7cys9kcm61xm19ibbz6xr74sxz ප්‍රවර්ගය:Javanese Indonesian 14 125179 192647 2024-09-17T08:56:07Z en>WingerBot 0 rename dialect= to lect= in {{auto cat}} 192647 wikitext text/x-wiki {{auto cat|lect=1}} ertee7cys9kcm61xm19ibbz6xr74sxz 192648 192647 2024-11-18T04:11:18Z Lee 19 [[:en:Category:Javanese_Indonesian]] වෙතින් එක් සංශෝධනයක් 192647 wikitext text/x-wiki {{auto cat|lect=1}} ertee7cys9kcm61xm19ibbz6xr74sxz ප්‍රවර්ගය:Indonesian Indonesian 14 125180 192649 2024-09-17T09:28:19Z en>WingerBot 0 rename dialect= to lect= in {{auto cat}} 192649 wikitext text/x-wiki {{auto cat|lect=1}} ertee7cys9kcm61xm19ibbz6xr74sxz 192650 192649 2024-11-18T04:11:46Z Lee 19 [[:en:Category:Indonesian_Indonesian]] වෙතින් එක් සංශෝධනයක් 192649 wikitext text/x-wiki {{auto cat|lect=1}} ertee7cys9kcm61xm19ibbz6xr74sxz ප්‍රවර්ගය:Regional Indonesian 14 125181 192651 2021-08-09T00:03:17Z en>Ultimateria 0 {{auto cat}} 192651 wikitext text/x-wiki {{auto cat}} eomzlm5v4j7ond1phrju7cnue91g5qx 192652 192651 2024-11-18T04:12:15Z Lee 19 [[:en:Category:Regional_Indonesian]] වෙතින් එක් සංශෝධනයක් 192651 wikitext text/x-wiki {{auto cat}} eomzlm5v4j7ond1phrju7cnue91g5qx ප්‍රවර්ගය:Varieties of Indonesian 14 125182 192653 2023-09-24T06:12:15Z en>WingerBot 0 Created page with "{{auto cat}}" 192653 wikitext text/x-wiki {{auto cat}} eomzlm5v4j7ond1phrju7cnue91g5qx 192654 192653 2024-11-18T04:12:50Z Lee 19 [[:en:Category:Varieties_of_Indonesian]] වෙතින් එක් සංශෝධනයක් 192653 wikitext text/x-wiki {{auto cat}} eomzlm5v4j7ond1phrju7cnue91g5qx ප්‍රවර්ගය:Classical Indonesian 14 125183 192655 2024-09-17T09:29:36Z en>WingerBot 0 rename dialect= to lect= in {{auto cat}} 192655 wikitext text/x-wiki {{auto cat|lect=1}} ertee7cys9kcm61xm19ibbz6xr74sxz 192656 192655 2024-11-18T04:13:15Z Lee 19 [[:en:Category:Classical_Indonesian]] වෙතින් එක් සංශෝධනයක් 192655 wikitext text/x-wiki {{auto cat|lect=1}} ertee7cys9kcm61xm19ibbz6xr74sxz ප්‍රවර්ගය:Prokem Indonesian 14 125184 192657 2024-09-17T11:07:30Z en>WingerBot 0 rename dialect= to lect= in {{auto cat}} 192657 wikitext text/x-wiki {{auto cat|lect=1}} ertee7cys9kcm61xm19ibbz6xr74sxz 192658 192657 2024-11-18T04:13:48Z Lee 19 [[:en:Category:Prokem_Indonesian]] වෙතින් එක් සංශෝධනයක් 192657 wikitext text/x-wiki {{auto cat|lect=1}} ertee7cys9kcm61xm19ibbz6xr74sxz ප්‍රවර්ගය:Japanese kanji read as ゐ 14 125185 192659 2024-02-27T07:06:10Z en>Benwing2 0 Replaced content with "{{auto cat|histconsol=い}}" 192659 wikitext text/x-wiki {{auto cat|histconsol=い}} q2vrwqzaew6kgok4zc657d2hx2gevt5 192660 192659 2024-11-18T04:14:16Z Lee 19 [[:en:Category:Japanese_kanji_read_as_ゐ]] වෙතින් එක් සංශෝධනයක් 192659 wikitext text/x-wiki {{auto cat|histconsol=い}} q2vrwqzaew6kgok4zc657d2hx2gevt5 ප්‍රවර්ගය:Japanese terms with 諒 replaced by daiyōji 了 14 125186 192661 2024-03-01T07:53:21Z en>WingerBot 0 add sort key りょう based on {{ja-kanjitab}} on page [[了承]] 192661 wikitext text/x-wiki {{auto cat|sort=りょう}} a4uicg67yo7ui7g4vyzyg0q4hge6rng 192662 192661 2024-11-18T04:14:45Z Lee 19 [[:en:Category:Japanese_terms_with_諒_replaced_by_daiyōji_了]] වෙතින් එක් සංශෝධනයක් 192661 wikitext text/x-wiki {{auto cat|sort=りょう}} a4uicg67yo7ui7g4vyzyg0q4hge6rng ප්‍රවර්ගය:ජපන් යෙදුම්, 学 භාවිතා කොට ලියා がく ලෙස කියවන 14 125187 192663 2020-12-31T18:37:59Z en>WingerBot 0 convert {{ja-readingcat}} to {{auto cat}} 192663 wikitext text/x-wiki {{auto cat|goon|kan'on}} f81u8sjg1a4kr52e0dgxe99ta9q4hzj 192664 192663 2024-11-18T04:15:14Z Lee 19 [[:en:Category:Japanese_terms_spelled_with_学_read_as_がく]] වෙතින් එක් සංශෝධනයක් 192663 wikitext text/x-wiki {{auto cat|goon|kan'on}} f81u8sjg1a4kr52e0dgxe99ta9q4hzj 192823 192664 2024-11-18T09:57:12Z Pinthura 2424 Pinthura විසින් [[ප්‍රවර්ගය:Japanese terms spelled with 学 read as がく]] සිට [[ප්‍රවර්ගය:ජපන් යෙදුම්, 学 භාවිතා කොට ලියා がく ලෙස කියවන]] වෙත පිටුව ගෙන යන ලදී: සේවා: නව ප්‍රවර්ග නාමය වෙත ගෙනයාම. 192663 wikitext text/x-wiki {{auto cat|goon|kan'on}} f81u8sjg1a4kr52e0dgxe99ta9q4hzj 192825 192823 2024-11-18T09:57:22Z Pinthura 2424 සේවා: ඉංග්‍රීසි ව්‍යාපෘතිය වෙත සබැඳියක් එක් කිරීම. 192825 wikitext text/x-wiki {{auto cat|goon|kan'on}} [[en:Category:Japanese terms spelled with 学 read as がく]] czowxw1jb4un6abkg51umzuazrjbm5b ප්‍රවර්ගය:Okinawan terms spelled with 光 read as ふぃちゃい 14 125188 192665 2020-12-31T18:30:48Z en>WingerBot 0 convert {{ryu-readingcat}} to {{auto cat}} 192665 wikitext text/x-wiki {{auto cat|kun}} 6sgynwa4ww4n7ynr3errc7yhla69lb0 192666 192665 2024-11-18T04:15:43Z Lee 19 [[:en:Category:Okinawan_terms_spelled_with_光_read_as_ふぃちゃい]] වෙතින් එක් සංශෝධනයක් 192665 wikitext text/x-wiki {{auto cat|kun}} 6sgynwa4ww4n7ynr3errc7yhla69lb0 ප්‍රවර්ගය:Japanese terms spelled with 衛 14 125189 192667 2024-07-16T13:09:09Z en>Theknightwho 0 192667 wikitext text/x-wiki {{auto cat}} eomzlm5v4j7ond1phrju7cnue91g5qx 192668 192667 2024-11-18T04:16:16Z Lee 19 [[:en:Category:Japanese_terms_spelled_with_衛]] වෙතින් එක් සංශෝධනයක් 192667 wikitext text/x-wiki {{auto cat}} eomzlm5v4j7ond1phrju7cnue91g5qx ප්‍රවර්ගය:Spanish terms spelled with Î 14 125190 192669 2024-07-16T14:08:56Z en>Theknightwho 0 192669 wikitext text/x-wiki {{auto cat|context=rare}} mt1l0ylyh0up319ergs1praiqauolwy 192670 192669 2024-11-18T04:17:14Z Lee 19 [[:en:Category:Spanish_terms_spelled_with_Î]] වෙතින් එක් සංශෝධනයක් 192669 wikitext text/x-wiki {{auto cat|context=rare}} mt1l0ylyh0up319ergs1praiqauolwy ප්‍රවර්ගය:English terms spelled with É 14 125191 192671 2020-12-31T02:52:55Z en>WingerBot 0 convert {{charactercat}} to {{auto cat}} 192671 wikitext text/x-wiki {{auto cat}} eomzlm5v4j7ond1phrju7cnue91g5qx 192672 192671 2024-11-18T04:17:42Z Lee 19 [[:en:Category:English_terms_spelled_with_É]] වෙතින් එක් සංශෝධනයක් 192671 wikitext text/x-wiki {{auto cat}} eomzlm5v4j7ond1phrju7cnue91g5qx ප්‍රවර්ගය:Japanese terms spelled with 愛 14 125192 192673 2020-12-31T02:55:11Z en>WingerBot 0 convert {{charactercat}} to {{auto cat}} 192673 wikitext text/x-wiki {{auto cat}} eomzlm5v4j7ond1phrju7cnue91g5qx 192674 192673 2024-11-18T04:18:07Z Lee 19 [[:en:Category:Japanese_terms_spelled_with_愛]] වෙතින් එක් සංශෝධනයක් 192673 wikitext text/x-wiki {{auto cat}} eomzlm5v4j7ond1phrju7cnue91g5qx ප්‍රවර්ගය:Ladino terms derived from the Hebrew root ח־ב־ר 14 125193 192675 2022-03-22T00:29:31Z en>Koavf 0 Created page with "{{auto cat}}" 192675 wikitext text/x-wiki {{auto cat}} eomzlm5v4j7ond1phrju7cnue91g5qx 192676 192675 2024-11-18T04:18:36Z Lee 19 [[:en:Category:Ladino_terms_derived_from_the_Hebrew_root_ח־ב־ר]] වෙතින් එක් සංශෝධනයක් 192675 wikitext text/x-wiki {{auto cat}} eomzlm5v4j7ond1phrju7cnue91g5qx ප්‍රවර්ගය:Requests for translations in user-competency categories with 16-31 users 14 125194 192677 2023-10-01T04:38:17Z en>Benwing2 0 Created page with "{{auto cat}}" 192677 wikitext text/x-wiki {{auto cat}} eomzlm5v4j7ond1phrju7cnue91g5qx 192678 192677 2024-11-18T04:20:06Z Lee 19 [[:en:Category:Requests_for_translations_in_user-competency_categories_with_16-31_users]] වෙතින් එක් සංශෝධනයක් 192677 wikitext text/x-wiki {{auto cat}} eomzlm5v4j7ond1phrju7cnue91g5qx ප්‍රවර්ගය:Requests for translations in user-competency categories by language 14 125195 192679 2023-10-01T03:19:58Z en>Benwing2 0 Created page with "{{auto cat}}" 192679 wikitext text/x-wiki {{auto cat}} eomzlm5v4j7ond1phrju7cnue91g5qx 192680 192679 2024-11-18T04:20:42Z Lee 19 [[:en:Category:Requests_for_translations_in_user-competency_categories_by_language]] වෙතින් එක් සංශෝධනයක් 192679 wikitext text/x-wiki {{auto cat}} eomzlm5v4j7ond1phrju7cnue91g5qx ප්‍රවර්ගය:User fr-4 14 125196 192681 2023-10-01T03:59:20Z en>WingerBot 0 use {{auto cat}} for manually-specified user-competency categories (manually assisted) 192681 wikitext text/x-wiki {{auto cat|text=Ces utilisateurs parlent <<français>> à un niveau '''comparable à la langue maternelle'''.}} kjwrvdpif1vpv12oa6z55dqe73go63m 192682 192681 2024-11-18T04:23:20Z Lee 19 [[:en:Category:User_fr-4]] වෙතින් එක් සංශෝධනයක් 192681 wikitext text/x-wiki {{auto cat|text=Ces utilisateurs parlent <<français>> à un niveau '''comparable à la langue maternelle'''.}} kjwrvdpif1vpv12oa6z55dqe73go63m වික්ෂනරි:Babel 4 125197 192683 2024-11-15T02:31:26Z en>HeliosX 0 These would be the correct endonyms. 192683 wikitext text/x-wiki '''User language templates''' aid multilingual communication by making it easier to contact someone who speaks a certain language. The idea originated on [[commons:Commons:Babel|Wikimedia Commons]] and has also been implemented on [[meta:Meta:Babel templates|Meta-Wiki]] and some of the Wikipedias, to varying extents. To participate, you can add the Babel template to [[Special:MyPage|your user page]] by following these instructions: * Start off with <code>&#123;&#123;[[Template:Babel|Babel]]|</code> * Then add one of the following codes for each language you speak, separated by <code>|</code>, where <var>xx</var> is the [[w:ISO 639|ISO 639]] code for the language: ** <code><var>xx</var>-0</code> if you don't understand the language practically at all. You can use this if there's some reason why you might be expected to know the language better, or to indicate that you know something very little about it. Your user page will ''not'' be categorized by placing that template. ** <code><var>xx</var>-1</code> for basic command (the ability to understand the language somewhat and to ask or answer simple questions) ** <code><var>xx</var>-2</code> ability to modify articles and to participate in discussions ** <code><var>xx</var>-3</code> for advanced or fluent understanding (the ability to write articles in this language without difficulties, minor errors may occur) ** <code><var>xx</var>-4</code> if you have a grasp of the language comparable to a native speaker, but are not a native speaker ** <code><var>xx</var></code> if you're a native speaker * Then finish by adding closing braces: <code>}}</code> {| style="float: right; margin-left: 1em; margin-bottom: 0.5em; width: 242px; border: #99B3FF solid 1px" | <center>'''[[Wiktionary:Babel]]'''</center> |- | <div style="float:left;border:solid #6ef7a7 1px;margin:1px;"> {| cellspacing="0" style="width:238px;background:#c5fcdc;" | style="width:45px;height:45px;background:#6ef7a7;text-align:center;font-size:14pt;" | <span title="Swedish">'''sv'''</span> | style="font-size:8pt;padding:4pt;line-height:1.25em; " | Den här användaren talar '''[[:Category:User sv|svenska]]''' som '''[[:Category:User sv-N|modersmål]]'''. |}</div> |- | <div style="float:left;border:solid #99B3FF 1px;margin:1px"> {| cellspacing="0" style="width:238px;background:#E0E8FF" | style="width:45px;height:45px;background:#99B3FF;text-align:center;font-size:14pt" | <span title="English">'''en-3'''</span> | style="font-size:8pt;padding:4pt;line-height:1.25em; " | This user is able to contribute with an '''[[:Category:User en-3|advanced]]''' level of '''[[:Category:User en|English]]'''. |}</div> |- | <div style="float:left;border:solid #77E0E8 1px;margin:1px"> {| cellspacing="0" style="width:238px;background:#D0F8FF" | style="width:45px;height:45px;background:#77E0E8;text-align:center;font-size:14pt" | <span title="French">'''fr-2'''</span> | style="font-size:8pt;padding:4pt;line-height:1.25em; " | Cet utilisateur peut contribuer avec un niveau '''[[:Category:User fr-2|moyen]]''' en '''[[:Category:User fr|français]]'''. |}</div> |- | <div style="float:left;border:solid #C0C8FF 1px;margin:1px"> {| cellspacing="0" style="width:238px;background:#F0F8FF" | style="width:45px;height:45px;background:#C0C8FF;text-align:center;font-size:14pt" | <span title="Spanish">'''es-1'''</span> | style="font-size:8pt;padding:4pt;line-height:1.25em; " | Este usuario puede contribuir con un nivel '''[[:Category:User es-1|básico]]''' de '''[[:Category:User es|español]]'''. |}</div> |- | <div style="float:left;border:solid #FFB3B3 1px;margin:1px"> {| cellspacing="0" style="width:238px;background:#FFE0E8" | style="width:45px;height:45px;background:#FFB3B3;text-align:center;font-size:14pt" | <span title="Aragonese">'''an-0'''</span> | style="font-size:8pt;padding:4pt;line-height:1.25em; " | Iste usuario '''no repleca''' l''''[[:Category:User an|aragonés]]''' (u lo repleca con prou dificultá). |}</div> |- | style="text-align: center" | [[:Category:User languages|Search user languages]] |} So, for example, {{temp|Babel|en|de-1}} would indicate a native speaker of English with basic knowledge of German. {{temp|Babel|sv|en-3|fr-2|es-1|an-0}} would indicate a native speaker of Swedish with an advanced knowledge of English, an intermediate knowledge of French, a basic knowledge of Spanish and no knowledge of Aragonese. You can also add stand-alone language templates by following the {{temp|User <var>xx</var>-1}} format. These templates add you to the category associated with your level of understanding, and to the overall category for that language. To find someone who speaks a particular language, see '''[[:Category:User languages|user languages]]''', and follow the links. For the most part, the two and three letter codes are taken from [[w:ISO 639|ISO 639]], but see [[Wiktionary:List of languages|this list]] for a comprehensive guide. Some language templates may show different text depending on whether the user has set their gender in their preferences to be male, female or unspecified. This is automatic and happens without needing to do anything. However, if you prefer not to show gender-specific messages or show a gender different from what you set in your preferences, it can be overridden by using the {{para|g}} parameter, which you can set to either {{para|g|m}} (male), {{para|g|f}} (female) or {{para|g|-}} (not specified). Both the general {{temp|Babel}} template and the individual language templates support this option. You can help expand this system by creating templates for your language. Categories have already been created for most languages which have editions of Wikipedia containing over a hundred articles; they just need labelling up! It's recommended to copy the English or French versions when expanding the scheme, as most of the languages listed here are incomplete. The French versions show examples of how gender-specific messages may be generated. See also ''[[Help:Creating a template]]''. ==Languages== {{babels|aa|Afar|Afar}} {{babels|ab|Аҧсуа|Abkhaz}} {{babels|ace|Bahsa Acèh|Acehnese}} {{babels|acm|عراقي|Iraqi Arabic}} {{babels|aeb|تونسي|Tunisian Arabic}} {{babels|af|Afrikaans|Afrikaans}} {{babels|afb|خليجي|Gulf Arabic}} {{babels|ajp|شامي (فلسطين والأردن)|South Levantine Arabic}} {{babels|ak|Akan|Akan}} {{babels|am|አማርኛ|Amharic}} {{babels|an|Aragonés|Aragonese}} {{babels|ang|Englisc|Old English}} {{babels|apc|شامي (سوريا ولبنان)|North Levantine Arabic}} {{babels|ar|العربية|Arabic}} {{babels|arc|ܐܪܡܝܐ|Aramaic}} {{babels|arq|جزائري|Algerian Arabic}} {{babels|ary|مغربي|Moroccan Arabic}} {{babels|arz|مصري|Egyptian Arabic}} {{babels|as|অসমীয়া|Assamese}} {{babels|ast|Asturianu|Asturian}} {{babels|av|Авар|Avar}} {{babels|ay|Aymar|Aymara}} {{babels|az|Azərbaycan dili|Azerbaijani}} {{babels|ba|Башҡортса|Bashkir}} {{babels|be|Беларуская|Belarusian}} {{babels|bew|Basa Betawi|Betawi}} {{babels|bg|Български|Bulgarian}} {{babels|bh|भोजपुरी|Bhojpuri}} {{babels|bi|Bislama|Bislama}} {{babels|bla|Siksiká|Blackfoot}} {{babels|bm|Bamanankan|Bambara}} {{babels|bn|বাংলা|Bengali}} {{babels|bo|བོད་ཡིག|Tibetan}} {{babels|br|Brezhoneg|Breton}} {{babels|bs|bosanski|Bosnian}} {{babels|ca|Català|Catalan}} {{babels|ccp|???|Chakma}} {{babels|ce|Нохчийн|Chechen}} {{babels|ceb|Sugbuanon|Cebuano}} {{babels|ch|Chamoru|Chamorro}} {{babels|cho|Choctaw|Choctaw}} {{babels|chr|ᏣᎳᎩ|Cherokee}} {{babels|chy|Tsetsêhestâhese|Cheyenne}} {{babels|ckb|سۆرانی|Central Kurdish}} {{babels|cmn|官話 / 官话|Mandarin}} {{babels|co|Corsu|Corsican}} {{babels|cr|Nehiyaw|Cree}} {{babels|crh|Kırım Tatarca|Crimean Tatar}} {{babels|cs|Český|Czech}} {{babels|csb|Kaszëbsczi|Kashubian}} {{babels|ctg|চাটগাঁইয়া বুলি|Chittagonian}} {{babels|cv|Чăвашла|Chuvash}} {{babels|cy|Cymraeg|Welsh}} {{babels|da|Dansk|Danish}} {{babels|de|Deutsch|German}} {{babels|dsb|Dolnoserbski|Lower Sorbian}} {{babels|dum|Dietsche tale|Middle Dutch}} {{babels|dv|ދިވެހި|Dhivehi}} {{babels|dz|རྫོང་ཁ|Dzongkha}} {{babels|ee|Eve|Ewe}} {{babels|el|Ελληνική|Greek}} {{babels|en|English|English}} {{babels|en-CA|English|Canadian|sub=1}} {{babels|en-GB|English|British|sub=1}} {{babels|en-US|English|American|sub=1}} {{babels|en-IE|English|Irish|sub=1}} {{babels|enm|Engli&#383;ch|Middle English}} {{babels|eo|Esperanto|Esperanto}} {{babels|es|Español|Spanish}} {{babels|et|Eesti|Estonian}} {{babels|eu|Euskara|Basque}} {{babels|ext|Estremeñu|Extremaduran}} {{babels|fa|فارسی|Persian}} {{babels|ff|Fulfulde|Fula}} {{babels|fi|Suomi|Finnish}} {{babels|fj|Vosa vaka-Viti|Fijian}} {{babels|fo|Føroyskt|Faroese}} {{babels|fr|Français|French}} {{babels|fur|Furlan|Friulian}} {{babels|fy|Frysk|Frisian}} {{babels|ga|Gaeilge|Irish}} {{babels|gan|贛語|Gan}} {{babels|gd|Gàidhlig|Scottish Gaelic}} {{babels|gem-pro|Þiudiskǭ Tungǭ|Proto-Germanic}} {{babels|gil|Kiribati|Gilbertese}} {{babels2|gl|Galego|Galician}} {{babels|gml|Sassesch|Middle Low German}} {{babels|gmw-cfr|Central Franconian|Central Franconian}} {{babels|gn|Avañe'ẽ|Guaraní}} {{babels|goh|Diutiska sprahha|Old High German}} {{babels|got|𐌲𐌿𐍄𐌹𐍃𐌺𐌰 𐍂𐌰𐌶𐌳𐌰|Gothic}} {{babels|grc|Ἑλληνική|Ancient Greek}} {{babels|gsw|Alemannisch|Alemannic German}} {{babels|gu|ગુજરાતી|Gujarati}} {{babels|gv|Gaelg|Manx}} {{babels|ha|Hausa|Hausa}} {{babels|hak|客家話|Hakka}} {{babels|haw|Hawai'i|Hawaiian}} {{babels|he|עברית|Hebrew}} {{babels|hi|हिन्दी|Hindi}} {{babels|ho|Hiri Motu|Hiri Motu}} {{babels|hr|hrvatski|Croatian}} {{babels|hsb|Hornjoserbsce|Upper Sorbian}} {{babels|hsn|湘語|Xiang}} {{babels|ht|Kreyòl ayisyen|Haitian Creole}} {{babels|hu|Magyar|Hungarian}} {{babels|hy|Հայերեն|Armenian}} {{babels|ia|Interlingua|Interlingua}} {{babels|id|Bahasa Indonesia|Indonesian}} {{babels|ie|Interlingue|Occidental}} {{babels|ig|Igbo|Igbo}} {{babels|ii|ꆇꉙ|Yi}} {{babels|ik|Iñupiak|Inupiak}} {{babels|ilo|Ilokano|Ilokano}} {{babels|ine-pro|Séneh₂m Dn̥ǵʰwéh₂m|Proto-Indo-European}} {{babels|io|Ido|Ido}} {{babels|is|Íslenska|Icelandic}} {{babels|it|Italiano|Italian}} {{babels|izh|Ižora|Ingrian}} {{babels|iu|ᐃᓄᒃᑎᑐᑦ|Inuktitut}} {{babels|ja|日本語|Japanese}} {{babels|jbo|Lojban|Lojban}} {{babels|jv|Basa Jawa/Basa Jawi|Javanese}} {{babels|ka|ქართული / Kartuli|Georgian}} {{babels|kg|Kikong|Kongo}} {{babels|ki|Gĩkũyũ|Kikuyu}} {{babels|kj|Kuanyama|Kwanyama}} {{babels|kk|Қазақша|Kazakh}} {{babels|kl|Kalaallisut|Kalaallisut}} {{babels|kld|Gamilaraay|Gamilaraay}} {{babels|km|ភាសាខ្មែរ|Khmer}} {{babels|kmr|Kurmancî|Northern Kurdish}} {{babels|kn|ಕನ್ನಡ|Kannada}} {{babels|ko|한국어|Korean}} {{babels|kr|Kanuri|Kanuri}} {{babels|ks|کٲشُر|Kashmiri}} {{babels|kv|Коми|Komi}} {{babels|kw|Kernewek|Cornish}} {{babels|ky|Кыргызча|Kyrgyz}} {{babels|la|Latina|Latin}} {{babels|lad|Ladino|Ladino}} {{babels|lb|Lëtzebuergesch|Luxembourgish}} {{babels|lg|Luganda|Luganda}} {{babels|li|Lèmburgs|Limburgish}} {{babels|lij|Líguru|Ligurian}} {{babels|lmo|Lumbaart|Lombard}} {{babels|ln|Lingála|Lingala}} {{babels|lo|ພາສາລາວ|Lao}} {{babels|lt|Lietuvių|Lithuanian}} {{babels|lv|Latviešu|Latvian}} {{babels|lzz|Lazuri Nena/Chanuri|Laz}} {{babels|mg|Malagasy|Malagasy}} {{babels|mh|Ebon|Marshallese}} {{babels|mi|Māori|Maori}} {{babels|mk|Македонски|Macedonian}} {{babels|ml|മലയാളം|Malayalam}} {{babels|mn|Монгол|Mongolian}} {{babels|mr|मराठी|Marathi}} {{babels|ms|Bahasa Melayu|Malay}} {{babels|mt|bil-Malti|Maltese}} {{babels|mus|Mvskoke|Creek}} {{babels|my|မြန်မာဘာသာစကား|Burmese}} {{babels|mns-nor|Ма̄ньси|Mansi}} {{babels|mnw|အရေဝ်ဘာသာမန်|Mon}} {{babels|mwr|मारवाड़ी|Marwari}} {{babels|mxi|أَكَاشْتىس|Mozarabic}} {{babels|shn|ဝႃႈၽႃႇသႃႇတႆး|Shan}} {{babels|na|Ekakairũ Naoero|Nauruan}} {{babels|nah|Nawatl|Nahuatl}} {{babels|nan|Bân-lâm-gú|Southern Min}} {{babels|nap|Nnapulitano|Neapolitan}} {{babels|nds|Plattdüütsch|Low Saxon}} {{babels|ne|नेपाली|Nepali}} {{babels|ng|Oshiwambo|Ndonga}} {{babels|nl|Nederlands|Dutch}} {{babels|nn|Nynorsk|Nynorsk}} {{babels|no|Norsk|Norwegian}} {{babels|non|Norrœnt mál|Old Norse}} {{babels|nv|Diné bizaad|Navajo}} {{babels|ny|Chi Chewa|Chichewa}} {{babels|oc|Langue d'Oc|Occitan}} {{babels|om|???|Oromo}} {{babels|or|ଓଡ଼ିଆ|Odia}} {{babels|os|Ирон æвзаг|Ossetian}} {{babels|osx|Sahsiska sprāka|Old Saxon}} {{babels|pa|ਪੰਜਾਬੀ|Punjabi}} {{babels|pam|Kapampangan|Kapampangan}} {{babels|pdc|Deitsch|Pennsylvania German}} {{babels|pi|pāli|Pali}} {{babels|pl|Polski|Polish}} {{babels|pms|Piemontèis|Piedmontese}} {{babels|prs|دری|Dari}} {{babels|ps|پښتو|Pashto}} {{babels|pt|Português|Portuguese}} {{babels|pt-BR|Português do Brasil|Brazilian Portuguese|sub=1}} {{babels|qu|Runa Simi|Quechua}} {{babels|qya|Quenya|Quenya}} {{babels|rhg|???|Rohingya}} {{babels|rif|Tarifit|Tarifit}} {{babels|ruo|Vlåški/Žejånski|Istro-Romanian}} {{babels|rup|Armâneaşti|Aromanian}} {{babels|ruq|Vlăheşte|Megleno-Romanian}} {{babels|rm|Rumantsch|Romansh}} {{babels|rn|Kirundi|Kirundi}} {{babels|ro|Română|Romanian}} {{babels|ru|Русский|Russian}} {{babels|rw|Kinyarwandi|Kinyarwanda}} {{babels|ryu|沖縄口|Okinawan}} {{babels|sa|संस्कृतम्|Sanskrit}} {{babels|sat|ᱥᱟᱱᱛᱟᱲᱤ|Santali}} {{babels|sah|Саха тыла|Yakut}} {{babels|sc|Sardu|Sardinian}} {{babels|scn|Sicilianu|Sicilian}} {{babels|sco|Scots|Scots}} {{babels|sd|सिनधि|Sindhi}} {{babels|sdh|کوردی خوارین|Southern Kurdish}} {{babels|se|Sámegiella|Northern Sami}} {{babels|sg|Sängö|Sango}} {{babels|sgn|Sign Languages|Sign Languages}} {{babels|sgs|Žemaitiu|Samogitian}} {{babels|sh|Srpskohrvatski|Serbo-Croatian}} {{babels|si|සිංහල|Sinhala}} {{babels|sip|???|Sikkimese}} {{babels|sjd|Са̄мь кӣлл|Kildin Sami}} {{babels|sje|Bidumsámegiella|Pite Sami}} {{babels|sjn|Sindarin|Sindarin}} {{babels|sju|Ubmejesámiengiälla|Ume Sami}} {{babels|sk|Slovenčina|Slovak}} {{babels|sl|Slovenščina|Slovene}} {{babels|sm|Gagana Samoa|Samoan}} {{babels|sma|Åarjelsaemien gïele|Southern Sami}} {{babels|smj|Julevsámegiella|Lule Sami}} {{babels|smn|Anarâškielâ|Inari Sami}} {{babels|sn|chiShona|Shona}} {{babels|so|Soomaaliga|Somali}} {{babels|sq|Shqip|Albanian}} {{babels|sr|српски|Serbian}} {{babels|ss|SiSwati|Swazi}} {{babels|st|seSotho|Sesotho}} {{babels|stq|Seeltersk|Saterland Frisian}} {{babels|su|Basa Sunda|Sundanese}} {{babels|sv|Svenska|Swedish}} {{babels|sw|Kiswahili|Swahili}} {{babels|syc|ܣܘܪܝܝܐ|Classical Syriac}} {{babels|syl|ꠍꠤꠟꠐꠤ|Sylheti}} {{babels|szl|Ślůnski|Silesian}} {{babels|ta|தமிழ்|Tamil}} {{babels|te|తెలుగు|Telugu}} {{babels|tet|lia-Tetun|Tetum}} {{babels|tg|Тоҷикӣ|Tajik}} {{babels|th|ภาษาไทย|Thai}} {{babels|ti|ትግርኛ|Tigrinya}} {{babels|tk|Türkmençe|Turkmen}} {{babels|tl|Tagalog|Tagalog}} {{babels|tn|Setswana|Tswana}} {{babels|to|Faka Tonga|Tongan}} {{babels|tok|toki pona|Toki Pona}} {{babels|tpi|Tok Pisin|Tok Pisin}} {{babels|tr|Türkçe|Turkish}} {{babels|tru|ܣܘܪܝܬ|Turoyo}} {{babels|ts|Xitsonga|Tsonga}} {{babels|tt|Tatarça|Tatar}} {{babels|tum|chiTumbuka|Tumbuka}} {{babels|tvl|Tuvalu|Tuvaluan}} {{babels|ty|Reo M&#257;`ohi|Tahitian}} {{babels|ug|ئۇيغۇر|Uyghur}} {{babels|uk|Українська|Ukrainian}} {{babels|ur|اردو|Urdu}} {{babels|uz|Ўзбек|Uzbek}} {{babels|ve|Venda|Venda}} {{babels|vec|Vèneto|Venetan}} {{babels|vi|Tiếng Việt|Vietnamese}} {{babels|vls|Westvlams|Flemish}} {{babels|vo|Volapük|Volapük}} {{babels|wa|Walon|Walloon}} {{babels|war|Winaray|Waray-Waray}} {{babels|wo|Wollof|Wolof}} {{babels|wuu|吴语|Wu}} {{babels|xh|isiXhosa|Xhosa}} {{babels|yi|ייִדיש|Yiddish}} {{babels|yo|Yorùbá|Yoruba}} {{babels|yua|Maya|Yucatec Maya}} {{babels|yue|粵語/粤语|Cantonese}} {{babels|yue-Hant|粵語|Cantonese}} {{babels|yue-Hans|粤语|Cantonese}} {{babels|za|Cuengh|Zhuang}} {{babels|zu|isiZulu|Zulu}} [[Category:Wiktionary multilingual issues]] [[an:Biquizionario:Babel]] [[ast:Wikcionariu:Babel]] [[bn:উইকিঅভিধান:Babel]] [[bs:Vikirječnik:Babel]] [[br:Wikeriadur:Babel]] [[ca:Viccionari:Babel]] [[cs:Wikislovník:Babylón]] [[cy:Wiciadur:Babel]] [[de:Wiktionary:Babel]] [[es:Wikcionario:Babel]] [[eo:Vikivortaro:Babel]] [[eu:Wiktionary:Babel]] [[fr:Wiktionnaire:Babel]] [[ga:Vicífhoclóir:Baibéal]] [[gl:Wiktionary:Babel]] [[hy:Վիքիբառարան:Babel]] [[hr:Wječnik:Babel]] [[io:Wikivortaro:Babel]] [[id:Wiktionary:Babel]] [[it:Wikizionario:Babel]] [[kl:Wiktionary:Babel]] [[rw:Wiktionary:Babel]] [[la:Victionarium:Babel]] [[lv:Vikivārdnīca:Babel]] [[lb:Wiktionnaire:Babel]] [[li:Wiktionary:Babel]] [[mg:Wiktionary:Babel]] [[ml:വിക്കിനിഘണ്ടു:Babel]] [[ms:Wiktionary:Babel]] [[mn:Wiktionary:Babel]] [[no:Wiktionary:Babel]] [[km:WT:Babel]] [[pt:Wikcionário:Coordenação multilíngue#Babel]] [[ro:Wikționar:Babel]] [[ru:Викисловарь:Вавилон]] [[sq:Wiktionary:Babel]] [[simple:Wiktionary:Babel]] [[sh:Wiktionary:Babel]] [[sv:Hjälp:Babel]] [[te:WT:Babel]] [[tr:Vikisözlük:Babil]] [[uk:Вікісловник:Вавилон]] [[wa:Wiktionary:Babel]] pbko1ke26p0xw4ztez3gy9n1xcaw3e1 192684 192683 2024-11-18T04:23:58Z Lee 19 [[:en:Wiktionary:Babel]] වෙතින් එක් සංශෝධනයක් 192683 wikitext text/x-wiki '''User language templates''' aid multilingual communication by making it easier to contact someone who speaks a certain language. The idea originated on [[commons:Commons:Babel|Wikimedia Commons]] and has also been implemented on [[meta:Meta:Babel templates|Meta-Wiki]] and some of the Wikipedias, to varying extents. To participate, you can add the Babel template to [[Special:MyPage|your user page]] by following these instructions: * Start off with <code>&#123;&#123;[[Template:Babel|Babel]]|</code> * Then add one of the following codes for each language you speak, separated by <code>|</code>, where <var>xx</var> is the [[w:ISO 639|ISO 639]] code for the language: ** <code><var>xx</var>-0</code> if you don't understand the language practically at all. You can use this if there's some reason why you might be expected to know the language better, or to indicate that you know something very little about it. Your user page will ''not'' be categorized by placing that template. ** <code><var>xx</var>-1</code> for basic command (the ability to understand the language somewhat and to ask or answer simple questions) ** <code><var>xx</var>-2</code> ability to modify articles and to participate in discussions ** <code><var>xx</var>-3</code> for advanced or fluent understanding (the ability to write articles in this language without difficulties, minor errors may occur) ** <code><var>xx</var>-4</code> if you have a grasp of the language comparable to a native speaker, but are not a native speaker ** <code><var>xx</var></code> if you're a native speaker * Then finish by adding closing braces: <code>}}</code> {| style="float: right; margin-left: 1em; margin-bottom: 0.5em; width: 242px; border: #99B3FF solid 1px" | <center>'''[[Wiktionary:Babel]]'''</center> |- | <div style="float:left;border:solid #6ef7a7 1px;margin:1px;"> {| cellspacing="0" style="width:238px;background:#c5fcdc;" | style="width:45px;height:45px;background:#6ef7a7;text-align:center;font-size:14pt;" | <span title="Swedish">'''sv'''</span> | style="font-size:8pt;padding:4pt;line-height:1.25em; " | Den här användaren talar '''[[:Category:User sv|svenska]]''' som '''[[:Category:User sv-N|modersmål]]'''. |}</div> |- | <div style="float:left;border:solid #99B3FF 1px;margin:1px"> {| cellspacing="0" style="width:238px;background:#E0E8FF" | style="width:45px;height:45px;background:#99B3FF;text-align:center;font-size:14pt" | <span title="English">'''en-3'''</span> | style="font-size:8pt;padding:4pt;line-height:1.25em; " | This user is able to contribute with an '''[[:Category:User en-3|advanced]]''' level of '''[[:Category:User en|English]]'''. |}</div> |- | <div style="float:left;border:solid #77E0E8 1px;margin:1px"> {| cellspacing="0" style="width:238px;background:#D0F8FF" | style="width:45px;height:45px;background:#77E0E8;text-align:center;font-size:14pt" | <span title="French">'''fr-2'''</span> | style="font-size:8pt;padding:4pt;line-height:1.25em; " | Cet utilisateur peut contribuer avec un niveau '''[[:Category:User fr-2|moyen]]''' en '''[[:Category:User fr|français]]'''. |}</div> |- | <div style="float:left;border:solid #C0C8FF 1px;margin:1px"> {| cellspacing="0" style="width:238px;background:#F0F8FF" | style="width:45px;height:45px;background:#C0C8FF;text-align:center;font-size:14pt" | <span title="Spanish">'''es-1'''</span> | style="font-size:8pt;padding:4pt;line-height:1.25em; " | Este usuario puede contribuir con un nivel '''[[:Category:User es-1|básico]]''' de '''[[:Category:User es|español]]'''. |}</div> |- | <div style="float:left;border:solid #FFB3B3 1px;margin:1px"> {| cellspacing="0" style="width:238px;background:#FFE0E8" | style="width:45px;height:45px;background:#FFB3B3;text-align:center;font-size:14pt" | <span title="Aragonese">'''an-0'''</span> | style="font-size:8pt;padding:4pt;line-height:1.25em; " | Iste usuario '''no repleca''' l''''[[:Category:User an|aragonés]]''' (u lo repleca con prou dificultá). |}</div> |- | style="text-align: center" | [[:Category:User languages|Search user languages]] |} So, for example, {{temp|Babel|en|de-1}} would indicate a native speaker of English with basic knowledge of German. {{temp|Babel|sv|en-3|fr-2|es-1|an-0}} would indicate a native speaker of Swedish with an advanced knowledge of English, an intermediate knowledge of French, a basic knowledge of Spanish and no knowledge of Aragonese. You can also add stand-alone language templates by following the {{temp|User <var>xx</var>-1}} format. These templates add you to the category associated with your level of understanding, and to the overall category for that language. To find someone who speaks a particular language, see '''[[:Category:User languages|user languages]]''', and follow the links. For the most part, the two and three letter codes are taken from [[w:ISO 639|ISO 639]], but see [[Wiktionary:List of languages|this list]] for a comprehensive guide. Some language templates may show different text depending on whether the user has set their gender in their preferences to be male, female or unspecified. This is automatic and happens without needing to do anything. However, if you prefer not to show gender-specific messages or show a gender different from what you set in your preferences, it can be overridden by using the {{para|g}} parameter, which you can set to either {{para|g|m}} (male), {{para|g|f}} (female) or {{para|g|-}} (not specified). Both the general {{temp|Babel}} template and the individual language templates support this option. You can help expand this system by creating templates for your language. Categories have already been created for most languages which have editions of Wikipedia containing over a hundred articles; they just need labelling up! It's recommended to copy the English or French versions when expanding the scheme, as most of the languages listed here are incomplete. The French versions show examples of how gender-specific messages may be generated. See also ''[[Help:Creating a template]]''. ==Languages== {{babels|aa|Afar|Afar}} {{babels|ab|Аҧсуа|Abkhaz}} {{babels|ace|Bahsa Acèh|Acehnese}} {{babels|acm|عراقي|Iraqi Arabic}} {{babels|aeb|تونسي|Tunisian Arabic}} {{babels|af|Afrikaans|Afrikaans}} {{babels|afb|خليجي|Gulf Arabic}} {{babels|ajp|شامي (فلسطين والأردن)|South Levantine Arabic}} {{babels|ak|Akan|Akan}} {{babels|am|አማርኛ|Amharic}} {{babels|an|Aragonés|Aragonese}} {{babels|ang|Englisc|Old English}} {{babels|apc|شامي (سوريا ولبنان)|North Levantine Arabic}} {{babels|ar|العربية|Arabic}} {{babels|arc|ܐܪܡܝܐ|Aramaic}} {{babels|arq|جزائري|Algerian Arabic}} {{babels|ary|مغربي|Moroccan Arabic}} {{babels|arz|مصري|Egyptian Arabic}} {{babels|as|অসমীয়া|Assamese}} {{babels|ast|Asturianu|Asturian}} {{babels|av|Авар|Avar}} {{babels|ay|Aymar|Aymara}} {{babels|az|Azərbaycan dili|Azerbaijani}} {{babels|ba|Башҡортса|Bashkir}} {{babels|be|Беларуская|Belarusian}} {{babels|bew|Basa Betawi|Betawi}} {{babels|bg|Български|Bulgarian}} {{babels|bh|भोजपुरी|Bhojpuri}} {{babels|bi|Bislama|Bislama}} {{babels|bla|Siksiká|Blackfoot}} {{babels|bm|Bamanankan|Bambara}} {{babels|bn|বাংলা|Bengali}} {{babels|bo|བོད་ཡིག|Tibetan}} {{babels|br|Brezhoneg|Breton}} {{babels|bs|bosanski|Bosnian}} {{babels|ca|Català|Catalan}} {{babels|ccp|???|Chakma}} {{babels|ce|Нохчийн|Chechen}} {{babels|ceb|Sugbuanon|Cebuano}} {{babels|ch|Chamoru|Chamorro}} {{babels|cho|Choctaw|Choctaw}} {{babels|chr|ᏣᎳᎩ|Cherokee}} {{babels|chy|Tsetsêhestâhese|Cheyenne}} {{babels|ckb|سۆرانی|Central Kurdish}} {{babels|cmn|官話 / 官话|Mandarin}} {{babels|co|Corsu|Corsican}} {{babels|cr|Nehiyaw|Cree}} {{babels|crh|Kırım Tatarca|Crimean Tatar}} {{babels|cs|Český|Czech}} {{babels|csb|Kaszëbsczi|Kashubian}} {{babels|ctg|চাটগাঁইয়া বুলি|Chittagonian}} {{babels|cv|Чăвашла|Chuvash}} {{babels|cy|Cymraeg|Welsh}} {{babels|da|Dansk|Danish}} {{babels|de|Deutsch|German}} {{babels|dsb|Dolnoserbski|Lower Sorbian}} {{babels|dum|Dietsche tale|Middle Dutch}} {{babels|dv|ދިވެހި|Dhivehi}} {{babels|dz|རྫོང་ཁ|Dzongkha}} {{babels|ee|Eve|Ewe}} {{babels|el|Ελληνική|Greek}} {{babels|en|English|English}} {{babels|en-CA|English|Canadian|sub=1}} {{babels|en-GB|English|British|sub=1}} {{babels|en-US|English|American|sub=1}} {{babels|en-IE|English|Irish|sub=1}} {{babels|enm|Engli&#383;ch|Middle English}} {{babels|eo|Esperanto|Esperanto}} {{babels|es|Español|Spanish}} {{babels|et|Eesti|Estonian}} {{babels|eu|Euskara|Basque}} {{babels|ext|Estremeñu|Extremaduran}} {{babels|fa|فارسی|Persian}} {{babels|ff|Fulfulde|Fula}} {{babels|fi|Suomi|Finnish}} {{babels|fj|Vosa vaka-Viti|Fijian}} {{babels|fo|Føroyskt|Faroese}} {{babels|fr|Français|French}} {{babels|fur|Furlan|Friulian}} {{babels|fy|Frysk|Frisian}} {{babels|ga|Gaeilge|Irish}} {{babels|gan|贛語|Gan}} {{babels|gd|Gàidhlig|Scottish Gaelic}} {{babels|gem-pro|Þiudiskǭ Tungǭ|Proto-Germanic}} {{babels|gil|Kiribati|Gilbertese}} {{babels2|gl|Galego|Galician}} {{babels|gml|Sassesch|Middle Low German}} {{babels|gmw-cfr|Central Franconian|Central Franconian}} {{babels|gn|Avañe'ẽ|Guaraní}} {{babels|goh|Diutiska sprahha|Old High German}} {{babels|got|𐌲𐌿𐍄𐌹𐍃𐌺𐌰 𐍂𐌰𐌶𐌳𐌰|Gothic}} {{babels|grc|Ἑλληνική|Ancient Greek}} {{babels|gsw|Alemannisch|Alemannic German}} {{babels|gu|ગુજરાતી|Gujarati}} {{babels|gv|Gaelg|Manx}} {{babels|ha|Hausa|Hausa}} {{babels|hak|客家話|Hakka}} {{babels|haw|Hawai'i|Hawaiian}} {{babels|he|עברית|Hebrew}} {{babels|hi|हिन्दी|Hindi}} {{babels|ho|Hiri Motu|Hiri Motu}} {{babels|hr|hrvatski|Croatian}} {{babels|hsb|Hornjoserbsce|Upper Sorbian}} {{babels|hsn|湘語|Xiang}} {{babels|ht|Kreyòl ayisyen|Haitian Creole}} {{babels|hu|Magyar|Hungarian}} {{babels|hy|Հայերեն|Armenian}} {{babels|ia|Interlingua|Interlingua}} {{babels|id|Bahasa Indonesia|Indonesian}} {{babels|ie|Interlingue|Occidental}} {{babels|ig|Igbo|Igbo}} {{babels|ii|ꆇꉙ|Yi}} {{babels|ik|Iñupiak|Inupiak}} {{babels|ilo|Ilokano|Ilokano}} {{babels|ine-pro|Séneh₂m Dn̥ǵʰwéh₂m|Proto-Indo-European}} {{babels|io|Ido|Ido}} {{babels|is|Íslenska|Icelandic}} {{babels|it|Italiano|Italian}} {{babels|izh|Ižora|Ingrian}} {{babels|iu|ᐃᓄᒃᑎᑐᑦ|Inuktitut}} {{babels|ja|日本語|Japanese}} {{babels|jbo|Lojban|Lojban}} {{babels|jv|Basa Jawa/Basa Jawi|Javanese}} {{babels|ka|ქართული / Kartuli|Georgian}} {{babels|kg|Kikong|Kongo}} {{babels|ki|Gĩkũyũ|Kikuyu}} {{babels|kj|Kuanyama|Kwanyama}} {{babels|kk|Қазақша|Kazakh}} {{babels|kl|Kalaallisut|Kalaallisut}} {{babels|kld|Gamilaraay|Gamilaraay}} {{babels|km|ភាសាខ្មែរ|Khmer}} {{babels|kmr|Kurmancî|Northern Kurdish}} {{babels|kn|ಕನ್ನಡ|Kannada}} {{babels|ko|한국어|Korean}} {{babels|kr|Kanuri|Kanuri}} {{babels|ks|کٲشُر|Kashmiri}} {{babels|kv|Коми|Komi}} {{babels|kw|Kernewek|Cornish}} {{babels|ky|Кыргызча|Kyrgyz}} {{babels|la|Latina|Latin}} {{babels|lad|Ladino|Ladino}} {{babels|lb|Lëtzebuergesch|Luxembourgish}} {{babels|lg|Luganda|Luganda}} {{babels|li|Lèmburgs|Limburgish}} {{babels|lij|Líguru|Ligurian}} {{babels|lmo|Lumbaart|Lombard}} {{babels|ln|Lingála|Lingala}} {{babels|lo|ພາສາລາວ|Lao}} {{babels|lt|Lietuvių|Lithuanian}} {{babels|lv|Latviešu|Latvian}} {{babels|lzz|Lazuri Nena/Chanuri|Laz}} {{babels|mg|Malagasy|Malagasy}} {{babels|mh|Ebon|Marshallese}} {{babels|mi|Māori|Maori}} {{babels|mk|Македонски|Macedonian}} {{babels|ml|മലയാളം|Malayalam}} {{babels|mn|Монгол|Mongolian}} {{babels|mr|मराठी|Marathi}} {{babels|ms|Bahasa Melayu|Malay}} {{babels|mt|bil-Malti|Maltese}} {{babels|mus|Mvskoke|Creek}} {{babels|my|မြန်မာဘာသာစကား|Burmese}} {{babels|mns-nor|Ма̄ньси|Mansi}} {{babels|mnw|အရေဝ်ဘာသာမန်|Mon}} {{babels|mwr|मारवाड़ी|Marwari}} {{babels|mxi|أَكَاشْتىس|Mozarabic}} {{babels|shn|ဝႃႈၽႃႇသႃႇတႆး|Shan}} {{babels|na|Ekakairũ Naoero|Nauruan}} {{babels|nah|Nawatl|Nahuatl}} {{babels|nan|Bân-lâm-gú|Southern Min}} {{babels|nap|Nnapulitano|Neapolitan}} {{babels|nds|Plattdüütsch|Low Saxon}} {{babels|ne|नेपाली|Nepali}} {{babels|ng|Oshiwambo|Ndonga}} {{babels|nl|Nederlands|Dutch}} {{babels|nn|Nynorsk|Nynorsk}} {{babels|no|Norsk|Norwegian}} {{babels|non|Norrœnt mál|Old Norse}} {{babels|nv|Diné bizaad|Navajo}} {{babels|ny|Chi Chewa|Chichewa}} {{babels|oc|Langue d'Oc|Occitan}} {{babels|om|???|Oromo}} {{babels|or|ଓଡ଼ିଆ|Odia}} {{babels|os|Ирон æвзаг|Ossetian}} {{babels|osx|Sahsiska sprāka|Old Saxon}} {{babels|pa|ਪੰਜਾਬੀ|Punjabi}} {{babels|pam|Kapampangan|Kapampangan}} {{babels|pdc|Deitsch|Pennsylvania German}} {{babels|pi|pāli|Pali}} {{babels|pl|Polski|Polish}} {{babels|pms|Piemontèis|Piedmontese}} {{babels|prs|دری|Dari}} {{babels|ps|پښتو|Pashto}} {{babels|pt|Português|Portuguese}} {{babels|pt-BR|Português do Brasil|Brazilian Portuguese|sub=1}} {{babels|qu|Runa Simi|Quechua}} {{babels|qya|Quenya|Quenya}} {{babels|rhg|???|Rohingya}} {{babels|rif|Tarifit|Tarifit}} {{babels|ruo|Vlåški/Žejånski|Istro-Romanian}} {{babels|rup|Armâneaşti|Aromanian}} {{babels|ruq|Vlăheşte|Megleno-Romanian}} {{babels|rm|Rumantsch|Romansh}} {{babels|rn|Kirundi|Kirundi}} {{babels|ro|Română|Romanian}} {{babels|ru|Русский|Russian}} {{babels|rw|Kinyarwandi|Kinyarwanda}} {{babels|ryu|沖縄口|Okinawan}} {{babels|sa|संस्कृतम्|Sanskrit}} {{babels|sat|ᱥᱟᱱᱛᱟᱲᱤ|Santali}} {{babels|sah|Саха тыла|Yakut}} {{babels|sc|Sardu|Sardinian}} {{babels|scn|Sicilianu|Sicilian}} {{babels|sco|Scots|Scots}} {{babels|sd|सिनधि|Sindhi}} {{babels|sdh|کوردی خوارین|Southern Kurdish}} {{babels|se|Sámegiella|Northern Sami}} {{babels|sg|Sängö|Sango}} {{babels|sgn|Sign Languages|Sign Languages}} {{babels|sgs|Žemaitiu|Samogitian}} {{babels|sh|Srpskohrvatski|Serbo-Croatian}} {{babels|si|සිංහල|Sinhala}} {{babels|sip|???|Sikkimese}} {{babels|sjd|Са̄мь кӣлл|Kildin Sami}} {{babels|sje|Bidumsámegiella|Pite Sami}} {{babels|sjn|Sindarin|Sindarin}} {{babels|sju|Ubmejesámiengiälla|Ume Sami}} {{babels|sk|Slovenčina|Slovak}} {{babels|sl|Slovenščina|Slovene}} {{babels|sm|Gagana Samoa|Samoan}} {{babels|sma|Åarjelsaemien gïele|Southern Sami}} {{babels|smj|Julevsámegiella|Lule Sami}} {{babels|smn|Anarâškielâ|Inari Sami}} {{babels|sn|chiShona|Shona}} {{babels|so|Soomaaliga|Somali}} {{babels|sq|Shqip|Albanian}} {{babels|sr|српски|Serbian}} {{babels|ss|SiSwati|Swazi}} {{babels|st|seSotho|Sesotho}} {{babels|stq|Seeltersk|Saterland Frisian}} {{babels|su|Basa Sunda|Sundanese}} {{babels|sv|Svenska|Swedish}} {{babels|sw|Kiswahili|Swahili}} {{babels|syc|ܣܘܪܝܝܐ|Classical Syriac}} {{babels|syl|ꠍꠤꠟꠐꠤ|Sylheti}} {{babels|szl|Ślůnski|Silesian}} {{babels|ta|தமிழ்|Tamil}} {{babels|te|తెలుగు|Telugu}} {{babels|tet|lia-Tetun|Tetum}} {{babels|tg|Тоҷикӣ|Tajik}} {{babels|th|ภาษาไทย|Thai}} {{babels|ti|ትግርኛ|Tigrinya}} {{babels|tk|Türkmençe|Turkmen}} {{babels|tl|Tagalog|Tagalog}} {{babels|tn|Setswana|Tswana}} {{babels|to|Faka Tonga|Tongan}} {{babels|tok|toki pona|Toki Pona}} {{babels|tpi|Tok Pisin|Tok Pisin}} {{babels|tr|Türkçe|Turkish}} {{babels|tru|ܣܘܪܝܬ|Turoyo}} {{babels|ts|Xitsonga|Tsonga}} {{babels|tt|Tatarça|Tatar}} {{babels|tum|chiTumbuka|Tumbuka}} {{babels|tvl|Tuvalu|Tuvaluan}} {{babels|ty|Reo M&#257;`ohi|Tahitian}} {{babels|ug|ئۇيغۇر|Uyghur}} {{babels|uk|Українська|Ukrainian}} {{babels|ur|اردو|Urdu}} {{babels|uz|Ўзбек|Uzbek}} {{babels|ve|Venda|Venda}} {{babels|vec|Vèneto|Venetan}} {{babels|vi|Tiếng Việt|Vietnamese}} {{babels|vls|Westvlams|Flemish}} {{babels|vo|Volapük|Volapük}} {{babels|wa|Walon|Walloon}} {{babels|war|Winaray|Waray-Waray}} {{babels|wo|Wollof|Wolof}} {{babels|wuu|吴语|Wu}} {{babels|xh|isiXhosa|Xhosa}} {{babels|yi|ייִדיש|Yiddish}} {{babels|yo|Yorùbá|Yoruba}} {{babels|yua|Maya|Yucatec Maya}} {{babels|yue|粵語/粤语|Cantonese}} {{babels|yue-Hant|粵語|Cantonese}} {{babels|yue-Hans|粤语|Cantonese}} {{babels|za|Cuengh|Zhuang}} {{babels|zu|isiZulu|Zulu}} [[Category:Wiktionary multilingual issues]] [[an:Biquizionario:Babel]] [[ast:Wikcionariu:Babel]] [[bn:উইকিঅভিধান:Babel]] [[bs:Vikirječnik:Babel]] [[br:Wikeriadur:Babel]] [[ca:Viccionari:Babel]] [[cs:Wikislovník:Babylón]] [[cy:Wiciadur:Babel]] [[de:Wiktionary:Babel]] [[es:Wikcionario:Babel]] [[eo:Vikivortaro:Babel]] [[eu:Wiktionary:Babel]] [[fr:Wiktionnaire:Babel]] [[ga:Vicífhoclóir:Baibéal]] [[gl:Wiktionary:Babel]] [[hy:Վիքիբառարան:Babel]] [[hr:Wječnik:Babel]] [[io:Wikivortaro:Babel]] [[id:Wiktionary:Babel]] [[it:Wikizionario:Babel]] [[kl:Wiktionary:Babel]] [[rw:Wiktionary:Babel]] [[la:Victionarium:Babel]] [[lv:Vikivārdnīca:Babel]] [[lb:Wiktionnaire:Babel]] [[li:Wiktionary:Babel]] [[mg:Wiktionary:Babel]] [[ml:വിക്കിനിഘണ്ടു:Babel]] [[ms:Wiktionary:Babel]] [[mn:Wiktionary:Babel]] [[no:Wiktionary:Babel]] [[km:WT:Babel]] [[pt:Wikcionário:Coordenação multilíngue#Babel]] [[ro:Wikționar:Babel]] [[ru:Викисловарь:Вавилон]] [[sq:Wiktionary:Babel]] [[simple:Wiktionary:Babel]] [[sh:Wiktionary:Babel]] [[sv:Hjälp:Babel]] [[te:WT:Babel]] [[tr:Vikisözlük:Babil]] [[uk:Вікісловник:Вавилон]] [[wa:Wiktionary:Babel]] pbko1ke26p0xw4ztez3gy9n1xcaw3e1 192689 192684 2024-11-18T04:25:57Z Lee 19 192689 wikitext text/x-wiki {{ඉංග්‍රීසි ව්‍යාපෘතියෙන් ආයාත කළ පිටුව}} '''User language templates''' aid multilingual communication by making it easier to contact someone who speaks a certain language. The idea originated on [[commons:Commons:Babel|Wikimedia Commons]] and has also been implemented on [[meta:Meta:Babel templates|Meta-Wiki]] and some of the Wikipedias, to varying extents. To participate, you can add the Babel template to [[Special:MyPage|your user page]] by following these instructions: * Start off with <code>&#123;&#123;[[Template:Babel|Babel]]|</code> * Then add one of the following codes for each language you speak, separated by <code>|</code>, where <var>xx</var> is the [[w:ISO 639|ISO 639]] code for the language: ** <code><var>xx</var>-0</code> if you don't understand the language practically at all. You can use this if there's some reason why you might be expected to know the language better, or to indicate that you know something very little about it. Your user page will ''not'' be categorized by placing that template. ** <code><var>xx</var>-1</code> for basic command (the ability to understand the language somewhat and to ask or answer simple questions) ** <code><var>xx</var>-2</code> ability to modify articles and to participate in discussions ** <code><var>xx</var>-3</code> for advanced or fluent understanding (the ability to write articles in this language without difficulties, minor errors may occur) ** <code><var>xx</var>-4</code> if you have a grasp of the language comparable to a native speaker, but are not a native speaker ** <code><var>xx</var></code> if you're a native speaker * Then finish by adding closing braces: <code>}}</code> {| style="float: right; margin-left: 1em; margin-bottom: 0.5em; width: 242px; border: #99B3FF solid 1px" | <center>'''[[Wiktionary:Babel]]'''</center> |- | <div style="float:left;border:solid #6ef7a7 1px;margin:1px;"> {| cellspacing="0" style="width:238px;background:#c5fcdc;" | style="width:45px;height:45px;background:#6ef7a7;text-align:center;font-size:14pt;" | <span title="Swedish">'''sv'''</span> | style="font-size:8pt;padding:4pt;line-height:1.25em; " | Den här användaren talar '''[[:Category:User sv|svenska]]''' som '''[[:Category:User sv-N|modersmål]]'''. |}</div> |- | <div style="float:left;border:solid #99B3FF 1px;margin:1px"> {| cellspacing="0" style="width:238px;background:#E0E8FF" | style="width:45px;height:45px;background:#99B3FF;text-align:center;font-size:14pt" | <span title="English">'''en-3'''</span> | style="font-size:8pt;padding:4pt;line-height:1.25em; " | This user is able to contribute with an '''[[:Category:User en-3|advanced]]''' level of '''[[:Category:User en|English]]'''. |}</div> |- | <div style="float:left;border:solid #77E0E8 1px;margin:1px"> {| cellspacing="0" style="width:238px;background:#D0F8FF" | style="width:45px;height:45px;background:#77E0E8;text-align:center;font-size:14pt" | <span title="French">'''fr-2'''</span> | style="font-size:8pt;padding:4pt;line-height:1.25em; " | Cet utilisateur peut contribuer avec un niveau '''[[:Category:User fr-2|moyen]]''' en '''[[:Category:User fr|français]]'''. |}</div> |- | <div style="float:left;border:solid #C0C8FF 1px;margin:1px"> {| cellspacing="0" style="width:238px;background:#F0F8FF" | style="width:45px;height:45px;background:#C0C8FF;text-align:center;font-size:14pt" | <span title="Spanish">'''es-1'''</span> | style="font-size:8pt;padding:4pt;line-height:1.25em; " | Este usuario puede contribuir con un nivel '''[[:Category:User es-1|básico]]''' de '''[[:Category:User es|español]]'''. |}</div> |- | <div style="float:left;border:solid #FFB3B3 1px;margin:1px"> {| cellspacing="0" style="width:238px;background:#FFE0E8" | style="width:45px;height:45px;background:#FFB3B3;text-align:center;font-size:14pt" | <span title="Aragonese">'''an-0'''</span> | style="font-size:8pt;padding:4pt;line-height:1.25em; " | Iste usuario '''no repleca''' l''''[[:Category:User an|aragonés]]''' (u lo repleca con prou dificultá). |}</div> |- | style="text-align: center" | [[:Category:User languages|Search user languages]] |} So, for example, {{temp|Babel|en|de-1}} would indicate a native speaker of English with basic knowledge of German. {{temp|Babel|sv|en-3|fr-2|es-1|an-0}} would indicate a native speaker of Swedish with an advanced knowledge of English, an intermediate knowledge of French, a basic knowledge of Spanish and no knowledge of Aragonese. You can also add stand-alone language templates by following the {{temp|User <var>xx</var>-1}} format. These templates add you to the category associated with your level of understanding, and to the overall category for that language. To find someone who speaks a particular language, see '''[[:Category:User languages|user languages]]''', and follow the links. For the most part, the two and three letter codes are taken from [[w:ISO 639|ISO 639]], but see [[Wiktionary:List of languages|this list]] for a comprehensive guide. Some language templates may show different text depending on whether the user has set their gender in their preferences to be male, female or unspecified. This is automatic and happens without needing to do anything. However, if you prefer not to show gender-specific messages or show a gender different from what you set in your preferences, it can be overridden by using the {{para|g}} parameter, which you can set to either {{para|g|m}} (male), {{para|g|f}} (female) or {{para|g|-}} (not specified). Both the general {{temp|Babel}} template and the individual language templates support this option. You can help expand this system by creating templates for your language. Categories have already been created for most languages which have editions of Wikipedia containing over a hundred articles; they just need labelling up! It's recommended to copy the English or French versions when expanding the scheme, as most of the languages listed here are incomplete. The French versions show examples of how gender-specific messages may be generated. See also ''[[Help:Creating a template]]''. ==Languages== {{babels|aa|Afar|Afar}} {{babels|ab|Аҧсуа|Abkhaz}} {{babels|ace|Bahsa Acèh|Acehnese}} {{babels|acm|عراقي|Iraqi Arabic}} {{babels|aeb|تونسي|Tunisian Arabic}} {{babels|af|Afrikaans|Afrikaans}} {{babels|afb|خليجي|Gulf Arabic}} {{babels|ajp|شامي (فلسطين والأردن)|South Levantine Arabic}} {{babels|ak|Akan|Akan}} {{babels|am|አማርኛ|Amharic}} {{babels|an|Aragonés|Aragonese}} {{babels|ang|Englisc|Old English}} {{babels|apc|شامي (سوريا ولبنان)|North Levantine Arabic}} {{babels|ar|العربية|Arabic}} {{babels|arc|ܐܪܡܝܐ|Aramaic}} {{babels|arq|جزائري|Algerian Arabic}} {{babels|ary|مغربي|Moroccan Arabic}} {{babels|arz|مصري|Egyptian Arabic}} {{babels|as|অসমীয়া|Assamese}} {{babels|ast|Asturianu|Asturian}} {{babels|av|Авар|Avar}} {{babels|ay|Aymar|Aymara}} {{babels|az|Azərbaycan dili|Azerbaijani}} {{babels|ba|Башҡортса|Bashkir}} {{babels|be|Беларуская|Belarusian}} {{babels|bew|Basa Betawi|Betawi}} {{babels|bg|Български|Bulgarian}} {{babels|bh|भोजपुरी|Bhojpuri}} {{babels|bi|Bislama|Bislama}} {{babels|bla|Siksiká|Blackfoot}} {{babels|bm|Bamanankan|Bambara}} {{babels|bn|বাংলা|Bengali}} {{babels|bo|བོད་ཡིག|Tibetan}} {{babels|br|Brezhoneg|Breton}} {{babels|bs|bosanski|Bosnian}} {{babels|ca|Català|Catalan}} {{babels|ccp|???|Chakma}} {{babels|ce|Нохчийн|Chechen}} {{babels|ceb|Sugbuanon|Cebuano}} {{babels|ch|Chamoru|Chamorro}} {{babels|cho|Choctaw|Choctaw}} {{babels|chr|ᏣᎳᎩ|Cherokee}} {{babels|chy|Tsetsêhestâhese|Cheyenne}} {{babels|ckb|سۆرانی|Central Kurdish}} {{babels|cmn|官話 / 官话|Mandarin}} {{babels|co|Corsu|Corsican}} {{babels|cr|Nehiyaw|Cree}} {{babels|crh|Kırım Tatarca|Crimean Tatar}} {{babels|cs|Český|Czech}} {{babels|csb|Kaszëbsczi|Kashubian}} {{babels|ctg|চাটগাঁইয়া বুলি|Chittagonian}} {{babels|cv|Чăвашла|Chuvash}} {{babels|cy|Cymraeg|Welsh}} {{babels|da|Dansk|Danish}} {{babels|de|Deutsch|German}} {{babels|dsb|Dolnoserbski|Lower Sorbian}} {{babels|dum|Dietsche tale|Middle Dutch}} {{babels|dv|ދިވެހި|Dhivehi}} {{babels|dz|རྫོང་ཁ|Dzongkha}} {{babels|ee|Eve|Ewe}} {{babels|el|Ελληνική|Greek}} {{babels|en|English|English}} {{babels|en-CA|English|Canadian|sub=1}} {{babels|en-GB|English|British|sub=1}} {{babels|en-US|English|American|sub=1}} {{babels|en-IE|English|Irish|sub=1}} {{babels|enm|Engli&#383;ch|Middle English}} {{babels|eo|Esperanto|Esperanto}} {{babels|es|Español|Spanish}} {{babels|et|Eesti|Estonian}} {{babels|eu|Euskara|Basque}} {{babels|ext|Estremeñu|Extremaduran}} {{babels|fa|فارسی|Persian}} {{babels|ff|Fulfulde|Fula}} {{babels|fi|Suomi|Finnish}} {{babels|fj|Vosa vaka-Viti|Fijian}} {{babels|fo|Føroyskt|Faroese}} {{babels|fr|Français|French}} {{babels|fur|Furlan|Friulian}} {{babels|fy|Frysk|Frisian}} {{babels|ga|Gaeilge|Irish}} {{babels|gan|贛語|Gan}} {{babels|gd|Gàidhlig|Scottish Gaelic}} {{babels|gem-pro|Þiudiskǭ Tungǭ|Proto-Germanic}} {{babels|gil|Kiribati|Gilbertese}} {{babels2|gl|Galego|Galician}} {{babels|gml|Sassesch|Middle Low German}} {{babels|gmw-cfr|Central Franconian|Central Franconian}} {{babels|gn|Avañe'ẽ|Guaraní}} {{babels|goh|Diutiska sprahha|Old High German}} {{babels|got|𐌲𐌿𐍄𐌹𐍃𐌺𐌰 𐍂𐌰𐌶𐌳𐌰|Gothic}} {{babels|grc|Ἑλληνική|Ancient Greek}} {{babels|gsw|Alemannisch|Alemannic German}} {{babels|gu|ગુજરાતી|Gujarati}} {{babels|gv|Gaelg|Manx}} {{babels|ha|Hausa|Hausa}} {{babels|hak|客家話|Hakka}} {{babels|haw|Hawai'i|Hawaiian}} {{babels|he|עברית|Hebrew}} {{babels|hi|हिन्दी|Hindi}} {{babels|ho|Hiri Motu|Hiri Motu}} {{babels|hr|hrvatski|Croatian}} {{babels|hsb|Hornjoserbsce|Upper Sorbian}} {{babels|hsn|湘語|Xiang}} {{babels|ht|Kreyòl ayisyen|Haitian Creole}} {{babels|hu|Magyar|Hungarian}} {{babels|hy|Հայերեն|Armenian}} {{babels|ia|Interlingua|Interlingua}} {{babels|id|Bahasa Indonesia|Indonesian}} {{babels|ie|Interlingue|Occidental}} {{babels|ig|Igbo|Igbo}} {{babels|ii|ꆇꉙ|Yi}} {{babels|ik|Iñupiak|Inupiak}} {{babels|ilo|Ilokano|Ilokano}} {{babels|ine-pro|Séneh₂m Dn̥ǵʰwéh₂m|Proto-Indo-European}} {{babels|io|Ido|Ido}} {{babels|is|Íslenska|Icelandic}} {{babels|it|Italiano|Italian}} {{babels|izh|Ižora|Ingrian}} {{babels|iu|ᐃᓄᒃᑎᑐᑦ|Inuktitut}} {{babels|ja|日本語|Japanese}} {{babels|jbo|Lojban|Lojban}} {{babels|jv|Basa Jawa/Basa Jawi|Javanese}} {{babels|ka|ქართული / Kartuli|Georgian}} {{babels|kg|Kikong|Kongo}} {{babels|ki|Gĩkũyũ|Kikuyu}} {{babels|kj|Kuanyama|Kwanyama}} {{babels|kk|Қазақша|Kazakh}} {{babels|kl|Kalaallisut|Kalaallisut}} {{babels|kld|Gamilaraay|Gamilaraay}} {{babels|km|ភាសាខ្មែរ|Khmer}} {{babels|kmr|Kurmancî|Northern Kurdish}} {{babels|kn|ಕನ್ನಡ|Kannada}} {{babels|ko|한국어|Korean}} {{babels|kr|Kanuri|Kanuri}} {{babels|ks|کٲشُر|Kashmiri}} {{babels|kv|Коми|Komi}} {{babels|kw|Kernewek|Cornish}} {{babels|ky|Кыргызча|Kyrgyz}} {{babels|la|Latina|Latin}} {{babels|lad|Ladino|Ladino}} {{babels|lb|Lëtzebuergesch|Luxembourgish}} {{babels|lg|Luganda|Luganda}} {{babels|li|Lèmburgs|Limburgish}} {{babels|lij|Líguru|Ligurian}} {{babels|lmo|Lumbaart|Lombard}} {{babels|ln|Lingála|Lingala}} {{babels|lo|ພາສາລາວ|Lao}} {{babels|lt|Lietuvių|Lithuanian}} {{babels|lv|Latviešu|Latvian}} {{babels|lzz|Lazuri Nena/Chanuri|Laz}} {{babels|mg|Malagasy|Malagasy}} {{babels|mh|Ebon|Marshallese}} {{babels|mi|Māori|Maori}} {{babels|mk|Македонски|Macedonian}} {{babels|ml|മലയാളം|Malayalam}} {{babels|mn|Монгол|Mongolian}} {{babels|mr|मराठी|Marathi}} {{babels|ms|Bahasa Melayu|Malay}} {{babels|mt|bil-Malti|Maltese}} {{babels|mus|Mvskoke|Creek}} {{babels|my|မြန်မာဘာသာစကား|Burmese}} {{babels|mns-nor|Ма̄ньси|Mansi}} {{babels|mnw|အရေဝ်ဘာသာမန်|Mon}} {{babels|mwr|मारवाड़ी|Marwari}} {{babels|mxi|أَكَاشْتىس|Mozarabic}} {{babels|shn|ဝႃႈၽႃႇသႃႇတႆး|Shan}} {{babels|na|Ekakairũ Naoero|Nauruan}} {{babels|nah|Nawatl|Nahuatl}} {{babels|nan|Bân-lâm-gú|Southern Min}} {{babels|nap|Nnapulitano|Neapolitan}} {{babels|nds|Plattdüütsch|Low Saxon}} {{babels|ne|नेपाली|Nepali}} {{babels|ng|Oshiwambo|Ndonga}} {{babels|nl|Nederlands|Dutch}} {{babels|nn|Nynorsk|Nynorsk}} {{babels|no|Norsk|Norwegian}} {{babels|non|Norrœnt mál|Old Norse}} {{babels|nv|Diné bizaad|Navajo}} {{babels|ny|Chi Chewa|Chichewa}} {{babels|oc|Langue d'Oc|Occitan}} {{babels|om|???|Oromo}} {{babels|or|ଓଡ଼ିଆ|Odia}} {{babels|os|Ирон æвзаг|Ossetian}} {{babels|osx|Sahsiska sprāka|Old Saxon}} {{babels|pa|ਪੰਜਾਬੀ|Punjabi}} {{babels|pam|Kapampangan|Kapampangan}} {{babels|pdc|Deitsch|Pennsylvania German}} {{babels|pi|pāli|Pali}} {{babels|pl|Polski|Polish}} {{babels|pms|Piemontèis|Piedmontese}} {{babels|prs|دری|Dari}} {{babels|ps|پښتو|Pashto}} {{babels|pt|Português|Portuguese}} {{babels|pt-BR|Português do Brasil|Brazilian Portuguese|sub=1}} {{babels|qu|Runa Simi|Quechua}} {{babels|qya|Quenya|Quenya}} {{babels|rhg|???|Rohingya}} {{babels|rif|Tarifit|Tarifit}} {{babels|ruo|Vlåški/Žejånski|Istro-Romanian}} {{babels|rup|Armâneaşti|Aromanian}} {{babels|ruq|Vlăheşte|Megleno-Romanian}} {{babels|rm|Rumantsch|Romansh}} {{babels|rn|Kirundi|Kirundi}} {{babels|ro|Română|Romanian}} {{babels|ru|Русский|Russian}} {{babels|rw|Kinyarwandi|Kinyarwanda}} {{babels|ryu|沖縄口|Okinawan}} {{babels|sa|संस्कृतम्|Sanskrit}} {{babels|sat|ᱥᱟᱱᱛᱟᱲᱤ|Santali}} {{babels|sah|Саха тыла|Yakut}} {{babels|sc|Sardu|Sardinian}} {{babels|scn|Sicilianu|Sicilian}} {{babels|sco|Scots|Scots}} {{babels|sd|सिनधि|Sindhi}} {{babels|sdh|کوردی خوارین|Southern Kurdish}} {{babels|se|Sámegiella|Northern Sami}} {{babels|sg|Sängö|Sango}} {{babels|sgn|Sign Languages|Sign Languages}} {{babels|sgs|Žemaitiu|Samogitian}} {{babels|sh|Srpskohrvatski|Serbo-Croatian}} {{babels|si|සිංහල|Sinhala}} {{babels|sip|???|Sikkimese}} {{babels|sjd|Са̄мь кӣлл|Kildin Sami}} {{babels|sje|Bidumsámegiella|Pite Sami}} {{babels|sjn|Sindarin|Sindarin}} {{babels|sju|Ubmejesámiengiälla|Ume Sami}} {{babels|sk|Slovenčina|Slovak}} {{babels|sl|Slovenščina|Slovene}} {{babels|sm|Gagana Samoa|Samoan}} {{babels|sma|Åarjelsaemien gïele|Southern Sami}} {{babels|smj|Julevsámegiella|Lule Sami}} {{babels|smn|Anarâškielâ|Inari Sami}} {{babels|sn|chiShona|Shona}} {{babels|so|Soomaaliga|Somali}} {{babels|sq|Shqip|Albanian}} {{babels|sr|српски|Serbian}} {{babels|ss|SiSwati|Swazi}} {{babels|st|seSotho|Sesotho}} {{babels|stq|Seeltersk|Saterland Frisian}} {{babels|su|Basa Sunda|Sundanese}} {{babels|sv|Svenska|Swedish}} {{babels|sw|Kiswahili|Swahili}} {{babels|syc|ܣܘܪܝܝܐ|Classical Syriac}} {{babels|syl|ꠍꠤꠟꠐꠤ|Sylheti}} {{babels|szl|Ślůnski|Silesian}} {{babels|ta|தமிழ்|Tamil}} {{babels|te|తెలుగు|Telugu}} {{babels|tet|lia-Tetun|Tetum}} {{babels|tg|Тоҷикӣ|Tajik}} {{babels|th|ภาษาไทย|Thai}} {{babels|ti|ትግርኛ|Tigrinya}} {{babels|tk|Türkmençe|Turkmen}} {{babels|tl|Tagalog|Tagalog}} {{babels|tn|Setswana|Tswana}} {{babels|to|Faka Tonga|Tongan}} {{babels|tok|toki pona|Toki Pona}} {{babels|tpi|Tok Pisin|Tok Pisin}} {{babels|tr|Türkçe|Turkish}} {{babels|tru|ܣܘܪܝܬ|Turoyo}} {{babels|ts|Xitsonga|Tsonga}} {{babels|tt|Tatarça|Tatar}} {{babels|tum|chiTumbuka|Tumbuka}} {{babels|tvl|Tuvalu|Tuvaluan}} {{babels|ty|Reo M&#257;`ohi|Tahitian}} {{babels|ug|ئۇيغۇر|Uyghur}} {{babels|uk|Українська|Ukrainian}} {{babels|ur|اردو|Urdu}} {{babels|uz|Ўзбек|Uzbek}} {{babels|ve|Venda|Venda}} {{babels|vec|Vèneto|Venetan}} {{babels|vi|Tiếng Việt|Vietnamese}} {{babels|vls|Westvlams|Flemish}} {{babels|vo|Volapük|Volapük}} {{babels|wa|Walon|Walloon}} {{babels|war|Winaray|Waray-Waray}} {{babels|wo|Wollof|Wolof}} {{babels|wuu|吴语|Wu}} {{babels|xh|isiXhosa|Xhosa}} {{babels|yi|ייִדיש|Yiddish}} {{babels|yo|Yorùbá|Yoruba}} {{babels|yua|Maya|Yucatec Maya}} {{babels|yue|粵語/粤语|Cantonese}} {{babels|yue-Hant|粵語|Cantonese}} {{babels|yue-Hans|粤语|Cantonese}} {{babels|za|Cuengh|Zhuang}} {{babels|zu|isiZulu|Zulu}} [[Category:Wiktionary multilingual issues]] [[an:Biquizionario:Babel]] [[ast:Wikcionariu:Babel]] [[bn:উইকিঅভিধান:Babel]] [[bs:Vikirječnik:Babel]] [[br:Wikeriadur:Babel]] [[ca:Viccionari:Babel]] [[cs:Wikislovník:Babylón]] [[cy:Wiciadur:Babel]] [[en:Wiktionary:Babel]] [[de:Wiktionary:Babel]] [[es:Wikcionario:Babel]] [[eo:Vikivortaro:Babel]] [[eu:Wiktionary:Babel]] [[fr:Wiktionnaire:Babel]] [[ga:Vicífhoclóir:Baibéal]] [[gl:Wiktionary:Babel]] [[hy:Վիքիբառարան:Babel]] [[hr:Wječnik:Babel]] [[io:Wikivortaro:Babel]] [[id:Wiktionary:Babel]] [[it:Wikizionario:Babel]] [[kl:Wiktionary:Babel]] [[rw:Wiktionary:Babel]] [[la:Victionarium:Babel]] [[lv:Vikivārdnīca:Babel]] [[lb:Wiktionnaire:Babel]] [[li:Wiktionary:Babel]] [[mg:Wiktionary:Babel]] [[ml:വിക്കിനിഘണ്ടു:Babel]] [[ms:Wiktionary:Babel]] [[mn:Wiktionary:Babel]] [[no:Wiktionary:Babel]] [[km:WT:Babel]] [[pt:Wikcionário:Coordenação multilíngue#Babel]] [[ro:Wikționar:Babel]] [[ru:Викисловарь:Вавилон]] [[sq:Wiktionary:Babel]] [[simple:Wiktionary:Babel]] [[sh:Wiktionary:Babel]] [[sv:Hjälp:Babel]] [[te:WT:Babel]] [[tr:Vikisözlük:Babil]] [[uk:Вікісловник:Вавилон]] [[wa:Wiktionary:Babel]] 1ob5mji9ve5jgrrx29f62vk5jpjh6ya සැකිල්ල:babels 10 125198 192685 2023-10-05T06:12:10Z en>Benwing2 0 192685 wikitext text/x-wiki {{#if:{{{sub|}}}|====|===}}{{{1}}} - <span id={{{1}}} lang={{{1}}}>{{{2}}}</span> ([[{{{3}}}]]){{#if:{{{sub|}}}|====|===}} Category: '''[[:Category:User {{{1}}}|User {{{1}}}]]''' * [[Template:User {{{1}}}-0|User {{{1}}}-0]] &mdash; none * [[Template:User {{{1}}}-1|User {{{1}}}-1]] &mdash; [[:Category:User {{{1}}}-1|basic]] * [[Template:User {{{1}}}-2|User {{{1}}}-2]] &mdash; [[:Category:User {{{1}}}-2|intermediate]] * [[Template:User {{{1}}}-3|User {{{1}}}-3]] &mdash; [[:Category:User {{{1}}}-3|advanced]] * [[Template:User {{{1}}}-4|User {{{1}}}-4]] &mdash; [[:Category:User {{{1}}}-4|near native]] * [[Template:User {{{1}}}-N|User {{{1}}}-N]] &mdash; [[:Category:User {{{1}}}-N|native]] ** OR just [[Template:User {{{1}}}|User {{{1}}}]] &mdash; [[:Category:User {{{1}}}-N|native]] <noinclude>{{documentation}}</noinclude> 9o8oeoeotdgs0vifede3hhe75foqfmv 192686 192685 2024-11-18T04:25:07Z Lee 19 [[:en:Template:babels]] වෙතින් එක් සංශෝධනයක් 192685 wikitext text/x-wiki {{#if:{{{sub|}}}|====|===}}{{{1}}} - <span id={{{1}}} lang={{{1}}}>{{{2}}}</span> ([[{{{3}}}]]){{#if:{{{sub|}}}|====|===}} Category: '''[[:Category:User {{{1}}}|User {{{1}}}]]''' * [[Template:User {{{1}}}-0|User {{{1}}}-0]] &mdash; none * [[Template:User {{{1}}}-1|User {{{1}}}-1]] &mdash; [[:Category:User {{{1}}}-1|basic]] * [[Template:User {{{1}}}-2|User {{{1}}}-2]] &mdash; [[:Category:User {{{1}}}-2|intermediate]] * [[Template:User {{{1}}}-3|User {{{1}}}-3]] &mdash; [[:Category:User {{{1}}}-3|advanced]] * [[Template:User {{{1}}}-4|User {{{1}}}-4]] &mdash; [[:Category:User {{{1}}}-4|near native]] * [[Template:User {{{1}}}-N|User {{{1}}}-N]] &mdash; [[:Category:User {{{1}}}-N|native]] ** OR just [[Template:User {{{1}}}|User {{{1}}}]] &mdash; [[:Category:User {{{1}}}-N|native]] <noinclude>{{documentation}}</noinclude> 9o8oeoeotdgs0vifede3hhe75foqfmv සැකිල්ල:babels/documentation 10 125199 192687 2023-10-05T06:12:25Z en>Benwing2 0 Created page with "{{documentation subpage}} {{documentation needed}}<!-- Replace this with a short description of the purpose of the template, and how to use it. --> <includeonly> [[Category:User competency templates]] </includeonly>" 192687 wikitext text/x-wiki {{documentation subpage}} {{documentation needed}}<!-- Replace this with a short description of the purpose of the template, and how to use it. --> <includeonly> [[Category:User competency templates]] </includeonly> 8t6vq8o4z5mnpl08k2rbxfizqr3dlx3 192688 192687 2024-11-18T04:25:24Z Lee 19 [[:en:Template:babels/documentation]] වෙතින් එක් සංශෝධනයක් 192687 wikitext text/x-wiki {{documentation subpage}} {{documentation needed}}<!-- Replace this with a short description of the purpose of the template, and how to use it. --> <includeonly> [[Category:User competency templates]] </includeonly> 8t6vq8o4z5mnpl08k2rbxfizqr3dlx3 ප්‍රවර්ගය:Substrate languages 14 125200 192690 2024-04-23T06:46:05Z en>WingerBot 0 rename {{autocat}} to {{auto cat}} 192690 wikitext text/x-wiki {{auto cat}} eomzlm5v4j7ond1phrju7cnue91g5qx 192691 192690 2024-11-18T04:26:21Z Lee 19 [[:en:Category:Substrate_languages]] වෙතින් එක් සංශෝධනයක් 192690 wikitext text/x-wiki {{auto cat}} eomzlm5v4j7ond1phrju7cnue91g5qx ප්‍රවර්ගය:The BMAC substrate 14 125201 192692 2024-09-17T09:36:49Z en>WingerBot 0 rename dialect= to lect= in {{auto cat}} 192692 wikitext text/x-wiki {{auto cat|lect=1|def=the [[substrate]](s) spoken in the {{w|Bactria–Margiana Archaeological Complex}} and possibly found as a {{w|substratum in Vedic Sanskrit}}|cat=Substrate languages|breadcrumb=BMAC|type=unattested}} pm30fs5owcc3i1zbjk9gdhhoqzkme6h 192693 192692 2024-11-18T04:27:04Z Lee 19 [[:en:Category:The_BMAC_substrate]] වෙතින් එක් සංශෝධනයක් 192692 wikitext text/x-wiki {{auto cat|lect=1|def=the [[substrate]](s) spoken in the {{w|Bactria–Margiana Archaeological Complex}} and possibly found as a {{w|substratum in Vedic Sanskrit}}|cat=Substrate languages|breadcrumb=BMAC|type=unattested}} pm30fs5owcc3i1zbjk9gdhhoqzkme6h ප්‍රවර්ගය:Dobhashi 14 125202 192694 2024-09-17T10:27:22Z en>WingerBot 0 rename dialect= to lect= in {{auto cat}} 192694 wikitext text/x-wiki {{auto cat|lect=1|lang=bn|def=a literary register of Bengali that was in common use from the 14th century to the 19th century|type=extinct|noreg=1|wp=1}} 1anuzbufrti2abjvscsfjxepzr1cpew 192695 192694 2024-11-18T04:27:30Z Lee 19 [[:en:Category:Dobhashi]] වෙතින් එක් සංශෝධනයක් 192694 wikitext text/x-wiki {{auto cat|lect=1|lang=bn|def=a literary register of Bengali that was in common use from the 14th century to the 19th century|type=extinct|noreg=1|wp=1}} 1anuzbufrti2abjvscsfjxepzr1cpew ප්‍රවර්ගය:Limburgan-Ripuarian transitional dialects 14 125203 192696 2024-09-17T10:09:58Z en>WingerBot 0 rename dialect= to lect= in {{auto cat}} 192696 wikitext text/x-wiki {{auto cat|lect=1}} ertee7cys9kcm61xm19ibbz6xr74sxz 192697 192696 2024-11-18T04:27:57Z Lee 19 [[:en:Category:Limburgan-Ripuarian_transitional_dialects]] වෙතින් එක් සංශෝධනයක් 192696 wikitext text/x-wiki {{auto cat|lect=1}} ertee7cys9kcm61xm19ibbz6xr74sxz ප්‍රවර්ගය:Regional English 14 125204 192698 2022-10-19T04:29:56Z en>ExcarnateSojourner 0 Add merge request notice. 192698 wikitext text/x-wiki {{merge|Category:English dialectal terms|fragment=Category:Regional English, Category:English dialectal terms (NOT subcategories)}} {{wp|English dialects}} {{auto cat}} This includes dialects spoken in [[England]] (e.g., [[:Category:Northern England English|Northern English dialect]], [[Geordie]], etc.), the rest of the [[United Kingdom]] (e.g., [[:Category:Irish English|Hibernian (or Irish-) English]], [[:Category:Scottish English|Scottish]] and [[:Category:Welsh English|Welsh English]], and other countries ([[Australia]], [[US]], [[Canada]], [[Jamaica]], etc.). {{temp|label|en|regional}} places entries into this category. It is preferable to specify regional usage or dialect specifically, using labels or notes. ===See also=== * [[:Category:English dialectal terms]] * [[:Category:Scots language|Scots language]] – Western Germanic language spoken in [[Scotland]] closely related to [[English]]. * [[:Category:Languages of the United Kingdom|Languages of the United Kingdom]] – including English, Old English, and other others. a45gg8yfes7agkcorbfazb8a4p779e9 192699 192698 2024-11-18T04:28:36Z Lee 19 [[:en:Category:Regional_English]] වෙතින් එක් සංශෝධනයක් 192698 wikitext text/x-wiki {{merge|Category:English dialectal terms|fragment=Category:Regional English, Category:English dialectal terms (NOT subcategories)}} {{wp|English dialects}} {{auto cat}} This includes dialects spoken in [[England]] (e.g., [[:Category:Northern England English|Northern English dialect]], [[Geordie]], etc.), the rest of the [[United Kingdom]] (e.g., [[:Category:Irish English|Hibernian (or Irish-) English]], [[:Category:Scottish English|Scottish]] and [[:Category:Welsh English|Welsh English]], and other countries ([[Australia]], [[US]], [[Canada]], [[Jamaica]], etc.). {{temp|label|en|regional}} places entries into this category. It is preferable to specify regional usage or dialect specifically, using labels or notes. ===See also=== * [[:Category:English dialectal terms]] * [[:Category:Scots language|Scots language]] – Western Germanic language spoken in [[Scotland]] closely related to [[English]]. * [[:Category:Languages of the United Kingdom|Languages of the United Kingdom]] – including English, Old English, and other others. a45gg8yfes7agkcorbfazb8a4p779e9 ප්‍රවර්ගය:en:Universities 14 125205 192700 2022-06-21T11:35:25Z en>WingerBot 0 use {{auto cat}}, remove extraneous TOC templates and manually-specified categories (manually assisted) 192700 wikitext text/x-wiki {{auto cat}} eomzlm5v4j7ond1phrju7cnue91g5qx 192701 192700 2024-11-18T04:30:10Z Lee 19 [[:en:Category:en:Universities]] වෙතින් එක් සංශෝධනයක් 192700 wikitext text/x-wiki {{auto cat}} eomzlm5v4j7ond1phrju7cnue91g5qx ප්‍රවර්ගය:Durham English 14 125206 192702 2024-09-17T09:30:43Z en>WingerBot 0 rename dialect= to lect= in {{auto cat}} 192702 wikitext text/x-wiki {{auto cat|lect=1}} ertee7cys9kcm61xm19ibbz6xr74sxz 192703 192702 2024-11-18T04:30:39Z Lee 19 [[:en:Category:Durham_English]] වෙතින් එක් සංශෝධනයක් 192702 wikitext text/x-wiki {{auto cat|lect=1}} ertee7cys9kcm61xm19ibbz6xr74sxz ප්‍රවර්ගය:Durham University English 14 125207 192704 2024-09-17T10:06:09Z en>WingerBot 0 rename dialect= to lect= in {{auto cat}} 192704 wikitext text/x-wiki {{auto cat|lect=1}} ertee7cys9kcm61xm19ibbz6xr74sxz 192705 192704 2024-11-18T04:31:06Z Lee 19 [[:en:Category:Durham_University_English]] වෙතින් එක් සංශෝධනයක් 192704 wikitext text/x-wiki {{auto cat|lect=1}} ertee7cys9kcm61xm19ibbz6xr74sxz ප්‍රවර්ගය:Hong Kong English 14 125208 192706 2024-09-17T08:51:17Z en>WingerBot 0 rename dialect= to lect= in {{auto cat}} 192706 wikitext text/x-wiki {{auto cat|lect=1}} ertee7cys9kcm61xm19ibbz6xr74sxz 192707 192706 2024-11-18T04:31:32Z Lee 19 [[:en:Category:Hong_Kong_English]] වෙතින් එක් සංශෝධනයක් 192706 wikitext text/x-wiki {{auto cat|lect=1}} ertee7cys9kcm61xm19ibbz6xr74sxz ප්‍රවර්ගය:Unattested languages 14 125209 192708 2023-10-04T08:59:06Z en>Surjection 0 192708 wikitext text/x-wiki Languages of which there are no written records and which have not been reconstructed based on their descendants. Most of these are [[w:Stratum (linguistics)#Unattested substrata|unattested substrate languages]] that have been proposed as sources of vocabulary in certain languages. [[Category:All languages| ]] [[Category:All extinct languages| ]] oocf529ap8hzoxeizaqt5stdubfnvoh 192709 192708 2024-11-18T04:31:57Z Lee 19 [[:en:Category:Unattested_languages]] වෙතින් එක් සංශෝධනයක් 192708 wikitext text/x-wiki Languages of which there are no written records and which have not been reconstructed based on their descendants. Most of these are [[w:Stratum (linguistics)#Unattested substrata|unattested substrate languages]] that have been proposed as sources of vocabulary in certain languages. [[Category:All languages| ]] [[Category:All extinct languages| ]] oocf529ap8hzoxeizaqt5stdubfnvoh ප්‍රවර්ගය:Brazilian Portuguese 14 125210 192710 2024-09-17T08:51:23Z en>WingerBot 0 rename dialect= to lect= in {{auto cat}} 192710 wikitext text/x-wiki {{auto cat|lect=1}} ertee7cys9kcm61xm19ibbz6xr74sxz 192711 192710 2024-11-18T04:32:21Z Lee 19 [[:en:Category:Brazilian_Portuguese]] වෙතින් එක් සංශෝධනයක් 192710 wikitext text/x-wiki {{auto cat|lect=1}} ertee7cys9kcm61xm19ibbz6xr74sxz ප්‍රවර්ගය:Japanese Korean 14 125211 192712 2024-09-17T09:39:15Z en>WingerBot 0 rename dialect= to lect= in {{auto cat}} 192712 wikitext text/x-wiki {{auto cat|lect=1|Japan|wp=Zainichi Korean language,ko:재일조선어}} gvv8m6q0gaaqp92qiozzg870l6zpg7w 192713 192712 2024-11-18T04:32:48Z Lee 19 [[:en:Category:Japanese_Korean]] වෙතින් එක් සංශෝධනයක් 192712 wikitext text/x-wiki {{auto cat|lect=1|Japan|wp=Zainichi Korean language,ko:재일조선어}} gvv8m6q0gaaqp92qiozzg870l6zpg7w ප්‍රවර්ගය:Texas Silesian 14 125212 192714 2024-09-17T09:14:04Z en>WingerBot 0 rename dialect= to lect= in {{auto cat}} 192714 wikitext text/x-wiki {{auto cat|lect=1|country=the United States|wp=Texan Silesian}} 0f4j6ixdubhqq5eunu97dcfycuac3ye 192715 192714 2024-11-18T04:33:42Z Lee 19 [[:en:Category:Texas_Silesian]] වෙතින් එක් සංශෝධනයක් 192714 wikitext text/x-wiki {{auto cat|lect=1|country=the United States|wp=Texan Silesian}} 0f4j6ixdubhqq5eunu97dcfycuac3ye ප්‍රවර්ගය:Texas English 14 125213 192716 2024-09-17T09:04:05Z en>WingerBot 0 rename dialect= to lect= in {{auto cat}} 192716 wikitext text/x-wiki {{auto cat|lect=1}} ertee7cys9kcm61xm19ibbz6xr74sxz 192717 192716 2024-11-18T04:34:22Z Lee 19 [[:en:Category:Texas_English]] වෙතින් එක් සංශෝධනයක් 192716 wikitext text/x-wiki {{auto cat|lect=1}} ertee7cys9kcm61xm19ibbz6xr74sxz ප්‍රවර්ගය:Overseas Chinese 14 125214 192718 2024-09-17T10:07:49Z en>WingerBot 0 rename dialect= to lect= in {{auto cat}} 192718 wikitext text/x-wiki {{auto cat|lect=1|def=[[Chinese]] (any variety) as spoken outside of [[China]] and [[Taiwan]]}} 8g6lpuja32kwa45lho1pk5mzjsutlb4 192719 192718 2024-11-18T04:34:58Z Lee 19 [[:en:Category:Overseas_Chinese]] වෙතින් එක් සංශෝධනයක් 192718 wikitext text/x-wiki {{auto cat|lect=1|def=[[Chinese]] (any variety) as spoken outside of [[China]] and [[Taiwan]]}} 8g6lpuja32kwa45lho1pk5mzjsutlb4 ප්‍රවර්ගය:Bahian Portuguese 14 125215 192720 2024-09-17T09:58:57Z en>WingerBot 0 rename dialect= to lect= in {{auto cat}} 192720 wikitext text/x-wiki {{auto cat|lect=1}} ertee7cys9kcm61xm19ibbz6xr74sxz 192721 192720 2024-11-18T04:35:24Z Lee 19 [[:en:Category:Bahian_Portuguese]] වෙතින් එක් සංශෝධනයක් 192720 wikitext text/x-wiki {{auto cat|lect=1}} ertee7cys9kcm61xm19ibbz6xr74sxz ප්‍රවර්ගය:Southern Brazilian Portuguese 14 125216 192722 2024-09-17T08:52:50Z en>WingerBot 0 rename dialect= to lect= in {{auto cat}} 192722 wikitext text/x-wiki {{auto cat|lect=1}} ertee7cys9kcm61xm19ibbz6xr74sxz 192723 192722 2024-11-18T04:35:49Z Lee 19 [[:en:Category:Southern_Brazilian_Portuguese]] වෙතින් එක් සංශෝධනයක් 192722 wikitext text/x-wiki {{auto cat|lect=1}} ertee7cys9kcm61xm19ibbz6xr74sxz ප්‍රවර්ගය:Beijing Mandarin 14 125217 192724 2024-09-17T09:15:21Z en>WingerBot 0 rename dialect= to lect= in {{auto cat}} 192724 wikitext text/x-wiki {{auto cat|lect=1}} ertee7cys9kcm61xm19ibbz6xr74sxz 192725 192724 2024-11-18T04:36:16Z Lee 19 [[:en:Category:Beijing_Mandarin]] වෙතින් එක් සංශෝධනයක් 192724 wikitext text/x-wiki {{auto cat|lect=1}} ertee7cys9kcm61xm19ibbz6xr74sxz ප්‍රවර්ගය:New Latin 14 125218 192726 2024-09-17T08:56:55Z en>WingerBot 0 rename dialect= to lect= in {{auto cat}} 192726 wikitext text/x-wiki {{auto cat|lect=1|def=Latin as used in scholarly works since the [[Renaissance]], also known as Neo-Latin|cat=Post-classical Latin|wp=1|type=extant}} mvm3hjq2p33pcisna32ctpagbuujp0w 192727 192726 2024-11-18T04:36:44Z Lee 19 [[:en:Category:New_Latin]] වෙතින් එක් සංශෝධනයක් 192726 wikitext text/x-wiki {{auto cat|lect=1|def=Latin as used in scholarly works since the [[Renaissance]], also known as Neo-Latin|cat=Post-classical Latin|wp=1|type=extant}} mvm3hjq2p33pcisna32ctpagbuujp0w ප්‍රවර්ගය:Varieties of English 14 125219 192728 2023-09-19T21:35:29Z en>Benwing2 0 Created page with "{{auto cat}}" 192728 wikitext text/x-wiki {{auto cat}} eomzlm5v4j7ond1phrju7cnue91g5qx 192729 192728 2024-11-18T04:37:25Z Lee 19 [[:en:Category:Varieties_of_English]] වෙතින් එක් සංශෝධනයක් 192728 wikitext text/x-wiki {{auto cat}} eomzlm5v4j7ond1phrju7cnue91g5qx ප්‍රවර්ගය:European English 14 125220 192730 2024-09-17T08:54:41Z en>WingerBot 0 rename dialect= to lect= in {{auto cat}} 192730 wikitext text/x-wiki {{auto cat|lect=1}} ertee7cys9kcm61xm19ibbz6xr74sxz 192731 192730 2024-11-18T04:37:49Z Lee 19 [[:en:Category:European_English]] වෙතින් එක් සංශෝධනයක් 192730 wikitext text/x-wiki {{auto cat|lect=1}} ertee7cys9kcm61xm19ibbz6xr74sxz ප්‍රවර්ගය:Regional Portuguese 14 125221 192732 2020-12-26T07:07:12Z en>WingerBot 0 use {{auto cat}} + Wikipedia link to dialects page if it exists (manually assisted) 192732 wikitext text/x-wiki {{wp|Portuguese dialects}} {{auto cat}} hnv0fomo37zgvbp1ubjj6ijduy6mrdc 192733 192732 2024-11-18T04:38:18Z Lee 19 [[:en:Category:Regional_Portuguese]] වෙතින් එක් සංශෝධනයක් 192732 wikitext text/x-wiki {{wp|Portuguese dialects}} {{auto cat}} hnv0fomo37zgvbp1ubjj6ijduy6mrdc ප්‍රවර්ගය:Contemporary Latin 14 125222 192734 2024-09-17T09:57:10Z en>WingerBot 0 rename dialect= to lect= in {{auto cat}} 192734 wikitext text/x-wiki {{auto cat|lect=1|def=Latin since c. 1900|cat=New Latin|type=extant}} bs63a9876md9qu1f8v70cr1akosifkp 192735 192734 2024-11-18T04:38:44Z Lee 19 [[:en:Category:Contemporary_Latin]] වෙතින් එක් සංශෝධනයක් 192734 wikitext text/x-wiki {{auto cat|lect=1|def=Latin since c. 1900|cat=New Latin|type=extant}} bs63a9876md9qu1f8v70cr1akosifkp ප්‍රවර්ගය:Issime Walser 14 125223 192736 2024-09-17T09:23:20Z en>WingerBot 0 rename dialect= to lect= in {{auto cat}} 192736 wikitext text/x-wiki {{auto cat|lect=1|lang=wae|[[Issime]], a village in the [[Aosta Valley]] of [[Italy]]|breadcrumb=Issime}} fh697gllogkb7wliztju6lbsdjp0aw1 192737 192736 2024-11-18T04:39:11Z Lee 19 [[:en:Category:Issime_Walser]] වෙතින් එක් සංශෝධනයක් 192736 wikitext text/x-wiki {{auto cat|lect=1|lang=wae|[[Issime]], a village in the [[Aosta Valley]] of [[Italy]]|breadcrumb=Issime}} fh697gllogkb7wliztju6lbsdjp0aw1 ප්‍රවර්ගය:Kentish Middle English 14 125224 192738 2024-09-17T09:02:54Z en>WingerBot 0 rename dialect= to lect= in {{auto cat}} 192738 wikitext text/x-wiki {{auto cat|lect=1|Kent}} lesti85wfqyk90p3vym39rbdsclo6qg 192739 192738 2024-11-18T04:39:41Z Lee 19 [[:en:Category:Kentish_Middle_English]] වෙතින් එක් සංශෝධනයක් 192738 wikitext text/x-wiki {{auto cat|lect=1|Kent}} lesti85wfqyk90p3vym39rbdsclo6qg ප්‍රවර්ගය:Northern England English 14 125225 192740 2024-09-17T08:54:05Z en>WingerBot 0 rename dialect= to lect= in {{auto cat}} 192740 wikitext text/x-wiki {{auto cat|lect=1}} ertee7cys9kcm61xm19ibbz6xr74sxz 192741 192740 2024-11-18T04:40:05Z Lee 19 [[:en:Category:Northern_England_English]] වෙතින් එක් සංශෝධනයක් 192740 wikitext text/x-wiki {{auto cat|lect=1}} ertee7cys9kcm61xm19ibbz6xr74sxz ප්‍රවර්ගය:Northumbrian English 14 125226 192742 2024-09-17T08:53:47Z en>WingerBot 0 rename dialect= to lect= in {{auto cat}} 192742 wikitext text/x-wiki {{auto cat|lect=1}} ertee7cys9kcm61xm19ibbz6xr74sxz 192743 192742 2024-11-18T04:40:29Z Lee 19 [[:en:Category:Northumbrian_English]] වෙතින් එක් සංශෝධනයක් 192742 wikitext text/x-wiki {{auto cat|lect=1}} ertee7cys9kcm61xm19ibbz6xr74sxz ප්‍රවර්ගය:Puerto Rican Spanish 14 125227 192744 2024-09-17T09:39:08Z en>WingerBot 0 rename dialect= to lect= in {{auto cat}} 192744 wikitext text/x-wiki {{auto cat|lect=1}} ertee7cys9kcm61xm19ibbz6xr74sxz 192745 192744 2024-11-18T04:41:06Z Lee 19 [[:en:Category:Puerto_Rican_Spanish]] වෙතින් එක් සංශෝධනයක් 192744 wikitext text/x-wiki {{auto cat|lect=1}} ertee7cys9kcm61xm19ibbz6xr74sxz ප්‍රවර්ගය:Texas German 14 125228 192746 2024-09-17T10:11:50Z en>WingerBot 0 rename dialect= to lect= in {{auto cat}} 192746 wikitext text/x-wiki {{auto cat|lect=1}} ertee7cys9kcm61xm19ibbz6xr74sxz 192747 192746 2024-11-18T04:41:32Z Lee 19 [[:en:Category:Texas_German]] වෙතින් එක් සංශෝධනයක් 192746 wikitext text/x-wiki {{auto cat|lect=1}} ertee7cys9kcm61xm19ibbz6xr74sxz Jakarta 0 125229 192748 2024-11-18T05:15:57Z Lee 19 '==English== ===Alternative forms=== * {{alt|en|Djakarta}} ===Etymology=== From {{bor|en|id|Jakarta}}, from {{der|en|sa|जयकर्ता|t=that which causes victory}}. ===Pronunciation=== * {{IPA|en|/d͡ʒəˈkɑː(ɹ)tə/}} * {{audio|en|LL-Q1860 (eng)-Vealhurl-Jakarta.wav|a=Southern England}} * {{rhymes|en|ɑː(ɹ)tə|s=3}} ===Proper noun=== {{en-prop}} # {{senseid|en|Q3630}} [[ජකාර්තා]] ({{plac...' යොදමින් නව පිටුවක් තනන ලදි 192748 wikitext text/x-wiki ==English== ===Alternative forms=== * {{alt|en|Djakarta}} ===Etymology=== From {{bor|en|id|Jakarta}}, from {{der|en|sa|जयकर्ता|t=that which causes victory}}. ===Pronunciation=== * {{IPA|en|/d͡ʒəˈkɑː(ɹ)tə/}} * {{audio|en|LL-Q1860 (eng)-Vealhurl-Jakarta.wav|a=Southern England}} * {{rhymes|en|ɑː(ɹ)tə|s=3}} ===Proper noun=== {{en-prop}} # {{senseid|en|Q3630}} [[ජකාර්තා]] ({{place|en|province/and/capital city|c/Indonesia}}). #: {{syn|en|Batavia|q=historical}} ====Derived terms==== * {{l|en|Jakartan}} ==Afrikaans== ===Proper noun=== {{af-proper noun}} # {{alt form of|af|Djakarta}} ==Catalan== ===Etymology=== {{ubor|ca|id|Jakarta}}. ===Pronunciation=== * {{ca-IPA|Djacàrta}} ===Proper noun=== {{ca-proper noun|m|head=Jakarta}} # {{l|en|Jakarta}} ==Czech== {{wp|lang=cs}} ===Pronunciation=== * {{cs-IPA|Džakarta}} ===Proper noun=== {{cs-proper noun|f|adj=jakartský}} # {{tcl|cs|Jakarta|id=Q3630}} ====Declension==== {{cs-ndecl|f.sg}} ===Further reading=== * {{R:cs:IJP}} ==Indonesian== {{wp|lang=id}} ===Etymology=== Derives from {{der|id|sa|जयकर्ता||that which causes victory}}, from {{compound|sa|जय|t1=glory|कर्ता|t2=doer, accomplisher|nocat=1}}. ===Pronunciation=== * {{IPA|id|/d͡ʒaˈkarta/|}} * {{hyphenation|id|Ja|kar|ta}} * {{rhymes|id|ta|a|s=3}} ===Proper noun=== {{head|id|proper noun}} # {{tcl|id|Jakarta|id=Q3630}} ====Alternative forms==== * {{l|id|Djakarta}} {{q|dated|pre-1967}} ====Synonyms==== * {{l|id|Sunda Kelapa}} * {{l|id|Jayakarta}} * {{l|id|Batavia}} ===Further reading=== * {{R:KBBI Daring}} ==Malay== {{wikipedia|lang=ms}} ===Pronunciation=== * {{IPA|ms|/d͡ʒaka(r)tə/|a=Johor-Selangor}} * {{IPA|ms|/d͡ʒaka(r)ta/|a=Riau-Lingga}} * {{rhymes|ms|a(r)tə|tə|ə}} ===Proper noun=== {{head|ms|proper noun}} # {{tcl|ms|Jakarta|id=Q3630}} ==Portuguese== ===Proper noun=== {{pt-proper noun|f}} # {{alternative spelling of|pt|Jacarta}} ==Slovak== {{wp|lang=sk}} ===Pronunciation=== * {{sk-IPA|džakarta}} ===Proper noun=== {{sk-proper noun|f|gen=Jakarty|decl=žena}} # {{tcl|sk|Jakarta|id=Q3630}} ===References=== * {{R:sk:SDK}} ==Vietnamese== {{wikipedia|lang=vi}} ===Alternative forms=== * {{alter|vi|Gia-các-ta}} ===Etymology=== {{ubor|vi|en|Jakarta}}. ===Pronunciation=== {{vi-IPA|Gia-các-ta}} ===Proper noun=== {{vi-proper noun}} # {{place|vi|capital|c/Indonesia|t1=Jakarta}} gc3tbkkbcwkci77pswcskh5892cfndi 192788 192748 2024-11-18T09:15:36Z Pinthura 2424 යොමු තොරතුරු පරිවර්තනය 192788 wikitext text/x-wiki == ඉංග්‍රීසි == === වෙනත් ආකාර === * {{alt|en|Djakarta}} === නිරුක්තිය === From {{bor|en|id|Jakarta}}, from {{der|en|sa|जयकर्ता|t=that which causes victory}}. === උච්චාරණය === * {{IPA|en|/d͡ʒəˈkɑː(ɹ)tə/}} * {{audio|en|LL-Q1860 (eng)-Vealhurl-Jakarta.wav|a=Southern England}} * {{rhymes|en|ɑː(ɹ)tə|s=3}} === සංඥා නාම පදය === {{en-prop}} # {{senseid|en|Q3630}} [[ජකාර්තා]] ({{place|en|province/and/capital city|c/Indonesia}}). #: {{syn|en|Batavia|q=historical}} ==== ව්‍යුත්පන්න යෙදුම් ==== * {{l|en|Jakartan}} ==Afrikaans== === සංඥා නාම පදය === {{af-proper noun}} # {{alt form of|af|Djakarta}} ==Catalan== === නිරුක්තිය === {{ubor|ca|id|Jakarta}}. === උච්චාරණය === * {{ca-IPA|Djacàrta}} === සංඥා නාම පදය === {{ca-proper noun|m|head=Jakarta}} # {{l|en|Jakarta}} ==Czech== {{wp|lang=cs}} === උච්චාරණය === * {{cs-IPA|Džakarta}} === සංඥා නාම පදය === {{cs-proper noun|f|adj=jakartský}} # {{tcl|cs|Jakarta|id=Q3630}} ==== වරනැඟීම ==== {{cs-ndecl|f.sg}} === වැඩිදුර් කියවීම සඳහා === * {{R:cs:IJP}} ==Indonesian== {{wp|lang=id}} === නිරුක්තිය === Derives from {{der|id|sa|जयकर्ता||that which causes victory}}, from {{compound|sa|जय|t1=glory|कर्ता|t2=doer, accomplisher|nocat=1}}. === උච්චාරණය === * {{IPA|id|/d͡ʒaˈkarta/|}} * {{hyphenation|id|Ja|kar|ta}} * {{rhymes|id|ta|a|s=3}} === සංඥා නාම පදය === {{head|id|proper noun}} # {{tcl|id|Jakarta|id=Q3630}} ==== වෙනත් ආකාර ==== * {{l|id|Djakarta}} {{q|dated|pre-1967}} ==== සමාන පද ==== * {{l|id|Sunda Kelapa}} * {{l|id|Jayakarta}} * {{l|id|Batavia}} === වැඩිදුර් කියවීම සඳහා === * {{R:KBBI Daring}} ==Malay== {{wikipedia|lang=ms}} === උච්චාරණය === * {{IPA|ms|/d͡ʒaka(r)tə/|a=Johor-Selangor}} * {{IPA|ms|/d͡ʒaka(r)ta/|a=Riau-Lingga}} * {{rhymes|ms|a(r)tə|tə|ə}} === සංඥා නාම පදය === {{head|ms|proper noun}} # {{tcl|ms|Jakarta|id=Q3630}} == පෘතුගීසි == === සංඥා නාම පදය === {{pt-proper noun|f}} # {{alternative spelling of|pt|Jacarta}} ==Slovak== {{wp|lang=sk}} === උච්චාරණය === * {{sk-IPA|džakarta}} === සංඥා නාම පදය === {{sk-proper noun|f|gen=Jakarty|decl=žena}} # {{tcl|sk|Jakarta|id=Q3630}} === මූලාශ්‍ර === * {{R:sk:SDK}} == වියට්නාම == {{wikipedia|lang=vi}} === වෙනත් ආකාර === * {{alter|vi|Gia-các-ta}} === නිරුක්තිය === {{ubor|vi|en|Jakarta}}. === උච්චාරණය === {{vi-IPA|Gia-các-ta}} === සංඥා නාම පදය === {{vi-proper noun}} # {{place|vi|capital|c/Indonesia|t1=Jakarta}} r3ib62bmnrltvtl8g6hrgm519vdnpn6 ජකාර්තා 0 125230 192749 2024-11-18T05:17:37Z Lee 19 '== සිංහල == === නිරුක්තිය === {{rfe|si}} === නාම පදය === {{si-noun}} # ඉන්දුනීසියාවේ අග නගරය හා විශාලතම නගරය # {{senseid|si|Q3630}} ({{place|si|province/and/capital city|c/Indonesia}}). <!-- ==== පරිවර්තන ==== {{trans-top|පරිවර්තන}} * ඉංග්‍රීසි: {{t|en|<<ඉංග...' යොදමින් නව පිටුවක් තනන ලදි 192749 wikitext text/x-wiki == සිංහල == === නිරුක්තිය === {{rfe|si}} === නාම පදය === {{si-noun}} # ඉන්දුනීසියාවේ අග නගරය හා විශාලතම නගරය # {{senseid|si|Q3630}} ({{place|si|province/and/capital city|c/Indonesia}}). <!-- ==== පරිවර්තන ==== {{trans-top|පරිවර්තන}} * ඉංග්‍රීසි: {{t|en|<<ඉංග්‍රීසි වචනය>>}} {{trans-bottom}} === අමතර අවධානයට === * {{l|si|<<ආශ්‍රිත පවතින වෙනත් වචන>>}} --> hw7kldyg6rapviym1cqc7w1p8u4t5ro 192750 192749 2024-11-18T05:46:55Z Lee 19 192750 wikitext text/x-wiki == සිංහල == === නිරුක්තිය === {{rfe|si}} === නාම පදය === {{si-noun}} # {{l|ඉන්දුනීසියාව|ඉන්දුනීසියාවේ}} අග නගරය හා විශාලතම නගරය. # {{senseid|si|Q3630}} ({{place|si|province/and/capital city|c/Indonesia}}). <!-- ==== පරිවර්තන ==== {{trans-top|පරිවර්තන}} * ඉංග්‍රීසි: {{t|en|<<ඉංග්‍රීසි වචනය>>}} {{trans-bottom}} === අමතර අවධානයට === * {{l|si|<<ආශ්‍රිත පවතින වෙනත් වචන>>}} --> 79732e173goz8zm3b5px4cht1ytufy7 192751 192750 2024-11-18T05:47:14Z Lee 19 192751 wikitext text/x-wiki == සිංහල == === නිරුක්තිය === {{rfe|si}} === නාම පදය === {{si-noun}} # {{l|si|ඉන්දුනීසියාව|ඉන්දුනීසියාවේ}} අග නගරය හා විශාලතම නගරය. # {{senseid|si|Q3630}} ({{place|si|province/and/capital city|c/Indonesia}}). <!-- ==== පරිවර්තන ==== {{trans-top|පරිවර්තන}} * ඉංග්‍රීසි: {{t|en|<<ඉංග්‍රීසි වචනය>>}} {{trans-bottom}} === අමතර අවධානයට === * {{l|si|<<ආශ්‍රිත පවතින වෙනත් වචන>>}} --> 7uazhx0xfc1z9dbqslw8z9u121gzfom 192752 192751 2024-11-18T05:47:54Z Lee 19 192752 wikitext text/x-wiki == සිංහල == {{wp}} === නිරුක්තිය === {{rfe|si}} === නාම පදය === {{si-noun}} # {{l|si|ඉන්දුනීසියාව|ඉන්දුනීසියාවේ}} අග නගරය හා විශාලතම නගරය. # {{senseid|si|Q3630}} ({{place|si|province/and/capital city|c/Indonesia}}). <!-- ==== පරිවර්තන ==== {{trans-top|පරිවර්තන}} * ඉංග්‍රීසි: {{t|en|<<ඉංග්‍රීසි වචනය>>}} {{trans-bottom}} === අමතර අවධානයට === * {{l|si|<<ආශ්‍රිත පවතින වෙනත් වචන>>}} --> 8pw16xlppvy7p8eme9wpffbji2p8zya 192753 192752 2024-11-18T05:48:23Z Lee 19 192753 wikitext text/x-wiki == සිංහල == {{wp}} === නිරුක්තිය === {{rfe|si}} === නාම පදය === {{si-noun}} # {{l|si|ඉන්දුනීසියාව|ඉන්දුනීසියාවේ}} අග නගරය හා විශාලතම නගරය. # {{senseid|si|Q3630}} ({{place|si|province/and/capital city|c/Indonesia}}). ==== පරිවර්තන ==== {{trans-top|පරිවර්තන}} * ඉංග්‍රීසි: {{t|en|Jakarta}} {{trans-bottom}} <!-- === අමතර අවධානයට === * {{l|si|<<ආශ්‍රිත පවතින වෙනත් වචන>>}} --> kdd1zaeo8c5v0kkh91oxw2nv8qwt195 Java 0 125231 192754 2024-11-18T05:53:42Z Lee 19 නිර්මාණය 192754 wikitext text/x-wiki {{also|java|javā|Jáva|jäva|Javą}} ==English== ===Etymology=== {{bor+|en|jv|ꦗꦮ}}, possibly from {{der|en|sa|[[यव]]-[[द्वीप]]||island of barley}}, used in reference to the coffee grown on Java and nearby islands since at least 1850. The programming language (initially called ''Oak'') is a reference to {{m|en|java}}, the blend of coffee from the island. ===Pronunciation=== * {{IPA|en|/ˈd͡ʒɑːvə/}}, {{enPR|jäʹ-və}} * {{audio|en|LL-Q1860 (eng)-Vealhurl-Java.wav|a=Southern England}} * {{rhymes|en|ɑːvə|s=2}} * {{homophones|en|java}} ===Proper noun=== {{en-proper noun}} # [[ජාවා]]. ====Hyponyms==== * {{sense|computing}} {{l|en|Java EE}}, {{l|en|Java ME}}, {{l|en|Java SE}} ====Meronyms==== {{col3|en|title=island|Banten|West Java|Central Java|East Java|Jakarta|Yogyakarta}} ====Holonyms==== * {{sense|island}} {{l|en|Greater Sunda Islands}} ====Derived terms==== {{col-auto|en|Blue Java|Java black rot|Javanese|Javadoc|JavaFX|JavaScript|Java cat|Java mouse-deer|Java pepper|Java sparrow|Java canvas}} ===Noun=== {{en-noun}} [[File:BlackJava female, 1905.png|right|thumb|a female Java]] # A [[chicken]] of the Java breed which was developed in the United States. {{C|en|Java programming language}} ==Catalan== ===Proper noun=== {{ca-proper noun|f}} # {{place|ca|island|c/Indonesia|t1=Java}} ====Derived terms==== * {{l|ca|javanès}} ==Dutch== ===Etymology=== {{rfe|nl}} The neighbourhood is named after the Indonesian island. ===Pronunciation=== * {{IPA|nl|/ˈjaː.vaː/}} * {{audio|nl|Nl-Java.ogg}} * {{hyphenation|nl|Ja|va}} ===Proper noun=== {{nl-proper noun|n}} # {{l|en|Java}} {{gloss|island of Indonesia}} # {{place|nl|neighbourhood|c/Almelo|p/Overijssel|c/Netherlands}} ====Derived terms==== * {{l|nl|Javaan}} * {{l|nl|Javazee}} ====Related terms==== * {{l|nl|Javaans}} ==French== ===Pronunciation=== * {{fr-IPA}} * {{audio|fr|LL-Q150 (fra)-Benoît Prieur-Java.wav}} ===Proper noun=== {{fr-proper noun|f}} # {{l|en|Java}} {{gloss|Island}} #: {{uxi|fr|L'île de '''Java'''.|'''Java''' island.}} ===Proper noun=== {{fr-proper noun|m}} # {{l|en|Java}} {{gloss|programming language}} ====Derived terms==== * {{l|fr|javanais}} * {{l|fr|Javanais}} {{C|fr|Computer languages|Islands}} ==German== ===Pronunciation=== * {{audio|de|De-Java.ogg}} ===Proper noun=== {{de-proper noun|toponym}} # {{place|de|island|c/Indonesia|the world's most populous island|t1=Java}} ====Related terms==== * {{l|de|Javaner}} * {{l|de|Javanerin}} * {{l|de|Javanisch}} * {{l|de|javanisch}} ===Proper noun=== {{de-proper noun|n}} # [[#English|Java]] {{gloss|programming language}} {{C|de|Computer languages}} ==Polish== {{wp|lang=pl}} ===Etymology=== {{ubor|pl|en|Java}}, from {{der|pl|jv|ꦗꦮ}}, possibly from {{der|pl|sa|[[यव]]-[[द्वीप]]}}. ===Pronunciation=== {{pl-pr|dżawa|a=LL-Q809 (pol)-Olaf-Java.wav|h=Ja.va}} ===Proper noun=== {{pl-proper noun|f}} # {{l|en|Java}} {{gl|programming language}} ====Declension==== {{pl-decl-noun-sing|tantum=s |Java |Javy |Javie |Javę |Javą |Javie |Javo }} ===Further reading=== * {{R:pl:PWN}} {{C|pl|Computer languages}} ==Portuguese== ===Pronunciation=== {{pt-IPA}} * {{rhymes|pt|avɐ|abɐ|q2=Northern Portugal|s=2}} * {{hyphenation|pt|Ja|va}} ===Etymology 1=== ====Proper noun==== {{pt-proper noun|f}} # {{place|pt|island|of|c/Indonesia|t1=Java}} =====Related terms===== * {{l|pt|javanês}}, {{l|pt|jau}} ===Etymology 2=== {{ubor|pt|en|Java}}. ====Proper noun==== {{pt-proper noun|m}} # {{lb|pt|computing}} {{l|en|Java}} {{gloss|programming language}} {{C|pt|Computer languages}} ==Spanish== {{wikipedia|lang=es}} ===Pronunciation=== {{es-pr}} ===Proper noun=== {{es-proper noun|f}} # {{place|es|island|of|c/Indonesia|t1=Java}} ====Derived terms==== {{col-auto|es |rinoceronte de Java |té de Java |tigre de Java }} ====Descendants==== * {{desc|tl|Haba|bor=1}} ===Proper noun=== {{es-proper noun|m}} # {{l|en|Java}} {{gloss|programming language}} ====Derived terms==== {{col-auto|es|javanés}} {{C|es|Computer languages}} ==Swedish== {{wikipedia|lang=sv}} ===Proper noun=== {{sv-proper noun|n}} # {{place|sv|island|c/Indonesia|t1=Java}} ====Related terms==== * {{l|sv|javakaffe}} * {{l|sv|javanes}} * {{l|sv|javanesisk}} * {{l|sv|javanesiska}} * {{l|sv|javansk}} * {{l|sv|javanska}} ====See also==== * {{l|sv|java}} kzel3n6pk38u8i3m5s666wtny7t0l24 192787 192754 2024-11-18T09:15:26Z Pinthura 2424 යොමු තොරතුරු පරිවර්තනය 192787 wikitext text/x-wiki {{also|java|javā|Jáva|jäva|Javą}} == ඉංග්‍රීසි == === නිරුක්තිය === {{bor+|en|jv|ꦗꦮ}}, possibly from {{der|en|sa|[[यव]]-[[द्वीप]]||island of barley}}, used in reference to the coffee grown on Java and nearby islands since at least 1850. The programming language (initially called ''Oak'') is a reference to {{m|en|java}}, the blend of coffee from the island. === උච්චාරණය === * {{IPA|en|/ˈd͡ʒɑːvə/}}, {{enPR|jäʹ-və}} * {{audio|en|LL-Q1860 (eng)-Vealhurl-Java.wav|a=Southern England}} * {{rhymes|en|ɑːvə|s=2}} * {{homophones|en|java}} === සංඥා නාම පදය === {{en-proper noun}} # [[ජාවා]]. ====Hyponyms==== * {{sense|computing}} {{l|en|Java EE}}, {{l|en|Java ME}}, {{l|en|Java SE}} ====Meronyms==== {{col3|en|title=island|Banten|West Java|Central Java|East Java|Jakarta|Yogyakarta}} ====Holonyms==== * {{sense|island}} {{l|en|Greater Sunda Islands}} ==== ව්‍යුත්පන්න යෙදුම් ==== {{col-auto|en|Blue Java|Java black rot|Javanese|Javadoc|JavaFX|JavaScript|Java cat|Java mouse-deer|Java pepper|Java sparrow|Java canvas}} === නාම පදය === {{en-noun}} [[File:BlackJava female, 1905.png|right|thumb|a female Java]] # A [[chicken]] of the Java breed which was developed in the United States. {{C|en|Java programming language}} ==Catalan== === සංඥා නාම පදය === {{ca-proper noun|f}} # {{place|ca|island|c/Indonesia|t1=Java}} ==== ව්‍යුත්පන්න යෙදුම් ==== * {{l|ca|javanès}} == ඕලන්ද == === නිරුක්තිය === {{rfe|nl}} The neighbourhood is named after the Indonesian island. === උච්චාරණය === * {{IPA|nl|/ˈjaː.vaː/}} * {{audio|nl|Nl-Java.ogg}} * {{hyphenation|nl|Ja|va}} === සංඥා නාම පදය === {{nl-proper noun|n}} # {{l|en|Java}} {{gloss|island of Indonesia}} # {{place|nl|neighbourhood|c/Almelo|p/Overijssel|c/Netherlands}} ==== ව්‍යුත්පන්න යෙදුම් ==== * {{l|nl|Javaan}} * {{l|nl|Javazee}} ==== ආශ්‍රිත යෙදුම් ==== * {{l|nl|Javaans}} == ප්‍රංශ == === උච්චාරණය === * {{fr-IPA}} * {{audio|fr|LL-Q150 (fra)-Benoît Prieur-Java.wav}} === සංඥා නාම පදය === {{fr-proper noun|f}} # {{l|en|Java}} {{gloss|Island}} #: {{uxi|fr|L'île de '''Java'''.|'''Java''' island.}} === සංඥා නාම පදය === {{fr-proper noun|m}} # {{l|en|Java}} {{gloss|programming language}} ==== ව්‍යුත්පන්න යෙදුම් ==== * {{l|fr|javanais}} * {{l|fr|Javanais}} {{C|fr|Computer languages|Islands}} == ජර්මානු == === උච්චාරණය === * {{audio|de|De-Java.ogg}} === සංඥා නාම පදය === {{de-proper noun|toponym}} # {{place|de|island|c/Indonesia|the world's most populous island|t1=Java}} ==== ආශ්‍රිත යෙදුම් ==== * {{l|de|Javaner}} * {{l|de|Javanerin}} * {{l|de|Javanisch}} * {{l|de|javanisch}} === සංඥා නාම පදය === {{de-proper noun|n}} # [[#English|Java]] {{gloss|programming language}} {{C|de|Computer languages}} == පෝලන්ත == {{wp|lang=pl}} === නිරුක්තිය === {{ubor|pl|en|Java}}, from {{der|pl|jv|ꦗꦮ}}, possibly from {{der|pl|sa|[[यव]]-[[द्वीप]]}}. === උච්චාරණය === {{pl-pr|dżawa|a=LL-Q809 (pol)-Olaf-Java.wav|h=Ja.va}} === සංඥා නාම පදය === {{pl-proper noun|f}} # {{l|en|Java}} {{gl|programming language}} ==== වරනැඟීම ==== {{pl-decl-noun-sing|tantum=s |Java |Javy |Javie |Javę |Javą |Javie |Javo }} === වැඩිදුර් කියවීම සඳහා === * {{R:pl:PWN}} {{C|pl|Computer languages}} == පෘතුගීසි == === උච්චාරණය === {{pt-IPA}} * {{rhymes|pt|avɐ|abɐ|q2=Northern Portugal|s=2}} * {{hyphenation|pt|Ja|va}} === නිරුක්තිය 1 === ==== සංඥා නාම පදය ==== {{pt-proper noun|f}} # {{place|pt|island|of|c/Indonesia|t1=Java}} ===== ආශ්‍රිත යෙදුම් ===== * {{l|pt|javanês}}, {{l|pt|jau}} === නිරුක්තිය 2 === {{ubor|pt|en|Java}}. ==== සංඥා නාම පදය ==== {{pt-proper noun|m}} # {{lb|pt|computing}} {{l|en|Java}} {{gloss|programming language}} {{C|pt|Computer languages}} == ස්පාඤ්ඤ == {{wikipedia|lang=es}} === උච්චාරණය === {{es-pr}} === සංඥා නාම පදය === {{es-proper noun|f}} # {{place|es|island|of|c/Indonesia|t1=Java}} ==== ව්‍යුත්පන්න යෙදුම් ==== {{col-auto|es |rinoceronte de Java |té de Java |tigre de Java }} ====Descendants==== * {{desc|tl|Haba|bor=1}} === සංඥා නාම පදය === {{es-proper noun|m}} # {{l|en|Java}} {{gloss|programming language}} ==== ව්‍යුත්පන්න යෙදුම් ==== {{col-auto|es|javanés}} {{C|es|Computer languages}} == ස්වීඩන් == {{wikipedia|lang=sv}} === සංඥා නාම පදය === {{sv-proper noun|n}} # {{place|sv|island|c/Indonesia|t1=Java}} ==== ආශ්‍රිත යෙදුම් ==== * {{l|sv|javakaffe}} * {{l|sv|javanes}} * {{l|sv|javanesisk}} * {{l|sv|javanesiska}} * {{l|sv|javansk}} * {{l|sv|javanska}} ==== අමතර අවධානයට ==== * {{l|sv|java}} n0rf7ay4z4or3lrd8jxt2vsdps7xfii ජාවා 0 125232 192755 2024-11-18T05:54:06Z Lee 19 '== සිංහල == === නිරුක්තිය === {{rfe|si}} === නාම පදය === {{si-noun}} # {{rfdef|si}} <!-- ==== පරිවර්තන ==== {{trans-top|පරිවර්තන}} * ඉංග්‍රීසි: {{t|en|<<ඉංග්‍රීසි වචනය>>}} {{trans-bottom}} === අමතර අවධානයට === * {{l|si|<<ආශ්‍රිත පවතින වෙනත් ව...' යොදමින් නව පිටුවක් තනන ලදි 192755 wikitext text/x-wiki == සිංහල == === නිරුක්තිය === {{rfe|si}} === නාම පදය === {{si-noun}} # {{rfdef|si}} <!-- ==== පරිවර්තන ==== {{trans-top|පරිවර්තන}} * ඉංග්‍රීසි: {{t|en|<<ඉංග්‍රීසි වචනය>>}} {{trans-bottom}} === අමතර අවධානයට === * {{l|si|<<ආශ්‍රිත පවතින වෙනත් වචන>>}} --> 37g9s13iio6w9i2yw7aw46v28viw7h4 192756 192755 2024-11-18T05:55:40Z Lee 19 192756 wikitext text/x-wiki == සිංහල == [[File:Java_Topography.png|thumb|250px|Java (1)]] {{විකිපීඩියා}} === නිරුක්තිය === {{rfe|si}} === නාම පදය === {{si-noun}} # {{place|si|An <<island>> in the Indonesian Archipelago, <<c/Indonesia>>}}. # {{lb|si|computer language}} An [[object-oriented]], [[garbage collection|garbage-collected]] computer [[programming language]]. ==== පරිවර්තන ==== {{trans-top|පරිවර්තන}} * ඉංග්‍රීසි: {{t|en|Java}} {{trans-bottom}} <!-- === අමතර අවධානයට === * {{l|si|<<ආශ්‍රිත පවතින වෙනත් වචන>>}} --> a6qiqhcxkh17h366irikb7cif0parkh transfixes 0 125233 192757 2024-11-18T05:57:55Z Lee 19 නිර්මාණය 192757 wikitext text/x-wiki ==English== ===Noun=== {{head|en|noun form}} # {{plural of|en|transfix}} ===Verb=== {{head|en|verb form}} # {{infl of|en|transfix||s-verb-form}} 1gpvd5syns1sxtsb9xiusahadymsnie 192786 192757 2024-11-18T09:15:16Z Pinthura 2424 යොමු තොරතුරු පරිවර්තනය 192786 wikitext text/x-wiki == ඉංග්‍රීසි == === නාම පදය === {{head|en|noun form}} # {{plural of|en|transfix}} === ක්‍රියා පදය === {{head|en|verb form}} # {{infl of|en|transfix||s-verb-form}} t9sobcxig2cr9ddywlsgnjj5zylzf9j transfix 0 125234 192758 2024-11-18T05:59:13Z Lee 19 නිර්මාණය 192758 wikitext text/x-wiki ==English== ===Etymology 1=== From {{bor|en|frm|transfixer}}, from {{der|en|fro|transfixer}}, from {{der|en|la|transfigō|t=to pierce through}}, from {{m|la|trans-||through}} + {{m|la|figō||to pierce}}. ====Pronunciation==== * {{audio|en|en-us-transfix.ogg|a=US}} ====Verb==== {{en-verb}} # {{rfdef|en}} =====Related terms===== * {{l|en|transfixation}} * {{l|en|transfixion}} * {{l|en|transfixture}} ===Etymology 2=== From {{con|en|trans|fix}}. ====Noun==== {{en-noun}} # {{lb|en|linguistics}} A discontinuous [[affix]], which occurs at more than one position in a word, typical of [[Semitic]] languages. pm951axc6p2ghbumi7o44kscu1aimft 192785 192758 2024-11-18T09:15:06Z Pinthura 2424 යොමු තොරතුරු පරිවර්තනය 192785 wikitext text/x-wiki == ඉංග්‍රීසි == === නිරුක්තිය 1 === From {{bor|en|frm|transfixer}}, from {{der|en|fro|transfixer}}, from {{der|en|la|transfigō|t=to pierce through}}, from {{m|la|trans-||through}} + {{m|la|figō||to pierce}}. ==== උච්චාරණය ==== * {{audio|en|en-us-transfix.ogg|a=US}} ==== ක්‍රියා පදය ==== {{en-verb}} # {{rfdef|en}} ===== ආශ්‍රිත යෙදුම් ===== * {{l|en|transfixation}} * {{l|en|transfixion}} * {{l|en|transfixture}} === නිරුක්තිය 2 === From {{con|en|trans|fix}}. ==== නාම පදය ==== {{en-noun}} # {{lb|en|linguistics}} A discontinuous [[affix]], which occurs at more than one position in a word, typical of [[Semitic]] languages. eyoeoish36qp5y71fn4a6454bhs2qta circumfixes 0 125235 192759 2024-11-18T08:57:49Z Lee 19 නිර්මාණය 192759 wikitext text/x-wiki ==English== ===Noun=== {{head|en|noun form}} # {{plural of|en|circumfix}} ===Verb=== {{head|en|verb form}} # {{infl of|en|circumfix||s-verb-form}} sy8fbnmdt13xhswui5qdt5drxa79lzd 192784 192759 2024-11-18T09:14:56Z Pinthura 2424 යොමු තොරතුරු පරිවර්තනය 192784 wikitext text/x-wiki == ඉංග්‍රීසි == === නාම පදය === {{head|en|noun form}} # {{plural of|en|circumfix}} === ක්‍රියා පදය === {{head|en|verb form}} # {{infl of|en|circumfix||s-verb-form}} 4agi9hwtgws44hh6k10r06sdahtdoi5 circumfix 0 125236 192760 2024-11-18T08:58:58Z Lee 19 නිර්මාණය 192760 wikitext text/x-wiki ==English== {{wp}} ===Etymology=== From {{confix|en|circum|fix}}. ===Pronunciation=== * {{s|noun}} ** {{IPA|en|/ˈsəːkəmfɪks/|a=UK}} ** {{IPA|en|/ˈsɚkəmfɪks/|a=US}} * {{s|verb}} ** {{IPA|en|/səːkəmˈfɪks/|/ˈsəːkəmfɪks/|a=RP}} ** {{IPA|en|/sɚkəmˈfɪks/|/ˈsɚkəmfɪks/|a=US}} ===Noun=== {{en-noun}} # {{lb|en|grammar}} An [[affix]] [[contain]]ing both a [[prefix]]ing and a [[suffix]]ing element existing as a single [[morphological]] [[unit]]. #: {{syn|en|ambifix|confix}} ====Coordinate terms==== {{col4|en |adfix |affix |disfix |duplifix |infix |interfix |libfix |postfix |prefix |prefixoid |pseudo-suffix |semi-prefix |simulfix |suprafix |suffix |suffixoid |transfix }} ====Derived terms==== * {{l|en|circumfixation}} * {{l|en|circumfixal}} * {{l|en|circumfixing}} {{q|adjective, noun or present participle}} ===Verb=== {{en-verb}} # {{lb|en|grammar}} Affix a circumfix to (a word). ===Further reading=== * [[:Category:Circumfixes by language]] ==Dutch== ===Etymology=== {{rfe|nl}} ===Pronunciation=== * {{IPA|nl|/ˈsɪrkʏmˌfɪks/}} * {{audio|nl|Nl-circumfix.ogg}} * {{hyphenation|nl|cir|cum|fix}} ===Noun=== {{nl-noun|n|-en|+}} # {{lb|nl|grammar}} {{l|en|circumfix}} cpal8llpjvk298yzcpcb0nib4udw9a5 192783 192760 2024-11-18T09:14:46Z Pinthura 2424 යොමු තොරතුරු පරිවර්තනය 192783 wikitext text/x-wiki == ඉංග්‍රීසි == {{wp}} === නිරුක්තිය === From {{confix|en|circum|fix}}. === උච්චාරණය === * {{s|noun}} ** {{IPA|en|/ˈsəːkəmfɪks/|a=UK}} ** {{IPA|en|/ˈsɚkəmfɪks/|a=US}} * {{s|verb}} ** {{IPA|en|/səːkəmˈfɪks/|/ˈsəːkəmfɪks/|a=RP}} ** {{IPA|en|/sɚkəmˈfɪks/|/ˈsɚkəmfɪks/|a=US}} === නාම පදය === {{en-noun}} # {{lb|en|grammar}} An [[affix]] [[contain]]ing both a [[prefix]]ing and a [[suffix]]ing element existing as a single [[morphological]] [[unit]]. #: {{syn|en|ambifix|confix}} ====Coordinate terms==== {{col4|en |adfix |affix |disfix |duplifix |infix |interfix |libfix |postfix |prefix |prefixoid |pseudo-suffix |semi-prefix |simulfix |suprafix |suffix |suffixoid |transfix }} ==== ව්‍යුත්පන්න යෙදුම් ==== * {{l|en|circumfixation}} * {{l|en|circumfixal}} * {{l|en|circumfixing}} {{q|adjective, noun or present participle}} === ක්‍රියා පදය === {{en-verb}} # {{lb|en|grammar}} Affix a circumfix to (a word). === වැඩිදුර් කියවීම සඳහා === * [[:Category:Circumfixes by language]] == ඕලන්ද == === නිරුක්තිය === {{rfe|nl}} === උච්චාරණය === * {{IPA|nl|/ˈsɪrkʏmˌfɪks/}} * {{audio|nl|Nl-circumfix.ogg}} * {{hyphenation|nl|cir|cum|fix}} === නාම පදය === {{nl-noun|n|-en|+}} # {{lb|nl|grammar}} {{l|en|circumfix}} qok6z2utfinjjui27uxrsjor07rdlfx interfix 0 125237 192761 2024-11-18T09:01:19Z Lee 19 නිර්මාණය 192761 wikitext text/x-wiki ==English== ===Etymology=== From {{prefix|en|inter|fix}}. ===Pronunciation=== * {{hyphenation|en|in|ter|fix}} ===Noun=== {{en-noun}} # {{lb|en|linguistic morphology}} A [[transfix#Noun|transfix]]. ====Coordinate terms==== * {{affixes}} ===Verb=== {{en-verb}} # {{rfdef|en}} ====Derived terms==== * {{l|en|interfixation}} ====See also==== * {{l|en|epenthesis}} * [[infix]] * [[:Category:English interfixes]] dw4x9en3zp1ueno7q1krqa4902f7pwe 192782 192761 2024-11-18T09:14:36Z Pinthura 2424 යොමු තොරතුරු පරිවර්තනය 192782 wikitext text/x-wiki == ඉංග්‍රීසි == === නිරුක්තිය === From {{prefix|en|inter|fix}}. === උච්චාරණය === * {{hyphenation|en|in|ter|fix}} === නාම පදය === {{en-noun}} # {{lb|en|linguistic morphology}} A [[transfix#Noun|transfix]]. ====Coordinate terms==== * {{affixes}} === ක්‍රියා පදය === {{en-verb}} # {{rfdef|en}} ==== ව්‍යුත්පන්න යෙදුම් ==== * {{l|en|interfixation}} ==== අමතර අවධානයට ==== * {{l|en|epenthesis}} * [[infix]] * [[:Category:English interfixes]] ft38byjo4r7978rotjus2fz84ej2w39 interfixes 0 125238 192762 2024-11-18T09:02:04Z Lee 19 නිර්මාණය 192762 wikitext text/x-wiki ==English== ===Noun=== {{head|en|noun form}} # {{plural of|en|interfix}} ===Verb=== {{head|en|verb form}} # {{infl of|en|interfix||s-verb-form}} 2m15vw3flj2kvjhbpy6u4623kndh09z 192781 192762 2024-11-18T09:14:26Z Pinthura 2424 යොමු තොරතුරු පරිවර්තනය 192781 wikitext text/x-wiki == ඉංග්‍රීසි == === නාම පදය === {{head|en|noun form}} # {{plural of|en|interfix}} === ක්‍රියා පදය === {{head|en|verb form}} # {{infl of|en|interfix||s-verb-form}} b2gsd9871q4yxrlvlja8tlp7sttnel0 interfixing 0 125239 192763 2024-11-18T09:02:17Z Lee 19 නිර්මාණය 192763 wikitext text/x-wiki ==English== ===Verb=== {{head|en|verb form}} # {{infl of|en|interfix||ing-form}} ha7ck2k9662kzoriyigtpyood047gvu 192780 192763 2024-11-18T09:14:16Z Pinthura 2424 යොමු තොරතුරු පරිවර්තනය 192780 wikitext text/x-wiki == ඉංග්‍රීසි == === ක්‍රියා පදය === {{head|en|verb form}} # {{infl of|en|interfix||ing-form}} 8ad4fnpgfmyc7znpomlqyvhwsdj7uk5 interfixed 0 125240 192764 2024-11-18T09:02:30Z Lee 19 නිර්මාණය 192764 wikitext text/x-wiki ==English== ===Verb=== {{head|en|verb form}} # {{infl of|en|interfix||ed-form}} ooudfsl3ti0deiyxv5gsva1i845eakg 192779 192764 2024-11-18T09:14:06Z Pinthura 2424 යොමු තොරතුරු පරිවර්තනය 192779 wikitext text/x-wiki == ඉංග්‍රීසි == === ක්‍රියා පදය === {{head|en|verb form}} # {{infl of|en|interfix||ed-form}} l4jyc8kkob32ncaoltspbfh1bmj3xyk infix 0 125241 192765 2024-11-18T09:04:26Z Lee 19 නිර්මාණය 192765 wikitext text/x-wiki {{also|Infix}} ==English== ===Etymology=== {{back-form|en}} from {{der|en|enm|infixed|t=stuck in}}, from {{der|en|la|infixus}}, past participle of {{m|la|infigō|t=to fasten in}}. ===Pronunciation=== ; Noun: * {{IPA|en|/ˈɪnfɪks/|a=UK,US}} * {{audio|en|en-us-infix.ogg|a=US|pos=noun}} ; Verb: * {{IPA|en|/ɪnˈfɪks/|/ˈɪnfɪks/|a=UK,US}} * {{audio|en|en-us-infix-verb.ogg|a=US|pos=verb}} * {{rhymes|en|ɪks|s=2}} ===Verb=== {{en-verb}} # {{lb|en|transitive|linguistics}} To insert a [[morpheme]] inside an existing word. ===Noun=== {{en-noun}} # {{lb|en|linguistics}} An [[affix]] inserted inside a [[root]], such as {{m|en|-ma-}} in English {{m|en|edumacation}}. ====Coordinate terms==== * {{affixes}} ====Derived terms==== {{der4 |en|infixal |infixation |infixion |infix operator |infix notation }} ===See also=== * {{l|en|anastomosis}} * {{l|en|postfix}} * [[:Category:English infixes]] {{cln|en|heteronyms|terms suffixed with -fix}} {{C|en|Linguistic morphology}} ==Catalan== {{wikipedia|lang=ca}} ===Etymology=== {{bor+|ca|la|īnfixus}}. ===Pronunciation=== * {{ca-IPA}} ===Noun=== {{ca-noun|m}} # {{lb|ca|linguistics}} {{l|en|infix}} ==Swedish== {{wikipedia|lang=sv}} ===Noun=== {{sv-noun|n}} # {{lb|sv|linguistics}} {{l|en|infix}} f9qtt0i50fgr82gmpx5vwl71l7r7fan 192778 192765 2024-11-18T09:13:56Z Pinthura 2424 යොමු තොරතුරු පරිවර්තනය 192778 wikitext text/x-wiki {{also|Infix}} == ඉංග්‍රීසි == === නිරුක්තිය === {{back-form|en}} from {{der|en|enm|infixed|t=stuck in}}, from {{der|en|la|infixus}}, past participle of {{m|la|infigō|t=to fasten in}}. === උච්චාරණය === ; Noun: * {{IPA|en|/ˈɪnfɪks/|a=UK,US}} * {{audio|en|en-us-infix.ogg|a=US|pos=noun}} ; Verb: * {{IPA|en|/ɪnˈfɪks/|/ˈɪnfɪks/|a=UK,US}} * {{audio|en|en-us-infix-verb.ogg|a=US|pos=verb}} * {{rhymes|en|ɪks|s=2}} === ක්‍රියා පදය === {{en-verb}} # {{lb|en|transitive|linguistics}} To insert a [[morpheme]] inside an existing word. === නාම පදය === {{en-noun}} # {{lb|en|linguistics}} An [[affix]] inserted inside a [[root]], such as {{m|en|-ma-}} in English {{m|en|edumacation}}. ====Coordinate terms==== * {{affixes}} ==== ව්‍යුත්පන්න යෙදුම් ==== {{der4 |en|infixal |infixation |infixion |infix operator |infix notation }} === අමතර අවධානයට === * {{l|en|anastomosis}} * {{l|en|postfix}} * [[:Category:English infixes]] {{cln|en|heteronyms|terms suffixed with -fix}} {{C|en|Linguistic morphology}} ==Catalan== {{wikipedia|lang=ca}} === නිරුක්තිය === {{bor+|ca|la|īnfixus}}. === උච්චාරණය === * {{ca-IPA}} === නාම පදය === {{ca-noun|m}} # {{lb|ca|linguistics}} {{l|en|infix}} == ස්වීඩන් == {{wikipedia|lang=sv}} === නාම පදය === {{sv-noun|n}} # {{lb|sv|linguistics}} {{l|en|infix}} osx5hs378m6mech6g4uo5tjlwtb7v3b infixes 0 125242 192766 2024-11-18T09:05:14Z Lee 19 නිර්මාණය 192766 wikitext text/x-wiki {{also|Infixes|infixés}} ==English== ===Noun=== {{head|en|noun form}} # {{plural of|en|infix}} ===Verb=== {{head|en|verb form}} # {{infl of|en|infix||s-verb-form}} ==French== ===Noun=== {{head|fr|noun form|g=m}} # {{plural of|fr|infixe}} goo19hztbbikshyvhh0p6wor7cggmeq 192777 192766 2024-11-18T09:13:46Z Pinthura 2424 යොමු තොරතුරු පරිවර්තනය 192777 wikitext text/x-wiki {{also|Infixes|infixés}} == ඉංග්‍රීසි == === නාම පදය === {{head|en|noun form}} # {{plural of|en|infix}} === ක්‍රියා පදය === {{head|en|verb form}} # {{infl of|en|infix||s-verb-form}} == ප්‍රංශ == === නාම පදය === {{head|fr|noun form|g=m}} # {{plural of|fr|infixe}} kowap0uk3tuk042x79ntncmkegrdvxd infixing 0 125243 192767 2024-11-18T09:05:30Z Lee 19 නිර්මාණය 192767 wikitext text/x-wiki ==English== ===Verb=== {{head|en|verb form}} # {{infl of|en|infix||ing-form}} e9dkbfno7325kq5h16nutrml93x29k2 192776 192767 2024-11-18T09:13:36Z Pinthura 2424 යොමු තොරතුරු පරිවර්තනය 192776 wikitext text/x-wiki == ඉංග්‍රීසි == === ක්‍රියා පදය === {{head|en|verb form}} # {{infl of|en|infix||ing-form}} g6a00s9avkitypjk5qccrsbu3k8qyz5 infixed 0 125244 192768 2024-11-18T09:05:47Z Lee 19 නිර්මාණය 192768 wikitext text/x-wiki ==English== ===Verb=== {{head|en|verb form}} # {{infl of|en|infix||ed-form}} c9mp3pmbockg5abfgvgfs3u85rkr739 192775 192768 2024-11-18T09:13:26Z Pinthura 2424 යොමු තොරතුරු පරිවර්තනය 192775 wikitext text/x-wiki == ඉංග්‍රීසි == === ක්‍රියා පදය === {{head|en|verb form}} # {{infl of|en|infix||ed-form}} lp14dqobnkkaqkdyvguvllrk0xbcczc suffix 0 125245 192769 2024-11-18T09:07:36Z Lee 19 නිර්මාණය 192769 wikitext text/x-wiki {{also|Suffix}} ==English== ===Etymology=== Borrowed from {{bor|en|la|suffīxus||suffix}}, from {{af|la|sub-|t1=under|fīxus|pos2=perfect passive participle of {{m|la|[[figo|fīgere]]||to fasten, fix}}|nocat=1}}, equivalent to {{con|en|sub|fix}}. ===Pronunciation=== * {{qualifier|noun}} {{IPA|en|/ˈsʌfɪks/}} ** {{audio|en|en-us-suffix.ogg|a=US}} * {{qualifier|verb}} {{IPA|en|/ˈsʌfɪks/|/səˈfɪks/}} * {{rhymes|en|ɪks|s=2}} ===Noun=== {{en-noun}} # {{senseid|en|Q102047}}{{lb|en|grammar|linguistic morphology}} A [[morpheme]] added at the [[end]] of a word to modify the word's [[meaning]]. #: {{syn|en|affix|q1=narrow sense}} #: {{ant|en|prefix}} #: {{hyper|en|affix|q1=broad sense|morpheme}} #: {{ux|en|The '''suffix''' "-able" changes "sing" into "singable".}} ====Coordinate terms==== * {{affixes}} ====Derived terms==== {{der3|en |derivational suffix |inflectional suffix |null suffix |possessive suffix |semisuffix |suffixal |suffixation |suffixness |zero suffix }} ====See also==== * [[:Category:English suffixes]] ===Verb=== {{en-verb}} # {{lb|en|transitive}} To [[append]] (something) to the end of something else. ====Related terms==== {{col4|en |affix |crucifixion |fix |fixation |infix |postfix |prefix |suffixal |suffixion |suffix tree }} {{cln|en|heteronyms}} {{C|en|Linguistic morphology}} 7vw69oiz74i1uj9rmf9naaogk8029aj 192774 192769 2024-11-18T09:13:16Z Pinthura 2424 යොමු තොරතුරු පරිවර්තනය 192774 wikitext text/x-wiki {{also|Suffix}} == ඉංග්‍රීසි == === නිරුක්තිය === Borrowed from {{bor|en|la|suffīxus||suffix}}, from {{af|la|sub-|t1=under|fīxus|pos2=perfect passive participle of {{m|la|[[figo|fīgere]]||to fasten, fix}}|nocat=1}}, equivalent to {{con|en|sub|fix}}. === උච්චාරණය === * {{qualifier|noun}} {{IPA|en|/ˈsʌfɪks/}} ** {{audio|en|en-us-suffix.ogg|a=US}} * {{qualifier|verb}} {{IPA|en|/ˈsʌfɪks/|/səˈfɪks/}} * {{rhymes|en|ɪks|s=2}} === නාම පදය === {{en-noun}} # {{senseid|en|Q102047}}{{lb|en|grammar|linguistic morphology}} A [[morpheme]] added at the [[end]] of a word to modify the word's [[meaning]]. #: {{syn|en|affix|q1=narrow sense}} #: {{ant|en|prefix}} #: {{hyper|en|affix|q1=broad sense|morpheme}} #: {{ux|en|The '''suffix''' "-able" changes "sing" into "singable".}} ====Coordinate terms==== * {{affixes}} ==== ව්‍යුත්පන්න යෙදුම් ==== {{der3|en |derivational suffix |inflectional suffix |null suffix |possessive suffix |semisuffix |suffixal |suffixation |suffixness |zero suffix }} ==== අමතර අවධානයට ==== * [[:Category:English suffixes]] === ක්‍රියා පදය === {{en-verb}} # {{lb|en|transitive}} To [[append]] (something) to the end of something else. ==== ආශ්‍රිත යෙදුම් ==== {{col4|en |affix |crucifixion |fix |fixation |infix |postfix |prefix |suffixal |suffixion |suffix tree }} {{cln|en|heteronyms}} {{C|en|Linguistic morphology}} 0wppywzolr1sji6zclsouvnk40otg2a prefix 0 125246 192770 2024-11-18T09:11:14Z Lee 19 නිර්මාණය 192770 wikitext text/x-wiki {{also|préfix}} ==English== ===Alternative forms=== * {{alter|en|præfix||obsolete}} * {{alter|en|prefixe||for the verb; obsolete}} ===Etymology 1=== Borrowed from {{bor|en|LL.|praefīxum}}, from {{der|en|la|praefīxus}}, past participle of {{m|la|praefīgō|t=I (fix, fasten, set up) in front”, “I fix on the (end, extremity)}} (from {{m|la|prae-|t=before}} + {{m|la|fīgō|t=I fix”, “I fasten”, “I affix}}), equivalent to {{con|en|pre|fix}}. {{doublet|en}} of the archaic synonym {{m|en|prefixum}}. ====Pronunciation==== * {{IPA|en|/ˈpɹiːfɪks/|/pɹɛˈfɪks/}} ** {{audio|en|LL-Q1860 (eng)-Vealhurl-prefix (noun).wav|a=Southern England}} ** {{audio|en|en-us-prefix.ogg|a=US}} * {{rhymes|en|ɪks|s=2}} ====Noun==== {{en-noun}} # {{rfdef|en}} =====Synonyms===== * {{l|en|forefix}} {{q|rare}} =====Coordinate terms===== * {{affixes}} =====Derived terms===== {{der3|en|metric prefix|null prefix|SI prefix|zero prefix |prefixal |prefixhood |[[prefixing]] {{q|adj.}} |[[prefixless]], [[prefixlessness|~ness]] |prefixlike |prefixness |prefixoid |pseudoprefix }} {{col3|en|title=Expressions |international call prefix |prefix code |prefix coding |prefix notation |prefix tree|ship prefix |separable prefix }} ===Etymology 2=== From {{inh|en|enm|prefixen}}, from {{der|en|frm|prefixer}},<ref>{{R:MED Online|entry=prēfixen|pos=v|id=MED34392}}</ref> from {{der|en|la|praefīxus}}, past participle of {{m|la|praefīgō|t=I (fix, fasten, set up) in front”, “I fix on the (end, extremity)}} (from {{m|la|prae-|t=before}} + {{m|la|fīgō|t=I fix”, “I fasten”, “I affix}}), equivalent to {{con|en|pre|fix}}. ====Pronunciation==== * {{IPA|en|/ˈpɹiːfɪks/|/pɹiːˈfɪks/|/pɹɛˈfɪks/}} ** {{audio|en|LL-Q1860 (eng)-Vealhurl-prefix2.wav|a=Southern England}} * {{rhymes|en|ɪks|s=2}} ====Verb==== {{en-verb}} # {{rfdef|en}} =====Derived terms===== {{der3|en |prefixable |prefixation |[[prefixed]], [[unprefixed]] |[[prefixer]], [[autoprefixer|auto~]] }} =====Related terms===== {{rel3|en|fix|pre-|[[prefixion]] {{q|archaic}}|prepend}} ===See also=== * [[Appendix:English nationality prefixes]] * [[:Category:English prefixes]] * {{l|en|coverb}} ===References=== <references/> {{cln|en|heteronyms}} {{C|en|Linguistic morphology}} h42u24y6t1ixxtoaq0a0gxmy30gb6ee 192773 192770 2024-11-18T09:13:06Z Pinthura 2424 යොමු තොරතුරු පරිවර්තනය 192773 wikitext text/x-wiki {{also|préfix}} == ඉංග්‍රීසි == === වෙනත් ආකාර === * {{alter|en|præfix||obsolete}} * {{alter|en|prefixe||for the verb; obsolete}} === නිරුක්තිය 1 === Borrowed from {{bor|en|LL.|praefīxum}}, from {{der|en|la|praefīxus}}, past participle of {{m|la|praefīgō|t=I (fix, fasten, set up) in front”, “I fix on the (end, extremity)}} (from {{m|la|prae-|t=before}} + {{m|la|fīgō|t=I fix”, “I fasten”, “I affix}}), equivalent to {{con|en|pre|fix}}. {{doublet|en}} of the archaic synonym {{m|en|prefixum}}. ==== උච්චාරණය ==== * {{IPA|en|/ˈpɹiːfɪks/|/pɹɛˈfɪks/}} ** {{audio|en|LL-Q1860 (eng)-Vealhurl-prefix (noun).wav|a=Southern England}} ** {{audio|en|en-us-prefix.ogg|a=US}} * {{rhymes|en|ɪks|s=2}} ==== නාම පදය ==== {{en-noun}} # {{rfdef|en}} ===== සමාන පද ===== * {{l|en|forefix}} {{q|rare}} =====Coordinate terms===== * {{affixes}} ===== ව්‍යුත්පන්න යෙදුම් ===== {{der3|en|metric prefix|null prefix|SI prefix|zero prefix |prefixal |prefixhood |[[prefixing]] {{q|adj.}} |[[prefixless]], [[prefixlessness|~ness]] |prefixlike |prefixness |prefixoid |pseudoprefix }} {{col3|en|title=Expressions |international call prefix |prefix code |prefix coding |prefix notation |prefix tree|ship prefix |separable prefix }} === නිරුක්තිය 2 === From {{inh|en|enm|prefixen}}, from {{der|en|frm|prefixer}},<ref>{{R:MED Online|entry=prēfixen|pos=v|id=MED34392}}</ref> from {{der|en|la|praefīxus}}, past participle of {{m|la|praefīgō|t=I (fix, fasten, set up) in front”, “I fix on the (end, extremity)}} (from {{m|la|prae-|t=before}} + {{m|la|fīgō|t=I fix”, “I fasten”, “I affix}}), equivalent to {{con|en|pre|fix}}. ==== උච්චාරණය ==== * {{IPA|en|/ˈpɹiːfɪks/|/pɹiːˈfɪks/|/pɹɛˈfɪks/}} ** {{audio|en|LL-Q1860 (eng)-Vealhurl-prefix2.wav|a=Southern England}} * {{rhymes|en|ɪks|s=2}} ==== ක්‍රියා පදය ==== {{en-verb}} # {{rfdef|en}} ===== ව්‍යුත්පන්න යෙදුම් ===== {{der3|en |prefixable |prefixation |[[prefixed]], [[unprefixed]] |[[prefixer]], [[autoprefixer|auto~]] }} ===== ආශ්‍රිත යෙදුම් ===== {{rel3|en|fix|pre-|[[prefixion]] {{q|archaic}}|prepend}} === අමතර අවධානයට === * [[Appendix:English nationality prefixes]] * [[:Category:English prefixes]] * {{l|en|coverb}} === මූලාශ්‍ර === <references/> {{cln|en|heteronyms}} {{C|en|Linguistic morphology}} k29cfre8djt0hwioawh1avrkmwgezux prefixes 0 125247 192771 2024-11-18T09:12:07Z Lee 19 නිර්මාණය 192771 wikitext text/x-wiki {{also|préfixes|préfixés}} ==English== ===Noun=== {{head|en|noun form}} # {{plural of|en|prefix}} # {{plural of|en|prefixe}} ===Verb=== {{head|en|verb form}} # {{infl of|en|prefix||s-verb-form}} 2d4m5fsievft36jpvcu0rhc50zrjj94 192772 192771 2024-11-18T09:12:56Z Pinthura 2424 යොමු තොරතුරු පරිවර්තනය 192772 wikitext text/x-wiki {{also|préfixes|préfixés}} == ඉංග්‍රීසි == === නාම පදය === {{head|en|noun form}} # {{plural of|en|prefix}} # {{plural of|en|prefixe}} === ක්‍රියා පදය === {{head|en|verb form}} # {{infl of|en|prefix||s-verb-form}} 3gv6yr2k3smqzhf3upu64x0og6w74nx -inus 0 125248 192789 2024-11-18T09:17:35Z Lee 19 නිර්මාණය 192789 wikitext text/x-wiki ==Latin== ===Alternative forms=== * {{l|la|-ānus}}, {{l|la|-ēnus}}, {{l|la|-iānus}}, {{l|la|-ūnus}} ===Etymology=== {{etymon|la|id=of or pertaining to|inh|itc-pro>*-īnos>of or belonging to}} From {{inh|la|itc-pro|*-īnos}}, from {{der|la|ine-pro|*-iHnos}}. Cognate with {{cog|grc|-ινος}} and {{cog|gem-pro|*-īnaz}}. ===Pronunciation=== * {{la-IPA|-īnus}} ===Suffix=== {{la-suffix-adj|-īnus}} # Of or pertaining to; [[-ine]]; {{non-gloss|Can indicate a relationship of position, possession, or origin}}. ====Usage notes==== The suffix ''-īnus'' is added to a noun base (especially a proper noun) to form an adjective. : Examples: :: {{suffixusex|la|collis|t1=hill|-īnus|collīnus|t3=of a hill, growing on a hill}} :: {{suffixusex|la|fungus|t1=mushroom, fungus|-īnus|fungīnus|t3=of a mushroom}} :: {{suffixusex|la|Liguria|t1=Liguria|-īnus|Ligurīnus|t3=Ligurian}} ====Declension==== {{la-adecl|-īnus}} ====Synonyms==== * {{l|la|-ēnsis}}, {{l|la|-icus}} ====Derived terms==== {{suffixsee|la}} ====Descendants==== {{top2}} * {{desc|ca|-í}} * {{desc|fr|-in}} * {{desc|en|-ine|bor=1}} * {{desc|it|-ino}} * {{desc|roa-opt|ĩo}} ** {{desc|gl|-iño}} ** {{desc|pt|-inho}} * {{desc|ro|-in}} * {{desc|scn|-inu}} * {{desc|es|-ino}} * {{desc|gl|-ino|bor=1}} * {{desc|pt|-ino|bor=1}} {{bottom}} nqf3iu69ro7rm1do8bo7etnrzmkwkzf 192794 192789 2024-11-18T09:18:33Z Pinthura 2424 යොමු තොරතුරු පරිවර්තනය 192794 wikitext text/x-wiki == ලතින් == === වෙනත් ආකාර === * {{l|la|-ānus}}, {{l|la|-ēnus}}, {{l|la|-iānus}}, {{l|la|-ūnus}} === නිරුක්තිය === {{etymon|la|id=of or pertaining to|inh|itc-pro>*-īnos>of or belonging to}} From {{inh|la|itc-pro|*-īnos}}, from {{der|la|ine-pro|*-iHnos}}. Cognate with {{cog|grc|-ινος}} and {{cog|gem-pro|*-īnaz}}. === උච්චාරණය === * {{la-IPA|-īnus}} === ප්‍රත්‍යය === {{la-suffix-adj|-īnus}} # Of or pertaining to; [[-ine]]; {{non-gloss|Can indicate a relationship of position, possession, or origin}}. ==== භාවිත සටහන් ==== The suffix ''-īnus'' is added to a noun base (especially a proper noun) to form an adjective. : Examples: :: {{suffixusex|la|collis|t1=hill|-īnus|collīnus|t3=of a hill, growing on a hill}} :: {{suffixusex|la|fungus|t1=mushroom, fungus|-īnus|fungīnus|t3=of a mushroom}} :: {{suffixusex|la|Liguria|t1=Liguria|-īnus|Ligurīnus|t3=Ligurian}} ==== වරනැඟීම ==== {{la-adecl|-īnus}} ==== සමාන පද ==== * {{l|la|-ēnsis}}, {{l|la|-icus}} ==== ව්‍යුත්පන්න යෙදුම් ==== {{suffixsee|la}} ====Descendants==== {{top2}} * {{desc|ca|-í}} * {{desc|fr|-in}} * {{desc|en|-ine|bor=1}} * {{desc|it|-ino}} * {{desc|roa-opt|ĩo}} ** {{desc|gl|-iño}} ** {{desc|pt|-inho}} * {{desc|ro|-in}} * {{desc|scn|-inu}} * {{desc|es|-ino}} * {{desc|gl|-ino|bor=1}} * {{desc|pt|-ino|bor=1}} {{bottom}} aoux07lp8vv38iocelv7078bx6slgl1 -ina 0 125249 192790 2024-11-18T09:17:38Z Lee 19 නිර්මාණය 192790 wikitext text/x-wiki {{also|Appendix:Variations of "ina"}} ==Translingual== ===Suffix=== {{head|mul|suffix}} # {{lb|mul|taxonomy}} {{non-gloss|Used to form names of [[subtribe]]s of [[animal]]s}} # {{lb|mul|taxonomy}} {{non-gloss|Used to form names of [[suborder]]s of [[animal]]s}} # {{lb|mul|taxonomy}} {{non-gloss|Used to form names of [[taxon|taxa]] subordinate to the higher rank from which they are derived}} # {{lb|mul|taxonomy}} {{non-gloss|Used to form names of [[genus|genera]] from other genera indicating a smaller size of organism}} ====Derived terms==== {{suffixsee|mul}} ==English== ===Suffix=== {{en-suffix}} # {{alternative form of|en|-ine}} ({{n-g|forming feminine nouns}}). #* {{quote-journal|en|author=[[w:Wilhelm Bölsche|Wilhelm Boelsche]]|chapter_tlr=Rheamars Dredenov|title=The Love Adventures of the Spider|editor=[[w:Charles H. Kerr|Charles H[ope] Kerr]]|journal=[[w:International Socialist Review (1900)|The International Socialist Review]]|volume=XV|issue=11|location=Chicago, Ill.|publisher=[[w:Charles H. Kerr Publishing Company|Charles H. Kerr & Company]]|month=May|year=1915|page=659|pageurl=https://archive.org/details/InternationalSocialistReview1900Vol15/page/n569/mode/1up|column=2|passage=Here are the male spider and the female spider (which shall be named “'''spiderina'''” in this article), both of the species of the garden spider. The former is only two-thirds of the size of Miss '''Spiderina'''.}} #* {{quote-book|en|author=w:Jim Benton|chapter=Thursday 12|chapterurl=https://archive.org/details/liveeachdaytodum0000bent/page/36/mode/1up|title=Live Each Day to the Dumbest|series=Dear Dumb Diary: Year Two|location=New York, N.Y.|publisher=[[w:Scholastic Corporation|Scholastic Inc.]]|year=2015|isbn=978-0-545-64258-3|passage=I HAVE PROBABLY INVENTED THE PROFESSION OF '''LAWYERINA'''}} #* {{quote-book|en|author=Fuse|tlr=Kevin Gifford|title=That Time I Got Reincarnated as a Slime|url=https://books.google.com/books?id=c006DwAAQBAJ&pg=PT297|volume=1|location=New York, N.Y.|publisher=[[w:Yen Press|Yen Press, LLC]]|year=2017|isbn=9780316414203|passage=Gobta and his attackers turned around to find a '''goblina''' staring them down—a fighter, judging by her muddy red hair. {{...}} Hobgoblins of either gender were high-level creatures capable of language, far more intelligent than their goblin relatives.}} ====Derived terms==== {{suffixsee|en}} ==Asturian== ===Suffix=== {{head|ast|suffix|g=f}} # {{l|en|-y}} {{gloss|forming diminutives of feminine nouns}} ====Related terms==== * {{l|ast|-ín}} ==Latin== ===Pronunciation=== * {{la-IPA|īna}} ===Etymology 1=== {{etymon|la|id=nouns|-inus>of or pertaining to|pos=suffix}} Nominalization of the feminine form of {{m|la|-īnus|t=of or pertaining to}}. For the nouns naming locations, perhaps compare the feminine gender of {{m|la|taberna|t=shop, store}}. Nouns in ''-īna'' with abstract senses, such as {{m|la|medicīna|t=practice of medicine|g=f}}, can be interpreted as adjectives in agreement with a noun {{m|la|ars|t=art|g=f}} that is omitted by ellipsis.<ref name="Arnold">{{cite-book|title=Latin word-building|author=Arnold, Thomas Kerchever|year=1855|publisher=Rivingtons, Waterloo Place|location=London|page=32|pageurl=https://books.google.com/books?id=eosCAAAAQAAJ&pg=PA32}}</ref> ====Suffix==== {{la-suffix-noun|-īna<1>}} # {{non-gloss|Used to form nouns describing places where a certain activity is carried out, or abstract nouns naming activities}}<ref name="Arnold"></ref> #: {{suffixusex|la|opifex|gloss1=worker, craftsman, artisan|officīna|gloss2=workshop, workroom|altaff=-īna}} #: {{suffixusex|la|coquus|gloss1=cook|coquīna|gloss2=kitchen; cookery|altaff=-īna}} #: {{suffixusex|la|fodiō|gloss1=to dig|fodīna|gloss2=mine|altaff=-īna}} #: {{suffixusex|la|medicus|gloss1=doctor, physician|medicīna|gloss2=medicine; cure; practice of medicine|altaff=-īna}} # {{non-gloss|Used to form nouns or names denoting female beings}} #: {{suffixusex|la|gallus|gallīna|t1=rooster, cock|t2=hen|altaff=-īna}} #: {{suffixusex|la|cloāca|Cloācīna|t1=sewer|t2=goddess of the Cloaca Maxima|altaff=-īna}} =====Usage notes===== Nouns in {{m|la||-īna}} often show syncope of an internal syllable preceding the suffix, as in {{m|la|doctor}}, {{m|la|doctrīna}}; {{m|la|figulus|t=potter}}, {{m|la|figlīna|t=potter's workshop}}; {{m|la|opifex|t=craftsman, artisan, worker}}, {{m|la|officīna|t=workshop}}; and {{m|la|discipulus}}, {{m|la|disciplīna}}. Some have alternative forms without syncope, sometimes attested specifically in the context of Old Latin, such as {{m|la|discipulīna}} and {{m|la|opificīna}} (found in Plautus). Many nouns in {{m|la||-īna}} are built on nouns that serve as the name of professions or occupations, including a number of formations in {{m|la||-trīna}} from agent nouns in {{m|la|-tor}}. =====Declension===== {{la-ndecl|-īna<1>}} =====Synonyms===== * {{sense|forms nouns denoting places}} {{l|la|-āria}}, {{l|la|-ārium}}, {{l|la|-tōrium}} =====Derived terms===== {{suffixsee|la}} ===Etymology 2=== {{nonlemma}} ====Suffix==== {{head|la|suffix form|head=-īna}} # {{inflection of|la|-īnus||nom//voc//abl|f|s|;|nom//acc//voc|n|p}} ===References=== <references/> 1rihvknwzz9nn7zg1nepd6zbqg1jy38 192793 192790 2024-11-18T09:18:23Z Pinthura 2424 යොමු තොරතුරු පරිවර්තනය 192793 wikitext text/x-wiki {{also|Appendix:Variations of "ina"}} == සර්ව භාෂාමය == === ප්‍රත්‍යය === {{head|mul|suffix}} # {{lb|mul|taxonomy}} {{non-gloss|Used to form names of [[subtribe]]s of [[animal]]s}} # {{lb|mul|taxonomy}} {{non-gloss|Used to form names of [[suborder]]s of [[animal]]s}} # {{lb|mul|taxonomy}} {{non-gloss|Used to form names of [[taxon|taxa]] subordinate to the higher rank from which they are derived}} # {{lb|mul|taxonomy}} {{non-gloss|Used to form names of [[genus|genera]] from other genera indicating a smaller size of organism}} ==== ව්‍යුත්පන්න යෙදුම් ==== {{suffixsee|mul}} == ඉංග්‍රීසි == === ප්‍රත්‍යය === {{en-suffix}} # {{alternative form of|en|-ine}} ({{n-g|forming feminine nouns}}). #* {{quote-journal|en|author=[[w:Wilhelm Bölsche|Wilhelm Boelsche]]|chapter_tlr=Rheamars Dredenov|title=The Love Adventures of the Spider|editor=[[w:Charles H. Kerr|Charles H[ope] Kerr]]|journal=[[w:International Socialist Review (1900)|The International Socialist Review]]|volume=XV|issue=11|location=Chicago, Ill.|publisher=[[w:Charles H. Kerr Publishing Company|Charles H. Kerr & Company]]|month=May|year=1915|page=659|pageurl=https://archive.org/details/InternationalSocialistReview1900Vol15/page/n569/mode/1up|column=2|passage=Here are the male spider and the female spider (which shall be named “'''spiderina'''” in this article), both of the species of the garden spider. The former is only two-thirds of the size of Miss '''Spiderina'''.}} #* {{quote-book|en|author=w:Jim Benton|chapter=Thursday 12|chapterurl=https://archive.org/details/liveeachdaytodum0000bent/page/36/mode/1up|title=Live Each Day to the Dumbest|series=Dear Dumb Diary: Year Two|location=New York, N.Y.|publisher=[[w:Scholastic Corporation|Scholastic Inc.]]|year=2015|isbn=978-0-545-64258-3|passage=I HAVE PROBABLY INVENTED THE PROFESSION OF '''LAWYERINA'''}} #* {{quote-book|en|author=Fuse|tlr=Kevin Gifford|title=That Time I Got Reincarnated as a Slime|url=https://books.google.com/books?id=c006DwAAQBAJ&pg=PT297|volume=1|location=New York, N.Y.|publisher=[[w:Yen Press|Yen Press, LLC]]|year=2017|isbn=9780316414203|passage=Gobta and his attackers turned around to find a '''goblina''' staring them down—a fighter, judging by her muddy red hair. {{...}} Hobgoblins of either gender were high-level creatures capable of language, far more intelligent than their goblin relatives.}} ==== ව්‍යුත්පන්න යෙදුම් ==== {{suffixsee|en}} ==Asturian== === ප්‍රත්‍යය === {{head|ast|suffix|g=f}} # {{l|en|-y}} {{gloss|forming diminutives of feminine nouns}} ==== ආශ්‍රිත යෙදුම් ==== * {{l|ast|-ín}} == ලතින් == === උච්චාරණය === * {{la-IPA|īna}} === නිරුක්තිය 1 === {{etymon|la|id=nouns|-inus>of or pertaining to|pos=suffix}} Nominalization of the feminine form of {{m|la|-īnus|t=of or pertaining to}}. For the nouns naming locations, perhaps compare the feminine gender of {{m|la|taberna|t=shop, store}}. Nouns in ''-īna'' with abstract senses, such as {{m|la|medicīna|t=practice of medicine|g=f}}, can be interpreted as adjectives in agreement with a noun {{m|la|ars|t=art|g=f}} that is omitted by ellipsis.<ref name="Arnold">{{cite-book|title=Latin word-building|author=Arnold, Thomas Kerchever|year=1855|publisher=Rivingtons, Waterloo Place|location=London|page=32|pageurl=https://books.google.com/books?id=eosCAAAAQAAJ&pg=PA32}}</ref> ==== ප්‍රත්‍යය ==== {{la-suffix-noun|-īna<1>}} # {{non-gloss|Used to form nouns describing places where a certain activity is carried out, or abstract nouns naming activities}}<ref name="Arnold"></ref> #: {{suffixusex|la|opifex|gloss1=worker, craftsman, artisan|officīna|gloss2=workshop, workroom|altaff=-īna}} #: {{suffixusex|la|coquus|gloss1=cook|coquīna|gloss2=kitchen; cookery|altaff=-īna}} #: {{suffixusex|la|fodiō|gloss1=to dig|fodīna|gloss2=mine|altaff=-īna}} #: {{suffixusex|la|medicus|gloss1=doctor, physician|medicīna|gloss2=medicine; cure; practice of medicine|altaff=-īna}} # {{non-gloss|Used to form nouns or names denoting female beings}} #: {{suffixusex|la|gallus|gallīna|t1=rooster, cock|t2=hen|altaff=-īna}} #: {{suffixusex|la|cloāca|Cloācīna|t1=sewer|t2=goddess of the Cloaca Maxima|altaff=-īna}} ===== භාවිත සටහන් ===== Nouns in {{m|la||-īna}} often show syncope of an internal syllable preceding the suffix, as in {{m|la|doctor}}, {{m|la|doctrīna}}; {{m|la|figulus|t=potter}}, {{m|la|figlīna|t=potter's workshop}}; {{m|la|opifex|t=craftsman, artisan, worker}}, {{m|la|officīna|t=workshop}}; and {{m|la|discipulus}}, {{m|la|disciplīna}}. Some have alternative forms without syncope, sometimes attested specifically in the context of Old Latin, such as {{m|la|discipulīna}} and {{m|la|opificīna}} (found in Plautus). Many nouns in {{m|la||-īna}} are built on nouns that serve as the name of professions or occupations, including a number of formations in {{m|la||-trīna}} from agent nouns in {{m|la|-tor}}. ===== වරනැඟීම ===== {{la-ndecl|-īna<1>}} ===== සමාන පද ===== * {{sense|forms nouns denoting places}} {{l|la|-āria}}, {{l|la|-ārium}}, {{l|la|-tōrium}} ===== ව්‍යුත්පන්න යෙදුම් ===== {{suffixsee|la}} === නිරුක්තිය 2 === {{nonlemma}} ==== ප්‍රත්‍යය ==== {{head|la|suffix form|head=-īna}} # {{inflection of|la|-īnus||nom//voc//abl|f|s|;|nom//acc//voc|n|p}} === මූලාශ්‍ර === <references/> jwegnovlcp27axkfq1ucukjji2zasq1 -inum 0 125250 192791 2024-11-18T09:17:39Z Lee 19 නිර්මාණය 192791 wikitext text/x-wiki ==Latin== ===Suffix=== {{head|la|suffix form|head=-īnum}} # {{inflection of|la|-īnus||nom//acc//voc|n|s|;|acc|m|s}} epj36rik2oomr6roxsddcjut07w6bcl 192792 192791 2024-11-18T09:18:13Z Pinthura 2424 යොමු තොරතුරු පරිවර්තනය 192792 wikitext text/x-wiki == ලතින් == === ප්‍රත්‍යය === {{head|la|suffix form|head=-īnum}} # {{inflection of|la|-īnus||nom//acc//voc|n|s|;|acc|m|s}} 5r8vdnkvu9shcm7gfucty8sli04qynf ප්‍රවර්ගය:English suffix forms 14 125251 192796 2024-11-18T09:25:27Z Pinthura 2424 Pinthura විසින් [[ප්‍රවර්ගය:English suffix forms]] සිට [[ප්‍රවර්ගය:ඉංග්‍රීසි ප්‍රත්‍ය ස්වරූප]] වෙත පිටුව ගෙන යන ලදී: සේවා: නව ප්‍රවර්ග නාමය වෙත ගෙනයාම. 192796 wikitext text/x-wiki #යළියොමුව [[:ප්‍රවර්ගය:ඉංග්‍රීසි ප්‍රත්‍ය ස්වරූප]] hyxdfdefg81vwwb60qat9lb43ir1ih4 192798 192796 2024-11-18T09:25:47Z Pinthura 2424 සේවා: යළියොමුව, මෘදු ප්‍රවර්ග යළියොමුවක් බවට හැරවීම. 192798 wikitext text/x-wiki {{category redirect|ඉංග්‍රීසි ප්‍රත්‍ය ස්වරූප}} 4w9bhviq148qqal4ebyhht11kqn47hp ප්‍රවර්ගය:English ප්‍රත්‍ය ස්වරූප 14 125252 192799 2024-11-18T09:25:57Z Pinthura 2424 සේවා: මෘදු ප්‍රවර්ග යළියොමුවක් නිර්මාණය. 192799 wikitext text/x-wiki {{category redirect|ඉංග්‍රීසි ප්‍රත්‍ය ස්වරූප}} 4w9bhviq148qqal4ebyhht11kqn47hp ප්‍රවර්ගය:ලතින් ප්‍රත්‍ය ස්වරූප 14 125253 192801 2024-11-18T09:31:00Z Pinthura 2424 සේවා: [[:[[en:Category:Latin suffix forms]]]] තුළ තිබූ පෙළ මෙහි ඇතුළු කිරීම. 192801 wikitext text/x-wiki {{auto cat}} [[Category:Latin inflectional suffixes]] 5jozkrt9syw9p3s4cxlcerxvfvlqhru 192802 192801 2024-11-18T09:31:10Z Pinthura 2424 Pinthura විසින් [[ප්‍රවර්ගය:Latin suffix forms]] සිට [[ප්‍රවර්ගය:ලතින් ප්‍රත්‍ය ස්වරූප]] වෙත පිටුව ගෙන යන ලදී: සේවා: නව ප්‍රවර්ග නාමය වෙත ගෙනයාම. 192801 wikitext text/x-wiki {{auto cat}} [[Category:Latin inflectional suffixes]] 5jozkrt9syw9p3s4cxlcerxvfvlqhru 192804 192802 2024-11-18T09:31:20Z Pinthura 2424 සේවා: ඉංග්‍රීසි ව්‍යාපෘතිය වෙත සබැඳියක් එක් කිරීම. 192804 wikitext text/x-wiki {{auto cat}} [[Category:Latin inflectional suffixes]] [[en:Category:Latin suffix forms]] e77u79groui3iwofntwgc7csjsyiquv ප්‍රවර්ගය:Latin suffix forms 14 125254 192803 2024-11-18T09:31:11Z Pinthura 2424 Pinthura විසින් [[ප්‍රවර්ගය:Latin suffix forms]] සිට [[ප්‍රවර්ගය:ලතින් ප්‍රත්‍ය ස්වරූප]] වෙත පිටුව ගෙන යන ලදී: සේවා: නව ප්‍රවර්ග නාමය වෙත ගෙනයාම. 192803 wikitext text/x-wiki #යළියොමුව [[:ප්‍රවර්ගය:ලතින් ප්‍රත්‍ය ස්වරූප]] nfgittpvrdkkv04u9pejtq8vb7ot5cf 192805 192803 2024-11-18T09:31:30Z Pinthura 2424 සේවා: යළියොමුව, මෘදු ප්‍රවර්ග යළියොමුවක් බවට හැරවීම. 192805 wikitext text/x-wiki {{category redirect|ලතින් ප්‍රත්‍ය ස්වරූප}} rv4wuarstuxtki6wl4fpvyekpelimiv ප්‍රවර්ගය:Latin ප්‍රත්‍ය ස්වරූප 14 125255 192806 2024-11-18T09:31:40Z Pinthura 2424 සේවා: මෘදු ප්‍රවර්ග යළියොමුවක් නිර්මාණය. 192806 wikitext text/x-wiki {{category redirect|ලතින් ප්‍රත්‍ය ස්වරූප}} rv4wuarstuxtki6wl4fpvyekpelimiv ප්‍රවර්ගය:භාෂාව අනුව ප්‍රත්‍ය ස්වරූප 14 125256 192808 2022-06-20T04:54:45Z en>WingerBot 0 use {{auto cat}}, remove extraneous {{catfix}}/TOC templates (manually assisted) 192808 wikitext text/x-wiki {{auto cat}} eomzlm5v4j7ond1phrju7cnue91g5qx 192809 192808 2024-11-18T09:39:21Z Lee 19 [[:en:Category:Suffix_forms_by_language]] වෙතින් එක් සංශෝධනයක් 192808 wikitext text/x-wiki {{auto cat}} eomzlm5v4j7ond1phrju7cnue91g5qx 192810 192809 2024-11-18T09:40:24Z Lee 19 Lee විසින් [[ප්‍රවර්ගය:Suffix forms by language]] සිට [[ප්‍රවර්ගය:භාෂාව අනුව ප්‍රත්‍ය ස්වරූප]] වෙත පිටුව ගෙන යන ලදී 192808 wikitext text/x-wiki {{auto cat}} eomzlm5v4j7ond1phrju7cnue91g5qx ප්‍රවර්ගය:Suffix forms by language 14 125257 192811 2024-11-18T09:40:24Z Lee 19 Lee විසින් [[ප්‍රවර්ගය:Suffix forms by language]] සිට [[ප්‍රවර්ගය:භාෂාව අනුව ප්‍රත්‍ය ස්වරූප]] වෙත පිටුව ගෙන යන ලදී 192811 wikitext text/x-wiki #යළියොමුව [[:ප්‍රවර්ගය:භාෂාව අනුව ප්‍රත්‍ය ස්වරූප]] ncixulggw2uafzo6fnjyzstojwkd0f8 ප්‍රවර්ගය:ඉංග්‍රීසි පදාණු ස්වරූප 14 125258 192812 2024-11-18T09:46:18Z Pinthura 2424 සේවා: [[:[[en:Category:English morpheme forms]]]] තුළ තිබූ පෙළ මෙහි ඇතුළු කිරීම. 192812 wikitext text/x-wiki {{auto cat}} eomzlm5v4j7ond1phrju7cnue91g5qx 192813 192812 2024-11-18T09:46:28Z Pinthura 2424 Pinthura විසින් [[ප්‍රවර්ගය:English morpheme forms]] සිට [[ප්‍රවර්ගය:ඉංග්‍රීසි පදාණු ස්වරූප]] වෙත පිටුව ගෙන යන ලදී: සේවා: නව ප්‍රවර්ග නාමය වෙත ගෙනයාම. 192812 wikitext text/x-wiki {{auto cat}} eomzlm5v4j7ond1phrju7cnue91g5qx 192815 192813 2024-11-18T09:46:37Z Pinthura 2424 සේවා: ඉංග්‍රීසි ව්‍යාපෘතිය වෙත සබැඳියක් එක් කිරීම. 192815 wikitext text/x-wiki {{auto cat}} [[en:Category:English morpheme forms]] 4qita6d5px28pid92nz0rkarjikzmzy ප්‍රවර්ගය:English morpheme forms 14 125259 192814 2024-11-18T09:46:28Z Pinthura 2424 Pinthura විසින් [[ප්‍රවර්ගය:English morpheme forms]] සිට [[ප්‍රවර්ගය:ඉංග්‍රීසි පදාණු ස්වරූප]] වෙත පිටුව ගෙන යන ලදී: සේවා: නව ප්‍රවර්ග නාමය වෙත ගෙනයාම. 192814 wikitext text/x-wiki #යළියොමුව [[:ප්‍රවර්ගය:ඉංග්‍රීසි පදාණු ස්වරූප]] i5s0slc8ba2myu3dwmhuu3f1pzzxdja 192816 192814 2024-11-18T09:46:47Z Pinthura 2424 සේවා: යළියොමුව, මෘදු ප්‍රවර්ග යළියොමුවක් බවට හැරවීම. 192816 wikitext text/x-wiki {{category redirect|ඉංග්‍රීසි පදාණු ස්වරූප}} ad78tjj7w3wmc9la4igxc9tzvsx7hku ප්‍රවර්ගය:English පදාණු ස්වරූප 14 125260 192817 2024-11-18T09:46:58Z Pinthura 2424 සේවා: මෘදු ප්‍රවර්ග යළියොමුවක් නිර්මාණය. 192817 wikitext text/x-wiki {{category redirect|ඉංග්‍රීසි පදාණු ස්වරූප}} ad78tjj7w3wmc9la4igxc9tzvsx7hku transfixing 0 125261 192818 2024-11-18T09:50:58Z Lee 19 නිර්මාණය 192818 wikitext text/x-wiki ==English== ===Verb=== {{head|en|verb form}} # {{infl of|en|transfix||ing-form}} cpvfsqbtwvw84nsx21fyilhvyfykdyn 192821 192818 2024-11-18T09:52:02Z Pinthura 2424 යොමු තොරතුරු පරිවර්තනය 192821 wikitext text/x-wiki == ඉංග්‍රීසි == === ක්‍රියා පදය === {{head|en|verb form}} # {{infl of|en|transfix||ing-form}} ryovo4wlcjd77wky6ftgs0xi5fkbjh8 transfixed 0 125262 192819 2024-11-18T09:51:24Z Lee 19 නිර්මාණය 192819 wikitext text/x-wiki ==English== ===Adjective=== {{en-adj}} # [[render|Rendered]] [[motionless]] by completely focused attention, [[rapt]], [[entranced]], [[mesmerized]]. ====Synonyms==== * {{l|en|rapt}} * {{l|en|enthralled}} * {{l|en|entranced}} * {{l|en|mesmerized}} * {{l|en|hypnotized}} ===Verb=== {{head|en|verb form}} # {{infl of|en|transfix||ed-form}} g07p8p0sla7sbfjwj3joxkfpfmvq2s8 192820 192819 2024-11-18T09:51:52Z Pinthura 2424 යොමු තොරතුරු පරිවර්තනය 192820 wikitext text/x-wiki == ඉංග්‍රීසි == === නාම විශේෂණ පදය === {{en-adj}} # [[render|Rendered]] [[motionless]] by completely focused attention, [[rapt]], [[entranced]], [[mesmerized]]. ==== සමාන පද ==== * {{l|en|rapt}} * {{l|en|enthralled}} * {{l|en|entranced}} * {{l|en|mesmerized}} * {{l|en|hypnotized}} === ක්‍රියා පදය === {{head|en|verb form}} # {{infl of|en|transfix||ed-form}} rv4t09p7wd6b3wh631k89wdfl96odv6 192822 192820 2024-11-18T09:55:41Z Lee 19 192822 wikitext text/x-wiki == ඉංග්‍රීසි == === නාම විශේෂණ පදය === {{en-adj}} # {{rfdef|en}} ==== සමාන පද ==== * {{l|en|rapt}} * {{l|en|enthralled}} * {{l|en|entranced}} * {{l|en|mesmerized}} * {{l|en|hypnotized}} === ක්‍රියා පදය === {{head|en|verb form}} # {{infl of|en|transfix||ed-form}} a0q4di5fpqj7ayourvmph0f9nqq4yxp ප්‍රවර්ගය:Japanese terms spelled with 学 read as がく 14 125263 192824 2024-11-18T09:57:12Z Pinthura 2424 Pinthura විසින් [[ප්‍රවර්ගය:Japanese terms spelled with 学 read as がく]] සිට [[ප්‍රවර්ගය:ජපන් යෙදුම්, 学 භාවිතා කොට ලියා がく ලෙස කියවන]] වෙත පිටුව ගෙන යන ලදී: සේවා: නව ප්‍රවර්ග නාමය වෙත ගෙනයාම. 192824 wikitext text/x-wiki #යළියොමුව [[:ප්‍රවර්ගය:ජපන් යෙදුම්, 学 භාවිතා කොට ලියා がく ලෙස කියවන]] bxe5ndml4smplsiw6il020ts2quvacy 192826 192824 2024-11-18T09:57:32Z Pinthura 2424 සේවා: යළියොමුව, මෘදු ප්‍රවර්ග යළියොමුවක් බවට හැරවීම. 192826 wikitext text/x-wiki {{category redirect|ජපන් යෙදුම්, 学 භාවිතා කොට ලියා がく ලෙස කියවන}} sjtibrmxg91wkg2y4vxmoam6lccwua8 ප්‍රවර්ගය:Japanese යෙදුම්, 学 භාවිතා කොට ලියා がく ලෙස කියවන 14 125264 192827 2024-11-18T09:57:42Z Pinthura 2424 සේවා: මෘදු ප්‍රවර්ග යළියොමුවක් නිර්මාණය. 192827 wikitext text/x-wiki {{category redirect|ජපන් යෙදුම්, 学 භාවිතා කොට ලියා がく ලෙස කියවන}} sjtibrmxg91wkg2y4vxmoam6lccwua8 සැකිල්ල:la-suffix-adj 10 125265 192828 2019-11-18T03:24:23Z en>Benwing2 0 192828 wikitext text/x-wiki {{#invoke:la-headword|show|suffixes|suff_type=adjective|def=-ēnsis}}<noinclude>{{documentation}}</noinclude> bgpjzfnfv5gkkl58imyl53hj639n1ic 192829 192828 2024-11-18T09:59:19Z Lee 19 [[:en:Template:la-suffix-adj]] වෙතින් එක් සංශෝධනයක් 192828 wikitext text/x-wiki {{#invoke:la-headword|show|suffixes|suff_type=adjective|def=-ēnsis}}<noinclude>{{documentation}}</noinclude> bgpjzfnfv5gkkl58imyl53hj639n1ic සැකිල්ල:la-suffix-adj/documentation 10 125266 192830 2019-08-02T00:39:06Z en>Benwing2 0 Created page with "{{documentation subpage}} == Usage == Use this template on the headword line of Latin adjectival suffixes. The format is identical to {{temp|la-adj}}. The only difference is t..." 192830 wikitext text/x-wiki {{documentation subpage}} == Usage == Use this template on the headword line of Latin adjectival suffixes. The format is identical to {{temp|la-adj}}. The only difference is that this template categorizes into [[:Category:Latin suffixes]] and [[:Category:Latin adjective-forming suffixes]] instead of [[:Category:Latin adjectives]]. E.g., on {{l|la|-ēnsis}}: :{{temp|la-suffix-adj|-ēnsis}} The above code displays as follows: :{{la-suffix-adj|-ēnsis}} <includeonly> [[Category:Latin headword-line templates|suffix-adj]] </includeonly> janjg9mjzzxgahj782pmz4h8g5aorub 192831 192830 2024-11-18T09:59:41Z Lee 19 [[:en:Template:la-suffix-adj/documentation]] වෙතින් එක් සංශෝධනයක් 192830 wikitext text/x-wiki {{documentation subpage}} == Usage == Use this template on the headword line of Latin adjectival suffixes. The format is identical to {{temp|la-adj}}. The only difference is that this template categorizes into [[:Category:Latin suffixes]] and [[:Category:Latin adjective-forming suffixes]] instead of [[:Category:Latin adjectives]]. E.g., on {{l|la|-ēnsis}}: :{{temp|la-suffix-adj|-ēnsis}} The above code displays as follows: :{{la-suffix-adj|-ēnsis}} <includeonly> [[Category:Latin headword-line templates|suffix-adj]] </includeonly> janjg9mjzzxgahj782pmz4h8g5aorub සැකිල්ල:non-gloss 10 125267 192832 2024-10-05T05:31:00Z en>Benwing 0 Benwing moved page [[Template:non-gloss definition]] to [[Template:non-gloss]]: shorten name per [[Wiktionary:Requests_for_moves,_mergers_and_splits#Template:non-gloss_definition_->_Template:non-gloss_and_remove_aliases_'ngd'_and_'non-gloss_definition']] 192832 wikitext text/x-wiki <includeonly><span class="use-with-mention">{{#invoke:links/templates|def_t|{{{1|}}}}}</span></includeonly><noinclude>{{documentation}}</noinclude> cpexukynlyy7leam0qqiqa96ifmofr3 192833 192832 2024-11-18T10:00:32Z Lee 19 [[:en:Template:non-gloss]] වෙතින් එක් සංශෝධනයක් 192832 wikitext text/x-wiki <includeonly><span class="use-with-mention">{{#invoke:links/templates|def_t|{{{1|}}}}}</span></includeonly><noinclude>{{documentation}}</noinclude> cpexukynlyy7leam0qqiqa96ifmofr3 සැකිල්ල:non-gloss/documentation 10 125268 192834 2024-10-05T20:49:51Z en>Benwing2 0 put shortcuts in order of preference 192834 wikitext text/x-wiki {{documentation subpage}} <includeonly>{{shortcut|Template:ng|Template:n-g|Template:ngd}}</includeonly> {{uses lua|Module:links/templates}} Use this template to apply the correct styling to a definition that is not a [[Wiktionary:Style guide#Types of definitions|gloss]]. Most definitions in the English Wiktionary are worded as glosses. That is, the words in the definition function as the same part of speech and semantics as the defined headword. For example, the first definition of {{m|en|word}} is a noun phrase (“A distinct unit of language...”) and the first definition of the verb {{m|en|talk}} is a verb phrase (“To communicate to someone else...”). Some terms are difficult or impossible to define with a gloss. For example, one of the definitions of {{m|en|of}} is given as “Connects a noun derived from a verb with the object of that verb.” That definition is not a gloss, because the words in the definition cannot be used as a substitute for “of”. Most dictionaries use a different style for these rare definitions that are not glosses, e.g. by placing the non-gloss definition in parentheses or by italicizing it. This template applies similar formatting to such definitions and allows readers to control the format for such definitions; the {{w|CSS class}} <code>.use-with-mention</code> is used. This template currently uses [[Module:links/templates]] to generate some of its content; specifically, it calls the {{code|lua|embedded_language_links}} function from [[Module:links]], passing the English language in an argument, to point all plain links to the English section of the page to which they point. Thus, below, the link <code class="wiki-markup"><nowiki>[[noun]]</nowiki></code> is automatically converted to <code class="wiki-markup"><nowiki>[[noun#English|noun]]</nowiki></code>. If you need to link to non-English entries use {{temp|l}} or {{temp|m}} inside {{temp|non-gloss}}. ==Parameters== ; {{para|1}} : The non-gloss definition. ==Examples== :<code><nowiki># {{non-gloss|Connects a [[noun]] derived from a [[verb]] with the [[object]] of that verb.}}</nowiki></code> :# {{non-gloss|Connects a [[noun]] derived from a [[verb]] with the [[object]] of that verb.}} ==TemplateData== {{TemplateDataHeader}} <templatedata> { "params": { "1": { "label": "definition", "description": "the non-gloss definition of the term", "example": "an emphatic form of", "type": "string", "required": true } }, "format": "inline", "description": "Use this template to apply the correct styling to a definition that is not a gloss." } </templatedata> <includeonly> [[Category:Qualifier and gloss templates]] </includeonly> snjxos5193xfayicanc6jvui26wa4ex 192835 192834 2024-11-18T10:00:48Z Lee 19 [[:en:Template:non-gloss/documentation]] වෙතින් එක් සංශෝධනයක් 192834 wikitext text/x-wiki {{documentation subpage}} <includeonly>{{shortcut|Template:ng|Template:n-g|Template:ngd}}</includeonly> {{uses lua|Module:links/templates}} Use this template to apply the correct styling to a definition that is not a [[Wiktionary:Style guide#Types of definitions|gloss]]. Most definitions in the English Wiktionary are worded as glosses. That is, the words in the definition function as the same part of speech and semantics as the defined headword. For example, the first definition of {{m|en|word}} is a noun phrase (“A distinct unit of language...”) and the first definition of the verb {{m|en|talk}} is a verb phrase (“To communicate to someone else...”). Some terms are difficult or impossible to define with a gloss. For example, one of the definitions of {{m|en|of}} is given as “Connects a noun derived from a verb with the object of that verb.” That definition is not a gloss, because the words in the definition cannot be used as a substitute for “of”. Most dictionaries use a different style for these rare definitions that are not glosses, e.g. by placing the non-gloss definition in parentheses or by italicizing it. This template applies similar formatting to such definitions and allows readers to control the format for such definitions; the {{w|CSS class}} <code>.use-with-mention</code> is used. This template currently uses [[Module:links/templates]] to generate some of its content; specifically, it calls the {{code|lua|embedded_language_links}} function from [[Module:links]], passing the English language in an argument, to point all plain links to the English section of the page to which they point. Thus, below, the link <code class="wiki-markup"><nowiki>[[noun]]</nowiki></code> is automatically converted to <code class="wiki-markup"><nowiki>[[noun#English|noun]]</nowiki></code>. If you need to link to non-English entries use {{temp|l}} or {{temp|m}} inside {{temp|non-gloss}}. ==Parameters== ; {{para|1}} : The non-gloss definition. ==Examples== :<code><nowiki># {{non-gloss|Connects a [[noun]] derived from a [[verb]] with the [[object]] of that verb.}}</nowiki></code> :# {{non-gloss|Connects a [[noun]] derived from a [[verb]] with the [[object]] of that verb.}} ==TemplateData== {{TemplateDataHeader}} <templatedata> { "params": { "1": { "label": "definition", "description": "the non-gloss definition of the term", "example": "an emphatic form of", "type": "string", "required": true } }, "format": "inline", "description": "Use this template to apply the correct styling to a definition that is not a gloss." } </templatedata> <includeonly> [[Category:Qualifier and gloss templates]] </includeonly> snjxos5193xfayicanc6jvui26wa4ex සැකිල්ල:suffixusex 10 125269 192836 2019-07-26T02:51:44Z en>Chuck Entz 0 Protected "[[Template:suffixusex]]": Highly visible template/module ([Edit=Allow only template editors and administrators] (indefinite) [Move=Allow only template editors and administrators] (indefinite)) 192836 wikitext text/x-wiki {{#invoke:affixusex/templates|affixusex_t|type=suffix}}<noinclude>{{documentation}}</noinclude> s2rg1e1pyhhmwsssx4hzdjgpaivk0lm 192837 192836 2024-11-18T10:01:07Z Lee 19 [[:en:Template:suffixusex]] වෙතින් එක් සංශෝධනයක් 192836 wikitext text/x-wiki {{#invoke:affixusex/templates|affixusex_t|type=suffix}}<noinclude>{{documentation}}</noinclude> s2rg1e1pyhhmwsssx4hzdjgpaivk0lm සැකිල්ල:suffixusex/documentation 10 125270 192838 2023-08-05T04:38:46Z en>WingerBot 0 rename {{Lua}} to {{uses lua}} 192838 wikitext text/x-wiki {{documentation subpage}} {{shortcut|Template:sufex}} {{uses lua|Module:affixusex/templates}} This template creates usage examples for suffix entries in the format ''word'' + ''-suffix'' → ''suffixed word''. More complex entries are also possible, e.g.: : ''word1'' + ''word2'' + ''-suffix'' → ''suffixed word'' : ''word1'' + ''-suffix1'' → ''suffixed word 1'' + ''-suffix2'' → ''suffixed word 2'' : ''word1'' (''qualifier'') + ''word2'' → ''combined word'' ==Parameters== * This template takes almost exactly the same parameters as {{temp|affixusex}} and its shortcut {{temp|afex}}; see the documentation of that template for more information. There are only slight differences between the two: # When {{tl|suffixusex}}/{{tl|sufex}} is used, the parameter {{para|altaff}} can also be named {{para|altsuf}}, for compatibility purposes. # When interpolating a suffix before the last component (taken from the {{para|altaff}} parameter or the page name), {{temp|affixusex}} checks that the suffix being inserted actually looks like a suffix (i.e. it begins with a hyphen and doesn't end with a hyphen) before being interpolated. {{tl|suffixusex}} does not make this extra check. This may matter in languages where suffixes are not normally preceded by a hyphen (e.g. East Asian languages), or are preceded by a different character (e.g. Hebrew and Arabic). For Latin-script languages, it usually doesn't matter. In practice, these are very minor differences, and it is recommended to use {{temp|affixusex}}/{{temp|afex}} in all circumstances; {{tl|prefixusex}} and {{tl|suffixusex}} are maintained largely for compatibility. ==See also== * {{temp|prefixusex}}/{{temp|prefex}}: like {{temp|suffixusex}}/{{temp|sufex}}, but for prefixes * {{temp|affixusex}}/{{temp|afex}}: general variant for prefixes, suffixes, interfixes, compounds, etc. * {{temp|ux}}: to format general usage examples <includeonly> [[Category:Definition templates]] </includeonly> 1dz4470p9nmrdu9a0io5dp2ow79qgic 192839 192838 2024-11-18T10:01:26Z Lee 19 [[:en:Template:suffixusex/documentation]] වෙතින් එක් සංශෝධනයක් 192838 wikitext text/x-wiki {{documentation subpage}} {{shortcut|Template:sufex}} {{uses lua|Module:affixusex/templates}} This template creates usage examples for suffix entries in the format ''word'' + ''-suffix'' → ''suffixed word''. More complex entries are also possible, e.g.: : ''word1'' + ''word2'' + ''-suffix'' → ''suffixed word'' : ''word1'' + ''-suffix1'' → ''suffixed word 1'' + ''-suffix2'' → ''suffixed word 2'' : ''word1'' (''qualifier'') + ''word2'' → ''combined word'' ==Parameters== * This template takes almost exactly the same parameters as {{temp|affixusex}} and its shortcut {{temp|afex}}; see the documentation of that template for more information. There are only slight differences between the two: # When {{tl|suffixusex}}/{{tl|sufex}} is used, the parameter {{para|altaff}} can also be named {{para|altsuf}}, for compatibility purposes. # When interpolating a suffix before the last component (taken from the {{para|altaff}} parameter or the page name), {{temp|affixusex}} checks that the suffix being inserted actually looks like a suffix (i.e. it begins with a hyphen and doesn't end with a hyphen) before being interpolated. {{tl|suffixusex}} does not make this extra check. This may matter in languages where suffixes are not normally preceded by a hyphen (e.g. East Asian languages), or are preceded by a different character (e.g. Hebrew and Arabic). For Latin-script languages, it usually doesn't matter. In practice, these are very minor differences, and it is recommended to use {{temp|affixusex}}/{{temp|afex}} in all circumstances; {{tl|prefixusex}} and {{tl|suffixusex}} are maintained largely for compatibility. ==See also== * {{temp|prefixusex}}/{{temp|prefex}}: like {{temp|suffixusex}}/{{temp|sufex}}, but for prefixes * {{temp|affixusex}}/{{temp|afex}}: general variant for prefixes, suffixes, interfixes, compounds, etc. * {{temp|ux}}: to format general usage examples <includeonly> [[Category:Definition templates]] </includeonly> 1dz4470p9nmrdu9a0io5dp2ow79qgic සැකිල්ල:suffixusex/sandbox 10 125271 192840 2017-12-19T20:46:52Z en>Erutuon 0 Created page with "{{#invoke:User:Erutuon/usex|suffixusex}}<noinclude>{{documentation}}</noinclude>" 192840 wikitext text/x-wiki {{#invoke:User:Erutuon/usex|suffixusex}}<noinclude>{{documentation}}</noinclude> 7uhoranp2imy9bxzw20ir0m1a9diplz 192841 192840 2024-11-18T10:01:31Z Lee 19 [[:en:Template:suffixusex/sandbox]] වෙතින් එක් සංශෝධනයක් 192840 wikitext text/x-wiki {{#invoke:User:Erutuon/usex|suffixusex}}<noinclude>{{documentation}}</noinclude> 7uhoranp2imy9bxzw20ir0m1a9diplz සැකිල්ල:suffixusex/sandbox/documentation 10 125272 192842 2023-09-23T05:00:57Z en>ExcarnateSojourner 0 categorize 192842 wikitext text/x-wiki {{documentation subpage}} * {{suffixusex/sandbox|grc|ᾰ̓-|λᾰνθᾰ́νω|alt2=ληθ-|-ης|ᾰ̓ληθής}} * {{temp demo|suffixusex/sandbox|en|abc|alt1=ābc|dfe|alt2=dfė|ghi|alt3=dfı|jkl|alt4=ɟkl}} <includeonly> [[Category:Sandbox templates]] </includeonly> 7ibxv5b3vh11zv4j41qlmh80tjlflgw 192843 192842 2024-11-18T10:01:36Z Lee 19 [[:en:Template:suffixusex/sandbox/documentation]] වෙතින් එක් සංශෝධනයක් 192842 wikitext text/x-wiki {{documentation subpage}} * {{suffixusex/sandbox|grc|ᾰ̓-|λᾰνθᾰ́νω|alt2=ληθ-|-ης|ᾰ̓ληθής}} * {{temp demo|suffixusex/sandbox|en|abc|alt1=ābc|dfe|alt2=dfė|ghi|alt3=dfı|jkl|alt4=ɟkl}} <includeonly> [[Category:Sandbox templates]] </includeonly> 7ibxv5b3vh11zv4j41qlmh80tjlflgw Module:affixusex/templates 828 125273 192844 2024-08-13T18:51:44Z en>Ioaxxere 0 Wrap content in <span class="affixusex"></span> 192844 Scribunto text/plain local export = {} local require = require local affixusex_module = "Module:affixusex" local parameter_utilities_module = "Module:parameter utilities" local concat = table.concat local find = string.find local gsub = string.gsub local insert = table.insert local match = string.match local sort = table.sort local sub = string.sub function export.affixusex_t(frame) local parent_args = frame:getParent().args local params = { [1] = {required = true, type = "language", default = "und"}, [2] = {list = true, allow_holes = true}, ["altaff"] = {}, ["nointerp"] = {type = "boolean"}, ["pagename"] = {}, } local aftype = frame.args.type if aftype == "" or not aftype then aftype = "affix" end if aftype == "prefix" then params.altpref = {alias_of = "altaff"} elseif aftype == "suffix" then params.altsuf = {alias_of = "altaff"} end local m_param_utils = require(parameter_utilities_module) local param_mods = m_param_utils.construct_param_mods { -- We want to require an index for all params. Some of the params generated below have separate_no_index, which -- overrides require_index (and also requires an index for the param corresponding to the first item). {default = true, require_index = true}, {group = {"link", "ref", "lang", "q", "l"}}, {param = "lit", separate_no_index = true}, {param = "arrow", type = "boolean"}, {param = {"joiner", "fulljoiner"}}, } local has_exclamation_point = {} local items, args = m_param_utils.process_list_arguments { params = params, param_mods = param_mods, raw_args = parent_args, process_args_before_parsing = function(args) -- Remember and remove an exclamation point from the beginning of a term. We need to do this *before* -- parsing inline modifiers because the exclamation point goes before a language prefix, which is split off -- as part of parsing inline modifiers. for i, term in ipairs(args[2]) do if sub(term, 1, 1) == "!" then has_exclamation_point[i] = true args[2][i] = gsub(term, "^!", "") end end end, termarg = 2, parse_lang_prefix = true, track_module = "affixusex", } local lang = args[1] local data = { items = items, lang = lang, sc = args.sc.default, l = args.l.default, ll = args.ll.default, q = args.q.default, qq = args.qq.default, lit = args.lit.default, } local pagename = args.pagename or mw.loadData("Module:headword/data").pagename -- Determine whether the terms in the numbered params contain a prefix or suffix. If not, we may insert one before -- the last term (for suffixes) or the first term (for prefixes). local affix_in_items = false for i, item in ipairs(items) do if item.term then -- Careful here, a prefix beginning with ! should be treated as a normal term. if has_exclamation_point[item.orig_index] or ((item.lang or lang):makeEntryName(item.term)) == pagename then affix_in_items = true if not item.alt then item.alt = item.term item.term = nil end end end end -- Determine affix to check for prefixness/suffixness. local insertable_aff = args.altaff or pagename -- Determine affix to interpolate if needed. local affix = args.altaff if not affix then if lang:hasType("reconstructed") then affix = "*" .. pagename else affix = pagename end end -- Insert suffix derived from page title or altaff=/altsuf= before the last component if -- (a) nointerp= isn't present, and -- (b) no suffix is present among the parts (where "suffix" means a part that matches the subpage name after -- diacritics have been removed, or a part prefixed by !), and either -- (i) {{suffixusex}}/{{sufex}} was used; -- (ii) {{affixusex}}/{{afex}} was used and altaff= is given, and its value looks like a suffix (begins with -, -- doesn't end in -; an infix is not a suffix) -- (iii) {{affixusex}}/{{afex}} was used and altaff= is not given and the subpage title looks like a suffix -- (same conditions as for altaff=) -- Insert prefix derived from page title or altaff=/altpref= before the first component using similar logic as -- preceding. if not args.nointerp and not affix_in_items then if aftype == "prefix" or ( aftype == "affix" and sub(insertable_aff, -1) == "-" and sub(insertable_aff, 1, 1) ~= "-" ) then insert(items, 1, {alt = affix}) elseif aftype == "suffix" or ( aftype == "affix" and sub(insertable_aff, 1, 1) == "-" and sub(insertable_aff, -1) ~= "-" ) then insert(items, #items, {alt = affix}) end end return "<span class=\"affixusex\">" .. require(affixusex_module).format_affixusex(data) .. "</span>" end return export cmf7mj9fnifxjn12cm50p7uc3xdjdeo 192845 192844 2024-11-18T10:02:00Z Lee 19 [[:en:Module:affixusex/templates]] වෙතින් එක් සංශෝධනයක් 192844 Scribunto text/plain local export = {} local require = require local affixusex_module = "Module:affixusex" local parameter_utilities_module = "Module:parameter utilities" local concat = table.concat local find = string.find local gsub = string.gsub local insert = table.insert local match = string.match local sort = table.sort local sub = string.sub function export.affixusex_t(frame) local parent_args = frame:getParent().args local params = { [1] = {required = true, type = "language", default = "und"}, [2] = {list = true, allow_holes = true}, ["altaff"] = {}, ["nointerp"] = {type = "boolean"}, ["pagename"] = {}, } local aftype = frame.args.type if aftype == "" or not aftype then aftype = "affix" end if aftype == "prefix" then params.altpref = {alias_of = "altaff"} elseif aftype == "suffix" then params.altsuf = {alias_of = "altaff"} end local m_param_utils = require(parameter_utilities_module) local param_mods = m_param_utils.construct_param_mods { -- We want to require an index for all params. Some of the params generated below have separate_no_index, which -- overrides require_index (and also requires an index for the param corresponding to the first item). {default = true, require_index = true}, {group = {"link", "ref", "lang", "q", "l"}}, {param = "lit", separate_no_index = true}, {param = "arrow", type = "boolean"}, {param = {"joiner", "fulljoiner"}}, } local has_exclamation_point = {} local items, args = m_param_utils.process_list_arguments { params = params, param_mods = param_mods, raw_args = parent_args, process_args_before_parsing = function(args) -- Remember and remove an exclamation point from the beginning of a term. We need to do this *before* -- parsing inline modifiers because the exclamation point goes before a language prefix, which is split off -- as part of parsing inline modifiers. for i, term in ipairs(args[2]) do if sub(term, 1, 1) == "!" then has_exclamation_point[i] = true args[2][i] = gsub(term, "^!", "") end end end, termarg = 2, parse_lang_prefix = true, track_module = "affixusex", } local lang = args[1] local data = { items = items, lang = lang, sc = args.sc.default, l = args.l.default, ll = args.ll.default, q = args.q.default, qq = args.qq.default, lit = args.lit.default, } local pagename = args.pagename or mw.loadData("Module:headword/data").pagename -- Determine whether the terms in the numbered params contain a prefix or suffix. If not, we may insert one before -- the last term (for suffixes) or the first term (for prefixes). local affix_in_items = false for i, item in ipairs(items) do if item.term then -- Careful here, a prefix beginning with ! should be treated as a normal term. if has_exclamation_point[item.orig_index] or ((item.lang or lang):makeEntryName(item.term)) == pagename then affix_in_items = true if not item.alt then item.alt = item.term item.term = nil end end end end -- Determine affix to check for prefixness/suffixness. local insertable_aff = args.altaff or pagename -- Determine affix to interpolate if needed. local affix = args.altaff if not affix then if lang:hasType("reconstructed") then affix = "*" .. pagename else affix = pagename end end -- Insert suffix derived from page title or altaff=/altsuf= before the last component if -- (a) nointerp= isn't present, and -- (b) no suffix is present among the parts (where "suffix" means a part that matches the subpage name after -- diacritics have been removed, or a part prefixed by !), and either -- (i) {{suffixusex}}/{{sufex}} was used; -- (ii) {{affixusex}}/{{afex}} was used and altaff= is given, and its value looks like a suffix (begins with -, -- doesn't end in -; an infix is not a suffix) -- (iii) {{affixusex}}/{{afex}} was used and altaff= is not given and the subpage title looks like a suffix -- (same conditions as for altaff=) -- Insert prefix derived from page title or altaff=/altpref= before the first component using similar logic as -- preceding. if not args.nointerp and not affix_in_items then if aftype == "prefix" or ( aftype == "affix" and sub(insertable_aff, -1) == "-" and sub(insertable_aff, 1, 1) ~= "-" ) then insert(items, 1, {alt = affix}) elseif aftype == "suffix" or ( aftype == "affix" and sub(insertable_aff, 1, 1) == "-" and sub(insertable_aff, -1) ~= "-" ) then insert(items, #items, {alt = affix}) end end return "<span class=\"affixusex\">" .. require(affixusex_module).format_affixusex(data) .. "</span>" end return export cmf7mj9fnifxjn12cm50p7uc3xdjdeo Module:affixusex 828 125274 192846 2024-08-14T04:32:34Z en>Benwing2 0 changes for format_derived() calling convention change 192846 Scribunto text/plain local export = {} local etymology_module = "Module:etymology" local links_module = "Module:links" local pron_qualifier_module = "Module:pron qualifier" -- main function --[==[ Format the affix usexes in `data`. We more or less simply call full_link() on each item, along with the associated params, to format the link, but need some special-casing for affixes. On input, the `data` object contains the following fields: * `lang` ('''required'''): Overall language object; default for items not specifying their own language. * `sc`: Overall script object; default for items not specifying their own script. * `items`: List of items. Each is an object with the following fields: ** `term`: The term (affix or resulting term). ** `gloss`, `tr`, `ts`, `genders`, `alt`, `id`, `lit`, `pos`: The same as for `full_links()` in [[Module:links]]. ** `lang`: Language of the term. Should only be set when the term has its own language, and will cause the language to be displayed before the term. Defaults to the overall `lang`. ** `sc`: Script of the term. Defaults to the overall `sc`. ** `fulljoiner`: Text of the separator appearing before the item, including spaces. Takes precedence over `joiner` and `arrow`. ** `joiner`: Text of the separator appearing before the item, not including spaces. Takes precedence over `arrow`. ** `arrow`: If specified, the separator is a right arrow. If none of `fulljoiner`, `joiner` and `arrow` are given, the separator is a right arrow if it's the last item, otherwise a plus sign if it's not the first item, otherwise there's no displayed separator. ** `q`: Left regular qualifier(s) for the term. ** `qq`: Right regular qualifier(s) for the term. ** `l`: Left labels for the term. ** `ll`: Right labels for the term. ** `refs`: References for the term, in the structure expected by [[Module:references]]. * `lit`: Overall literal meaning. * `q`: Overall left regular qualifier(s). * `qq`: Overall right regular qualifier(s). * `l`: Overall left labels. * `ll`: Overall right labels. '''WARNING:''' This destructively modifies the `items` objects (specifically by adding default values for `lang` and `sc`). ]==] function export.format_affixusex(data) local result = {} -- Loop over all terms. We simply call for index, item in ipairs(data.items) do local term = item.term local alt = item.alt if item.fulljoiner then table.insert(result, item.fulljoiner) elseif item.joiner then table.insert(result, " " .. item.joiner .. " ") elseif index == #data.items or item.arrow then table.insert(result, " → ") elseif index > 1 then table.insert(result, " + ") end table.insert(result, "&lrm;") local text local item_lang_specific = item.lang item.lang = item.lang or data.lang item.sc = item.sc or data.sc if item_lang_specific then text = require(etymology_module).format_derived { terminfo = item, template_name = "affixusex", } else text = require(links_module).full_link(item, "term") end if item.q and item.q[1] or item.qq and item.qq[1] or item.l and item.l[1] or item.ll and item.ll[1] or item.refs and item.refs[1] then text = require(pron_qualifier_module).format_qualifiers { lang = item.lang, text = text, q = item.q, qq = item.qq, l = item.l, ll = item.ll, refs = item.refs, } end table.insert(result, text) end result = table.concat(result) .. (data.lit and ", literally " .. require(links_module).mark(data.lit, "gloss") or "") if data.q and data.q[1] or data.qq and data.qq[1] or data.l and data.l[1] or data.ll and data.ll[1] then result = require(pron_qualifier_module).format_qualifiers { lang = data.lang, text = result, q = data.q, qq = data.qq, l = data.l, ll = data.ll, } end return result end return export fvkf991iz4525on603pf3uhuxulnai6 192847 192846 2024-11-18T10:02:13Z Lee 19 [[:en:Module:affixusex]] වෙතින් එක් සංශෝධනයක් 192846 Scribunto text/plain local export = {} local etymology_module = "Module:etymology" local links_module = "Module:links" local pron_qualifier_module = "Module:pron qualifier" -- main function --[==[ Format the affix usexes in `data`. We more or less simply call full_link() on each item, along with the associated params, to format the link, but need some special-casing for affixes. On input, the `data` object contains the following fields: * `lang` ('''required'''): Overall language object; default for items not specifying their own language. * `sc`: Overall script object; default for items not specifying their own script. * `items`: List of items. Each is an object with the following fields: ** `term`: The term (affix or resulting term). ** `gloss`, `tr`, `ts`, `genders`, `alt`, `id`, `lit`, `pos`: The same as for `full_links()` in [[Module:links]]. ** `lang`: Language of the term. Should only be set when the term has its own language, and will cause the language to be displayed before the term. Defaults to the overall `lang`. ** `sc`: Script of the term. Defaults to the overall `sc`. ** `fulljoiner`: Text of the separator appearing before the item, including spaces. Takes precedence over `joiner` and `arrow`. ** `joiner`: Text of the separator appearing before the item, not including spaces. Takes precedence over `arrow`. ** `arrow`: If specified, the separator is a right arrow. If none of `fulljoiner`, `joiner` and `arrow` are given, the separator is a right arrow if it's the last item, otherwise a plus sign if it's not the first item, otherwise there's no displayed separator. ** `q`: Left regular qualifier(s) for the term. ** `qq`: Right regular qualifier(s) for the term. ** `l`: Left labels for the term. ** `ll`: Right labels for the term. ** `refs`: References for the term, in the structure expected by [[Module:references]]. * `lit`: Overall literal meaning. * `q`: Overall left regular qualifier(s). * `qq`: Overall right regular qualifier(s). * `l`: Overall left labels. * `ll`: Overall right labels. '''WARNING:''' This destructively modifies the `items` objects (specifically by adding default values for `lang` and `sc`). ]==] function export.format_affixusex(data) local result = {} -- Loop over all terms. We simply call for index, item in ipairs(data.items) do local term = item.term local alt = item.alt if item.fulljoiner then table.insert(result, item.fulljoiner) elseif item.joiner then table.insert(result, " " .. item.joiner .. " ") elseif index == #data.items or item.arrow then table.insert(result, " → ") elseif index > 1 then table.insert(result, " + ") end table.insert(result, "&lrm;") local text local item_lang_specific = item.lang item.lang = item.lang or data.lang item.sc = item.sc or data.sc if item_lang_specific then text = require(etymology_module).format_derived { terminfo = item, template_name = "affixusex", } else text = require(links_module).full_link(item, "term") end if item.q and item.q[1] or item.qq and item.qq[1] or item.l and item.l[1] or item.ll and item.ll[1] or item.refs and item.refs[1] then text = require(pron_qualifier_module).format_qualifiers { lang = item.lang, text = text, q = item.q, qq = item.qq, l = item.l, ll = item.ll, refs = item.refs, } end table.insert(result, text) end result = table.concat(result) .. (data.lit and ", literally " .. require(links_module).mark(data.lit, "gloss") or "") if data.q and data.q[1] or data.qq and data.qq[1] or data.l and data.l[1] or data.ll and data.ll[1] then result = require(pron_qualifier_module).format_qualifiers { lang = data.lang, text = result, q = data.q, qq = data.qq, l = data.l, ll = data.ll, } end return result end return export fvkf991iz4525on603pf3uhuxulnai6 Module:affixusex/documentation 828 125275 192848 2024-06-16T07:10:51Z en>Benwing2 0 use {{module documentation}}, {{module cat}} 192848 wikitext text/x-wiki ==Exported functions== {{module documentation|section_level=3|identifier=^export}} {{module cat|-|Quotation and usage example}} 5t0skmkcsje52lvmwbounmfi54b58v6 192849 192848 2024-11-18T10:02:35Z Lee 19 [[:en:Module:affixusex/documentation]] වෙතින් එක් සංශෝධනයක් 192848 wikitext text/x-wiki ==Exported functions== {{module documentation|section_level=3|identifier=^export}} {{module cat|-|Quotation and usage example}} 5t0skmkcsje52lvmwbounmfi54b58v6 සැකිල්ල:suffixsee 10 125276 192850 2023-07-14T00:59:38Z en>WingerBot 0 [[Module:compound]] and dependencies renamed to [[Module:affix]] (manually assisted) 192850 wikitext text/x-wiki {{#invoke:affix/templates|derivsee|derivtype=suffix}}<!-- --><noinclude> {{documentation}} [[Category:Internal link templates]] </noinclude> a2kbphndxvyx022ku9nqzi97k0se2hz 192851 192850 2024-11-18T10:02:59Z Lee 19 [[:en:Template:suffixsee]] වෙතින් එක් සංශෝධනයක් 192850 wikitext text/x-wiki {{#invoke:affix/templates|derivsee|derivtype=suffix}}<!-- --><noinclude> {{documentation}} [[Category:Internal link templates]] </noinclude> a2kbphndxvyx022ku9nqzi97k0se2hz සැකිල්ල:suffixsee/documentation 10 125277 192852 2022-08-27T16:29:19Z en>WingerBot 0 remove extraneous spaces at end of line 192852 wikitext text/x-wiki {{documentation subpage}} This template is used to create expandable category trees at entries for suffixes. For example, [[-al#Spanish]] contains this wikitext: <nowiki>{{suffixsee|es}}</nowiki> and thereby generates this output: {{suffixsee|es|head=-al}} To use a different suffix than the page name (for example to make a list of related words of a suffixed term), use the "head" parameter: <nowiki>{{suffixsee|en|head=-onym}}</nowiki> which yields: {{suffixsee|en|head=-onym}} ==See also== * {{temp|prefixsee}} * {{temp|interfixsee}} * {{temp|circumfixsee}} <includeonly> [[Category:Morphology templates|suffix]] </includeonly> l55p7gkoncujgqbsa7byxieurqez5hy 192853 192852 2024-11-18T10:03:15Z Lee 19 [[:en:Template:suffixsee/documentation]] වෙතින් එක් සංශෝධනයක් 192852 wikitext text/x-wiki {{documentation subpage}} This template is used to create expandable category trees at entries for suffixes. For example, [[-al#Spanish]] contains this wikitext: <nowiki>{{suffixsee|es}}</nowiki> and thereby generates this output: {{suffixsee|es|head=-al}} To use a different suffix than the page name (for example to make a list of related words of a suffixed term), use the "head" parameter: <nowiki>{{suffixsee|en|head=-onym}}</nowiki> which yields: {{suffixsee|en|head=-onym}} ==See also== * {{temp|prefixsee}} * {{temp|interfixsee}} * {{temp|circumfixsee}} <includeonly> [[Category:Morphology templates|suffix]] </includeonly> l55p7gkoncujgqbsa7byxieurqez5hy සැකිල්ල:serif 10 125278 192854 2017-08-03T18:59:57Z en>Erutuon 0 allow specification of class 192854 wikitext text/x-wiki <span style="font-family: serif;" {{#if:{{{class|}}}|class="{{{class|}}}"}}>{{{1}}}</span><noinclude> {{documentation}} </noinclude> by0wdku8mlrjhbwe6fxhv70ntbzc9py 192855 192854 2024-11-18T10:05:51Z Lee 19 [[:en:Template:serif]] වෙතින් එක් සංශෝධනයක් 192854 wikitext text/x-wiki <span style="font-family: serif;" {{#if:{{{class|}}}|class="{{{class|}}}"}}>{{{1}}}</span><noinclude> {{documentation}} </noinclude> by0wdku8mlrjhbwe6fxhv70ntbzc9py සැකිල්ල:serif/documentation 10 125279 192856 2023-03-04T21:26:16Z en>J3133 0 192856 wikitext text/x-wiki {{documentation subpage}} This template adds a serif font to text, in order to set off a quotation (for example) from what is around it. It can be used on discussion pages; don't use it anywhere else. Place the text in the first parameter. ==Parameters== ; {{para|1}} : Text to be formatted with serif font. ; {{para|class|opt=1}} : A class to add to the text. ==Examples== : {{temp|serif|Declensions were found that matched the ending of the masculine “στᾱ́ς”, but the corresponding feminine endings were “αινᾰ”, “ᾱσᾰ”, none of which matched the ending of the feminine “στᾶσα”.}} :: &darr; : {{serif|Declensions were found that matched the ending of the masculine “στᾱ́ς”, but the corresponding feminine endings were “αινᾰ”, “ᾱσᾰ”, none of which matched the ending of the feminine “στᾶσα”.}} ---- : {{temp|serif|Declensions were found that matched the ending of the masculine “στᾱ́ς”, but the corresponding feminine endings were “αινᾰ”, “ᾱσᾰ”, none of which matched the ending of the feminine “στᾶσα”.|class=error}} :: &darr; : {{serif|Declensions were found that matched the ending of the masculine “στᾱ́ς”, but the corresponding feminine endings were “αινᾰ”, “ᾱσᾰ”, none of which matched the ending of the feminine “στᾶσα”.|class=error}} <includeonly> [[Category:Discussion templates]] [[Category:Text format templates]] </includeonly> 579umqdx8nhoqz09idr8zyt12r0t2sv 192857 192856 2024-11-18T10:06:06Z Lee 19 [[:en:Template:serif/documentation]] වෙතින් එක් සංශෝධනයක් 192856 wikitext text/x-wiki {{documentation subpage}} This template adds a serif font to text, in order to set off a quotation (for example) from what is around it. It can be used on discussion pages; don't use it anywhere else. Place the text in the first parameter. ==Parameters== ; {{para|1}} : Text to be formatted with serif font. ; {{para|class|opt=1}} : A class to add to the text. ==Examples== : {{temp|serif|Declensions were found that matched the ending of the masculine “στᾱ́ς”, but the corresponding feminine endings were “αινᾰ”, “ᾱσᾰ”, none of which matched the ending of the feminine “στᾶσα”.}} :: &darr; : {{serif|Declensions were found that matched the ending of the masculine “στᾱ́ς”, but the corresponding feminine endings were “αινᾰ”, “ᾱσᾰ”, none of which matched the ending of the feminine “στᾶσα”.}} ---- : {{temp|serif|Declensions were found that matched the ending of the masculine “στᾱ́ς”, but the corresponding feminine endings were “αινᾰ”, “ᾱσᾰ”, none of which matched the ending of the feminine “στᾶσα”.|class=error}} :: &darr; : {{serif|Declensions were found that matched the ending of the masculine “στᾱ́ς”, but the corresponding feminine endings were “αινᾰ”, “ᾱσᾰ”, none of which matched the ending of the feminine “στᾶσα”.|class=error}} <includeonly> [[Category:Discussion templates]] [[Category:Text format templates]] </includeonly> 579umqdx8nhoqz09idr8zyt12r0t2sv ප්‍රවර්ගය:සංස්කෘත යෙදුම්, ප්‍රත්‍ය අනුව 14 125280 192871 2022-09-02T08:16:26Z en>WingerBot 0 WingerBot moved page [[Category:Sanskrit words by suffix]] to [[Category:Sanskrit terms by suffix]] without leaving a redirect: rename 'words' -> 'terms' in affix and compound categories (see [[Wiktionary:Beer parlour/2022/August]]) 192871 wikitext text/x-wiki {{auto cat}} eomzlm5v4j7ond1phrju7cnue91g5qx 192872 192871 2024-11-18T11:26:03Z Lee 19 [[:en:Category:Sanskrit_terms_by_suffix]] වෙතින් එක් සංශෝධනයක් 192871 wikitext text/x-wiki {{auto cat}} eomzlm5v4j7ond1phrju7cnue91g5qx 192873 192872 2024-11-18T11:26:50Z Lee 19 Lee විසින් [[ප්‍රවර්ගය:Sanskrit terms by suffix]] සිට [[ප්‍රවර්ගය:සංස්කෘත යෙදුම්, ප්‍රත්‍ය අනුව]] වෙත පිටුව ගෙන යන ලදී 192871 wikitext text/x-wiki {{auto cat}} eomzlm5v4j7ond1phrju7cnue91g5qx ප්‍රවර්ගය:Sanskrit terms by suffix 14 125281 192874 2024-11-18T11:26:50Z Lee 19 Lee විසින් [[ප්‍රවර්ගය:Sanskrit terms by suffix]] සිට [[ප්‍රවර්ගය:සංස්කෘත යෙදුම්, ප්‍රත්‍ය අනුව]] වෙත පිටුව ගෙන යන ලදී 192874 wikitext text/x-wiki #යළියොමුව [[:ප්‍රවර්ගය:සංස්කෘත යෙදුම්, ප්‍රත්‍ය අනුව]] ry48mtaswh2wj0ptndmqztj3cp8fh6b ප්‍රවර්ගය:සංස්කෘත ප්‍රත්‍ය 14 125282 192875 2022-06-20T04:46:47Z en>WingerBot 0 use {{auto cat}}, remove extraneous {{catfix}}/TOC templates (manually assisted) 192875 wikitext text/x-wiki {{auto cat}} eomzlm5v4j7ond1phrju7cnue91g5qx 192876 192875 2024-11-18T11:27:33Z Lee 19 [[:en:Category:Sanskrit_suffixes]] වෙතින් එක් සංශෝධනයක් 192875 wikitext text/x-wiki {{auto cat}} eomzlm5v4j7ond1phrju7cnue91g5qx 192877 192876 2024-11-18T11:28:08Z Lee 19 Lee විසින් [[ප්‍රවර්ගය:Sanskrit suffixes]] සිට [[ප්‍රවර්ගය:සංස්කෘත ප්‍රත්‍ය]] වෙත පිටුව ගෙන යන ලදී 192875 wikitext text/x-wiki {{auto cat}} eomzlm5v4j7ond1phrju7cnue91g5qx ප්‍රවර්ගය:Sanskrit suffixes 14 125283 192878 2024-11-18T11:28:08Z Lee 19 Lee විසින් [[ප්‍රවර්ගය:Sanskrit suffixes]] සිට [[ප්‍රවර්ගය:සංස්කෘත ප්‍රත්‍ය]] වෙත පිටුව ගෙන යන ලදී 192878 wikitext text/x-wiki #යළියොමුව [[:ප්‍රවර්ගය:සංස්කෘත ප්‍රත්‍ය]] brqel7q73wl65xq991g4dneo1i0z3ls ප්‍රවර්ගය:සංස්කෘත පදාණු 14 125284 192879 2024-11-18T11:29:20Z Pinthura 2424 සේවා: [[:[[en:Category:Sanskrit morphemes]]]] තුළ තිබූ පෙළ මෙහි ඇතුළු කිරීම. 192879 wikitext text/x-wiki {{auto cat}} eomzlm5v4j7ond1phrju7cnue91g5qx 192880 192879 2024-11-18T11:29:30Z Pinthura 2424 Pinthura විසින් [[ප්‍රවර්ගය:Sanskrit morphemes]] සිට [[ප්‍රවර්ගය:සංස්කෘත පදාණු]] වෙත පිටුව ගෙන යන ලදී: සේවා: නව ප්‍රවර්ග නාමය වෙත ගෙනයාම. 192879 wikitext text/x-wiki {{auto cat}} eomzlm5v4j7ond1phrju7cnue91g5qx 192882 192880 2024-11-18T11:29:40Z Pinthura 2424 සේවා: ඉංග්‍රීසි ව්‍යාපෘතිය වෙත සබැඳියක් එක් කිරීම. 192882 wikitext text/x-wiki {{auto cat}} [[en:Category:Sanskrit morphemes]] rrb01vw2i5dyi3ji1en8y711wukab2i ප්‍රවර්ගය:Sanskrit morphemes 14 125285 192881 2024-11-18T11:29:31Z Pinthura 2424 Pinthura විසින් [[ප්‍රවර්ගය:Sanskrit morphemes]] සිට [[ප්‍රවර්ගය:සංස්කෘත පදාණු]] වෙත පිටුව ගෙන යන ලදී: සේවා: නව ප්‍රවර්ග නාමය වෙත ගෙනයාම. 192881 wikitext text/x-wiki #යළියොමුව [[:ප්‍රවර්ගය:සංස්කෘත පදාණු]] rkisvknijlhna555e49fv2cygtzr0ro 192883 192881 2024-11-18T11:29:50Z Pinthura 2424 සේවා: යළියොමුව, මෘදු ප්‍රවර්ග යළියොමුවක් බවට හැරවීම. 192883 wikitext text/x-wiki {{category redirect|සංස්කෘත පදාණු}} hzmm6mw2kt6pnc2962hmbw1v2o4moh8 ප්‍රවර්ගය:Sanskrit පදාණු 14 125286 192884 2024-11-18T11:30:00Z Pinthura 2424 සේවා: මෘදු ප්‍රවර්ග යළියොමුවක් නිර්මාණය. 192884 wikitext text/x-wiki {{category redirect|සංස්කෘත පදාණු}} hzmm6mw2kt6pnc2962hmbw1v2o4moh8 -onym 0 125287 192886 2024-11-18T11:56:05Z Lee 19 නිර්මාණය 192886 wikitext text/x-wiki ==English== ===Alternative forms=== * {{l|en|-nym}} ===Etymology=== From {{w|international scientific vocabulary}}, reflecting a New Latin {{w|classical compound|combining form}}, from {{der|en|grc|ὄνυμα}}, Doric and Aeolic dialectal form of {{m|grc|ὄνομα||name}}; compare also {{m|en|-onymy#Etymology|-onymy § Etymology}}. ===Suffix=== {{en-suffix}} # [[වචනය]] [තහවුරු කර නොමැත] # [[නාමය]] [තහවුරු කර නොමැත] ====Derived terms==== {{suffixsee|en}} ====Related terms==== * [[:Category:English terms suffixed with -nym|English terms suffixed with -nym]] * {{l|en|onymity}}, {{l|en|onymous}}, {{l|en|onymously}} {{cln|en|2-syllable words}} gvqsjecerzyvs5fb0bgfta3gd8pkse6 -nym 0 125288 192887 2024-11-18T11:57:16Z Lee 19 නිර්මාණය 192887 wikitext text/x-wiki {{also|nym}} ==English== ===Etymology=== See {{m|en|-onym#Etymology|-onym § Etymology}}. ===Suffix=== {{en-suffix}} # {{alternative form of|en|-onym}} ====Usage notes==== * Most of the words that end in ''-nym'' end in ''-onym'', which is the proper suffix from the Greek {{m|el|ὄνυμα}}. ====Derived terms==== {{suffixsee|en}} ====Related terms==== * [[:Category:English terms suffixed with -onym|English terms suffixed with -onym]] l7o9v6dl90tzv2axpj8kopeu91klpi7 සැකිල්ල:en-suffix 10 125289 192888 2024-09-22T01:19:54Z en>Theknightwho 0 192888 wikitext text/x-wiki <noinclude>{{rfd}}</noinclude>{{head|en|suffix|head={{{head|}}}|cat2={{{cat2|}}}|cat3={{{cat3|}}}|id={{{id|}}}}}<!-- --><noinclude>{{documentation}}</noinclude> f18an73sfkmfqmo4vvginqirbngmyor 192889 192888 2024-11-18T11:57:39Z Lee 19 [[:en:Template:en-suffix]] වෙතින් එක් සංශෝධනයක් 192888 wikitext text/x-wiki <noinclude>{{rfd}}</noinclude>{{head|en|suffix|head={{{head|}}}|cat2={{{cat2|}}}|cat3={{{cat3|}}}|id={{{id|}}}}}<!-- --><noinclude>{{documentation}}</noinclude> f18an73sfkmfqmo4vvginqirbngmyor 192892 192889 2024-11-18T11:58:26Z Lee 19 192892 wikitext text/x-wiki {{head|en|suffix|head={{{head|}}}|cat2={{{cat2|}}}|cat3={{{cat3|}}}|id={{{id|}}}}}<!-- --><noinclude>{{documentation}}</noinclude> 4f7do8cuhpnme5jxhl7guwigfiebigv සැකිල්ල:en-suffix/documentation 10 125290 192890 2015-10-09T19:40:54Z en>Msh210 0 -rfd:kept 192890 wikitext text/x-wiki {{documentation subpage}} This template generates a headword line for English suffix entries, and adds them to [[:Category:English suffixes]]. It should be used in the English language section, right below the ===Suffix=== header: <pre>===Suffix===&#xA;{{en-suffix}}</pre> ===Parameters=== This template takes the following parameters, all optional: * '''sort''' – sort key, should be the suffix without the leading “-” – optional but recommended * '''cat2''' – second category, such as “unproductive suffixes” or “adverb-forming suffixes” * '''cat3''' – third category ===See also=== * {{temp|en-prefix}} * {{temp|suffix}} <includeonly> [[Category:English headword-line templates|suffix]] </includeonly> aa8u4q2a7jlb1uehj8x59k017djjqg9 192891 192890 2024-11-18T11:57:56Z Lee 19 [[:en:Template:en-suffix/documentation]] වෙතින් එක් සංශෝධනයක් 192890 wikitext text/x-wiki {{documentation subpage}} This template generates a headword line for English suffix entries, and adds them to [[:Category:English suffixes]]. It should be used in the English language section, right below the ===Suffix=== header: <pre>===Suffix===&#xA;{{en-suffix}}</pre> ===Parameters=== This template takes the following parameters, all optional: * '''sort''' – sort key, should be the suffix without the leading “-” – optional but recommended * '''cat2''' – second category, such as “unproductive suffixes” or “adverb-forming suffixes” * '''cat3''' – third category ===See also=== * {{temp|en-prefix}} * {{temp|suffix}} <includeonly> [[Category:English headword-line templates|suffix]] </includeonly> aa8u4q2a7jlb1uehj8x59k017djjqg9 සැකිල්ල:en-prefix 10 125291 192893 2024-09-22T01:20:48Z en>Theknightwho 0 192893 wikitext text/x-wiki <noinclude>{{rfd}}</noinclude>{{head|en|prefix|head={{{head|}}}|sort={{{sort|}}}}}<!-- --><noinclude>{{documentation}}</noinclude> gbzcnqci6xeyv2wsur289lxe7oazqf2 192894 192893 2024-11-18T11:58:37Z Lee 19 [[:en:Template:en-prefix]] වෙතින් එක් සංශෝධනයක් 192893 wikitext text/x-wiki <noinclude>{{rfd}}</noinclude>{{head|en|prefix|head={{{head|}}}|sort={{{sort|}}}}}<!-- --><noinclude>{{documentation}}</noinclude> gbzcnqci6xeyv2wsur289lxe7oazqf2 සැකිල්ල:en-prefix/documentation 10 125292 192895 2013-05-22T17:15:32Z en>Rua 0 CodeCat moved page [[Template:en-prefix/doc]] to [[Template:en-prefix/documentation]] without leaving a redirect: Moving documentation 192895 wikitext text/x-wiki {{documentation subpage}} This template generates a headword line for English prefix entries, and adds them to [[:Category:English prefixes]]. It should be used in the English language section, right below the ===Prefix=== header: <pre>===Prefix===&#xA;{{en-prefix}}</pre> This template does not take any parameters. <includeonly>[[Category:English headword-line templates|prefix]]</includeonly> pdawyobopvsht8nqk3o65q2yuhi1j6b 192896 192895 2024-11-18T11:58:52Z Lee 19 [[:en:Template:en-prefix/documentation]] වෙතින් එක් සංශෝධනයක් 192895 wikitext text/x-wiki {{documentation subpage}} This template generates a headword line for English prefix entries, and adds them to [[:Category:English prefixes]]. It should be used in the English language section, right below the ===Prefix=== header: <pre>===Prefix===&#xA;{{en-prefix}}</pre> This template does not take any parameters. <includeonly>[[Category:English headword-line templates|prefix]]</includeonly> pdawyobopvsht8nqk3o65q2yuhi1j6b