維基辭典 yuewiktionary https://yue.wiktionary.org/wiki/%E7%B6%AD%E5%9F%BA%E8%BE%AD%E5%85%B8:%E9%A0%AD%E7%89%88 MediaWiki 1.39.0-wmf.25 case-sensitive 媒體 特別 傾偈 用戶 用戶傾偈 維基辭典 維基辭典傾偈 文件 文件傾偈 MediaWiki MediaWiki傾偈 模傾偈 幫手 幫手傾偈 分類 分類傾偈 索引 索引討論 附錄 附錄討論 重構 重構傾偈 TimedText TimedText talk 模組 模組討論 Gadget Gadget talk Gadget definition Gadget definition talk 模組:Yue-rom-test 828 9851 22610 2022-08-17T14:39:36Z Iceman1415 2601 開咗新版「local export = {} local replace = mw.ustring.gsub local match = mw.ustring.match -- jp = Jyutping -- nf = New-French Latinisation local cantonese_tone_values = { '55', '15', '33', '11', '13', '22' } local super_numbers = { '¹', '²', '³', '⁴', '⁵', '⁶' } -- local city_names = { '廣州', '香港', '佛山', '台山', '江門', '珠海', '韶關', '肇慶', '惠州龍門', '寶安', '東莞', '圍頭', '陽江', '茂名', '湛江市區', '雲浮', '梧州', '鬱...」 Scribunto text/plain local export = {} local replace = mw.ustring.gsub local match = mw.ustring.match -- jp = Jyutping -- nf = New-French Latinisation local cantonese_tone_values = { '55', '15', '33', '11', '13', '22' } local super_numbers = { '¹', '²', '³', '⁴', '⁵', '⁶' } -- local city_names = { '廣州', '香港', '佛山', '台山', '江門', '珠海', '韶關', '肇慶', '惠州龍門', '寶安', '東莞', '圍頭', '陽江', '茂名', '湛江市區', '雲浮', '梧州', '鬱林', '北海', '南寧', '貴港', '來賓', } function export.index_link(frame) local jp = type(frame) == 'table' and frame.args[1] or frame local nf = export.jp_to_nf(jp) -- create index links local jp_links = replace(jp, '([^1-6 ]+)([1-6]+)', '[[:Category:粵拼索引/%1|%1%2]]') local nf_links = replace(nf, '([^1-6 ]+)([1-6]+)', '[[:Category:新法蘭西索引/%1|%1%2]]') -- convert tone numbers to superscript jp_links = replace(jp_links, '[1-6]', super_numbers) nf_links = replace(nf_links, '[1-6]', super_numbers) -- create category text (capture the first alphabetical part of the romanization) local jp_cat = '[[Category:粵拼索引/' .. match(jp, '^[^1-6 ]+') ..']]' local nf_cat = '[[Category:新法蘭西索引/' .. match(nf, '^[^1-6 ]+') ..']]' local count = frame.args.count; local city_name = '香港' if frame.args.city ~= nil then city_name = frame.args.city end local text = [==[* ]==] .. city_name .. [==[音]==] .. count .. [==[: ** [[wikipedia:zh-yue:新法蘭西粵語拼音方案|新法蘭西]]:<span style="font-size:150%; font-weight:bold">]==] .. nf_links .. [==[</span> ** [[wikipedia:zh-yue:粵拼|粵拼]]:<span style="font-size:150%; font-weight:bold">]==] .. jp_links .. [==[</span>]==] return text .. jp_cat .. nf_cat end function export.jp_to_nf(frame) local text = type(frame) == 'table' and frame.args[1] or frame text = replace(text, 'z', 'dz') -- IPA: /ʦ/ text = replace(text, 'c', 'ts') -- IPA: /ʦʰ/ text = replace(text, 'j', 'y') text = replace(text, 'lh', 'ł') -- IPA: /ɬ/; exists in many Cantonese dialects, but not in the Canton/HK dialect. text = replace(text, '([gk])w', '%1u') text = replace(text, 'aa', '啊') -- IPA: /a/; avoid conversion to 'ää' text = replace(text, 'a', 'ä') -- IPA: /ɐ/ text = replace(text, '啊', 'a') text = replace(text, 'eoi', 'œ̈ü') -- IPA: /ɵy/ or /ɵi/ text = replace(text, 'eo', 'œ̈') -- IPA: /ɵ/ text = replace(text, 'oi', 'oü') text = replace(text, 'ik', 'ëk') text = replace(text, 'ing', 'ëng') -- IPA: /eŋ/ or /ɪŋ/ text = replace(text, 'ei', 'ëi') text = replace(text, 'yu', 'ü') text = replace(text, 'oe', 'œ') -- IPA: /œ/ text = replace(text, 'ou', 'öu') text = replace(text, 'ung', 'öng') text = replace(text, 'uk', 'ök') text = replace(text, '[1-6]', cantonese_tone_values) -- convert 1-6 to IPA tone numbers return text end return export 10gtfjpj5bf6s5ox5p48stvo2zosxl6 22613 22610 2022-08-17T14:44:25Z Iceman1415 2601 Scribunto text/plain local export = {} local replace = mw.ustring.gsub local match = mw.ustring.match -- jp = Jyutping -- nf = New-French Latinisation local cantonese_tone_values = { '55', '15', '33', '11', '13', '22' } local super_numbers = { '¹', '²', '³', '⁴', '⁵', '⁶' } -- local city_names = { '廣州', '香港', '佛山', '台山', '江門', '珠海', '韶關', '肇慶', '惠州龍門', '寶安', '東莞', '圍頭', '陽江', '茂名', '湛江市區', '雲浮', '梧州', '鬱林', '北海', '南寧', '貴港', '來賓', } function export.index_link(frame) local jp = type(frame) == 'table' and frame.args[1] or frame local nf = export.jp_to_nf(jp) -- create index links local jp_links = replace(jp, '([^1-6 ]+)([1-6]+)', '[[:Category:粵拼索引/%1|%1%2]]') local nf_links = replace(nf, '([^1-6 ]+)([1-6]+)', '[[:Category:新法蘭西索引/%1|%1%2]]') -- convert tone numbers to superscript jp_links = replace(jp_links, '[1-6]', super_numbers) nf_links = replace(nf_links, '[1-6]', super_numbers) -- create category text (capture the first alphabetical part of the romanization) local jp_cat = '[[Category:粵拼索引/' .. match(jp, '^[^1-6 ]+') ..']]' local nf_cat = '[[Category:新法蘭西索引/' .. match(nf, '^[^1-6 ]+') ..']]' local count = frame.args.count; local city_name = frame.args.city local text = [==[* ]==] .. city_name .. [==[音]==] .. count .. [==[: ** [[wikipedia:zh-yue:新法蘭西粵語拼音方案|新法蘭西]]:<span style="font-size:150%; font-weight:bold">]==] .. nf_links .. [==[</span> ** [[wikipedia:zh-yue:粵拼|粵拼]]:<span style="font-size:150%; font-weight:bold">]==] .. jp_links .. [==[</span>]==] return text .. jp_cat .. nf_cat end function export.jp_to_nf(frame) local text = type(frame) == 'table' and frame.args[1] or frame text = replace(text, 'z', 'dz') -- IPA: /ʦ/ text = replace(text, 'c', 'ts') -- IPA: /ʦʰ/ text = replace(text, 'j', 'y') text = replace(text, 'lh', 'ł') -- IPA: /ɬ/; exists in many Cantonese dialects, but not in the Canton/HK dialect. text = replace(text, '([gk])w', '%1u') text = replace(text, 'aa', '啊') -- IPA: /a/; avoid conversion to 'ää' text = replace(text, 'a', 'ä') -- IPA: /ɐ/ text = replace(text, '啊', 'a') text = replace(text, 'eoi', 'œ̈ü') -- IPA: /ɵy/ or /ɵi/ text = replace(text, 'eo', 'œ̈') -- IPA: /ɵ/ text = replace(text, 'oi', 'oü') text = replace(text, 'ik', 'ëk') text = replace(text, 'ing', 'ëng') -- IPA: /eŋ/ or /ɪŋ/ text = replace(text, 'ei', 'ëi') text = replace(text, 'yu', 'ü') text = replace(text, 'oe', 'œ') -- IPA: /œ/ text = replace(text, 'ou', 'öu') text = replace(text, 'ung', 'öng') text = replace(text, 'uk', 'ök') text = replace(text, '[1-6]', cantonese_tone_values) -- convert 1-6 to IPA tone numbers return text end return export 0cusneid83mib6s8uqc9gcx67lp2dmv 用戶:Iceman1415/Sandbox 2 9852 22611 2022-08-17T14:40:36Z Iceman1415 2601 開咗新版「{{Yue-rom-test|ou1 zeoi2}} {{Yue-rom-test|ou1 zeoi2|city=廣州}}」 wikitext text/x-wiki {{Yue-rom-test|ou1 zeoi2}} {{Yue-rom-test|ou1 zeoi2|city=廣州}} ir3g47w72ajwjh3sczs3xi1lpwxvp2r 模:Yue-rom-test 10 9853 22612 2022-08-17T14:43:21Z Iceman1415 2601 開咗新版「{{#invoke:Yue-rom-test|index_link|1={{{1<noinclude>|saam1 gau2 sei3 ling4 ng5 ji6</noinclude>}}}|count={{{count|}}}|city={{{city|}}}}}」 wikitext text/x-wiki {{#invoke:Yue-rom-test|index_link|1={{{1<noinclude>|saam1 gau2 sei3 ling4 ng5 ji6</noinclude>}}}|count={{{count|}}}|city={{{city|}}}}} 9b3jflp3alyd0vqj4eu109apxo2y5tm 22614 22612 2022-08-17T14:44:43Z Iceman1415 2601 wikitext text/x-wiki {{#invoke:Yue-rom-test|index_link|1={{{1<noinclude>|saam1 gau2 sei3 ling4 ng5 ji6</noinclude>}}}|count={{{count|}}}|city={{{city|香港}}}}} n3obyianqmktoesl1a3smdc6mhughwg