September 17th, 2002

  • timwi

Translation system problem

The problem

We are currently having a big problem in the translation system. In English you can easily go

1minute
2-∞minutes

The Russians have it a little more complex:

1минута
2-4минуты
5-20минут
21минута
22-24минуты
25-30минут
etc.

Similarly, they have an entirely different system again in Tagalog and possibly other languages.

My idea

My idea is to create a system that allows the translators to enter as many translations as they need for a string that contains a number. We would need:
  • A flag for each translation string to determine if it contains a number or not.
  • A property of each language which states what number system this language uses (see below).
  • Determine how many translations per string containing a number are needed for each such system. Perhaps a hash in langlib?
  • For each such system, create a subroutine that decides which translation string to use for a particular number. Perhaps add subrefs to aforementioned global hash?
  • Enhance the translation editor to display several input boxes to translators wherever appropriate. The database could store these strings in one, separated by some special character, perhaps a pipe (|), so we would have something like:
    [[number]] hour ago|[[number]] hours ago
  • Add the required functionality to BML::ml().
With this, when a new language is added to the mix, all that needs to be done is either assign it an existing number system, or create a new one. That shouldn’t be much work at all.

Please comment whether or not you like this and/or whether you think this is feasible. If this is accepted, I will post it to Zilla and start right working on it.

Collapse )