Module:CS1 translator/sandbox: Difference between revisions

Content deleted Content added
function _cite_fr: fix overwrite of page by appending hidden pages_totales if 'page' already exists.
function _cite_fr: redo pages_totales comment.
Line 1,018:
-- args_t['pages'] = nil; -- unset; alias of |pages totales=; no equivalent in cs1|2
-- end
local page = args_t['passage'] or '';
if args_t['pages totales'] then
page = page .. ' <!--pages totales=' .. args_t['pages totales'] .. '--> '; -- append as hidden comment to page
if page then
page = page .. ' <!--pages totales=' .. args_t['pages totales'] .. '--> ';
else
table.insert (cite_args_t, 'page=<!--pages totales=' .. args_t['pages totales'] .. '--> ');
end
args_t['pages totales'] = nil; -- unset as no longer needed
args_t['passage'] = nil; -- unset as no longer needed
table.insert (cite_args_t, 'page=<!--pages totales=' .. args_t['pages totales'] .. '--> 'page);
end