[Wok][PATCH] Make tab name translatable and include ui/pages/tabs/* in POTFILES.in

From: Pooja Kulkarni <pkulkark@linux.vnet.ibm.com> This patch makes the tab name translatable and adds the path ui/pages/tabs/* in POTFILES.in Signed-off-by: Pooja Kulkarni <pkulkark@linux.vnet.ibm.com> --- po/POTFILES.in | 1 + ui/pages/i18n.json.tmpl | 1 + 2 files changed, 2 insertions(+) diff --git a/po/POTFILES.in b/po/POTFILES.in index aae0ca9..c0f0eb0 100644 --- a/po/POTFILES.in +++ b/po/POTFILES.in @@ -1,3 +1,4 @@ # List of source files which contain translatable strings. src/wok/i18n.py ui/pages/*.tmpl +ui/pages/tabs/*.tmpl diff --git a/ui/pages/i18n.json.tmpl b/ui/pages/i18n.json.tmpl index c3c5b69..240be65 100644 --- a/ui/pages/i18n.json.tmpl +++ b/ui/pages/i18n.json.tmpl @@ -24,6 +24,7 @@ #silent _ = t.gettext #silent _t = t.gettext { + "Settings": "$_("Settings")", "WOKAPI6007E": "$_("Can not contact the host system. Verify the host system is up and that you have network connectivity to it. HTTP request response %1. ")", "WOKAPI6003M": "$_("Cancel")", -- 2.1.0

On 05/09/2016 03:27 AM, pkulkark@linux.vnet.ibm.com wrote:
From: Pooja Kulkarni <pkulkark@linux.vnet.ibm.com>
This patch makes the tab name translatable and adds the path ui/pages/tabs/* in POTFILES.in
Signed-off-by: Pooja Kulkarni <pkulkark@linux.vnet.ibm.com> --- po/POTFILES.in | 1 + ui/pages/i18n.json.tmpl | 1 + 2 files changed, 2 insertions(+)
diff --git a/po/POTFILES.in b/po/POTFILES.in index aae0ca9..c0f0eb0 100644 --- a/po/POTFILES.in +++ b/po/POTFILES.in @@ -1,3 +1,4 @@ # List of source files which contain translatable strings. src/wok/i18n.py ui/pages/*.tmpl +ui/pages/tabs/*.tmpl
+1 for this change.
diff --git a/ui/pages/i18n.json.tmpl b/ui/pages/i18n.json.tmpl index c3c5b69..240be65 100644 --- a/ui/pages/i18n.json.tmpl +++ b/ui/pages/i18n.json.tmpl @@ -24,6 +24,7 @@ #silent _ = t.gettext #silent _t = t.gettext { + "Settings": "$_("Settings")",
About this change, I think we need to think more about how to translate tabs name which come from tab-ext.xml file. Thinking about the plugins, there is no way to include each plugin tab name to the Wok i18n.json.tmpl file. So we need to create a mechanism that will also work with plugins. I can't think in a suggestion right now. The best way would add translation support to tab-ext.xml file but I am not sure how we can do that.
"WOKAPI6007E": "$_("Can not contact the host system. Verify the host system is up and that you have network connectivity to it. HTTP request response %1. ")",
"WOKAPI6003M": "$_("Cancel")",

On 5/9/2016 8:21 PM, Aline Manera wrote:
On 05/09/2016 03:27 AM, pkulkark@linux.vnet.ibm.com wrote:
From: Pooja Kulkarni <pkulkark@linux.vnet.ibm.com>
This patch makes the tab name translatable and adds the path ui/pages/tabs/* in POTFILES.in
Signed-off-by: Pooja Kulkarni <pkulkark@linux.vnet.ibm.com> --- po/POTFILES.in | 1 + ui/pages/i18n.json.tmpl | 1 + 2 files changed, 2 insertions(+)
diff --git a/po/POTFILES.in b/po/POTFILES.in index aae0ca9..c0f0eb0 100644 --- a/po/POTFILES.in +++ b/po/POTFILES.in @@ -1,3 +1,4 @@ # List of source files which contain translatable strings. src/wok/i18n.py ui/pages/*.tmpl +ui/pages/tabs/*.tmpl
+1 for this change.
+1 from me too.
diff --git a/ui/pages/i18n.json.tmpl b/ui/pages/i18n.json.tmpl index c3c5b69..240be65 100644 --- a/ui/pages/i18n.json.tmpl +++ b/ui/pages/i18n.json.tmpl @@ -24,6 +24,7 @@ #silent _ = t.gettext #silent _t = t.gettext { + "Settings": "$_("Settings")",
About this change, I think we need to think more about how to translate tabs name which come from tab-ext.xml file. Thinking about the plugins, there is no way to include each plugin tab name to the Wok i18n.json.tmpl file. So we need to create a mechanism that will also work with plugins. I can't think in a suggestion right now. The best way would add translation support to tab-ext.xml file but I am not sure how we can do that.
The translation support is being taken care for tab-ext.xml when wok framework does the parsing of tab-ext.xml and if corresponding plugin/wok has the tab's name in its own i18n.json.tmpl like above. The ginger plugin already has its tabs name into its own i18n.json.tmpl file hence the translation happens for ginger tab's name. Having above entry in wok's i18n.json.tmpl for wok tab will does translate the wok tab name.
"WOKAPI6007E": "$_("Can not contact the host system. Verify the host system is up and that you have network connectivity to it. HTTP request response %1. ")",
"WOKAPI6003M": "$_("Cancel")",
_______________________________________________ Kimchi-devel mailing list Kimchi-devel@ovirt.org http://lists.ovirt.org/mailman/listinfo/kimchi-devel

On 05/10/2016 02:06 AM, Archana Singh wrote:
On 5/9/2016 8:21 PM, Aline Manera wrote:
On 05/09/2016 03:27 AM, pkulkark@linux.vnet.ibm.com wrote:
From: Pooja Kulkarni <pkulkark@linux.vnet.ibm.com>
This patch makes the tab name translatable and adds the path ui/pages/tabs/* in POTFILES.in
Signed-off-by: Pooja Kulkarni <pkulkark@linux.vnet.ibm.com> --- po/POTFILES.in | 1 + ui/pages/i18n.json.tmpl | 1 + 2 files changed, 2 insertions(+)
diff --git a/po/POTFILES.in b/po/POTFILES.in index aae0ca9..c0f0eb0 100644 --- a/po/POTFILES.in +++ b/po/POTFILES.in @@ -1,3 +1,4 @@ # List of source files which contain translatable strings. src/wok/i18n.py ui/pages/*.tmpl +ui/pages/tabs/*.tmpl
+1 for this change.
+1 from me too.
diff --git a/ui/pages/i18n.json.tmpl b/ui/pages/i18n.json.tmpl index c3c5b69..240be65 100644 --- a/ui/pages/i18n.json.tmpl +++ b/ui/pages/i18n.json.tmpl @@ -24,6 +24,7 @@ #silent _ = t.gettext #silent _t = t.gettext { + "Settings": "$_("Settings")",
About this change, I think we need to think more about how to translate tabs name which come from tab-ext.xml file. Thinking about the plugins, there is no way to include each plugin tab name to the Wok i18n.json.tmpl file. So we need to create a mechanism that will also work with plugins. I can't think in a suggestion right now. The best way would add translation support to tab-ext.xml file but I am not sure how we can do that.
The translation support is being taken care for tab-ext.xml when wok framework does the parsing of tab-ext.xml and if corresponding plugin/wok has the tab's name in its own i18n.json.tmpl like above. The ginger plugin already has its tabs name into its own i18n.json.tmpl file hence the translation happens for ginger tab's name. Having above entry in wok's i18n.json.tmpl for wok tab will does translate the wok tab name.
Thanks for explaining! I thought the plugins tabs were not being translated too.
"WOKAPI6007E": "$_("Can not contact the host system. Verify the host system is up and that you have network connectivity to it. HTTP request response %1. ")",
"WOKAPI6003M": "$_("Cancel")",
_______________________________________________ Kimchi-devel mailing list Kimchi-devel@ovirt.org http://lists.ovirt.org/mailman/listinfo/kimchi-devel
participants (3)
-
Aline Manera
-
Archana Singh
-
pkulkark@linux.vnet.ibm.com