Module:Colon: Difference between revisions
From Neodyland Wiki
More actions
←Created page with 'require('strict') local getArgs = require('Module:Arguments').getArgs local langSwitch = require('Module:LangSwitch')._langSwitch local p = {} function p._colon(args) end function p.colon(frame) return p._colon(getArgs(frame)) end return p' |
No edit summary |
||
| Line 7: | Line 7: | ||
function p._colon(args) | 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 colon_types = { | |||
-- 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'] = ':' | |||
} | |||
end | end | ||
Revision as of 22:12, 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 colon_types = {
-- 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'] = ':'
}
end
function p.colon(frame)
return p._colon(getArgs(frame))
end
return p