summaryrefslogtreecommitdiffstats
path: root/kcron/README.translators
blob: 87c4d719ce26c29a2aded721425f04fa910bc3c1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
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.