Difference between revisions of "Module:Template translation"
m
no edit summary
>Verdy p m (fixed for now (the test for apostrophe is broken and commented out)) |
>Verdy p m |
||
Line 7: | Line 7: | ||
isKnownLanguageTag function. THIS TEST DOES NOT WORK | isKnownLanguageTag function. THIS TEST DOES NOT WORK | ||
]] | ]] | ||
if (string.find(subpage, "'", 1, true) == nil) | |||
then | |||
--[[If the subpage is a valid language code, check if a translation of the | --[[If the subpage is a valid language code, check if a translation of the | ||
template exists in that language; if so, put it in langcode. | template exists in that language; if so, put it in langcode. | ||
Line 16: | Line 16: | ||
return subpage | return subpage | ||
end | end | ||
end | |||
return '' | return '' | ||
end | end |