Content deleted Content added
Line 25:
== Localisation ==
Hello, I would like to importo this module to it.wiki, but currently there are not localization options like for [[Module:Convert]]. I could try to move error message and some formatting options (like the decimal separator) to an external module ([[Module:Val/locale]]). Do you think this could be useful or they are reasons (performance
:Hi, we talked two years ago about convert. I never got around to providing l10n for val. I like simple stuff—see what I did to [[Module:Age]] on 31 March 2019. That was in response to a request I think at my talk which ended up at [[:bn:মডিউল আলাপ:বয়স|bnwiki]]. The point is that there is very little to localize and I don't really want an extra module to fuss with here. However, give it a go if you like. I'm not sure that "locale" is the right name. I temporarily forget what some modules use here, perhaps [[l10n]]? [[User:Johnuniq|Johnuniq]] ([[User talk:Johnuniq|talk]]) 09:37, 3 June 2019 (UTC)
::I just remembered a related issue for dewiki, see [[Template talk:Val/Archive 6#Comma as decimal separator]]. I found a local file on my computer where I apparently started work on localization but probably stopped when there was no feedback. I uploaded the file (patched with some recent changes to the main module) to the sandbox, see permalink at [[Special:PermanentLink/900088425|10:34, 3 June 2019]]. That is '''not tested'''. It was to handle numdot + numsep. Perhaps I abandoned it when I realized what a mess converting the wikitext would be. In the discussion at the archive link I pointed out that the example given used an en number for val's input (2.44) but they wanted a de number for the output (2,44). That would quickly cause immense confusion. [[User:Johnuniq|Johnuniq]] ([[User talk:Johnuniq|talk]]) 10:43, 3 June 2019 (UTC)
:::Hi, thankx. I will look into it. I prefer an external module because is simpler to keep files synced across different wiki, but moving all the messages and localisation options to the top of the file could be a also be a solution.--[[User:Moroboshi|Moroboshi]] ([[User talk:Moroboshi|talk]]) 10:54, 3 June 2019 (UTC)
:::::Hi. I read the discussion [[Template_talk:Val/Archive_6#Comma_as_decimal_separator]]. Currently on it.wiki numbers are formatted directly or indirectly using the [[Help:Magic_words|magic word]] <code>formatnum</code>, so the expected input is a number with dot (".") as decimal separator and no group separator. The outuput is a number with nobreaking space ("&amp;"") as group separator and comma (",") as decimal separator. For consistency with the convert module I would like that comma could also be used as decimal separator in alternative to dot.
:::::I have uploaded in the [[Module:Val/sandbox]] a test version with all the error messages listed in a table at the top of the file. It pass all test in [[Template talk:Val/testcases]] except for 27 cases, but the previous version in sandbox was failing them too. Ithaquabe the expected result should be corrected in the table of test ?
:::::I have also added a test on row 133-135 <code><nowiki>if numdot ~= '.' then arg = arg:gsub(numdot, '.') end</nowiki></code> to replace the locale numdot with "." if different from dot. --[[User:Moroboshi|Moroboshi]] ([[User talk:Moroboshi|talk]]) 11:40, 6 June 2019 (UTC)
|