[Bug 475434] ngettext strings are not translated



If you have any questions why you received this email, please see the text at
the end of this email. Replies to this email are NOT read, please see the text
at the end of this email. You can add comments to this bug at:
  http://bugzilla.gnome.org/show_bug.cgi?id=475434

  sabayon | general | Ver: 2.19.x




------- Comment #1 from Theppitak Karoonboonyanan  2007-09-10 11:49 UTC -------
The test script:

---8<---
import gettext
import locale

locale.setlocale (locale.LC_ALL, "")
#gettext.bindtextdomain ("sabayon", "/home/gnomez/share/locale")
#gettext.textdomain ("sabayon")
#_ = gettext.gettext
gettext.install ("sabayon", "/home/gnomez/share/locale")
print _("Close _Without Saving")
print gettext.ngettext ("If you don't save, changes from the last %ld second "
                        "will be permanently lost.",
                         "If you don't save, changes from the last %ld seconds
"
                         "will be permanently lost.",
                        2) % 2
---8<---

(Replace "/home/gnomez" with your installation prefix.)

Under Thai locale, it prints:

  _ปิดโดยไม่บันทึก
  If you don't save, changes from the last 2 seconds will be permanently lost.

If I switch to bindtextdomain() and textdomain(), by uncommenting the 3 lines,
and commenting out the gettext.install line, the result becomes:

  _ปิดโดยไม่บันทึก
  ถ้าคุณไม่บันทึก
การแก้ไขทั้งหมดใน 2
วินาทีที่ผ่านมาจะสูญหายอย่างถาวร


-- 
See http://bugzilla.gnome.org/page.cgi?id=email.html for more info about why you received
this email, why you can't respond via email, how to stop receiving
emails (or reduce the number you receive), and how to contact someone
if you are having problems with the system.

You can add comments to this bug at http://bugzilla.gnome.org/show_bug.cgi?id=475434.


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]