Modul:Infocaseta Nume străin/data

Acest submodul conține date referitoare la construcția subcasetelor pliabile și la afișarea titlurilor de subsecțiuni din {{Infocaseta Chineză}} și din alte formate înrudite.


--[[--------------------------< L A B E L _ M A P >------------------------------------------------------------Table to map |showflags= value to the |labeln= parameter value for {{Infobox}}TODO: convert showflag to a comma delimited list instead of these peculiar codes?]]local label_map = {["bp"] = "[[Bbánlám Pìngyīm]]",["bpmf"] = "[[Bopomofo]]",["gan"] = "[[Gan]]",["gd"] = "[[Romanizarea Guangdong|Guangdong]]",["h"] = "[[Romanizarea Guangdong#Hakka|Hakka]]",["hsn"] = "[[Xiang (limbă)|Xiang]]",["j"] = "[[Jyutping]]",["lmz"] = "Romanizare [[Limba șanhaiană|șanhaiană]]",["p"] = "[[Hanyu Pinyin]]",["phfs"] = "[[Pha̍k-fa-sṳ]]",["poj"] = "[[Pe̍h-ōe-jī]]",["psic"] = "[[Pinyin sichuanez|Pinyin]] [[Limba sichuaneză|sichuanez]]",["tl"] = "[[Tâi-lô]]",["toi"] = "[[Jyutping]] [[Limba taishaneză|taishanez]]",["tp"] = "[[Tongyong Pinyin]]",["w"] = "[[Wade–Giles]]",["wuu"] = "[[Wu (limbă)|Wu]]",["xej"] = "[[Xiao'erjing]]",["y"] = "[[Romanizarea Yale pentru limba cantoneză|Yale]] [[Limba cantoneză|cantonez]]",}--[[--------------------------< T R A N S L _ M A P >----------------------------------------------------------Table to map |showflags= value to an index into label_map for child infobox |labeln= value and to map |showflags=vale to the correct parameter for use in child infobox |datan= paramterImplementation deatils of |showflag= are in dispute see: Template_talk:Infobox_Chinese#Rfc_on_fixing_the_template_showflaglinked conversation is at: Template_talk:Infobox_Chinese/Archive_4#Showflag broken]]local transl_map = {-- maps |showflag= value to label from label_map table and data from matching parameter name["bp"] = {["label1"] = "bp", ["data1"] = "bp"},["bpmf"] = {["label1"] = "bpmf", ["data1"] = "bpmf"},["gan"] = {["label1"] = "gan", ["data1"] = "gan"},["gdp"] = {["label1"] = "gd", ["data1"] = "gd", ["label2"] = "p", ["data2"] = "p"},["h"] = {["label1"] = "h", ["data1"] = "h"},["hsn"] = {["label1"] = "hsn", ["data1"] = "hsn"},["j"] = {["label1"] = "j", ["data1"] = "j"},["jp"] = {["label1"] = "j", ["data1"] = "j", ["label2"] = "p", ["data2"] = "p"},["jy"] = {["label1"] = "j", ["data1"] = "j", ["label2"] = "y", ["data2"] = "y"},["jyp"] = {["label1"] = "j", ["data1"] = "j", ["label2"] = "y", ["data2"] = "y", ["label3"] = "p", ["data3"] = "p"},["lmz"] = {["label1"] = "lmz", ["data1"] = "lmz"},["p"] = {["label1"] = "p", ["data1"] = "p"},["phfs"] = {["label1"] = "phfs", ["data1"] = "phfs"},["phsn"] = {["label1"] = "p", ["data1"] = "p", ["label2"] = "hsn", ["data2"] = "hsn"},["pj"] = {["label1"] = "p", ["data1"] = "p", ["label2"] = "j", ["data2"] = "j"},["poj"] = {["label1"] = "poj", ["data1"] = "poj"},["psic"] = {["label1"] = "p", ["data1"] = "p", ["label2"] = "sic", ["data2"] = "sic"},["pwuu"] = {["label1"] = "p", ["data1"] = "p", ["label2"] = "wuu", ["data2"] = "wuu"},["py"] = {["label1"] = "p", ["data1"] = "p", ["label2"] = "y", ["data2"] = "y"},["tl"] = {["label1"] = "tl", ["data1"] = "tl"},["toip"] = {["label1"] = "toi", ["data1"] = "toi", ["label2"] = "p", ["data2"] = "p"},["tp"] = {["label1"] = "tp", ["data1"] = "tp"},["wp"] = {["label1"] = "w", ["data1"] = "w", ["label2"] = "p", ["data2"] = "p"},["wuu"] = {["label1"] = "wuu", ["data1"] = "wuu"},["y"] = {["label1"] = "y", ["data1"] = "y"},["yj"] = {["label1"] = "y", ["data1"] = "y", ["label2"] = "j", ["data2"] = "j"},["xej"] = {["label1"] = "xej", ["data1"] = "xej"},["xejp"] = {["label1"] = "xej", ["data1"] = "xej", ["label2"] = "p", ["data2"] = "p"},}--[[--------------------------< K E Y S >----------------------------------------------------------------------]]local keys = {-- table of xscript table keys callsar = "arabic",bo = "tibetan",hokkien = "hokkien",ja = "japanese",ko = "korean",ru = "russian",ug = "uyghur",uk = "ukrainian",}--[[--------------------------< X S C R I P T >----------------------------------------------------------------table that holds the various transcription headers and labels used by transcriptions()indexed in this table are lower case versions of the header display text without punctuation (if any)TODO: add support for transl transliteration standard parameter; akin to {{transl|lang code|standard code|text|italic=??}}]]local xscript = {["standard mandarin"] = {-- lower case version of the header display text["header"] = "[[Limba mandarină|Mandarină standard]]",-- text to be displayed if headers are displayed["lang"] = "zh",["t"] = {-- table of labels and their associated data parameter{"[[Hanyu Pinyin]]", "p"},-- label is [[Hanyu Pinyin]], data is taken from |p= parameter{"[[Bopomofo]]", "bpmf", script = "Bopo", size = "1rem"},{"[[Gwoyeu Romatzyh]]", "gr"},{"[[Wade–Giles]]", "w"},{"[[Tongyong Pinyin]]", "tp"},{"[[Romanizarea Yale pentru limba mandarină|Yale]]", "myr"},{"[[Mandarin Phonetic Symbols II|MPS2]]", "mps"},{"[[Alfabetul Fonetic Internațional|AFI]]", "mi", lang = ""}}},["other mandarin"] = {["header"] = "[[Limba mandarină|Alte varietăți de mandarină]]",["lang"] = "zh",["t"] = {{"[[Xiao'erjing]]", "xej", script = "Arab", size = "1rem"},{"[[Limba dungană|Dungană]]", "zh-dungan", script = "Cyrl"},{"[[Pinyin sichuanez|Pinyin]] [[Limba sichuaneză|sichuanez]]", "sic"},}},["wu"] = {["header"] = "[[Wu (limbă)|Wu]]",["lang"] = "wuu",["t"] = {{"Romanizare", "wuu"},{"Romanizare [[Limba șanhaiană|șanhaiană]]", "lmz"},{"Romanizare [[Limba wenzhouneză|wenzhouneză]]", "ouji"},{"[[Limba suzhouneză|Suzhouneză]]", "suz"},}},["gan"] = {["header"] = "[[Gan]]",["lang"] = "gan",["t"] = {{"Romanizare", "gan"},}},["xiang"] = {["header"] = "[[Xiang (limbă)|Xiang]]",["lang"] = "hsn",["t"] = {{"[[Alfabetul Fonetic Internațional|AFI]]", "hsn", lang = ""},}},["hakka"] = {["header"] = "[[Hakka (limbă)|Hakka]]",["lang"] = "hak",["t"] = {{"[[Romanizarea Guangdong#Hakka|Romanizare]]", "h"},{"[[Pha̍k-fa-sṳ]]", "phfs"},}},["yue cantonese"] = {["header"] = "[[Limba cantoneză|Yue: Cantoneză]]",["lang"] = "yue",["t"] = {{"[[Romanizarea Yale pentru limba cantoneză|Yale]]", "y"},{"[[Jyutping]]", "j"},{"[[Romanizarea Sidney Lau|Sidney Lau]]", "sl"},{"[[Romanizarea Guangdong|Guangdong]]", "gd"},{"[[Romanizarea Guvernului din Hong Kong pentru limba cantoneză|Hong Kong]]", "hk"},{"[[Romanizarea Guvernului din Macao pentru limba cantoneză|Macao]]", "mo"},{"[[Alfabetul Fonetic Internațional|AFI]]", "ci", lang = ""},}},["other yue"] = {["header"] = "[[Yue (limbă)|Alte varietăți de yue]]",["lang"] = "yue",["t"] = {{"[[Jyutping]] [[Limba taishaneză|taishanez]]", "toi"},}},["southern min"] = {["header"] = "[[Min Nan]]",["lang"] = "nan",["t"] = {{"[[Pe̍h-ōe-jī]]", "poj"},{"[[Tâi-lô]]", "tl"},{"[[Bbánlám Pìngyīm]]", "bp"},{"[[Romanizarea Guangdong|Peng'im]]", "teo"},{"Romanizare [[Limba hainaneză|hainaneză]]", "hain"},{"[[Leizhouhua]]", "lizu"},}},["eastern min"] = {["header"] = "[[Min Dong]]",["lang"] = "cdo",["t"] = {{"[[Bàng-uâ-cê]]", "buc"},}},["pu-xian min"] = {["header"] = "[[Pu-Xian]]",["lang"] = "cpx",["t"] = {{"[[Báⁿ-uā-ci̍]]", "hhbuc"},}},["northern min"] = {["header"] = "[[Min Bei]]",["lang"] = "mnp",["t"] = {{"[[Kienning Colloquial Romanized|Kienning Colloquial]]", "mblmc"},}},["old mandarin"] = {["header"] = "[[Limba mandarină veche|Mandarină veche]]",["lang"] = "zh",["t"] = {{"[['Phags-pa]] romanizat", "phagspa-latin"},}},["middle chinese"] = {["header"] = "[[Chineză medievală]]",["lang"] = "ltc",["script"] = "",["t"] = {{"[[Chineză medievală]]", "mc"},{"[[Chineză medievală|Chineză medievală timpurie]]", "emc"},{"[[Chineză medievală|Chineză medievală târzie]]", "lmc"},}},["old chinese"] = {["header"] = "[[Chineză veche]]",["lang"] = "och",["script"] = "",["t"] = {{"Baxter (1992)", "oc-b92"},{"Baxter–Sagart (2014)", "oc-bs"},{"Zhengzhang", "oc-zz"},}},--------< non-Chinese transcriptions >--------["arabic"] = {["header"] = nil,-- {{Infobox Chinese/Arabic}}; doesn't use header["lang"] = "ar",["t"] = {{"[[Alfabetul arab pentru chat|Chat]]", "chat"},{"[[Romanizarea ALA-LC|ALA-LC]]", "ala-lc"},{"[[ISO 233|ISO]]", "iso"},{"[[DIN 31635|DIN]]", "din"},}},["hokkien"] = {["header"] = nil,-- {{Infobox Chinese/Hokkien}}; doesn't use header["lang"] = "nan",["t"] = {{"[[Tâi-lô]]", "tl"},{"[[Bbánlám Pìngyīm|Bbánpìng]]", "bp"},{"[[Alfabetul Fonetic Internațional|AFI]]", "hokkienipa", lang = ""},}},["japanese"] = {["header"] = nil,-- {{Infobox Chinese/Japanese}}; doesn't use header["lang"] = "ja",["t"] = {{"[[Rōmaji]]", "romaji"},{"[[Romanizarea Hepburn|Hepburn revizuit]]", "revhep"},{"[[Romanizarea Hepburn|Hepburn tradițional]]", "tradhep"},{"[[Kunrei-shiki]]", "kunrei"},{"[[Nihon-shiki]]", "nihon"},}},["korean"] = {["header"] = nil,-- {{Infobox Chinese/Korean}}; doesn't use header["lang"] = "ko",["t"] = {{"[[Romanizarea revizuită a limbii coreene|Romanizarea Revizuită]]", "rr"},{"[[McCune-Reischauer|McCune–Reischauer]]", "mr"},{"[[Romanizarea limbii coreene (Coreea de Nord)|Coreea de Nord]]", "nr"},{"[[Alfabetul Fonetic Internațional|AFI]]", "koreanipa", lang = ""},}},["russian"] = {["header"] = nil,-- {{Infobox Chinese/Russian}}; doesn't use header["lang"] = "ru",["t"] = {{"[[Transliterarea științifică a alfabetului chirilic|Transliterare științifică]]", "scientific"},{"[[ISO 9|ISO]]", "iso"},{"[[GOST 16876-71|GOST 71]]", "gost"},{"[[Romanizarea BGN/PCGN pentru limba rusă|BGN/PCGN]]", "bgn/pcgn"},}},["tibetan"] = {["header"] = nil,-- {{Infobox Chinese/Tibetan}}; doesn't use header["lang"] = "bo",["t"] = {{"[[Transliterarea Wylie|Wylie]]", "wylie"},{"[[THL Simplified Phonetic Transcription|THL]]", "thdl"},{"[[Pinyin tibetan]]", "zwpy"},{"[[Alfabetul Fonetic Internațional|AFI]]", "lhasa", lang = ""},}},["ukrainian"] = {["header"] = nil,-- {{Infobox Chinese/Ukrainian}}; doesn't use header["lang"] = "uk",["t"] = {{"[[Sistemul național de transliterare a limbii ucrainene|Național]]", "ukrnat"},{"[[DSTU 9112:2021|DSTU]]", "dstu"},{"[[Transliterarea științifică a alfabetului chirilic|Transliterare științifică]]", "ukrsci"},{"[[ISO 9|ISO]]", "ukriso"},{"[[Romanizarea BGN/PCGN pentru limba ucraineană|BGN/PCGN]]", "ukrbgn"}}},["uyghur"] = {["header"] = nil,-- {{Infobox Chinese/Uyghur}}; doesn't use header["lang"] = "ug",["t"] = {{"[[Limba uigură#Ortografie|Latin Yëziqi]]", "uly"},{"[[Limba uigură#Ortografie|Yengi Yeziⱪ]]", "uyy"},{"[[Romanizarea SASM/GNC#Uigură|SASM/GNC]]", "sgs"},{"[[Limba uigură#Ortografie|Siril Yëziqi]]", "usy", script = "Cyrl"},{"[[Alfabetul Fonetic Internațional|AFI]]", "uipa", lang = ""},}},}--[[--------------------------< I B O X _ Z H Z H _ E N U M _ P A R A M S >------------------------------------]]local ibox_zhzh_enum_params = {-- "p", "hp", "xej" are special case enum parameters"c", "t", "s", "l", "tp", "w", "mi", "myr", "psp", "myale", "gr", "bpmf", "mps","zh-dungan", "sic", "y", "j", "sl", "gd", "hk", "mo", "ci", "toi", "gan", "wuu", "ouji", "suz","hsn", "h", "phfs", "poj", "tl", "bp", "buc", "hhbuc", "mblmc", "lmz", "teo", "lizu", "hain","mc", "emc", "lmc", "oc-bs", "oc-zz","oc-b92", -- only supported in the first ibox zhzh; why?"lao", "khm", "tet"-- not supported by ibox zh/zh  why are they here?}--[[--------------------------< H O K K I E N _ H D R _ N A M E S >--------------------------------------------This table fixes special cases in the ibox_ns_hokkien_complex header name parameters. |hokkien_header= for thefirst ibox gets filled from |hokkienname=, but there are various suffixes (including numerical ones) that areeither hardcoded or they get their names from |othername1=, later |othername2=, and then the third from|othername3=. The numerical parameter names should be replaced with |hokkien_header= followed by|hokkien_header1= ... like all of the other enumerated parameters]]local hokkien_hdr_names = {special = {pen = "[[Pseudonim]]",born = "Nume la naștere",child = "Nume în copilărie",courtesy = "[[Nume de curtoazie]]",stage = "Nume de scenă",dharma = "Nume de dharma",posthumous = "Nume postum"},numbered = {[""] = "hokkienname",[1] = "othername1",[2] = "othername2",[3] = "othername3"}}--[[--------------------------< K O _ H D R _ N A M E S >------------------------------------------------------This table fixes special cases in the ibox_ns_ko_complex header name parameters. |korean_header= for the firstibox gets filled from |koreanname=, but there are various suffixes (including numerical ones) that are eitherhardcoded or they get their names from |othername1=, later |othername2=, and then the third from |othername3=.The numerical parameter names should be replaced with |korean_header= followed by |korean_header1= ... like allof the other enumerated parameters]]local ko_hdr_names = {special = {ho = "[[Pseudonim]]",born = "Nume la naștere",a = "Nume în copilărie",ja = "[[Nume de curtoazie]]",stage = "Nume de scenă",gye = "Nume de dharma",ph = "Nume postum"},numbered = {[""] = "koreanname",[1] = "othername1",[2] = "othername2",[3] = "othername3"}}--[[--------------------------< Z H _ H D R _ N A M E S >------------------------------------------------------This table fixes an oddity in the ibox zh/zh header name parameters.  |chinese_header= for the first ibox zh/zh gets filled from |name1=, but the second gets its name from |altname=, and then the third from |altname3=.All of these parameter names should be replaced with |chinese_header= followed by |chinese_header2= ... like allof the other enumerated parameters]]local zh_hdr_names = {[2] = {"altname", "Nume chinezesc alternativ"},[3] = {"altname3", "Nume chinezesc alternativ secundar"},[4] = {"altname4", "Nume chinezesc alternativ terțiar"},[5] = {"altname5", "Nume chinezesc alternativ cuaternar"},[6] = {"altname6", "Nume chinezesc alternativ cvinar"}}--[[--------------------------< E X P O R T E D   T A B L E S >------------------------------------------------]]return {ibox_zhzh_enum_params = ibox_zhzh_enum_params,keys = keys,label_map = label_map,transl_map = transl_map,xscript = xscript,hokkien_hdr_names = hokkien_hdr_names,ko_hdr_names = ko_hdr_names,zh_hdr_names = zh_hdr_names}