31 #include <KLocalizedString>
34 bool useIsraelSettings )
39 << i18nc(
"These are weekly readings and do not have translations. "
40 "They may have different spellings in your language; "
41 "otherwise, just translate the sound to your characters",
"Bereshit" )
43 << i18n(
"Lech L'cha" )
45 << i18n(
"Chaye Sarah" )
48 << i18n(
"Vayishlach" )
56 << i18n(
"Beshalach" )
58 << i18n(
"Mishpatim" )
69 << i18n(
"Acharei Mot" )
73 << i18n(
"Bechukotai" )
76 << i18n(
"Behaalotcha" )
85 << i18n(
"Vaetchanan" )
111 static const quint8 XX = 255;
114 static const quint8 SatShort[] =
115 { XX, 52, XX, XX, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10,
116 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 121, 23, 24, XX, 25,
117 126, 128, 30, 131, 33, 34, 35, 36, 37, 38, 39, 40, 141, 43, 44,
118 45, 46, 47, 48, 49, 50,
120 static const quint8 SatLong[] =
121 { XX, 52, XX, XX, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10,
122 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 121, 23, 24, XX, 25,
123 126, 128, 30, 131, 33, 34, 35, 36, 37, 38, 39, 40, 141, 43, 44,
124 45, 46, 47, 48, 49, 150,
127 static const quint8 MonShort[] =
128 { 51, 52, XX, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11,
129 12, 13, 14, 15, 16, 17, 18, 19, 20, 121, 23, 24, XX, 25, 126,
130 128, 30, 131, 33, 34, 35, 36, 37, 38, 39, 40, 141, 43, 44, 45,
133 static const quint8 MonLong[] =
134 { 51, 52, XX, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11,
135 12, 13, 14, 15, 16, 17, 18, 19, 20, 121, 23, 24, XX, 25, 126,
136 128, 30, 131, 33, XX, 34, 35, 36, 37, 138, 40, 141, 43, 44, 45,
139 #define MonLong_Israel MonShort
141 #define TueNormal MonLong
142 #define TueNormal_Israel MonShort
144 static const quint8 ThuNormal[] =
145 { 52, XX, XX, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11,
146 12, 13, 14, 15, 16, 17, 18, 19, 20, 121, 23, 24, XX, XX, 25,
147 126, 128, 30, 131, 33, 34, 35, 36, 37, 38, 39, 40, 141, 43, 44,
148 45, 46, 47, 48, 49, 50,
150 static const quint8 ThuNormal_Israel[] =
151 { 52, XX, XX, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11,
152 12, 13, 14, 15, 16, 17, 18, 19, 20, 121, 23, 24, XX, 25, 126,
153 128, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 141, 43, 44,
154 45, 46, 47, 48, 49, 50,
156 static const quint8 ThuLong[] =
157 { 52, XX, XX, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11,
158 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, XX, 25,
159 126, 128, 30, 131, 33, 34, 35, 36, 37, 38, 39, 40, 141, 43, 44,
160 45, 46, 47, 48, 49, 50,
164 static const quint8 SatShortLeap[] =
165 { XX, 52, XX, XX, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10,
166 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25,
167 26, 27, XX, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39,
168 40, 141, 43, 44, 45, 46, 47, 48, 49, 150,
170 static const quint8 SatLongLeap[] =
171 { XX, 52, XX, XX, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10,
172 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25,
173 26, 27, XX, 28, 29, 30, 31, 32, 33, XX, 34, 35, 36, 37, 138,
174 40, 141, 43, 44, 45, 46, 47, 48, 49, 150,
176 #define SatLongLeap_Israel SatShortLeap
178 static const quint8 MonShortLeap[] =
179 { 51, 52, XX, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11,
180 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26,
181 27, XX, 28, 29, 30, 31, 32, 33, XX, 34, 35, 36, 37, 138, 40,
182 141, 43, 44, 45, 46, 47, 48, 49, 150,
184 static const quint8 MonShortLeap_Israel[] =
185 { 51, 52, XX, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11,
186 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26,
187 27, XX, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40,
188 141, 43, 44, 45, 46, 47, 48, 49, 150,
190 static const quint8 MonLongLeap[] =
191 { 51, 52, XX, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11,
192 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26,
193 27, XX, XX, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39,
194 40, 141, 43, 44, 45, 46, 47, 48, 49, 50,
196 static const quint8 MonLongLeap_Israel[] =
197 { 51, 52, XX, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11,
198 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26,
199 27, XX, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40,
200 41, 42, 43, 44, 45, 46, 47, 48, 49, 50,
203 #define TueNormalLeap MonLongLeap
204 #define TueNormalLeap_Israel MonLongLeap_Israel
206 static const quint8 ThuShortLeap[] =
207 { 52, XX, XX, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11,
208 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26,
209 27, 28, XX, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40,
210 41, 42, 43, 44, 45, 46, 47, 48, 49, 50,
212 static const quint8 ThuLongLeap[] =
213 { 52, XX, XX, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11,
214 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26,
215 27, 28, XX, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40,
216 41, 42, 43, 44, 45, 46, 47, 48, 49, 150,
220 int week = dayNumber / 7;
221 const quint8 *array = 0;
228 switch ( dayNumber % 7 ) {
232 }
else if ( kvia == 2 ) {
239 }
else if ( kvia == 2 ) {
250 array = useIsraelSettings ? ThuNormal_Israel : ThuNormal;
251 }
else if ( kvia == 2 ) {
257 switch ( dayNumber % 7 ) {
260 array = SatShortLeap;
261 }
else if ( kvia == 2 ) {
267 array = useIsraelSettings ? MonShortLeap_Israel : MonShortLeap;
268 }
else if ( kvia == 2 ) {
269 array = useIsraelSettings ? MonLongLeap_Israel : MonLongLeap;
279 array = ThuShortLeap;
280 }
else if ( kvia == 2 ) {
290 kWarning() <<
"Hebrew Plugin: Was not able to determine the Parsha."
291 <<
"Please report this as a bug.";
299 }
else if ( index < 100 ) {
300 buffer = parshiotNames[index];
303 buffer = parshiotNames[index - 100] +
QLatin1Char(
'-') + parshiotNames[index - 99];
#define TueNormalLeap_Israel
static QString findParshaName(int dayNumber, int kvia, bool isLeapYear, bool useIsraelSettings)
Find the parsha for a given day of the year.
#define SatLongLeap_Israel