I have added the first steps to get translation support into yum-utils.

Currently only the yum-plugin-aliases has been modified to support
translations, because it already has _() wrappers.

Added translation support to another tool or plugin is done by adding
*
from kitchen.i18n import easy_gettext_setup
_, P_  = easy_gettext_setup('yum-utils')

*In the start of the tool/plugin py file and wrap the text to be translatied
with _() or P_() (for plural)

I have used the i18n code from python-kitchen to not reinventing the wheel.

the translations is located in the main yum-utils package, so the following
line is needed in the %package -n yum-plugin-<name> section for a plugin
to support translation.

*Requires: yum-utils-translations = %{version}-%{release}*

Example:

*%package -n yum-plugin-aliases
Summary: Yum plugin to enable aliases filters
Group: System Environment/Base
Provides: yum-aliases = %{version}-%{release}
Obsoletes: yum-aliases < 1.1.20-0
Conflicts: yum-aliases < 1.1.20-0
# Requires args_hook
Requires: yum >= 3.2.23
Requires: yum-utils-translations = %{version}-%{release}
***
yum-utils-translations is provided by the yum-utils package, but can be
separated to separate package is needed.

Next steps is:
- Add translations to more utils/plugins
- Get yum-utils added to transiflex.

Tim
_______________________________________________
Yum-devel mailing list
Yum-devel@lists.baseurl.org
http://lists.baseurl.org/mailman/listinfo/yum-devel

Reply via email to