Module:Colon: Difference between revisions
From Neodyland Wiki
More actions
No edit summary |
m 20 revisions imported |
||
| (15 intermediate revisions by 5 users not shown) | |||
| Line 9: | Line 9: | ||
local lang = args.lang or mw.getCurrentFrame():preprocess("{{Int:Lang}}") | local lang = args.lang or mw.getCurrentFrame():preprocess("{{Int:Lang}}") | ||
-- Please keep the ASCII colon returned as HTML-encoded everywhere, as it MUST NOT be parsed as wiki markup | -- Please keep the ASCII colon returned as HTML-encoded everywhere, as it MUST NOT be parsed as wiki markup | ||
local colons = { | local colons = { | ||
-- Colon with | -- Colon with no space before and space after | ||
-- ": "" | |||
['ger'] = ': ', | ['ger'] = ': ', | ||
-- Colon with | -- Colon with narrow space before and space after | ||
[' | -- " : " | ||
['fr'] = ' : ', | |||
--[=[ Colon with | --[=[ Colon with non-breaking space before and space after, avoiding confusion with: | ||
several Arabic diacritics, | several Arabic diacritics, | ||
U+0589 Armenian punctuation Full stop, | U+0589 Armenian punctuation Full stop, | ||
| Line 35: | Line 37: | ||
U+2D53 Tifinagh letter Yu (Touareg Yaw) | U+2D53 Tifinagh letter Yu (Touareg Yaw) | ||
]=] | ]=] | ||
-- " : " | |||
['sp'] = ' : ', | ['sp'] = ' : ', | ||
-- Myanmar: do not use the ASCII colon (too | --[=[ Myanmar: | ||
do not use the ASCII colon | |||
(too confusable with a Myanmar letter in many fonts, notably at small sizes); | |||
use an en-dash instead | |||
]=] | |||
-- " – " | |||
['my'] = ' – ', | ['my'] = ' – ', | ||
-- | -- No spacing | ||
-- ":" | |||
['no'] = ':', | ['no'] = ':', | ||
-- Ethiopic punctuation sign colon | -- Ethiopic punctuation sign colon | ||
-- "፥ " | |||
['eth'] = '፥ ', | ['eth'] = '፥ ', | ||
-- Mongolian/Mandchu punctuation sign colon | -- Mongolian/Mandchu punctuation sign colon | ||
-- "᠄" | |||
['mong'] = '᠄', | ['mong'] = '᠄', | ||
-- CJK punctuation fullwidth colon (rotated if vertical layout) for Indo-Sinitic scripts used along with Chinese | --[=[ CJK punctuation fullwidth colon | ||
(rotated if vertical layout) | |||
for Indo-Sinitic scripts used along with Chinese | |||
]=] | |||
-- ":" | |||
['cjk'] = ':' | ['cjk'] = ':' | ||
} | } | ||
local text_args = { | local text_args = { | ||
['default'] = colons['ger'], | ['default'] = colons['ger'], | ||
[' | ['af'] = colons['ger'], | ||
[' | ['am'] = colons['eth'], | ||
[' | ['ar'] = colons['sp'], | ||
[' | ['Arab'] = colons['sp'], | ||
[' | ['Armn'] = colons['sp'], | ||
[' | ['arz'] = colons['sp'], | ||
[' | ['bar'] = colons['ger'], | ||
[' | ['be-tarask'] = colons['ger'], | ||
[' | ['be'] = colons['ger'], | ||
[' | ['Beng'] = colons['sp'], | ||
[' | ['ber'] = colons['sp'], | ||
[' | ['bg'] = colons['ger'], | ||
[' | ['bn'] = colons['sp'], | ||
[' | ['bo'] = colons['sp'], | ||
[' | ['Bpmf'] = colons['cjk'], | ||
[' | ['br'] = colons['fr'], | ||
[' | ['bs'] = colons['ger'], | ||
[' | ['ca'] = colons['ger'], | ||
[' | ['co'] = colons['ger'], | ||
[' | ['cs'] = colons['ger'], | ||
[' | ['Cyrl'] = colons['ger'], | ||
[' | ['de'] = colons['ger'], | ||
[' | ['Deva'] = colons['sp'], | ||
[' | ['el'] = colons['ger'], | ||
[' | ['eml'] = colons['ger'], | ||
[' | ['en'] = colons['ger'], | ||
[' | ['es'] = colons['ger'], | ||
[' | ['Ethi'] = colons['eth'], | ||
[' | ['ext'] = colons['ger'], | ||
[' | ['fa'] = colons['sp'], | ||
[' | ['fr-be'] = colons['fr'], | ||
[' | ['fr-ca'] = colons['fr'], | ||
[' | ['fr-ch'] = colons['fr'], | ||
['fr-lb'] = colons['fr'], | |||
[' | ['fr'] = colons['fr'], | ||
['fr'] = colons[' | ['gl'] = colons['ger'], | ||
[' | ['glk'] = colons['sp'], | ||
[' | ['Grek'] = colons['ger'], | ||
[' | ['gsw'] = colons['gsw'], | ||
[' | ['gu'] = colons['sp'], | ||
[' | ['Gujr'] = colons['sp'], | ||
[' | ['Guru'] = colons['sp'], | ||
[' | ['Hang'] = colons['cjk'], | ||
[' | ['Hani'] = colons['cjk'], | ||
[' | ['Hans'] = colons['cjk'], | ||
[' | ['Hant'] = colons['cjk'], | ||
[' | ['he'] = colons['sp'], | ||
[' | ['Hebr'] = colons['sp'], | ||
[' | ['hi'] = colons['sp'], | ||
[' | ['hr'] = colons['ger'], | ||
[' | ['hu'] = colons['ger'], | ||
[' | ['hy'] = colons['sp'], | ||
[' | ['ii'] = colons['cjk'], | ||
[' | ['it'] = colons['ger'], | ||
[' | ['ja'] = colons['cjk'], | ||
[' | ['Jpan'] = colons['cjk'], | ||
[' | ['Khmr'] = colons['sp'], | ||
['km'] = colons['sp'], | |||
[' | ['kn'] = colons['sp'], | ||
[' | ['Knda'] = colons['sp'], | ||
[' | ['ko-kp'] = colons['ger'], | ||
[' | ['ko'] = colons['ger'], | ||
[' | ['la'] = colons['ger'], | ||
[' | ['lb'] = colons['ger'], | ||
[' | ['li'] = colons['ger'], | ||
[' | ['lzh'] = colons['cjk'], | ||
[' | ['mk'] = colons['ger'], | ||
[' | ['ml'] = colons['sp'], | ||
[' | ['Mlym'] = colons['sp'], | ||
[' | ['mn-Mong'] = colons['mong'], | ||
[' | ['Mong'] = colons['mong'], | ||
[' | ['my'] = colons['my'], | ||
[' | ['Mymr'] = colons['my'], | ||
[' | ['nap'] = colons['ger'], | ||
[' | ['nds-nl'] = colons['ger'], | ||
[' | ['nds'] = colons['ger'], | ||
[' | ['ne'] = colons['sp'], | ||
[' | ['nl'] = colons['ger'], | ||
['ne'] = colons['sp'], | ['oc'] = colons['fr'], | ||
[' | ['or'] = colons['sp'], | ||
[' | ['Orya'] = colons['sp'], | ||
[' | ['pa'] = colons['sp'], | ||
[' | ['Phpa'] = colons['cjk'], | ||
[' | ['pnt'] = colons['ger'], | ||
[' | ['prd'] = colons['sp'], | ||
[' | ['ps'] = colons['sp'], | ||
[' | ['pt-br'] = colons['ger'], | ||
[' | ['pt'] = colons['ger'], | ||
[' | ['rgn'] = colons['ger'], | ||
[' | ['rm'] = colons['ger'], | ||
[' | ['ro'] = colons['ger'], | ||
[' | ['ru'] = colons['ger'], | ||
[' | ['scn'] = colons['ger'], | ||
[' | ['shy'] = colons['sp'], | ||
[' | ['si'] = colons['sp'], | ||
[' | ['Sinh'] = colons['sp'], | ||
[' | ['sk'] = colons['ger'], | ||
[' | ['sl'] = colons['ger'], | ||
[' | ['sr-ec'] = colons['ger'], | ||
[' | ['sr-el'] = colons['ger'], | ||
[' | ['sr-Latn'] = colons['ger'], | ||
[' | ['sr'] = colons['ger'], | ||
[' | ['ta'] = colons['sp'], | ||
['Tale'] = colons['cjk'], | |||
[' | ['Talu'] = colons['cjk'], | ||
[' | ['Taml'] = colons['sp'], | ||
['te'] = colons['sp'], | |||
[' | ['Telu'] = colons['sp'], | ||
[' | ['Tfng'] = colons['sp'], | ||
[' | ['th'] = colons['no'], | ||
['Thai'] = colons['no'], | |||
[' | ['ti'] = colons['eth'], | ||
[' | ['Tibt'] = colons['sp'], | ||
[' | ['tzm'] = colons['sp'], | ||
['ug'] = colons['sp'], | |||
[' | ['ur'] = colons['sp'], | ||
[' | ['vec'] = colons['ger'], | ||
['vls'] = colons['ger'], | |||
[' | ['wa'] = colons['fr'], | ||
[' | ['wuu'] = colons['cjk'], | ||
[' | ['ydd'] = colons['sp'], | ||
[' | ['yi'] = colons['sp'], | ||
[' | ['Yiii'] = colons['cjk'], | ||
[' | ['yue'] = colons['cjk'], | ||
[' | ['zh-Hans'] = colons['cjk'], | ||
[' | ['zh-Hant'] = colons['cjk'], | ||
[' | ['zh'] = colons['cjk'], | ||
[' | ['Zinh-nbsp-Po-space'] = colons['sp'], | ||
[' | ['Zinh-nnbsp-Po-space'] = colons['fr'], | ||
[' | ['Zinh-Po-space'] = colons['ger'], | ||
[' | ['Zinh-Po'] = colons['no'] | ||
['zh- | |||
[' | |||
[' | |||
[' | |||
[' | |||
[' | |||
[' | |||
} | } | ||
langSwitch(text_args, lang) | return langSwitch(text_args, lang) | ||
end | end | ||