diff options
author | Martin Pitt <martin.pitt@ubuntu.com> | 2015-01-13 15:46:21 +0100 |
---|---|---|
committer | Martin Pitt <martin.pitt@ubuntu.com> | 2015-01-13 15:46:21 +0100 |
commit | bdec6a14c0d9805f84069c0d989feec2c751ec7c (patch) | |
tree | 1239bc229bd99b0bd2879fa42ef1e9052e5a9bba | |
parent | ae2a5ff1e49ae924605502ace170eb831e9c38e4 (diff) |
Make UdisksClient.get_size_for_display() units translatable
Apparently some languages transliterate storage units, so make them
translatable.
https://bugs.freedesktop.org/show_bug.cgi?id=86057
-rw-r--r-- | udisks/udisksclient.c | 24 |
1 files changed, 16 insertions, 8 deletions
diff --git a/udisks/udisksclient.c b/udisks/udisksclient.c index 0fe49c9..0507796 100644 --- a/udisks/udisksclient.c +++ b/udisks/udisksclient.c @@ -1611,22 +1611,26 @@ get_pow2_size (guint64 size) if (size < MEBIBYTE_FACTOR) { displayed_size = (double) size / KIBIBYTE_FACTOR; - unit = "KiB"; + /* Translators: SI prefix and standard unit symbol, translate cautiously (or not at all) */ + unit = C_("byte-size-pow2", "KiB"); } else if (size < GIBIBYTE_FACTOR) { displayed_size = (double) size / MEBIBYTE_FACTOR; - unit = "MiB"; + /* Translators: SI prefix and standard unit symbol, translate cautiously (or not at all) */ + unit = C_("byte-size-pow2", "MiB"); } else if (size < TEBIBYTE_FACTOR) { displayed_size = (double) size / GIBIBYTE_FACTOR; - unit = "GiB"; + /* Translators: SI prefix and standard unit symbol, translate cautiously (or not at all) */ + unit = C_("byte-size-pow2", "GiB"); } else { displayed_size = (double) size / TEBIBYTE_FACTOR; - unit = "TiB"; + /* Translators: SI prefix and standard unit symbol, translate cautiously (or not at all) */ + unit = C_("byte-size-pow2", "TiB"); } if (displayed_size < 10.0) @@ -1650,22 +1654,26 @@ get_pow10_size (guint64 size) if (size < MEGABYTE_FACTOR) { displayed_size = (double) size / KILOBYTE_FACTOR; - unit = "KB"; + /* Translators: SI prefix and standard unit symbol, translate cautiously (or not at all) */ + unit = C_("byte-size-pow10", "KB"); } else if (size < GIGABYTE_FACTOR) { displayed_size = (double) size / MEGABYTE_FACTOR; - unit = "MB"; + /* Translators: SI prefix and standard unit symbol, translate cautiously (or not at all) */ + unit = C_("byte-size-pow10", "MB"); } else if (size < TERABYTE_FACTOR) { displayed_size = (double) size / GIGABYTE_FACTOR; - unit = "GB"; + /* Translators: SI prefix and standard unit symbol, translate cautiously (or not at all) */ + unit = C_("byte-size-pow10", "GB"); } else { displayed_size = (double) size / TERABYTE_FACTOR; - unit = "TB"; + /* Translators: SI prefix and standard unit symbol, translate cautiously (or not at all) */ + unit = C_("byte-size-pow10", "TB"); } if (displayed_size < 10.0) |