← Back to team overview

touch-packages team mailing list archive

[Bug 1184810] Re: [i18n] Plural form does not work as documented

 

** No longer affects: ubuntu-ui-toolkit

-- 
You received this bug notification because you are a member of Ubuntu
Touch seeded packages, which is subscribed to ubuntu-ui-toolkit in
Ubuntu.
https://bugs.launchpad.net/bugs/1184810

Title:
  [i18n] Plural form does not work as documented

Status in “ubuntu-ui-toolkit” package in Ubuntu:
  Confirmed

Bug description:
  In the i18n component documentation the plural form should be used as:

   * Translate the given input string \a singular or \a plural (depending on the number of items \a n)
   * using gettext. Should be called like this:
   *          tr("%n file", "%n files", count)

  But this does not work as expected:

  The result string from this expression is:  ("%n file" or "%n files"
  with the "%n" instead the value)

  checking at the unit2d code I saw that the tr function automatically
  replaces the %n with the count value, but I am not sure if this is the
  correct solution.

  For now I am using  "tr("%1 file", "%1 files", count).arg(count)"

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/ubuntu-ui-toolkit/+bug/1184810/+subscriptions