Module:Colon: Difference between revisions
From Neodyland Wiki
More actions
No edit summary |
No edit summary |
||
| Line 10: | Line 10: | ||
-- 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 | local colons = { | ||
-- Colon with Germanic spacing | -- Colon with Germanic spacing | ||
['ger'] = ': ', | ['ger'] = ': ', | ||
| Line 51: | Line 51: | ||
-- 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 = { | |||
['default'] = colons['ger'], | |||
['Zinh-Po-space'] = colons['ger'], | |||
['en'] = colons['ger'], | |||
['vls'] = colons['ger'], | |||
['nds'] = colons['ger'], | |||
['nds-nl'] = colons['ger'], | |||
['nl'] = colons['ger'], | |||
['li'] = colons['ger'], | |||
['lb'] = colons['ger'], | |||
['af'] = colons['ger'], | |||
['de'] = colons['ger'], | |||
['bar'] = colons['ger'], | |||
['pt'] = colons['ger'], | |||
['pt-br'] = colons['ger'], | |||
['ro'] = colons['ger'], | |||
['sl'] = colons['ger'], | |||
['sk'] = colons['ger'], | |||
['cs'] = colons['ger'], | |||
['hu'] = colons['ger'], | |||
['bs'] = colons['ger'], | |||
['hr'] = colons['ger'], | |||
['sr-Latn'] = colons['ger'], | |||
['sr-el'] = colons['ger'], | |||
['Cyrl'] = colons['ger'], | |||
['sr'] = colons['ger'], | |||
['sr-ec'] = colons['ger'], | |||
['bg'] = colons['ger'], | |||
['mk'] = colons['ger'], | |||
['be'] = colons['ger'], | |||
['be-tarask'] = colons['ger'], | |||
['ru'] = colons['ger'], | |||
['Grek'] = colons['ger'], | |||
['el'] = colons['ger'], | |||
['pnt'] = colons['ger'], | |||
['Zinh-nnbsp-Po-space'] = colons['rom'], | |||
['fr'] = colons['rom'], | |||
['fr-be'] = colons['rom'], | |||
['fr-ca'] = colons['rom'], | |||
['fr-ch'] = colons['rom'], | |||
['fr-lb'] = colons['rom'], | |||
['oc'] = colons['rom'], | |||
['ca'] = colons['rom'], | |||
['wa'] = colons['rom'], | |||
['br'] = colons['rom'], | |||
['gsw'] = colons['rom'], | |||
['la'] = colons['rom'], | |||
['it'] = colons['rom'], | |||
['co'] = colons['rom'], | |||
['eml'] = colons['rom'], | |||
['nap'] = colons['rom'], | |||
['rgn'] = colons['rom'], | |||
['scn'] = colons['rom'], | |||
['vec'] = colons['rom'], | |||
['es'] = colons['rom'], | |||
['gl'] = colons['rom'], | |||
['ext'] = colons['rom'], | |||
['rm'] = colons['rom'], | |||
['Zinh-nbsp-Po-space'] = colons['sp'], | |||
['Hebr'] = colons['sp'], | |||
['he'] = colons['sp'], | |||
['yi'] = colons['sp'], | |||
['ydd'] = colons['sp'], | |||
['Arab'] = colons['sp'], | |||
['ar'] = colons['sp'], | |||
['arz'] = colons['sp'], | |||
['fa'] = colons['sp'], | |||
['prd'] = colons['sp'], | |||
['glk'] = colons['sp'], | |||
['ps'] = colons['sp'], | |||
['ur'] = colons['sp'], | |||
['ug'] = colons['sp'], | |||
['Armn'] = colons['sp'], | |||
['hy'] = colons['sp'], | |||
['Beng'] = colons['sp'], | |||
['bn'] = colons['sp'], | |||
['Deva'] = colons['sp'], | |||
['hi'] = colons['sp'], | |||
['ne'] = colons['sp'], | |||
['Guru'] = colons['sp'], | |||
['pa'] = colons['sp'], | |||
['Gujr'] = colons['sp'], | |||
['gu'] = colons['sp'], | |||
['Orya'] = colons['sp'], | |||
['or'] = colons['sp'], | |||
['Taml'] = colons['sp'], | |||
['ta'] = colons['sp'], | |||
['Telu'] = colons['sp'], | |||
['te'] = colons['sp'], | |||
['Knda'] = colons['sp'], | |||
['kn'] = colons['sp'], | |||
['Mlym'] = colons['sp'], | |||
['ml'] = colons['sp'], | |||
['Sinh'] = colons['sp'], | |||
['si'] = colons['sp'], | |||
['Tibt'] = colons['sp'], | |||
['bo'] = colons['sp'], | |||
['Khmr'] = colons['sp'], | |||
['km'] = colons['sp'], | |||
['Tfng'] = colons['sp'], | |||
['ber'] = colons['sp'], | |||
['shy'] = colons['sp'], | |||
['tzm'] = colons['sp'], | |||
['Mymr'] = colons['my'], | |||
['my'] = colons['my'] | |||
} | } | ||
end | end | ||
Revision as of 22:16, 30 April 2023
This documentation is transcluded from Module:Colon/doc.
require('strict')
local getArgs = require('Module:Arguments').getArgs
local langSwitch = require('Module:LangSwitch')._langSwitch
local p = {}
function p._colon(args)
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.
local colons = {
-- Colon with Germanic spacing
['ger'] = ': ',
-- Colon with Romance spacing
['rom'] = ' : ',
--[=[ Colon with spacing avoiding confusion with:
several Arabic diacritics,
U+0589 Armenian punctuation Full stop,
U+05C3 Hebrew punctuation sign Sof Pasuk,
U+0983 Bengali combining sign Visarga,
U+0903 Devanagari combining sign Visarga,
U+0A03 Gurmukhi combining sign Visarga,
U+0A83 Gujarati combining sign Visarga,
U+0B03 Oryia combining sign Visarga,
U+0B83 Tamil combining sign Visarga,
Telugu combining sign Visarga,
Kannada combining sign Visarga,
U+0D03 Malayalam combining sign Visarga,
U+0D83 Sinhalese combining sign Visarga,
U+0F7F Tibetan combining sign Rnam Bcad (Nam Che),
U+17C7 / U+17C8 Khmer combining signs Reahmuk / Yukaleakpintu,
U+2D53 Tifinagh letter Yu (Touareg Yaw)
]=]
['sp'] = ' : ',
-- Myanmar: do not use the ASCII colon (too much confusable with a Myanmar letter in many fonts, notably at small sizes), use an en-dash instead
['my'] = ' – ',
-- Not any spacing
['no'] = ':',
-- Ethiopic punctuation sign colon
['eth'] = '፥ ',
-- Mongolian/Mandchu punctuation sign colon
['mong'] = '᠄',
-- CJK punctuation fullwidth colon (rotated if vertical layout) for Indo-Sinitic scripts used along with Chinese
['cjk'] = ':'
}
local text_args = {
['default'] = colons['ger'],
['Zinh-Po-space'] = colons['ger'],
['en'] = colons['ger'],
['vls'] = colons['ger'],
['nds'] = colons['ger'],
['nds-nl'] = colons['ger'],
['nl'] = colons['ger'],
['li'] = colons['ger'],
['lb'] = colons['ger'],
['af'] = colons['ger'],
['de'] = colons['ger'],
['bar'] = colons['ger'],
['pt'] = colons['ger'],
['pt-br'] = colons['ger'],
['ro'] = colons['ger'],
['sl'] = colons['ger'],
['sk'] = colons['ger'],
['cs'] = colons['ger'],
['hu'] = colons['ger'],
['bs'] = colons['ger'],
['hr'] = colons['ger'],
['sr-Latn'] = colons['ger'],
['sr-el'] = colons['ger'],
['Cyrl'] = colons['ger'],
['sr'] = colons['ger'],
['sr-ec'] = colons['ger'],
['bg'] = colons['ger'],
['mk'] = colons['ger'],
['be'] = colons['ger'],
['be-tarask'] = colons['ger'],
['ru'] = colons['ger'],
['Grek'] = colons['ger'],
['el'] = colons['ger'],
['pnt'] = colons['ger'],
['Zinh-nnbsp-Po-space'] = colons['rom'],
['fr'] = colons['rom'],
['fr-be'] = colons['rom'],
['fr-ca'] = colons['rom'],
['fr-ch'] = colons['rom'],
['fr-lb'] = colons['rom'],
['oc'] = colons['rom'],
['ca'] = colons['rom'],
['wa'] = colons['rom'],
['br'] = colons['rom'],
['gsw'] = colons['rom'],
['la'] = colons['rom'],
['it'] = colons['rom'],
['co'] = colons['rom'],
['eml'] = colons['rom'],
['nap'] = colons['rom'],
['rgn'] = colons['rom'],
['scn'] = colons['rom'],
['vec'] = colons['rom'],
['es'] = colons['rom'],
['gl'] = colons['rom'],
['ext'] = colons['rom'],
['rm'] = colons['rom'],
['Zinh-nbsp-Po-space'] = colons['sp'],
['Hebr'] = colons['sp'],
['he'] = colons['sp'],
['yi'] = colons['sp'],
['ydd'] = colons['sp'],
['Arab'] = colons['sp'],
['ar'] = colons['sp'],
['arz'] = colons['sp'],
['fa'] = colons['sp'],
['prd'] = colons['sp'],
['glk'] = colons['sp'],
['ps'] = colons['sp'],
['ur'] = colons['sp'],
['ug'] = colons['sp'],
['Armn'] = colons['sp'],
['hy'] = colons['sp'],
['Beng'] = colons['sp'],
['bn'] = colons['sp'],
['Deva'] = colons['sp'],
['hi'] = colons['sp'],
['ne'] = colons['sp'],
['Guru'] = colons['sp'],
['pa'] = colons['sp'],
['Gujr'] = colons['sp'],
['gu'] = colons['sp'],
['Orya'] = colons['sp'],
['or'] = colons['sp'],
['Taml'] = colons['sp'],
['ta'] = colons['sp'],
['Telu'] = colons['sp'],
['te'] = colons['sp'],
['Knda'] = colons['sp'],
['kn'] = colons['sp'],
['Mlym'] = colons['sp'],
['ml'] = colons['sp'],
['Sinh'] = colons['sp'],
['si'] = colons['sp'],
['Tibt'] = colons['sp'],
['bo'] = colons['sp'],
['Khmr'] = colons['sp'],
['km'] = colons['sp'],
['Tfng'] = colons['sp'],
['ber'] = colons['sp'],
['shy'] = colons['sp'],
['tzm'] = colons['sp'],
['Mymr'] = colons['my'],
['my'] = colons['my']
}
end
function p.colon(frame)
return p._colon(getArgs(frame))
end
return p