Plural form support for translations

GunChleoc
Posts: 40
Joined: Sat Nov 30, 2013 12:57 pm
Contact:

Plural form support for translations

Post 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 :)
impaktor
Posts: 1008
Joined: Fri Dec 20, 2013 9:54 am
Location: Tellus
Contact:

Re: Plural form support for translations

Post 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!
GunChleoc
Posts: 40
Joined: Sat Nov 30, 2013 12:57 pm
Contact:

Re: Plural form support for translations

Post 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?
bszlrd
Posts: 1084
Joined: Mon Jul 01, 2013 3:25 pm
Location: Budapest HU

Re: Plural form support for translations

Post 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.
GunChleoc
Posts: 40
Joined: Sat Nov 30, 2013 12:57 pm
Contact:

Re: Plural form support for translations

Post 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
impaktor
Posts: 1008
Joined: Fri Dec 20, 2013 9:54 am
Location: Tellus
Contact:

Re: Plural form support for translations

Post 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.
GunChleoc
Posts: 40
Joined: Sat Nov 30, 2013 12:57 pm
Contact:

Re: Plural form support for translations

Post 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?
bszlrd
Posts: 1084
Joined: Mon Jul 01, 2013 3:25 pm
Location: Budapest HU

Re: Plural form support for translations

Post 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.
GunChleoc
Posts: 40
Joined: Sat Nov 30, 2013 12:57 pm
Contact:

Re: Plural form support for translations

Post by GunChleoc »

Thanks!

I just found your font files, current versions of DejaVu Sans and DejaVu Sand Mono support ⁊ :)
bszlrd
Posts: 1084
Joined: Mon Jul 01, 2013 3:25 pm
Location: Budapest HU

Re: Plural form support for translations

Post by bszlrd »

Ehat language you are translating to? Those two fonts are for cyrillic if I remember correctly.
Post Reply