Page 1 of 2

Plural form support for translations

Posted: Mon Nov 02, 2015 12:53 pm
by GunChleoc
Dear devs,

Since you're not using gettext, this request might be some work to implement.

What I would like to see as a translator is support for plural form patterns. for example, "little cats" in my language work like this:

0 cat beag
1, 11 chat beag
2, 12 chat bheag
3-10, 13-19 cait beaga
20 cat beag ...

One of the strings that would benefit is:

Code: Select all

Buy {amount} units for {price}
Key: MARKET_BUYLINE
Resource: UI Core

Thanks for listening :)

Re: Plural form support for translations

Posted: Thu Nov 05, 2015 10:50 pm
by impaktor
Hi!

Translations can be very tricky and in your case even worse if it is not just plural vs. singular, but moving from 11 to 12 or 13-19, that needs to be in the code to select different strings, which would be the same for many other languages, or different if it's 1 or more than 1, for instance. I just don't see any solution to this, but that doesn't mean there isn't any.

Usually, the translators work around these problems, or just use the "least wrong" sounding version.

Thanks for translating!

Re: Plural form support for translations

Posted: Sun Nov 08, 2015 7:01 pm
by GunChleoc
You would definitely something flexible and rule-based. Gettext is the usual solution, but of course changing your entire translation system would be a lot of work as well. Using Transifex already helps with having a workable translator's tool :)

I have a question concerning 2 strings in the Core resource:

Code: Select all

Fire laser
Key: FIRE_LASER

Is "fire" a noun or a verb?

Same for:

Code: Select all

Kill rotation
Key: HEADING_LOCK_KILLROT

Is "kill" a noun or a verb?

Re: Plural form support for translations

Posted: Sun Nov 08, 2015 7:06 pm
by bszlrd
Fire laser: "to fire or shoot the the laser", verb.

Kill rot: "to kill or stop the rotation", verb too.
I thought I provide the context too.

Re: Plural form support for translations

Posted: Sun Nov 08, 2015 8:01 pm
by GunChleoc
Thanks!

I can't currently run Pioneer at all due to an Opengl error - I have the same problem with SuperTuxKart, so it must be my graphics driver causing the problem. So, I'll keep pestering you with questions *lol

So, here's 2 more:
  1. Can your fontset handle Tironian et ⟨⁊⟩, Unicode point U+204A?
  2. Module CrewContracts: "Time served crew member" - I guess this means somebody with medium-level experience looking for work?
ETA: found a source string bug:

Code: Select all

That package isn't going to reach it's destination today.
it's -> its.

Key: PIRATE_TAUNTS_7
Module: DeliverPackage

Re: Plural form support for translations

Posted: Mon Nov 09, 2015 11:41 am
by impaktor
it's -> its.
Noted, have a fix in a pull request now.
https://github.com/pioneerspacesim/pioneer/pull/3382
"Time served crew member" - I guess this means somebody with medium-level experience looking for work?
Yes, not a "veteran", but intermediate, regarding showing candidate details when interviewing for a position.

Re: Plural form support for translations

Posted: Mon Nov 09, 2015 12:41 pm
by GunChleoc
Thanks!

I have 2 more, both for Module: DeliverPackage:

Code: Select all

I highly doubt it.
Key: I_HIGHLY_DOUBT_IT
What is being doubted here?

Code: Select all

Not any more than usual.
Key: NOT_ANY_MORE_THAN_USUAL
Not anymore what?

Re: Plural form support for translations

Posted: Mon Nov 09, 2015 2:25 pm
by bszlrd
Can your fontset handle Tironian et ⟨⁊⟩, Unicode point U+204A?
It seems we don't, but I'll check if I can add it to our fonts. While checking this, I noticed that we miss a couple of letters like "ű" too, so I guess it's fontforge time.

These too are seem to be answers for the same question, "Will there be any danger?"
I highly doubt it.
Highly doubts that there will be any danger (attackers, pirates)
Not any more than usual.
Not any more dangerous then a typical trip.

Re: Plural form support for translations

Posted: Mon Nov 09, 2015 7:33 pm
by GunChleoc
Thanks!

I just found your font files, current versions of DejaVu Sans and DejaVu Sand Mono support ⁊ :)

Re: Plural form support for translations

Posted: Tue Nov 10, 2015 10:10 am
by bszlrd
Ehat language you are translating to? Those two fonts are for cyrillic if I remember correctly.