You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
110 lines
3.6 KiB
110 lines
3.6 KiB
15 years ago
|
README.translators
|
||
|
|
||
|
Author: Gary Meyer <gary@meyer.net>
|
||
|
Date: November 7, 1999
|
||
|
|
||
|
---------------------------------------------------------------------------
|
||
|
KCron requires special care in translation. KCron does natural language
|
||
|
description, such as "At 12:00am, every day." How days and times are
|
||
|
described in different languages and cultures varies greatly.
|
||
|
|
||
|
I have tried to accomodate this challenge through making formatting of the
|
||
|
display significantly controlled by the translater.
|
||
|
|
||
|
The approach I have taken makes formatting strings available to the
|
||
|
translator. Where there is a string to translate that has a name
|
||
|
"SUCH_AS_THIS", KCron treats "SUCH_AS_THIS" as a special token.
|
||
|
|
||
|
For instance, consider "DAYS_OF_MONTH of MONTHS". The translator can
|
||
|
move the ordering of the phrases around. Additionally the translator
|
||
|
can translate the various words as well as separators such as the comma.
|
||
|
---------------------------------------------------------------------------
|
||
|
Look at CTTask::describe(). This is the most significant method used in
|
||
|
creating the description string that appears in the main display.
|
||
|
|
||
|
1. Change "%l:%M%P" to support time formatting for your locale.
|
||
|
|
||
|
Default:
|
||
|
"%l:%M%P" -> "11:00pm"
|
||
|
|
||
|
Other possibilities:
|
||
|
"%l:%M%p" -> "11:00PM"
|
||
|
"%H:%M" -> "23:00"
|
||
|
|
||
|
See "man strftime" for more time formatting options available.
|
||
|
|
||
|
2. Change "DAYS_OF_MONTH of MONTHS" to support how days of the month are
|
||
|
combined with month names for your locale.
|
||
|
|
||
|
Default:
|
||
|
"DAYS_OF_MONTH of MONTHS" -> "1st and 15th of Jan"
|
||
|
|
||
|
Other possibilities:
|
||
|
"MONTHS, DAYS_OF_MONTH" -> "Jan, 1st and 15th"
|
||
|
|
||
|
3. Change "every DAYS_OF_WEEK" to support how the English phrase
|
||
|
"every Monday" is translated to your locale.
|
||
|
|
||
|
Default:
|
||
|
"every DAYS_OF_WEEK" -> "every Mon, Wed, and Fri"
|
||
|
|
||
|
Other possibilitities:
|
||
|
"DAYS_OF_WEEK" -> "Mon, Wed, and Fri"
|
||
|
|
||
|
4. Change "DOM_FORMAT as well as DOW_FORMAT" to support how complex
|
||
|
phrases that involve day of the month as well as day of the week are
|
||
|
described in your locale.
|
||
|
|
||
|
Default:
|
||
|
"DOM_FORMAT as well as DOW_FORMAT" -> "1st and 15th of every month as well
|
||
|
as every Sun"
|
||
|
|
||
|
Other possibilities:
|
||
|
"DOM_FORMAT and DOW_FORMAT" -> "1st and 15th of every month and every Sun"
|
||
|
|
||
|
Note how the order of the two phrases can be changed.
|
||
|
|
||
|
5. Change "At TIME" to support how the English phrase "At 11:00pm" is
|
||
|
translated to your locale.
|
||
|
|
||
|
Default:
|
||
|
"At TIME" -> "At 11:00pm"
|
||
|
|
||
|
Other possibilities:
|
||
|
"TIME" -> "11:00pm"
|
||
|
|
||
|
If necessary you can put a phrase suffix after the "TIME" token.
|
||
|
|
||
|
6. Change "TIME_FORMAT, DATE_FORMAT" to describe how the English phrase
|
||
|
"At 11:00pm, every Sun" is best translated to your locale.
|
||
|
|
||
|
Default:
|
||
|
"TIME_FORMAT, DATE_FORMAT" -> "At 11:00pm, every Sun"
|
||
|
|
||
|
Other possibilities:
|
||
|
"TIME_FORMAT DATE_FORMAT" -> "At 11:00pm every Sun"
|
||
|
"DATE_FORMAT TIME_FORMAT" -> "every Sun At 11:00pm"
|
||
|
|
||
|
So the following translations...
|
||
|
"%l:%M%P" -> "%H:%M"
|
||
|
"DAYS_OF_MONTH of MONTHS" -> "MONTHS DAYS_OF_MONTH"
|
||
|
"every DAYS_OF_WEEK" -> "every DAYS_OF_WEEK"
|
||
|
"DOM_FORMAT as well as DOW_FORMAT" -> "DOM_FORMAT and DOW_FORMAT"
|
||
|
"At TIME" -> "at TIME" ->
|
||
|
"TIME_FORMAT, DATE_FORMAT" -> "DATE_FORMAT TIME_FORMAT"
|
||
|
|
||
|
Would produce...
|
||
|
"Jan 1st 23:00" instead of "At 11:00pm, Jan 1st"
|
||
|
---------------------------------------------------------------------------
|
||
|
ctunit.h and cttask.cpp also have places to describe whether or not
|
||
|
your local uses:
|
||
|
|
||
|
"1, 2, and 3" or
|
||
|
"1, 2 and 3" or
|
||
|
"1, 2, 3"
|
||
|
---------------------------------------------------------------------------
|
||
|
Everything else should be rather clear to translate. If you can not
|
||
|
support your locale through this translation, email the author at
|
||
|
gary@meyer.net and I'll see if I can make changes to accomodate.
|
||
|
|