Difference between revisions of "Module:Template translation"
m
no edit summary
>Verdy p m |
>Verdy p m |
||
Line 4: | Line 4: | ||
-- Get the last subpage (this function isolated for debugging purpose) | -- Get the last subpage (this function isolated for debugging purpose) | ||
local subpage = mw.title.getCurrentTitle().subpageText | local subpage = mw.title.getCurrentTitle().subpageText | ||
--[[Check first if there's an apostrophe, because they break the | --[[Check first if there's an apostrophe, because they break the isKnownLanguageTag | ||
function. This test does not work with regexps, use plain search instead (no need | |||
to use Unicode parser, apostrophes can only appear isolated as one byte in UTF-8). | |||
]] | ]] | ||
if (string.find(subpage, "'", 1, true) == nil) | if (string.find(subpage, "'", 1, true) == nil) |