I just have added N_() and Nn_() gettext equivalents to the latest ruby-bindings
These functions take the same arguments as _() and n_() functions but do *not*
translate the strings, they return the original untranslated values.
The side effect is that these string are found by gettext when crating POT file
and so they can be translated by translators.
Of course, to make it fully usable you need to do translation later using _()
Some examples when this can be used:
- translating constants (see  for an example)
- for logging an untranslated text, but displaying translated text to the user:
# does not translate, the exception contains the untranslated string,
# but it's recognized by gettext like normal _()
raise FooError, N_("Foo failed.")
rescue FooError => e
# log the original (untranslated) error
# but display translated error to the user,
# _() does the actual translation
This approach can be used whenever you need both original and translated text.
Later we could use this to fix Report.Error() to log the untranslated text
instead of the translation.
Appliance department / YaST Developer
190 00 Prague 9 / Czech Republic
tel: +420 284 028 960
To unsubscribe, e-mail: yast-devel+unsubscribe(a)opensuse.org
To contact the owner, e-mail: yast-devel+owner(a)opensuse.org