Module:Lang and Module:Lang/sandbox: Difference between pages

(Difference between pages)
Jump to navigation Jump to search
Page 1
Page 2
imported>Trappist the monk
+translation user styling;
 
imported>Trappist the monk
synch from live;
 
Line 1,283: Line 1,283:
table.insert (translation_t, "&thinsp;</small>"); -- close the <small> HTML tag
table.insert (translation_t, "&thinsp;</small>"); -- close the <small> HTML tag
end
end
table.insert (translation_t, table.concat ({ -- user styling spans match spand from {{gloss}}
table.insert (translation_t, table.concat ({'&#39;', args_t.translation, '&#39;'})); -- use HTML entities to avoid wiki markup confusion
'<span class="gloss-quot">\'</span>', -- user styling span for quote marks; use HTML entities to avoid wiki markup confusion
'<span class="gloss-text">', -- open user styling span for the translation
args_t.translation, -- the translation
'</span>', -- close user styling span for the translation
'<span class="gloss-quot">\'</span>' -- user styling span for quote marks
}));
return table.concat (translation_t); -- make a big string and done
return table.concat (translation_t); -- make a big string and done
end
end
Line 1,359: Line 1,353:


if args[text_idx] and args.text then
if args[text_idx] and args.text then
return make_error_msg (substitute (cfg.lang_t.conflict_n_param, {text_idx, cfg.lang_t.conflict_n_param_types.text}), args, template);
return make_error_msg (substitute (cfg.lang_t.conflict_n_param, {translit_idx, cfg.lang_t.conflict_n_param_types.text}), args, template);
else
else
args.text = args[text_idx] or args.text; -- prefer positional 'text' parameter
args.text = args[text_idx] or args.text; -- prefer positional 'text' parameter
Line 1,381: Line 1,375:


if args[xlate_idx] and (args.translation or args.lit) then
if args[xlate_idx] and (args.translation or args.lit) then
return make_error_msg (substitute (cfg.lang_xx_t.conflict_n_lit, {xlate_idx}), args, template);
return make_error_msg (substitute (cfg.lang_xx_t.conflict_n_lit, {translit_idx}), args, template);
elseif args.translation and args.lit then
elseif args.translation and args.lit then
return make_error_msg (cfg.lang_xx_t.conflict_lit, args, template);
return make_error_msg (cfg.lang_xx_t.conflict_lit, args, template);