Mailinglist Archive: yast-commit (477 mails)

< Previous Next >
[yast-commit] r57542 - in /trunk/yast2: library/types/src/String.ycp package/yast2.changes yast2.spec.in
  • From: lslezak@xxxxxxxxxxxxxxxx
  • Date: Thu, 11 Jun 2009 16:48:30 -0000
  • Message-id: <E1MEnS2-0001fy-TP@xxxxxxxxxxxxxxxx>
Author: lslezak
Date: Thu Jun 11 18:48:30 2009
New Revision: 57542

URL: http://svn.opensuse.org/viewcvs/yast?rev=57542&view=rev
Log:
- use float::tolstring() function in String::FormatSize() and
String::FormatSizeWithPrecision() to use the current
locale decimal separator (bnc#372671)

Modified:
trunk/yast2/library/types/src/String.ycp
trunk/yast2/package/yast2.changes
trunk/yast2/yast2.spec.in

Modified: trunk/yast2/library/types/src/String.ycp
URL:
http://svn.opensuse.org/viewcvs/yast/trunk/yast2/library/types/src/String.ycp?rev=57542&r1=57541&r2=57542&view=diff
==============================================================================
--- trunk/yast2/library/types/src/String.ycp (original)
+++ trunk/yast2/library/types/src/String.ycp Thu Jun 11 18:48:30 2009
@@ -81,10 +81,13 @@
* Return a pretty description of a byte count with required precision
* and using B, kB, MB, GB or TB as unit as appropriate.
*
+ * Uses the current locale defined decimal separator
+ * (i.e. the result is language dependant).
+ *
* @param bytes size (e.g. free diskspace, memory size) in Bytes
* @param precision number of fraction digits in output
* @param omit_zeroes if true then do not add zeroes
- * (usefull for memory size - 128 MB RAM looks better than 128.00 MB RAM)
+ * (useful for memory size - 128 MB RAM looks better than 128.00 MB RAM)
* @return formatted string
*
* @example FormatSizeWithPrecision(128, 2, true) -> "128 B"
@@ -122,7 +125,7 @@
precision = 0;
}

- return tostring(whole, precision) + " " + units[index]:"";
+ return float::tolstring(whole, precision) + " " + units[index]:"";
}

/**
@@ -131,6 +134,9 @@
* Return a pretty description of a byte count, with two fraction digits
* and using B, kB, MB, GB or TB as unit as appropriate.
*
+ * Uses the current locale defined decimal separator
+ * (i.e. the result is language dependant).
+ *
* @param bytes size (e.g. free diskspace) in Bytes
* @return formatted string
*

Modified: trunk/yast2/package/yast2.changes
URL:
http://svn.opensuse.org/viewcvs/yast/trunk/yast2/package/yast2.changes?rev=57542&r1=57541&r2=57542&view=diff
==============================================================================
--- trunk/yast2/package/yast2.changes (original)
+++ trunk/yast2/package/yast2.changes Thu Jun 11 18:48:30 2009
@@ -1,4 +1,11 @@
-------------------------------------------------------------------
+Thu Jun 11 18:09:25 CEST 2009 - lslezak@xxxxxxx
+
+- use float::tolstring() function in String::FormatSize() and
+ String::FormatSizeWithPrecision() to use the current
+ locale decimal separator (bnc#372671)
+
+-------------------------------------------------------------------
Thu Jun 11 15:55:55 CEST 2009 - jsrain@xxxxxxx

- Getting hostname info from /etc/HOSTNAME only if the file exists.

Modified: trunk/yast2/yast2.spec.in
URL:
http://svn.opensuse.org/viewcvs/yast/trunk/yast2/yast2.spec.in?rev=57542&r1=57541&r2=57542&view=diff
==============================================================================
--- trunk/yast2/yast2.spec.in (original)
+++ trunk/yast2/yast2.spec.in Thu Jun 11 18:48:30 2009
@@ -5,13 +5,13 @@

BuildRequires: perl-XML-Writer update-desktop-files yast2-devtools
yast2-testsuite yast2-perl-bindings
# Needed already in build time
-BuildRequires: yast2-pkg-bindings >= 2.17.32 yast2-core >= 2.17.1
yast2-ycp-ui-bindings >= 2.18.4
+BuildRequires: yast2-pkg-bindings >= 2.17.32 yast2-core >= 2.18.12
yast2-ycp-ui-bindings >= 2.18.4

# pre-requires for filling the sysconfig template (sysconfig.yast2)
PreReq: %fillup_prereq

-# y2base foo -S (hello) UI, list:: namespace
-Requires: yast2-core >= 2.17.1
+# float::tolstring builtin
+Requires: yast2-core >= 2.18.12
# Mod_UI
# new UI::OpenContextMenu
Requires: yast2-ycp-ui-bindings >= 2.18.4

--
To unsubscribe, e-mail: yast-commit+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: yast-commit+help@xxxxxxxxxxxx

< Previous Next >
This Thread
  • No further messages