Re: Translation of numeric values (application gnome-schedule)



Owkay,

So, in case your language does support word surgery much like the
English language and/or you implemented the easy-strings stuff for your
language:

def translate_crontab_easy (minute, hour, day, month, weekday):

  # Add support for your language here

  if language.find ("en") != -1:
    return translate_crontab_easy_en (minute, hour, day, month, weekday)
  elif language.find ("nl") != -1:
    return translate_crontab_easy_nl (minute, hour, day, month, weekday)
  else:
    return translate_crontab_easy_anylang(minute,hour,day,month,weekday)

In any other case, translate_crontab_easy_anylang will be used to
translate the frequency.

That anylang will translate the frequency to a string like:

_("At minute: %s, hour %s, day: %s, month: %s, weekday: %s")

or

_("At minute: %s, hour %s, every day, month: %s")

There are many such strings, ready for the po-only translators to
translate to whatever interpretation they can translate it to. These
English ones will never be used as the English and at this moment Dutch
languages are fully supported to have sweet programmatically frequency
translations.

So you will find, for example, this one:

_("Every minute, every hour, every day, every month, every weekday")

The translator can translate this to: "Every minute"

The translator can't translate 

_("At minute: 0, hour: 0, every day, every month, every weekday")

To: "Every hour", using only po-files. If the translator wants support
for that type of frequency translations, he or she 'can' however
implement the frequency translator for his or her own language. And we
will assist the translator in doing this.

I feel that this solves both the problem translators would be facing and
the usability issue. Translators still can get pretty much everything
covered but the frequency translation will not be as pretty.

However, if the translator is willing to code a few lines of python, he
or she can get the frequency translations at a higher level.

This way we are not crippling the frequency translations for languages
that can easily get supported by programmers (like me, Gaute Hope or
translators who known some python and are prepared to maintain it), yet
we are also not crippling translators :-). It's now an option in all
possible directions for all people involved in the translation of these
frequency issues.

As far as I know are; the format of the crontab, the format of at AND
the languages that would get support; all static things in this world. I
don't expect much "changes" that will need huge amounts of maintenance
every two weeks. The spelling-rules of a language are probably more
subjected to "changes" than the format of crontab. The addition of
support for a new scheduling system is, however, more likely to happen
some day in a far far future. But that would not introduce changes to
the existing code nor translations, but in stead would only "ADD" new
translations and new code. So again it's static and maintainable.

Still I am keeping "lang.py" as also owned by the translation teams :).
You guys (an girls) are still free to change whatever you want in it, no
questions asked.



-- 
Philip Van Hoof, Software Developer @ Cronos
home: me at freax dot org
work: Philip dot VanHoof at cronos dot be
http://www.freax.be, http://www.freax.eu.org



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]