Content deleted Content added
No edit summary |
No edit summary |
||
Line 25:
: Your approach in 2) is definitely smarter and I'm happy to take it after testing that there are no side effects (I don't see why there should be any).
: <code>if territory.args[2] ~= "{{{2}}}" then</code> is the way I found to check whether a parameter for variants i.e. "1945" has been defined, after [[mw:Extension_talk:Scribunto#x.27Equal.27_character_used_in_template_parameter_messes_things:_bug_or_feature.3F__28646|asking at mediawiki.org]]. Improvements welcome.
::Now I comprend you check for a parameter not definited. I think its cleaner to set the parameter to <code><nowiki>{{{2|}}}</nowiki></code> in the template and check for null string <code>""</code> in the module.--[[User:Moroboshi|Moroboshi]] ([[User talk:Moroboshi|talk]]) 18:01, 22 July 2013 (UTC)
:::The same for <code>{{{link}}}</code> or <code>{{{text}}}</code>, set them to <code><nowiki>{{{link|}}}</nowiki></code> or <code><nowiki>{{{text|}}}</nowiki></code> and check for null string in the module. I uploaded the modified flags to [[Module:Flags/Sandbox]] with some comments about my changes. Apparently it works with the example test in the doc.--[[User:Moroboshi|Moroboshi]] ([[User talk:Moroboshi|talk]]) 18:49, 22 July 2013 (UTC)
|