[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-i18n-doc
Subject:    Re: Different formulas for plurals in Qt and KDE
From:       Chusslove Illich <caslav.ilic () gmx ! net>
Date:       2014-05-16 13:08:29
Message-ID: 201405161508.31796.caslav.ilic () gmx ! net
[Download RAW message or body]


> [: Alexander Potashev :]
> Or may be there are no languages that both use PO Summit and have
> different plural formulas for tr() and i18n(), and so there is no
> conversion to do by PO Summit?

Well there is at least sr and nds. I've now added a plural conversion hook,
to enable it one adds something like this to the language-specific summit
configuration file trunk/l10n-support/<lang>/summit/messages.extras.summit:

  from pology.resolve import convert_plurals
  from pology.proj.kde.cattype import is_qt_cat

  plmap_qt = [(0, 0), (1, 1), (2, 2)] # source->destination form mapping
  plhead_qt = "nplurals=3; plural=....." # destination plural header
  S.hook_on_scatter_cat.extend([
      (convert_plurals(plmap_qt, plhead_qt), "future", is_qt_cat),
  ])

In case of Serbian only the fourth form should be removed and the first
three forms retain same places, so the mapping is [(0, 0), (1, 1), (2, 2)]
as above.

I can add this myself for nds (and anyone else), I only need the plural
formula that Qt assumes.

-- 
Chusslove Illich (Часлав Илић)

["signature.asc" (application/pgp-signature)]

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic