Module talk:Convert: Difference between revisions

Content deleted Content added
Line 135:
::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)
:::OK then. Saves testing all these variants. -[[User:DePiep|DePiep]] ([[User talk:DePiep|talk]]) 10:59, 21 September 2013 (UTC)
 
== Before going live ==