Content deleted Content added
Line 31:
::::I had trouble with other approaches for <code>{{{link}}}</code> or <code>{{{text}}}</code>. Null string is actually different from no parameter defined. Users can set <nowiki>link=</nowiki> or <nowiki>text=</nowiki> to give specific instructions to the template (no link and same label as name of flag).
I think the only thing I moved out of order was the function default_size (and obviously check_translation that is new), i assigned the name flag_code to territory.args[1] because is used in different points of the script (but maybe the name could be more specific).
Regarding the use of parameter do you known that you can have a simpler template call like <code><nowikI>{{Invoke|Flags|flag}}</nowiki></code> and access the parameter in lua module using <code>territory:parent().args()</code> ? Is sufficient to add this code to the start of the function:
<syntaxhighlight lang="lua">
function p.flag(territory)
|