[Kimchi-devel] [PATCH v2 1/2] UI changes to allow underscore in debug report name.
Christy Perez
christy at linux.vnet.ibm.com
Tue Jul 1 18:31:32 UTC 2014
New message on the debug report creation screen now says that
underscore ('_') characters are allowed, as well as
hyphens ('-').
Signed-off-by: Christy Perez <christy at linux.vnet.ibm.com>
---
po/en_US.po | 12 ++++++------
po/pt_BR.po | 13 ++++++-------
po/zh_CN.po | 12 ++++++------
src/kimchi/API.json | 2 +-
src/kimchi/i18n.py | 2 +-
ui/js/src/kimchi.report_add_main.js | 2 +-
ui/pages/i18n.json.tmpl | 2 +-
ui/pages/report-add.html.tmpl | 2 +-
8 files changed, 23 insertions(+), 24 deletions(-)
diff --git a/po/en_US.po b/po/en_US.po
index 7b66eb2..933d4eb 100644
--- a/po/en_US.po
+++ b/po/en_US.po
@@ -703,9 +703,9 @@ msgid "You should give a name for the debug file report."
msgstr "You should give a name for the debug file report."
msgid ""
-"Name should be a string. Only letters, digits and hyphen ('-') are allowed."
+"Name should be a string. Only letters, digits, underscore ('_') and hyphen ('-') are allowed."
msgstr ""
-"Name should be a string. Only letters, digits and hyphen ('-') are allowed."
+"Name should be a string. Only letters, digits, underscore ('_') and hyphen ('-') are allowed."
#, python-format
msgid ""
@@ -1317,8 +1317,8 @@ msgstr "Rename"
msgid "Download"
msgstr "Download"
-msgid "Report name should contain only letters, digits and/or hyphen ('-')."
-msgstr "Report name should contain only letters, digits and/or hyphen ('-')."
+msgid "Report name should contain only letters, digits, underscore ('_') and/or hyphen ('-')."
+msgstr "Report name should contain only letters, digits, underscore ('_') and/or hyphen ('-')."
msgid "Pending..."
msgstr "Pending..."
@@ -1503,10 +1503,10 @@ msgstr "Report Name"
msgid ""
"The name used to identify the report. If omitted, a name will be chosen "
-"based on current time. Name can contain: letters, digits and hyphen (\"-\")."
+"based on current time. Name can contain: letters, digits, underscore ('_') and hyphen (\"-\")."
msgstr ""
"The name used to identify the report. If omitted, a name will be chosen "
-"based on current time. Name can contain: letters, digits and hyphen (\"-\")."
+"based on current time. Name can contain: letters, digits, underscore ('_') and hyphen (\"-\")."
msgid "Add a Repository"
msgstr "Add a Repository"
diff --git a/po/pt_BR.po b/po/pt_BR.po
index b0884b4..adcfd11 100644
--- a/po/pt_BR.po
+++ b/po/pt_BR.po
@@ -748,10 +748,9 @@ msgid "You should give a name for the debug file report."
msgstr "Você deve dar um nome para o arquivo do relatório de debug."
msgid ""
-"Name should be a string. Only letters, digits and hyphen ('-') are allowed."
+"Name should be a string. Only letters, digits, underscore ('_') and hyphen ('-') are allowed."
msgstr ""
-"Nome deve ser uma string. Somente letras, digitos e hífem ('-') são "
-"permitidos."
+"Nome deve ser uma string. Somente letras, digitos, sublinhar ('_') e hífem ('-') são permitidos."
#, python-format
msgid ""
@@ -1382,8 +1381,8 @@ msgstr "Renomear"
msgid "Download"
msgstr "Baixar"
-msgid "Report name should contain only letters, digits and/or hyphen ('-')."
-msgstr "Nome do relatório deve apenas conter letras, números e/ou hífen ('-')."
+msgid "Report name should contain only letters, digits, underscore ('_') and/or hyphen ('-')."
+msgstr "Nome do relatório deve apenas conter letras, números, sublinhar ('_') e/ou hífen ('-')."
msgid "Pending..."
msgstr "Pendente..."
@@ -1568,10 +1567,10 @@ msgstr "Nome do Relatório"
msgid ""
"The name used to identify the report. If omitted, a name will be chosen "
-"based on current time. Name can contain: letters, digits and hyphen (\"-\")."
+"based on current time. Name can contain: letters, digits, underscore ('_') and hyphen (\"-\")."
msgstr ""
"Se o nome do relatório for omitido, será escolhido um nome baseado no "
-"horário atual. O nome pode conter: letras, números e hífen ('-')."
+"horário atual. O nome pode conter: letras, números, sublinhar ('_') e hífen ('-')."
msgid "Add a Repository"
msgstr "Adicionar um Repositório"
diff --git a/po/zh_CN.po b/po/zh_CN.po
index 272dd51..a3b5dcb 100644
--- a/po/zh_CN.po
+++ b/po/zh_CN.po
@@ -680,8 +680,8 @@ msgid "You should give a name for the debug file report."
msgstr "应该为诊断文件报告指定一个名字。"
msgid ""
-"Name should be a string. Only letters, digits and hyphen ('-') are allowed."
-msgstr "名字必须是一个字符串。只允许字母、数字和连字符 ('-')。"
+"Name should be a string. Only letters, digits, underscore ('_') and hyphen ('-') are allowed."
+msgstr "名字必须是一个字符串。只允许字母、下划线 ('_') 数字和连字符 ('-')。"
#, python-format
msgid ""
@@ -1270,8 +1270,8 @@ msgstr "重命名"
msgid "Download"
msgstr "下载"
-msgid "Report name should contain only letters, digits and/or hyphen ('-')."
-msgstr "报告名字中只能包含字母、数字或连字符(-)。"
+msgid "Report name should contain only letters, digits, underscore ('_') and/or hyphen ('-')."
+msgstr "报告名字中只能包含字母、下划线 ('_') 数字或连字符(-)。"
msgid "Pending..."
msgstr "正在加载..."
@@ -1441,10 +1441,10 @@ msgstr "诊断报告名"
msgid ""
"The name used to identify the report. If omitted, a name will be chosen "
-"based on current time. Name can contain: letters, digits and hyphen (\"-\")."
+"based on current time. Name can contain: letters, digits, underscore ('_') and hyphen (\"-\")."
msgstr ""
"名字用来标识诊断报告。如果省略,将会基于当前时间生成一个新名字。名字中可以包"
-"含字母、数字和连字符(-)"
+"含字母、下划线 ('_') 数字和连字符(-)"
msgid "Add a Repository"
msgstr "增加一个软件仓库"
diff --git a/src/kimchi/API.json b/src/kimchi/API.json
index 6d1324c..d635d2c 100644
--- a/src/kimchi/API.json
+++ b/src/kimchi/API.json
@@ -36,7 +36,7 @@
"name": {
"description": "The name for the debug report file.",
"type": "string",
- "pattern": "^[A-Za-z0-9-]*$",
+ "pattern": "^[_A-Za-z0-9-]*$",
"error": "KCHDR0007E"
}
}
diff --git a/src/kimchi/i18n.py b/src/kimchi/i18n.py
index 91684b6..0c76145 100644
--- a/src/kimchi/i18n.py
+++ b/src/kimchi/i18n.py
@@ -206,7 +206,7 @@
"KCHDR0004E": _("Can not find any generated debug report matching name %(name)s"),
"KCHDR0005E": _("Unable to generate debug report %(name)s. Details: %(err)s"),
"KCHDR0006E": _("You should give a name for the debug file report."),
- "KCHDR0007E": _("Name should be a string. Only letters, digits and hyphen ('-') are allowed."),
+ "KCHDR0007E": _("Name should be a string. Only letters, digits, underscore ('_') and hyphen ('-') are allowed."),
"KCHDR0008E": _("The debug report with specified name \"%(name)s\" already exists. Please use another one."),
"KCHSR0001E": _("Storage server %(server)s was not used by Kimchi"),
diff --git a/ui/js/src/kimchi.report_add_main.js b/ui/js/src/kimchi.report_add_main.js
index 43484f5..f64b879 100644
--- a/ui/js/src/kimchi.report_add_main.js
+++ b/ui/js/src/kimchi.report_add_main.js
@@ -41,7 +41,7 @@ kimchi.report_add_main = function() {
return false;
}
var reportName = nameTextbox.val();
- var validator = RegExp("^[A-Za-z0-9-]*$");
+ var validator = RegExp("^[_A-Za-z0-9-]*$");
if (!validator.test(reportName)) {
kimchi.message.error.code('KCHDR6011M');
return false;
diff --git a/ui/pages/i18n.json.tmpl b/ui/pages/i18n.json.tmpl
index d765cf2..c6f4e8c 100644
--- a/ui/pages/i18n.json.tmpl
+++ b/ui/pages/i18n.json.tmpl
@@ -113,7 +113,7 @@
"KCHDR6008M": "$_("Rename")",
"KCHDR6009M": "$_("Remove")",
"KCHDR6010M": "$_("Download")",
- "KCHDR6011M": "$_("Report name should contain only letters, digits and/or hyphen ('-').")",
+ "KCHDR6011M": "$_("Report name should contain only letters, digits, underscore ('_') and/or hyphen ('-').")",
"KCHDR6012M": "$_("Pending...")",
"KCHVM6001M": "$_("This will delete the virtual machine and its virtual disks. This operation cannot be undone. Would you like to continue?")",
diff --git a/ui/pages/report-add.html.tmpl b/ui/pages/report-add.html.tmpl
index b7209fe..74ef313 100644
--- a/ui/pages/report-add.html.tmpl
+++ b/ui/pages/report-add.html.tmpl
@@ -35,7 +35,7 @@
</h2>
<div class="field">
<span>
- $_("The name used to identify the report. If omitted, a name will be chosen based on current time. Name can contain: letters, digits and hyphen (\"-\").")
+ $_("The name used to identify the report. If omitted, a name will be chosen based on current time. Name can contain: letters, digits, underscore (\"_\") and hyphen (\"-\").")
</span>
<input type="text" class="text" id="report-name-textbox" name="name" />
</div>
--
1.9.3
More information about the Kimchi-devel
mailing list