UFO: Alien Invasion Issue Tracker
UFO: Alien Invasion
Go to the previous open issue
Go to the previous issue (open or closed)
star_faded.png
Please log in to bookmark issues
icon_project.png UFO: Alien Invasion / Closed Bug report #457 plurals
Go to the next issue (open or closed)
Go to the next open issue
This issue has been closed with status "Closed" and resolution "Not determined".
Issue basics
  • Type of issue
    Bug report
  • Category
    General
  • Targetted for
    Not determined
  • Status
    Closed
  • Priority
    3. Normal
User pain
  • Type of bug
    Not triaged
  • Likelihood
    Not triaged
  • Effect
    Not triaged
Affected by this issue (0)
There are no items
People involved
Times and dates
  • Posted at
  • Last updated
  • Estimated time
    Not estimated
Issue details
  • Resolution
    Not determined
  • Reproducability
    Not determined
  • Severity
    Not determined
  • Complexity
    Not determined
  • Platform
    Not determined
  • Architecture
    Not determined
Attachments (0)
There is nothing attached to this issue
Duplicate issues (0)
This issue does not have any duplicates
Description
[http://sourceforge.net/p/ufoai/bugs/457 Item 457] imported from sourceforge.net tracker on 2013-01-28 18:21:29

English have only two forms e.g. day/days and it should be simply written as "day(s)". But some other languages (e.g. czech) got more forms which can't use this simple "workaround". Gettext has solution and it works (see patch) in english and czech too. PoEdit have support for this as well. It need some extra work and it will lead to some changed strigs but it should be done. I'm able to do it (I hope :) but need to know that my work won't be rejected by developers.
===== Comments Ported from Sourceforge =====

====== tlh2000 (2006-11-25 13:52:59) ======

Logged In: YES
user_id=116930
Originator: NO

no, it won't be rejected. please do it and submit a patch - for current trunk please
====== tlh2000 (2006-11-25 14:00:18) ======

Logged In: YES
user_id=116930
Originator: NO

it would be cool if you could add some notes about this to the translation wiki as well:
http://ufo.myexp.de/wiki/index.php/Translating

and please also update our coding guidelines with the needed changes:
http://ufo.myexp.de/wiki/index.php/Coding_guidelines
====== tritol (2006-12-02 09:56:16) ======

Logged In: YES
user_id=1020281
Originator: YES

Here is patch to add plurals handling. It should fix all occurences I found in .po file except "Paid %i credits to/for..." (monthly bill). It also fix base count in stats page (swaped items) and missing gettext in aircraft weapons and shields (not shown translated). Please do not run 'make update-po' on all .po files. This change need extra header to .po file and each translator should make it on his own.
I'll add some notes to wiki in few hours...
====== nobody (2006-12-02 14:04:22) ======

Logged In: NO

ok, i will commit your patch in a few minutes - thanks you very much

i've also added ngettext as a keyword for string parsing, can you tell me why we should not use update-po to update the po files?
====== tritol (2006-12-02 14:21:59) ======

Logged In: YES
user_id=1020281
Originator: YES

ngettext shouldn't be set for string parsing I think. It works without it well. Probably gettext can handle this function and texts in this function have no gettext prefix _(). update-po works but it generate different structures depending on "Plural-Forms:" header. Translators should set this header first and then run update-po. When all .po files will have this header update-po will be secure.
I also update http://ufo.myexp.de/wiki/index.php/Translating. Can someone check it? English is not my native language.
====== nobody (2006-12-02 14:44:41) ======

Logged In: NO

i added plural forms support to en.po and de.po already
====== tritol (2006-12-02 14:48:18) ======

Logged In: YES
user_id=1020281
Originator: YES

http://ufo.myexp.de/wiki/index.php/Coding/Guidelines updated, check it too please :)
====== tlh2000 (2006-12-02 14:56:48) ======

Logged In: YES
user_id=116930
Originator: NO

commited - thanks

i also removed the --keyword=ngettext:1,2 entry for xgettext - please report whether update-po is working after you have added your headers.
====== tritol (2006-12-02 15:31:08) ======

Logged In: YES
user_id=1020281
Originator: YES

It seems that update-po is working. All new ngettext strings was merged into .po files.
====== tlh2000 (2006-12-02 15:46:55) ======

Logged In: YES
user_id=116930
Originator: NO

commited - thanks

i also removed the --keyword=ngettext:1,2 entry for xgettext - please report whether update-po is working after you have added your headers.
====== tritol (2006-12-02 16:07:14) ======

Logged In: YES
user_id=1020281
Originator: YES

I have plural header already and it works. Your comment is the same. Is it on purpose or some mistake?
====== tlh2000 (2006-12-02 16:50:17) ======

Logged In: YES
user_id=116930
Originator: NO

sorry, was a mistake. you have write access to svn now - and should also be able to update tracker items
Steps to reproduce this issue
Nothing entered.
Todos (0 / 0)
Issue created
footer_logo.png The Bug Genie 4.3.1 | Support | Feedback spinning_16.gif