From: Markus K. <ma...@se...> - 2008-07-14 07:22:52
|
[A better fix, now for the user list too] On Montag, 14. Juli 2008, Temlakos wrote: > Gentlemen: > > Today I upgraded to SMW 1.2 on all the wikis that I administer. I have > one in English and seven second-language mirrors (in German, Spanish, > French, Hebrew, Korean, Polish, and Chinese). > > The French site came a cropper with the evaluation of numeric data > types. I had understood that in the French numbering system, a period > acts as a thousands separator, and a comma acts as a decimal separator. > > The French database now refuses to parse my annotated numbers containing > periods as thousands separators. When I remove the separators, SMW > parses them without a problem--but then in the Factbox I see an > /ampersand/ (&) as a thousands separator. > > The English separators (comma for thousands, period for decimal) still > work as well as ever. > > What file do I need to examine in order to correct this fault? > > Any assistance would be appreciated. The problem is that the French translation uses " " as a thousands separator, which is indeed suitable for French, and so should be kept in the translation. However, SMW does not support multi-letter separator strings, and the translation apparently was made by someone without testing it. The problem is in the PHP method for number formatting which can only use one symbol for each separator. I have implemented this differently in SMW/SVN now, so that the current SVN version can use multi-letter separators like . The current version also will generally accept spaces in numbers, since one would probably write "1 234" instead of "1 234" in the input. To update this on existing 1.2 sites, update from SVN now, or download and update the following files selectively: http://svn.wikimedia.org/svnroot/mediawiki/trunk/extensions/SemanticMediaWiki/includes/SMW_GlobalFunctions.php http://svn.wikimedia.org/svnroot/mediawiki/trunk/extensions/SemanticMediaWiki/includes/SMW_DV_Number.php Alternatively, you can edit the file languages/SMW_Messages.php to change the "smw_kiloseparator" around line 958 from " " to " ". Regards, Markus > > Temlakos > > PS: SMW_refreshData.php did not die with my upgrade--not when I followed > instructions to the letter. I did have to correct a problem with an > unbalanced parenthesis that I had not noticed in my SMW_DV_HxDate.php > file. No "killed" message, no "regex too long" message. > > Temlakos > > > ------------------------------------------------------------------------- > Sponsored by: SourceForge.net Community Choice Awards: VOTE NOW! > Studies have shown that voting for your favorite open source project, > along with a healthy diet, reduces your potential for chronic lameness > and boredom. Vote Now at http://www.sourceforge.net/community/cca08 > _______________________________________________ > Semediawiki-devel mailing list > Sem...@li... > https://lists.sourceforge.net/lists/listinfo/semediawiki-devel -- Markus Krötzsch Semantic MediaWiki http://semantic-mediawiki.org http://korrekt.org ma...@se... |