Content deleted Content added
→parameter warnings=true: bug fixed |
→boolean: have trimmed boolean |
||
Line 133:
:Option value should be "on" just as other such params have. No need to introduce "yes", "y", "1" as option value. -[[User:DePiep|DePiep]] ([[User talk:DePiep|talk]]) 14:24, 20 September 2013 (UTC)
::It's true that my boolean function is self-indulgent as I have had to implement similar stuff on different systems where all the possible "true" values are required, however, it's perfectly valid Lua. The parameter is called "text" because it can only be a string, not numeric (it's not intended to be used from other modules where arbitrary parameters could be passed). Also, it's conventional Lua to not return anything for false, although I do feel unclean after doing that, and my more recent functions have tended to always return a value. I'll try to look around some other templates/modules to gauge what boolean option values are generally used, but we're talking about a pretty minor issue that isn't even used currently. One issue about only regarding "on" as true is error reporting—should the module report an error if the invoking template contains "warnings = yes"? [[User:Johnuniq|Johnuniq]] ([[User talk:Johnuniq|talk]]) 00:16, 21 September 2013 (UTC)
::I trimmed the boolean function so it accepts only "on" and "yes". [[User:Johnuniq|Johnuniq]] ([[User talk:Johnuniq|talk]]) 10:11, 21 September 2013 (UTC)
== Before going live ==
|