[Kimchi-devel] [PATCH] [Wok] Externlise the size units such as Ki, Mi, Gi, etc.
Pooja Kulkarni
pkulkark at linux.vnet.ibm.com
Tue May 31 09:00:25 UTC 2016
Hi Aline,
I do not have a good example for this, but I did come across something
while searching around.
French use Ko (kilo-octet) instead of Kb as a unit of size. So this
leads me to believe there could be other such scenarios while dealing
with different locales.
Thanks,
Pooja
On 05/30/2016 08:52 PM, Aline Manera wrote:
>
> Hi Pooja,
>
> Isn't KiB, MiB, GiB, ect international units for computing ?
> Do you have any example on which language they are 'translated' to a
> different unit name?
>
> Thanks,
> Aline Manera
>
> On 05/25/2016 06:55 AM, pkulkark at linux.vnet.ibm.com wrote:
>> From: Pooja Kulkarni <pkulkark at linux.vnet.ibm.com>
>>
>> This patch externalises the size
>> units such as KiB, MiB, GiB, etc
>> that are added in wok.formatMeasurement
>> method, and also updates the .pot
>> and *.po files.
>>
>> Signed-off-by: Pooja Kulkarni <pkulkark at linux.vnet.ibm.com>
>> ---
>> po/de_DE.po | 32 +++++++++++++++++++++++++++++++-
>> po/en_US.po | 32 +++++++++++++++++++++++++++++++-
>> po/es_ES.po | 32 +++++++++++++++++++++++++++++++-
>> po/fr_FR.po | 32 +++++++++++++++++++++++++++++++-
>> po/it_IT.po | 32 +++++++++++++++++++++++++++++++-
>> po/ja_JP.po | 32 +++++++++++++++++++++++++++++++-
>> po/ko_KR.po | 32 +++++++++++++++++++++++++++++++-
>> po/pt_BR.po | 32 +++++++++++++++++++++++++++++++-
>> po/ru_RU.po | 32 +++++++++++++++++++++++++++++++-
>> po/wok.pot | 32 +++++++++++++++++++++++++++++++-
>> po/zh_CN.po | 32 +++++++++++++++++++++++++++++++-
>> po/zh_TW.po | 32 +++++++++++++++++++++++++++++++-
>> ui/js/src/wok.utils.js | 7 ++++++-
>> ui/pages/i18n.json.tmpl | 13 ++++++++++++-
>> 14 files changed, 390 insertions(+), 14 deletions(-)
>>
>> diff --git a/po/de_DE.po b/po/de_DE.po
>> index 0fb869d..c2b9a0a 100644
>> --- a/po/de_DE.po
>> +++ b/po/de_DE.po
>> @@ -5,7 +5,7 @@ msgid ""
>> msgstr ""
>> "Project-Id-Version: kimchi 0.1\n"
>> "Report-Msgid-Bugs-To: \n"
>> -"POT-Creation-Date: 2016-05-19 21:30+0530\n"
>> +"POT-Creation-Date: 2016-05-25 15:08+0530\n"
>> "PO-Revision-Date: 2013-07-11 17:32-0400\n"
>> "Last-Translator: Crístian Viana <vianac at linux.vnet.ibm.com>\n"
>> "Language-Team: English\n"
>> @@ -201,6 +201,36 @@ msgstr ""
>> msgid "Actions"
>> msgstr ""
>>
>> +msgid "Ki"
>> +msgstr ""
>> +
>> +msgid "Mi"
>> +msgstr ""
>> +
>> +msgid "Gi"
>> +msgstr ""
>> +
>> +msgid "Ti"
>> +msgstr ""
>> +
>> +msgid "Pi"
>> +msgstr ""
>> +
>> +msgid "k"
>> +msgstr ""
>> +
>> +msgid "M"
>> +msgstr ""
>> +
>> +msgid "G"
>> +msgstr ""
>> +
>> +msgid "T"
>> +msgstr ""
>> +
>> +msgid "P"
>> +msgstr ""
>> +
>> msgid "The username or password you entered is incorrect. Please
>> try again."
>> msgstr ""
>> "Der Benutzername oder das Kennwort, den bzw. das Sie eingegeben
>> haben, ist "
>> diff --git a/po/en_US.po b/po/en_US.po
>> index 73d7056..b31785b 100644
>> --- a/po/en_US.po
>> +++ b/po/en_US.po
>> @@ -6,7 +6,7 @@ msgid ""
>> msgstr ""
>> "Project-Id-Version: kimchi 0.1\n"
>> "Report-Msgid-Bugs-To: \n"
>> -"POT-Creation-Date: 2016-05-19 21:30+0530\n"
>> +"POT-Creation-Date: 2016-05-25 15:08+0530\n"
>> "PO-Revision-Date: 2013-07-11 17:32-0400\n"
>> "Last-Translator: Crístian Viana <vianac at linux.vnet.ibm.com>\n"
>> "Language-Team: English\n"
>> @@ -195,6 +195,36 @@ msgstr ""
>> msgid "Actions"
>> msgstr ""
>>
>> +msgid "Ki"
>> +msgstr ""
>> +
>> +msgid "Mi"
>> +msgstr ""
>> +
>> +msgid "Gi"
>> +msgstr ""
>> +
>> +msgid "Ti"
>> +msgstr ""
>> +
>> +msgid "Pi"
>> +msgstr ""
>> +
>> +msgid "k"
>> +msgstr ""
>> +
>> +msgid "M"
>> +msgstr ""
>> +
>> +msgid "G"
>> +msgstr ""
>> +
>> +msgid "T"
>> +msgstr ""
>> +
>> +msgid "P"
>> +msgstr ""
>> +
>> msgid "The username or password you entered is incorrect. Please
>> try again."
>> msgstr ""
>>
>> diff --git a/po/es_ES.po b/po/es_ES.po
>> index 8acb513..d77c60e 100644
>> --- a/po/es_ES.po
>> +++ b/po/es_ES.po
>> @@ -5,7 +5,7 @@ msgid ""
>> msgstr ""
>> "Project-Id-Version: kimchi 0.1\n"
>> "Report-Msgid-Bugs-To: \n"
>> -"POT-Creation-Date: 2016-05-19 21:30+0530\n"
>> +"POT-Creation-Date: 2016-05-25 15:08+0530\n"
>> "PO-Revision-Date: 2013-07-11 17:32-0400\n"
>> "Last-Translator: Crístian Viana <vianac at linux.vnet.ibm.com>\n"
>> "Language-Team: English\n"
>> @@ -201,6 +201,36 @@ msgstr ""
>> msgid "Actions"
>> msgstr ""
>>
>> +msgid "Ki"
>> +msgstr ""
>> +
>> +msgid "Mi"
>> +msgstr ""
>> +
>> +msgid "Gi"
>> +msgstr ""
>> +
>> +msgid "Ti"
>> +msgstr ""
>> +
>> +msgid "Pi"
>> +msgstr ""
>> +
>> +msgid "k"
>> +msgstr ""
>> +
>> +msgid "M"
>> +msgstr ""
>> +
>> +msgid "G"
>> +msgstr ""
>> +
>> +msgid "T"
>> +msgstr ""
>> +
>> +msgid "P"
>> +msgstr ""
>> +
>> msgid "The username or password you entered is incorrect. Please
>> try again."
>> msgstr ""
>> "El nombre de usuario o contraseña que ha especificado es
>> incorrecto. Por "
>> diff --git a/po/fr_FR.po b/po/fr_FR.po
>> index 9cc473a..065113b 100644
>> --- a/po/fr_FR.po
>> +++ b/po/fr_FR.po
>> @@ -5,7 +5,7 @@ msgid ""
>> msgstr ""
>> "Project-Id-Version: kimchi 0.1\n"
>> "Report-Msgid-Bugs-To: \n"
>> -"POT-Creation-Date: 2016-05-19 21:30+0530\n"
>> +"POT-Creation-Date: 2016-05-25 15:08+0530\n"
>> "PO-Revision-Date: 2014-08-27 21:30+0000\n"
>> "Last-Translator: BobSynfig\n"
>> "Language-Team: French
>> (http://www.transifex.com/projects/p/kimchi/language/"
>> @@ -204,6 +204,36 @@ msgstr ""
>> msgid "Actions"
>> msgstr ""
>>
>> +msgid "Ki"
>> +msgstr ""
>> +
>> +msgid "Mi"
>> +msgstr ""
>> +
>> +msgid "Gi"
>> +msgstr ""
>> +
>> +msgid "Ti"
>> +msgstr ""
>> +
>> +msgid "Pi"
>> +msgstr ""
>> +
>> +msgid "k"
>> +msgstr ""
>> +
>> +msgid "M"
>> +msgstr ""
>> +
>> +msgid "G"
>> +msgstr ""
>> +
>> +msgid "T"
>> +msgstr ""
>> +
>> +msgid "P"
>> +msgstr ""
>> +
>> msgid "The username or password you entered is incorrect. Please
>> try again."
>> msgstr ""
>> "Le nom d'utilisateur ou le mot de passe que vous avez entré est
>> incorrect. "
>> diff --git a/po/it_IT.po b/po/it_IT.po
>> index ef3729d..d871172 100644
>> --- a/po/it_IT.po
>> +++ b/po/it_IT.po
>> @@ -5,7 +5,7 @@ msgid ""
>> msgstr ""
>> "Project-Id-Version: kimchi 0.1\n"
>> "Report-Msgid-Bugs-To: \n"
>> -"POT-Creation-Date: 2016-05-19 21:30+0530\n"
>> +"POT-Creation-Date: 2016-05-25 15:08+0530\n"
>> "PO-Revision-Date: 2013-07-11 17:32-0400\n"
>> "Last-Translator: Crístian Viana <vianac at linux.vnet.ibm.com>\n"
>> "Language-Team: English\n"
>> @@ -201,6 +201,36 @@ msgstr ""
>> msgid "Actions"
>> msgstr ""
>>
>> +msgid "Ki"
>> +msgstr ""
>> +
>> +msgid "Mi"
>> +msgstr ""
>> +
>> +msgid "Gi"
>> +msgstr ""
>> +
>> +msgid "Ti"
>> +msgstr ""
>> +
>> +msgid "Pi"
>> +msgstr ""
>> +
>> +msgid "k"
>> +msgstr ""
>> +
>> +msgid "M"
>> +msgstr ""
>> +
>> +msgid "G"
>> +msgstr ""
>> +
>> +msgid "T"
>> +msgstr ""
>> +
>> +msgid "P"
>> +msgstr ""
>> +
>> msgid "The username or password you entered is incorrect. Please
>> try again."
>> msgstr ""
>> "Il nome utente o la password immessi non sono corretti. Ripetere "
>> diff --git a/po/ja_JP.po b/po/ja_JP.po
>> index dc8926f..cde5d87 100644
>> --- a/po/ja_JP.po
>> +++ b/po/ja_JP.po
>> @@ -5,7 +5,7 @@ msgid ""
>> msgstr ""
>> "Project-Id-Version: kimchi 0.1\n"
>> "Report-Msgid-Bugs-To: \n"
>> -"POT-Creation-Date: 2016-05-19 21:30+0530\n"
>> +"POT-Creation-Date: 2016-05-25 15:08+0530\n"
>> "PO-Revision-Date: 2013-07-11 17:32-0400\n"
>> "Last-Translator: Crístian Viana <vianac at linux.vnet.ibm.com>\n"
>> "Language-Team: English\n"
>> @@ -199,6 +199,36 @@ msgstr ""
>> msgid "Actions"
>> msgstr ""
>>
>> +msgid "Ki"
>> +msgstr ""
>> +
>> +msgid "Mi"
>> +msgstr ""
>> +
>> +msgid "Gi"
>> +msgstr ""
>> +
>> +msgid "Ti"
>> +msgstr ""
>> +
>> +msgid "Pi"
>> +msgstr ""
>> +
>> +msgid "k"
>> +msgstr ""
>> +
>> +msgid "M"
>> +msgstr ""
>> +
>> +msgid "G"
>> +msgstr ""
>> +
>> +msgid "T"
>> +msgstr ""
>> +
>> +msgid "P"
>> +msgstr ""
>> +
>> msgid "The username or password you entered is incorrect. Please
>> try again."
>> msgstr "入力したユーザー名またはパスワードが誤っています。やり直し
>> てください。"
>>
>> diff --git a/po/ko_KR.po b/po/ko_KR.po
>> index 84b4750..2ef50fb 100644
>> --- a/po/ko_KR.po
>> +++ b/po/ko_KR.po
>> @@ -5,7 +5,7 @@ msgid ""
>> msgstr ""
>> "Project-Id-Version: kimchi 0.1\n"
>> "Report-Msgid-Bugs-To: \n"
>> -"POT-Creation-Date: 2016-05-19 21:30+0530\n"
>> +"POT-Creation-Date: 2016-05-25 15:08+0530\n"
>> "PO-Revision-Date: 2013-07-11 17:32-0400\n"
>> "Last-Translator: Crístian Viana <vianac at linux.vnet.ibm.com>\n"
>> "Language-Team: English\n"
>> @@ -196,6 +196,36 @@ msgstr ""
>> msgid "Actions"
>> msgstr ""
>>
>> +msgid "Ki"
>> +msgstr ""
>> +
>> +msgid "Mi"
>> +msgstr ""
>> +
>> +msgid "Gi"
>> +msgstr ""
>> +
>> +msgid "Ti"
>> +msgstr ""
>> +
>> +msgid "Pi"
>> +msgstr ""
>> +
>> +msgid "k"
>> +msgstr ""
>> +
>> +msgid "M"
>> +msgstr ""
>> +
>> +msgid "G"
>> +msgstr ""
>> +
>> +msgid "T"
>> +msgstr ""
>> +
>> +msgid "P"
>> +msgstr ""
>> +
>> msgid "The username or password you entered is incorrect. Please
>> try again."
>> msgstr ""
>> "입력한 사용자 이름 또는 비밀번호가 올바르지 않습니다. 다시 시도하
>> 십시오."
>> diff --git a/po/pt_BR.po b/po/pt_BR.po
>> index a4ae451..75a6c9b 100644
>> --- a/po/pt_BR.po
>> +++ b/po/pt_BR.po
>> @@ -20,7 +20,7 @@ msgid ""
>> msgstr ""
>> "Project-Id-Version: kimchi 1.0\n"
>> "Report-Msgid-Bugs-To: \n"
>> -"POT-Creation-Date: 2016-05-19 21:30+0530\n"
>> +"POT-Creation-Date: 2016-05-25 15:08+0530\n"
>> "PO-Revision-Date: 2015-03-23 12:57+0000\n"
>> "Last-Translator: Crístian Deives dos Santos Viana
>> <cristiandeives at gmail."
>> "com>\n"
>> @@ -217,6 +217,36 @@ msgstr ""
>> msgid "Actions"
>> msgstr ""
>>
>> +msgid "Ki"
>> +msgstr ""
>> +
>> +msgid "Mi"
>> +msgstr ""
>> +
>> +msgid "Gi"
>> +msgstr ""
>> +
>> +msgid "Ti"
>> +msgstr ""
>> +
>> +msgid "Pi"
>> +msgstr ""
>> +
>> +msgid "k"
>> +msgstr ""
>> +
>> +msgid "M"
>> +msgstr ""
>> +
>> +msgid "G"
>> +msgstr ""
>> +
>> +msgid "T"
>> +msgstr ""
>> +
>> +msgid "P"
>> +msgstr ""
>> +
>> msgid "The username or password you entered is incorrect. Please
>> try again."
>> msgstr ""
>> "O usuário ou senha inseridos estão incorretos. Por favor, tente
>> novamente."
>> diff --git a/po/ru_RU.po b/po/ru_RU.po
>> index 0e81ba4..392be6d 100644
>> --- a/po/ru_RU.po
>> +++ b/po/ru_RU.po
>> @@ -5,7 +5,7 @@ msgid ""
>> msgstr ""
>> "Project-Id-Version: kimchi 0.1\n"
>> "Report-Msgid-Bugs-To: \n"
>> -"POT-Creation-Date: 2016-05-19 21:30+0530\n"
>> +"POT-Creation-Date: 2016-05-25 15:08+0530\n"
>> "PO-Revision-Date: 2014-08-28 17:32+0000\n"
>> "Last-Translator: Aline Manera <aline.manera at gmail.com>\n"
>> "Language-Team: Russian
>> (http://www.transifex.com/projects/p/kimchi/language/"
>> @@ -197,6 +197,36 @@ msgstr ""
>> msgid "Actions"
>> msgstr ""
>>
>> +msgid "Ki"
>> +msgstr ""
>> +
>> +msgid "Mi"
>> +msgstr ""
>> +
>> +msgid "Gi"
>> +msgstr ""
>> +
>> +msgid "Ti"
>> +msgstr ""
>> +
>> +msgid "Pi"
>> +msgstr ""
>> +
>> +msgid "k"
>> +msgstr ""
>> +
>> +msgid "M"
>> +msgstr ""
>> +
>> +msgid "G"
>> +msgstr ""
>> +
>> +msgid "T"
>> +msgstr ""
>> +
>> +msgid "P"
>> +msgstr ""
>> +
>> msgid "The username or password you entered is incorrect. Please
>> try again."
>> msgstr "Указано неверное имя пользователя или пароль. Введите еще
>> раз."
>>
>> diff --git a/po/wok.pot b/po/wok.pot
>> index 01b8a28..231cd33 100755
>> --- a/po/wok.pot
>> +++ b/po/wok.pot
>> @@ -8,7 +8,7 @@ msgid ""
>> msgstr ""
>> "Project-Id-Version: PACKAGE VERSION\n"
>> "Report-Msgid-Bugs-To: \n"
>> -"POT-Creation-Date: 2016-05-19 21:30+0530\n"
>> +"POT-Creation-Date: 2016-05-25 15:08+0530\n"
>> "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
>> "Last-Translator: FULL NAME <EMAIL at ADDRESS>\n"
>> "Language-Team: LANGUAGE <LL at li.org>\n"
>> @@ -195,6 +195,36 @@ msgstr ""
>> msgid "Actions"
>> msgstr ""
>>
>> +msgid "Ki"
>> +msgstr ""
>> +
>> +msgid "Mi"
>> +msgstr ""
>> +
>> +msgid "Gi"
>> +msgstr ""
>> +
>> +msgid "Ti"
>> +msgstr ""
>> +
>> +msgid "Pi"
>> +msgstr ""
>> +
>> +msgid "k"
>> +msgstr ""
>> +
>> +msgid "M"
>> +msgstr ""
>> +
>> +msgid "G"
>> +msgstr ""
>> +
>> +msgid "T"
>> +msgstr ""
>> +
>> +msgid "P"
>> +msgstr ""
>> +
>> msgid "The username or password you entered is incorrect. Please
>> try again."
>> msgstr ""
>>
>> diff --git a/po/zh_CN.po b/po/zh_CN.po
>> index 0a66eec..5d81cc5 100644
>> --- a/po/zh_CN.po
>> +++ b/po/zh_CN.po
>> @@ -20,7 +20,7 @@ msgid ""
>> msgstr ""
>> "Project-Id-Version: kimchi 0.1\n"
>> "Report-Msgid-Bugs-To: \n"
>> -"POT-Creation-Date: 2016-05-19 21:30+0530\n"
>> +"POT-Creation-Date: 2016-05-25 15:08+0530\n"
>> "PO-Revision-Date: 2013-06-27 10:48+0000\n"
>> "Last-Translator: ShaoHe Feng <shaohef at linux.vnet.ibm.com>\n"
>> "Language-Team: ShaoHe Feng <shaohef at linux.vnet.ibm.com>\n"
>> @@ -212,6 +212,36 @@ msgstr ""
>> msgid "Actions"
>> msgstr ""
>>
>> +msgid "Ki"
>> +msgstr ""
>> +
>> +msgid "Mi"
>> +msgstr ""
>> +
>> +msgid "Gi"
>> +msgstr ""
>> +
>> +msgid "Ti"
>> +msgstr ""
>> +
>> +msgid "Pi"
>> +msgstr ""
>> +
>> +msgid "k"
>> +msgstr ""
>> +
>> +msgid "M"
>> +msgstr ""
>> +
>> +msgid "G"
>> +msgstr ""
>> +
>> +msgid "T"
>> +msgstr ""
>> +
>> +msgid "P"
>> +msgstr ""
>> +
>> msgid "The username or password you entered is incorrect. Please
>> try again."
>> msgstr "用户名或密码错误,请重新输入。"
>>
>> diff --git a/po/zh_TW.po b/po/zh_TW.po
>> index fd83384..ccd1d48 100644
>> --- a/po/zh_TW.po
>> +++ b/po/zh_TW.po
>> @@ -5,7 +5,7 @@ msgid ""
>> msgstr ""
>> "Project-Id-Version: kimchi 0.1\n"
>> "Report-Msgid-Bugs-To: \n"
>> -"POT-Creation-Date: 2016-05-19 21:30+0530\n"
>> +"POT-Creation-Date: 2016-05-25 15:08+0530\n"
>> "PO-Revision-Date: 2013-07-11 17:32-0400\n"
>> "Last-Translator: Crístian Viana <vianac at linux.vnet.ibm.com>\n"
>> "Language-Team: English\n"
>> @@ -196,6 +196,36 @@ msgstr ""
>> msgid "Actions"
>> msgstr ""
>>
>> +msgid "Ki"
>> +msgstr ""
>> +
>> +msgid "Mi"
>> +msgstr ""
>> +
>> +msgid "Gi"
>> +msgstr ""
>> +
>> +msgid "Ti"
>> +msgstr ""
>> +
>> +msgid "Pi"
>> +msgstr ""
>> +
>> +msgid "k"
>> +msgstr ""
>> +
>> +msgid "M"
>> +msgstr ""
>> +
>> +msgid "G"
>> +msgstr ""
>> +
>> +msgid "T"
>> +msgstr ""
>> +
>> +msgid "P"
>> +msgstr ""
>> +
>> msgid "The username or password you entered is incorrect. Please
>> try again."
>> msgstr "您輸入的使用者名稱或密碼不正確。請重試。"
>>
>> diff --git a/ui/js/src/wok.utils.js b/ui/js/src/wok.utils.js
>> index 1fb3c9b..8eb6f08 100644
>> --- a/ui/js/src/wok.utils.js
>> +++ b/ui/js/src/wok.utils.js
>> @@ -150,9 +150,14 @@ wok.changetoProperUnit = function(numOrg,
>> digits, base) {
>> var fixed = settings['fixed'];
>>
>> var unitMapping = unitBaseMapping[base];
>> + var unitmap = { 'Ki': 'WOKFMT2001M', 'Mi': 'WOKFMT2002M',
>> 'Gi': 'WOKFMT2003M',
>> + 'Ti': 'WOKFMT2004M', 'Pi': 'WOKFMT2005M',
>> 'k': 'WOKFMT2006M',
>> + 'M': 'WOKFMT2007M', 'G': 'WOKFMT2008M', 'T':
>> 'WOKFMT2009M',
>> + 'P': 'WOKFMT2010M'}
>> for(var i = unitMapping.length - 1; i >= 0; i--) {
>> var mapping = unitMapping[i];
>> - var suffix = mapping['us'];
>> + var s_key = mapping['us'];
>> + var suffix = i18n[unitmap[s_key]];
>> var startingValue = mapping['v'];
>> if(number < startingValue) {
>> continue;
>> diff --git a/ui/pages/i18n.json.tmpl b/ui/pages/i18n.json.tmpl
>> index ca7ae4c..94e90ac 100644
>> --- a/ui/pages/i18n.json.tmpl
>> +++ b/ui/pages/i18n.json.tmpl
>> @@ -49,5 +49,16 @@
>> "WOKSETT0009M": "$_("Showing {{ctx.start}} to {{ctx.end}} of
>> {{ctx.total}} entries")",
>> "WOKSETT0010M": "$_("No results found!")",
>> "WOKSETT0011M": "$_("Loading...")",
>> - "WOKSETT0012M": "$_("Actions")"
>> + "WOKSETT0012M": "$_("Actions")",
>> +
>> + "WOKFMT2001M": "$_("Ki")",
>> + "WOKFMT2002M": "$_("Mi")",
>> + "WOKFMT2003M": "$_("Gi")",
>> + "WOKFMT2004M": "$_("Ti")",
>> + "WOKFMT2005M": "$_("Pi")",
>> + "WOKFMT2006M": "$_("k")",
>> + "WOKFMT2007M": "$_("M")",
>> + "WOKFMT2008M": "$_("G")",
>> + "WOKFMT2009M": "$_("T")",
>> + "WOKFMT2010M": "$_("P")"
>> }
>
More information about the Kimchi-devel
mailing list