[Openstack-i18n] RFC: [Horizon translation] string "%(action)s %(data_type)s"

Akihiro Motoki amotoki at gmail.com
Mon Nov 18 22:50:28 UTC 2013

Hi Horizon translators,

I have a plan to make a small fix in Horizon strings in upstream code
and if possible backport to Havana.

Don't you have difficulties when translating a string "%(action)s
%(data_type)s" in Horizon?
It is used in two places:
-  to generate "action name" in the table (e.g. "Delete Network" in
the pull-down menu and "Confirm Delete Network")
- to generate "success message"  (e.g. "Deleted Network: net2" in a
success message pop-up)

In Japanese we would like to use different translated strings
for these strings (they are called "present" and "past" message respectively).
Otherwise we can't get natural strings in translations.

gettext has a mechanism called "message context", which allows us to
translate a same string in different contexts.
I have a plan to add a context to this string and allow us to use
different translated words for the string.

Once my fix is merged, we have the following entries in the PO file.
The entries will become fuzzy, but we can reuse the existing translations
so I believe the impact is small and we can get a benefit.

Before proposing a patch, I would like to know feedbacks from I18N community.

#: tables/actions.py:562
#, python-format
msgctxt "past"
msgid "%(action)s %(data_type)s"
msgstr ""

#: tables/actions.py:564
#, python-format
msgctxt "present"
msgid "%(action)s %(data_type)s"
msgstr ""

Akihiro Motoki <amotoki at gmail.com> / <motoki at da.jp.nec.com>

More information about the Openstack-i18n mailing list