Module:R from sort name: Difference between revisions

Content deleted Content added
categorise
use Module:Latin to remove accents
Line 9:
err_not_redirect = '[[Template:R from sort name]] error: page is not a redirect',
}
 
local remove_accents = require('Module:Latin').removeaccents
 
local category = function(category, chr)
return '[[' .. category .. ', ' .. remove_accents(chr) .. ']]'
end
 
local p = {}
Line 27 ⟶ 33:
return (
frame:expandTemplate{title = c.template_ambiguous} ..
'[[' .. category(c.cat_ambiguous_from .. ', ' .. char_from .. ']]') ..
'[[' .. category(c.cat_ambiguous_to .. ', ' .. char_to .. ']]')
)
else
return (
frame:expandTemplate{title = c.template_umambiguous} ..
'[[' .. category(c.cat_unambiguous_from .. ', ' .. char_from .. ']]') ..
'[[' .. category(c.cat_unambiguous_to .. ', ' .. char_to .. ']]')
)
end