12 #include <tdelocale.h>
14 TQStringList Parsha::parshiot_names;
26 Parsha::FindParshaName( int daynumber, int kvia, bool leap_p,
32 ( "These are weekly readings and do not have translations. They may have different spellings in your language; otherwise, just translate the sound to your characters",
33 "Bereshit") << i18n( "Noach") << i18n( "Lech L'cha") <<
34 i18n( "Vayera") << i18n( "Chaye Sarah") << i18n( "Toldot") <<
35 i18n( "Vayetze") << i18n( "Vayishlach") << i18n( "Vayeshev") <<
36 i18n( "Miketz") << i18n( "Vayigash") << i18n( "Vayechi") <<
37 i18n( "Shemot") << i18n( "Vaera") << i18n( "Bo") << i18n( "Beshalach")
38 << i18n( "Yitro") << i18n( "Mishpatim") << i18n( "Terumah") <<
39 i18n( "Tetzaveh") << i18n( "Ki Tisa") << i18n( "Vayakhel") <<
40 i18n( "Pekudei") << i18n( "Vayikra") << i18n( "Tzav") <<
41 i18n( "Shemini") << i18n( "Tazria") << i18n( "Metzora") <<
42 i18n( "Acharei Mot") << i18n( "Kedoshim") << i18n( "Emor") <<
43 i18n( "Behar") << i18n( "Bechukotai") << i18n( "Bemidbar") <<
44 i18n( "Naso") << i18n( "Behaalotcha") << i18n( "Shelach") <<
45 i18n( "Korach") << i18n( "Chukat") << i18n( "Balak") <<
46 i18n( "Pinchas") << i18n( "Matot") << i18n( "Masei") <<
47 i18n( "Devarim") << i18n( "Vaetchanan") << i18n( "Ekev") <<
48 i18n( "Reeh") << i18n( "Shoftim") << i18n( "Ki Tetze") <<
49 i18n( "Ki Tavo") << i18n( "Nitzavim") << i18n( "Vayelech") <<
66 static unsigned const char Sat_short[] =
67 { XX, 52, XX, XX, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10,
68 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 121, 23, 24, XX, 25,
69 126, 128, 30, 131, 33, 34, 35, 36, 37, 38, 39, 40, 141, 43, 44,
70 45, 46, 47, 48, 49, 50,
73 static unsigned const char Sat_long[] =
74 { XX, 52, XX, XX, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10,
75 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 121, 23, 24, XX, 25,
76 126, 128, 30, 131, 33, 34, 35, 36, 37, 38, 39, 40, 141, 43, 44,
77 45, 46, 47, 48, 49, 150,
80 static unsigned const char Mon_short[] =
81 { 51, 52, XX, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11,
82 12, 13, 14, 15, 16, 17, 18, 19, 20, 121, 23, 24, XX, 25, 126,
83 128, 30, 131, 33, 34, 35, 36, 37, 38, 39, 40, 141, 43, 44, 45,
87 static unsigned const char Mon_long[] =
88 { 51, 52, XX, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11,
89 12, 13, 14, 15, 16, 17, 18, 19, 20, 121, 23, 24, XX, 25, 126,
90 128, 30, 131, 33, XX, 34, 35, 36, 37, 138, 40, 141, 43, 44, 45,
94 #define Mon_long_Israel Mon_short
96 #define Tue_normal Mon_long
97 #define Tue_normal_Israel Mon_short
99 static unsigned const char Thu_normal[] =
100 { 52, XX, XX, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11,
101 12, 13, 14, 15, 16, 17, 18, 19, 20, 121, 23, 24, XX, XX, 25,
102 126, 128, 30, 131, 33, 34, 35, 36, 37, 38, 39, 40, 141, 43, 44,
103 45, 46, 47, 48, 49, 50,
105 static unsigned const char Thu_normal_Israel[] =
106 { 52, XX, XX, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11,
107 12, 13, 14, 15, 16, 17, 18, 19, 20, 121, 23, 24, XX, 25, 126,
108 128, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 141, 43, 44,
109 45, 46, 47, 48, 49, 50,
112 static unsigned const char Thu_long[] =
113 { 52, XX, XX, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11,
114 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, XX, 25,
115 126, 128, 30, 131, 33, 34, 35, 36, 37, 38, 39, 40, 141, 43, 44,
116 45, 46, 47, 48, 49, 50,
119 static unsigned const char Sat_short_leap[] =
120 { XX, 52, XX, XX, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10,
121 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25,
122 26, 27, XX, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39,
123 40, 141, 43, 44, 45, 46, 47, 48, 49, 150,
126 static unsigned const char Sat_long_leap[] =
127 { XX, 52, XX, XX, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10,
128 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25,
129 26, 27, XX, 28, 29, 30, 31, 32, 33, XX, 34, 35, 36, 37, 138,
130 40, 141, 43, 44, 45, 46, 47, 48, 49, 150,
133 #define Sat_long_leap_Israel Sat_short_leap
135 static unsigned const char Mon_short_leap[] =
136 { 51, 52, XX, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11,
137 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26,
138 27, XX, 28, 29, 30, 31, 32, 33, XX, 34, 35, 36, 37, 138, 40,
139 141, 43, 44, 45, 46, 47, 48, 49, 150,
141 static unsigned const char Mon_short_leap_Israel[] =
142 { 51, 52, XX, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11,
143 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26,
144 27, XX, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40,
145 141, 43, 44, 45, 46, 47, 48, 49, 150,
148 static unsigned const char Mon_long_leap[] =
149 { 51, 52, XX, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11,
150 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26,
151 27, XX, XX, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39,
152 40, 141, 43, 44, 45, 46, 47, 48, 49, 50,
154 static unsigned const char Mon_long_leap_Israel[] =
155 { 51, 52, XX, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11,
156 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26,
157 27, XX, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40,
158 41, 42, 43, 44, 45, 46, 47, 48, 49, 50,
161 #define Tue_normal_leap Mon_long_leap
162 #define Tue_normal_leap_Israel Mon_long_leap_Israel
164 static unsigned const char Thu_short_leap[] =
165 { 52, XX, XX, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11,
166 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26,
167 27, 28, XX, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40,
168 41, 42, 43, 44, 45, 46, 47, 48, 49, 50,
171 static unsigned const char Thu_long_leap[] =
172 { 52, XX, XX, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11,
173 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26,
174 27, 28, XX, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40,
175 41, 42, 43, 44, 45, 46, 47, 48, 49, 150,
182 int week = daynumber / 7;
183 unsigned const char *array = NULL;
191 switch (daynumber % 7)
203 array = israel_p ? Mon_long_Israel : Mon_long;
207 array = israel_p ? Tue_normal_Israel : Tue_normal;
211 array = israel_p ? Thu_normal_Israel : Thu_normal;
218 switch (daynumber % 7)
222 array = Sat_short_leap;
224 array = israel_p ? Sat_long_leap_Israel : Sat_long_leap;
228 array = israel_p ? Mon_short_leap_Israel : Mon_short_leap;
230 array = israel_p ? Mon_long_leap_Israel : Mon_long_leap;
235 israel_p ? Tue_normal_leap_Israel : Tue_normal_leap;
239 array = Thu_short_leap;
241 array = Thu_long_leap;
251 buffer = "??Parsha??";
260 else if (index < 100)
262 buffer = parshiot_names[index];
268 parshiot_names[index - 100] + "-" + parshiot_names[index -
|