1 | /* |
2 | SPDX-FileCopyrightText: 2013 Marco Martin <mart@kde.org> |
3 | |
4 | SPDX-License-Identifier: LGPL-2.0-or-later |
5 | */ |
6 | |
7 | // Undefine this because we don't want our i18n*() method names to be turned into i18nd*() |
8 | #undef TRANSLATION_DOMAIN |
9 | |
10 | #include "klocalizedcontext.h" |
11 | |
12 | #include <klocalizedstring.h> |
13 | |
14 | #include "ki18n_logging.h" |
15 | |
16 | class KLocalizedContextPrivate |
17 | { |
18 | public: |
19 | QString m_translationDomain; |
20 | }; |
21 | |
22 | KLocalizedContext::KLocalizedContext(QObject *parent) |
23 | : QObject(parent) |
24 | , d_ptr(new KLocalizedContextPrivate) |
25 | { |
26 | } |
27 | |
28 | KLocalizedContext::~KLocalizedContext() = default; |
29 | |
30 | QString KLocalizedContext::translationDomain() const |
31 | { |
32 | Q_D(const KLocalizedContext); |
33 | return d->m_translationDomain; |
34 | } |
35 | |
36 | void KLocalizedContext::setTranslationDomain(const QString &domain) |
37 | { |
38 | Q_D(KLocalizedContext); |
39 | if (domain != d->m_translationDomain) { |
40 | d->m_translationDomain = domain; |
41 | Q_EMIT translationDomainChanged(translationDomain: domain); |
42 | } |
43 | } |
44 | |
45 | static void subsVariant(KLocalizedString &trMessage, const QVariant &value) |
46 | { |
47 | switch (value.userType()) { |
48 | case QMetaType::QString: |
49 | trMessage = trMessage.subs(a: value.toString()); |
50 | break; |
51 | case QMetaType::Int: |
52 | trMessage = trMessage.subs(a: value.toInt()); |
53 | break; |
54 | case QMetaType::Double: |
55 | trMessage = trMessage.subs(a: value.toDouble()); |
56 | break; |
57 | case QMetaType::Char: |
58 | trMessage = trMessage.subs(a: value.toChar()); |
59 | break; |
60 | default: |
61 | if (value.canConvert<QString>()) { |
62 | trMessage = trMessage.subs(a: value.toString()); |
63 | } else { |
64 | trMessage = trMessage.subs(QStringLiteral("???" )); |
65 | qCWarning(KI18N) << "couldn't convert" << value << "to translate" ; |
66 | } |
67 | } |
68 | } |
69 | |
70 | static void resolveMessage(KLocalizedString &trMessage, |
71 | const QVariant ¶m1, |
72 | const QVariant ¶m2, |
73 | const QVariant ¶m3, |
74 | const QVariant ¶m4, |
75 | const QVariant ¶m5, |
76 | const QVariant ¶m6, |
77 | const QVariant ¶m7, |
78 | const QVariant ¶m8, |
79 | const QVariant ¶m9, |
80 | const QVariant ¶m10 = QVariant()) |
81 | { |
82 | if (param1.isValid()) { |
83 | subsVariant(trMessage, value: param1); |
84 | } |
85 | if (param2.isValid()) { |
86 | subsVariant(trMessage, value: param2); |
87 | } |
88 | if (param3.isValid()) { |
89 | subsVariant(trMessage, value: param3); |
90 | } |
91 | if (param4.isValid()) { |
92 | subsVariant(trMessage, value: param4); |
93 | } |
94 | if (param5.isValid()) { |
95 | subsVariant(trMessage, value: param5); |
96 | } |
97 | if (param6.isValid()) { |
98 | subsVariant(trMessage, value: param6); |
99 | } |
100 | if (param7.isValid()) { |
101 | subsVariant(trMessage, value: param7); |
102 | } |
103 | if (param8.isValid()) { |
104 | subsVariant(trMessage, value: param8); |
105 | } |
106 | if (param9.isValid()) { |
107 | subsVariant(trMessage, value: param9); |
108 | } |
109 | if (param10.isValid()) { |
110 | subsVariant(trMessage, value: param10); |
111 | } |
112 | } |
113 | |
114 | static void resolvePlural(KLocalizedString &trMessage, const QVariant ¶m) |
115 | { |
116 | trMessage = trMessage.subs(a: param.toInt()); |
117 | } |
118 | |
119 | QString KLocalizedContext::i18n(const QString &message, |
120 | const QVariant ¶m1, |
121 | const QVariant ¶m2, |
122 | const QVariant ¶m3, |
123 | const QVariant ¶m4, |
124 | const QVariant ¶m5, |
125 | const QVariant ¶m6, |
126 | const QVariant ¶m7, |
127 | const QVariant ¶m8, |
128 | const QVariant ¶m9, |
129 | const QVariant ¶m10) const |
130 | { |
131 | if (message.isEmpty()) { |
132 | qCWarning(KI18N) << "i18n() needs at least one parameter" ; |
133 | return QString(); |
134 | } |
135 | |
136 | Q_D(const KLocalizedContext); |
137 | KLocalizedString trMessage; |
138 | if (!d->m_translationDomain.isEmpty()) { |
139 | trMessage = ki18nd(domain: d->m_translationDomain.toUtf8().constData(), text: message.toUtf8().constData()); |
140 | } else { |
141 | trMessage = ki18n(text: message.toUtf8().constData()); |
142 | } |
143 | |
144 | resolveMessage(trMessage, param1, param2, param3, param4, param5, param6, param7, param8, param9, param10); |
145 | |
146 | return trMessage.toString(); |
147 | } |
148 | |
149 | QString KLocalizedContext::i18nc(const QString &context, |
150 | const QString &message, |
151 | const QVariant ¶m1, |
152 | const QVariant ¶m2, |
153 | const QVariant ¶m3, |
154 | const QVariant ¶m4, |
155 | const QVariant ¶m5, |
156 | const QVariant ¶m6, |
157 | const QVariant ¶m7, |
158 | const QVariant ¶m8, |
159 | const QVariant ¶m9, |
160 | const QVariant ¶m10) const |
161 | { |
162 | if (context.isEmpty() || message.isEmpty()) { |
163 | qCWarning(KI18N) << "i18nc() needs at least two arguments" ; |
164 | return QString(); |
165 | } |
166 | |
167 | Q_D(const KLocalizedContext); |
168 | KLocalizedString trMessage; |
169 | if (!d->m_translationDomain.isEmpty()) { |
170 | trMessage = ki18ndc(domain: d->m_translationDomain.toUtf8().constData(), context: context.toUtf8().constData(), text: message.toUtf8().constData()); |
171 | } else { |
172 | trMessage = ki18nc(context: context.toUtf8().constData(), text: message.toUtf8().constData()); |
173 | } |
174 | |
175 | resolveMessage(trMessage, param1, param2, param3, param4, param5, param6, param7, param8, param9, param10); |
176 | |
177 | return trMessage.toString(); |
178 | } |
179 | |
180 | QString KLocalizedContext::i18np(const QString &singular, |
181 | const QString &plural, |
182 | const QVariant ¶m1, |
183 | const QVariant ¶m2, |
184 | const QVariant ¶m3, |
185 | const QVariant ¶m4, |
186 | const QVariant ¶m5, |
187 | const QVariant ¶m6, |
188 | const QVariant ¶m7, |
189 | const QVariant ¶m8, |
190 | const QVariant ¶m9, |
191 | const QVariant ¶m10) const |
192 | { |
193 | if (singular.isEmpty() || plural.isEmpty()) { |
194 | qCWarning(KI18N) << "i18np() needs at least two arguments" ; |
195 | return QString(); |
196 | } |
197 | |
198 | Q_D(const KLocalizedContext); |
199 | KLocalizedString trMessage; |
200 | if (!d->m_translationDomain.isEmpty()) { |
201 | trMessage = ki18ndp(domain: d->m_translationDomain.toUtf8().constData(), singular: singular.toUtf8().constData(), plural: plural.toUtf8().constData()); |
202 | } else { |
203 | trMessage = ki18np(singular: singular.toUtf8().constData(), plural: plural.toUtf8().constData()); |
204 | } |
205 | |
206 | resolvePlural(trMessage, param: param1); |
207 | resolveMessage(trMessage, param1: param2, param2: param3, param3: param4, param4: param5, param5: param6, param6: param7, param7: param8, param8: param9, param9: param10); |
208 | |
209 | return trMessage.toString(); |
210 | } |
211 | |
212 | QString KLocalizedContext::i18ncp(const QString &context, |
213 | const QString &singular, |
214 | const QString &plural, |
215 | const QVariant ¶m1, |
216 | const QVariant ¶m2, |
217 | const QVariant ¶m3, |
218 | const QVariant ¶m4, |
219 | const QVariant ¶m5, |
220 | const QVariant ¶m6, |
221 | const QVariant ¶m7, |
222 | const QVariant ¶m8, |
223 | const QVariant ¶m9, |
224 | const QVariant ¶m10) const |
225 | { |
226 | if (context.isEmpty() || singular.isEmpty() || plural.isEmpty()) { |
227 | qCWarning(KI18N) << "i18ncp() needs at least three arguments" ; |
228 | return QString(); |
229 | } |
230 | |
231 | Q_D(const KLocalizedContext); |
232 | KLocalizedString trMessage; |
233 | if (!d->m_translationDomain.isEmpty()) { |
234 | trMessage = |
235 | ki18ndcp(domain: d->m_translationDomain.toUtf8().constData(), context: context.toUtf8().constData(), singular: singular.toUtf8().constData(), plural: plural.toUtf8().constData()); |
236 | } else { |
237 | trMessage = ki18ncp(context: context.toUtf8().constData(), singular: singular.toUtf8().constData(), plural: plural.toUtf8().constData()); |
238 | } |
239 | |
240 | resolvePlural(trMessage, param: param1); |
241 | resolveMessage(trMessage, param1: param2, param2: param3, param3: param4, param4: param5, param5: param6, param6: param7, param7: param8, param8: param9, param9: param10); |
242 | |
243 | return trMessage.toString(); |
244 | } |
245 | |
246 | QString KLocalizedContext::i18nd(const QString &domain, |
247 | const QString &message, |
248 | const QVariant ¶m1, |
249 | const QVariant ¶m2, |
250 | const QVariant ¶m3, |
251 | const QVariant ¶m4, |
252 | const QVariant ¶m5, |
253 | const QVariant ¶m6, |
254 | const QVariant ¶m7, |
255 | const QVariant ¶m8, |
256 | const QVariant ¶m9, |
257 | const QVariant ¶m10) const |
258 | { |
259 | if (domain.isEmpty() || message.isEmpty()) { |
260 | qCWarning(KI18N) << "i18nd() needs at least two parameters" ; |
261 | return QString(); |
262 | } |
263 | |
264 | KLocalizedString trMessage = ki18nd(domain: domain.toUtf8().constData(), text: message.toUtf8().constData()); |
265 | |
266 | resolveMessage(trMessage, param1, param2, param3, param4, param5, param6, param7, param8, param9, param10); |
267 | |
268 | return trMessage.toString(); |
269 | } |
270 | |
271 | QString KLocalizedContext::i18ndc(const QString &domain, |
272 | const QString &context, |
273 | const QString &message, |
274 | const QVariant ¶m1, |
275 | const QVariant ¶m2, |
276 | const QVariant ¶m3, |
277 | const QVariant ¶m4, |
278 | const QVariant ¶m5, |
279 | const QVariant ¶m6, |
280 | const QVariant ¶m7, |
281 | const QVariant ¶m8, |
282 | const QVariant ¶m9, |
283 | const QVariant ¶m10) const |
284 | { |
285 | if (domain.isEmpty() || context.isEmpty() || message.isEmpty()) { |
286 | qCWarning(KI18N) << "i18ndc() needs at least three arguments" ; |
287 | return QString(); |
288 | } |
289 | |
290 | KLocalizedString trMessage = ki18ndc(domain: domain.toUtf8().constData(), context: context.toUtf8().constData(), text: message.toUtf8().constData()); |
291 | |
292 | resolveMessage(trMessage, param1, param2, param3, param4, param5, param6, param7, param8, param9, param10); |
293 | |
294 | return trMessage.toString(); |
295 | } |
296 | |
297 | QString KLocalizedContext::i18ndp(const QString &domain, |
298 | const QString &singular, |
299 | const QString &plural, |
300 | const QVariant ¶m1, |
301 | const QVariant ¶m2, |
302 | const QVariant ¶m3, |
303 | const QVariant ¶m4, |
304 | const QVariant ¶m5, |
305 | const QVariant ¶m6, |
306 | const QVariant ¶m7, |
307 | const QVariant ¶m8, |
308 | const QVariant ¶m9, |
309 | const QVariant ¶m10) const |
310 | { |
311 | if (domain.isEmpty() || singular.isEmpty() || plural.isEmpty()) { |
312 | qCWarning(KI18N) << "i18ndp() needs at least three arguments" ; |
313 | return QString(); |
314 | } |
315 | |
316 | KLocalizedString trMessage = ki18ndp(domain: domain.toUtf8().constData(), singular: singular.toUtf8().constData(), plural: plural.toUtf8().constData()); |
317 | |
318 | resolvePlural(trMessage, param: param1); |
319 | resolveMessage(trMessage, param1: param2, param2: param3, param3: param4, param4: param5, param5: param6, param6: param7, param7: param8, param8: param9, param9: param10); |
320 | |
321 | return trMessage.toString(); |
322 | } |
323 | |
324 | QString KLocalizedContext::i18ndcp(const QString &domain, |
325 | const QString &context, |
326 | const QString &singular, |
327 | const QString &plural, |
328 | const QVariant ¶m1, |
329 | const QVariant ¶m2, |
330 | const QVariant ¶m3, |
331 | const QVariant ¶m4, |
332 | const QVariant ¶m5, |
333 | const QVariant ¶m6, |
334 | const QVariant ¶m7, |
335 | const QVariant ¶m8, |
336 | const QVariant ¶m9, |
337 | const QVariant ¶m10) const |
338 | { |
339 | if (domain.isEmpty() || context.isEmpty() || singular.isEmpty() || plural.isEmpty()) { |
340 | qCWarning(KI18N) << "i18ndcp() needs at least four arguments" ; |
341 | return QString(); |
342 | } |
343 | |
344 | KLocalizedString trMessage = |
345 | ki18ndcp(domain: domain.toUtf8().constData(), context: context.toUtf8().constData(), singular: singular.toUtf8().constData(), plural: plural.toUtf8().constData()); |
346 | |
347 | resolvePlural(trMessage, param: param1); |
348 | resolveMessage(trMessage, param1: param2, param2: param3, param3: param4, param4: param5, param5: param6, param6: param7, param7: param8, param8: param9, param9: param10); |
349 | |
350 | return trMessage.toString(); |
351 | } |
352 | |
353 | ///////////////////////// |
354 | |
355 | QString KLocalizedContext::xi18n(const QString &message, |
356 | const QVariant ¶m1, |
357 | const QVariant ¶m2, |
358 | const QVariant ¶m3, |
359 | const QVariant ¶m4, |
360 | const QVariant ¶m5, |
361 | const QVariant ¶m6, |
362 | const QVariant ¶m7, |
363 | const QVariant ¶m8, |
364 | const QVariant ¶m9, |
365 | const QVariant ¶m10) const |
366 | { |
367 | if (message.isEmpty()) { |
368 | qCWarning(KI18N) << "xi18n() needs at least one parameter" ; |
369 | return QString(); |
370 | } |
371 | |
372 | Q_D(const KLocalizedContext); |
373 | KLocalizedString trMessage; |
374 | if (!d->m_translationDomain.isEmpty()) { |
375 | trMessage = kxi18nd(domain: d->m_translationDomain.toUtf8().constData(), text: message.toUtf8().constData()); |
376 | } else { |
377 | trMessage = kxi18n(text: message.toUtf8().constData()); |
378 | } |
379 | |
380 | resolveMessage(trMessage, param1, param2, param3, param4, param5, param6, param7, param8, param9, param10); |
381 | |
382 | return trMessage.toString(); |
383 | } |
384 | |
385 | QString KLocalizedContext::xi18nc(const QString &context, |
386 | const QString &message, |
387 | const QVariant ¶m1, |
388 | const QVariant ¶m2, |
389 | const QVariant ¶m3, |
390 | const QVariant ¶m4, |
391 | const QVariant ¶m5, |
392 | const QVariant ¶m6, |
393 | const QVariant ¶m7, |
394 | const QVariant ¶m8, |
395 | const QVariant ¶m9, |
396 | const QVariant ¶m10) const |
397 | { |
398 | if (context.isEmpty() || message.isEmpty()) { |
399 | qCWarning(KI18N) << "xi18nc() needs at least two arguments" ; |
400 | return QString(); |
401 | } |
402 | |
403 | Q_D(const KLocalizedContext); |
404 | KLocalizedString trMessage; |
405 | if (!d->m_translationDomain.isEmpty()) { |
406 | trMessage = kxi18ndc(domain: d->m_translationDomain.toUtf8().constData(), context: context.toUtf8().constData(), text: message.toUtf8().constData()); |
407 | } else { |
408 | trMessage = kxi18nc(context: context.toUtf8().constData(), text: message.toUtf8().constData()); |
409 | } |
410 | |
411 | resolveMessage(trMessage, param1, param2, param3, param4, param5, param6, param7, param8, param9, param10); |
412 | |
413 | return trMessage.toString(); |
414 | } |
415 | |
416 | QString KLocalizedContext::xi18np(const QString &singular, |
417 | const QString &plural, |
418 | const QVariant ¶m1, |
419 | const QVariant ¶m2, |
420 | const QVariant ¶m3, |
421 | const QVariant ¶m4, |
422 | const QVariant ¶m5, |
423 | const QVariant ¶m6, |
424 | const QVariant ¶m7, |
425 | const QVariant ¶m8, |
426 | const QVariant ¶m9, |
427 | const QVariant ¶m10) const |
428 | { |
429 | if (singular.isEmpty() || plural.isEmpty()) { |
430 | qCWarning(KI18N) << "xi18np() needs at least two arguments" ; |
431 | return QString(); |
432 | } |
433 | |
434 | Q_D(const KLocalizedContext); |
435 | KLocalizedString trMessage; |
436 | if (!d->m_translationDomain.isEmpty()) { |
437 | trMessage = kxi18ndp(domain: d->m_translationDomain.toUtf8().constData(), singular: singular.toUtf8().constData(), plural: plural.toUtf8().constData()); |
438 | } else { |
439 | trMessage = kxi18np(singular: singular.toUtf8().constData(), plural: plural.toUtf8().constData()); |
440 | } |
441 | |
442 | resolvePlural(trMessage, param: param1); |
443 | resolveMessage(trMessage, param1: param2, param2: param3, param3: param4, param4: param5, param5: param6, param6: param7, param7: param8, param8: param9, param9: param10); |
444 | |
445 | return trMessage.toString(); |
446 | } |
447 | |
448 | QString KLocalizedContext::xi18ncp(const QString &context, |
449 | const QString &singular, |
450 | const QString &plural, |
451 | const QVariant ¶m1, |
452 | const QVariant ¶m2, |
453 | const QVariant ¶m3, |
454 | const QVariant ¶m4, |
455 | const QVariant ¶m5, |
456 | const QVariant ¶m6, |
457 | const QVariant ¶m7, |
458 | const QVariant ¶m8, |
459 | const QVariant ¶m9, |
460 | const QVariant ¶m10) const |
461 | { |
462 | if (context.isEmpty() || singular.isEmpty() || plural.isEmpty()) { |
463 | qCWarning(KI18N) << "xi18ncp() needs at least three arguments" ; |
464 | return QString(); |
465 | } |
466 | |
467 | Q_D(const KLocalizedContext); |
468 | KLocalizedString trMessage; |
469 | if (!d->m_translationDomain.isEmpty()) { |
470 | trMessage = |
471 | kxi18ndcp(domain: d->m_translationDomain.toUtf8().constData(), context: context.toUtf8().constData(), singular: singular.toUtf8().constData(), plural: plural.toUtf8().constData()); |
472 | } else { |
473 | trMessage = kxi18ncp(context: context.toUtf8().constData(), singular: singular.toUtf8().constData(), plural: plural.toUtf8().constData()); |
474 | } |
475 | |
476 | resolvePlural(trMessage, param: param1); |
477 | resolveMessage(trMessage, param1: param2, param2: param3, param3: param4, param4: param5, param5: param6, param6: param7, param7: param8, param8: param9, param9: param10); |
478 | |
479 | return trMessage.toString(); |
480 | } |
481 | |
482 | QString KLocalizedContext::xi18nd(const QString &domain, |
483 | const QString &message, |
484 | const QVariant ¶m1, |
485 | const QVariant ¶m2, |
486 | const QVariant ¶m3, |
487 | const QVariant ¶m4, |
488 | const QVariant ¶m5, |
489 | const QVariant ¶m6, |
490 | const QVariant ¶m7, |
491 | const QVariant ¶m8, |
492 | const QVariant ¶m9, |
493 | const QVariant ¶m10) const |
494 | { |
495 | if (domain.isEmpty() || message.isEmpty()) { |
496 | qCWarning(KI18N) << "xi18nd() needs at least two parameters" ; |
497 | return QString(); |
498 | } |
499 | |
500 | KLocalizedString trMessage = kxi18nd(domain: domain.toUtf8().constData(), text: message.toUtf8().constData()); |
501 | |
502 | resolveMessage(trMessage, param1, param2, param3, param4, param5, param6, param7, param8, param9, param10); |
503 | |
504 | return trMessage.toString(); |
505 | } |
506 | |
507 | QString KLocalizedContext::xi18ndc(const QString &domain, |
508 | const QString &context, |
509 | const QString &message, |
510 | const QVariant ¶m1, |
511 | const QVariant ¶m2, |
512 | const QVariant ¶m3, |
513 | const QVariant ¶m4, |
514 | const QVariant ¶m5, |
515 | const QVariant ¶m6, |
516 | const QVariant ¶m7, |
517 | const QVariant ¶m8, |
518 | const QVariant ¶m9, |
519 | const QVariant ¶m10) const |
520 | { |
521 | if (domain.isEmpty() || context.isEmpty() || message.isEmpty()) { |
522 | qCWarning(KI18N) << "x18ndc() needs at least three arguments" ; |
523 | return QString(); |
524 | } |
525 | |
526 | KLocalizedString trMessage = kxi18ndc(domain: domain.toUtf8().constData(), context: context.toUtf8().constData(), text: message.toUtf8().constData()); |
527 | |
528 | resolveMessage(trMessage, param1, param2, param3, param4, param5, param6, param7, param8, param9, param10); |
529 | |
530 | return trMessage.toString(); |
531 | } |
532 | |
533 | QString KLocalizedContext::xi18ndp(const QString &domain, |
534 | const QString &singular, |
535 | const QString &plural, |
536 | const QVariant ¶m1, |
537 | const QVariant ¶m2, |
538 | const QVariant ¶m3, |
539 | const QVariant ¶m4, |
540 | const QVariant ¶m5, |
541 | const QVariant ¶m6, |
542 | const QVariant ¶m7, |
543 | const QVariant ¶m8, |
544 | const QVariant ¶m9, |
545 | const QVariant ¶m10) const |
546 | { |
547 | if (domain.isEmpty() || singular.isEmpty() || plural.isEmpty()) { |
548 | qCWarning(KI18N) << "xi18ndp() needs at least three arguments" ; |
549 | return QString(); |
550 | } |
551 | |
552 | KLocalizedString trMessage = kxi18ndp(domain: domain.toUtf8().constData(), singular: singular.toUtf8().constData(), plural: plural.toUtf8().constData()); |
553 | |
554 | resolvePlural(trMessage, param: param1); |
555 | resolveMessage(trMessage, param1: param2, param2: param3, param3: param4, param4: param5, param5: param6, param6: param7, param7: param8, param8: param9, param9: param10); |
556 | |
557 | return trMessage.toString(); |
558 | } |
559 | |
560 | QString KLocalizedContext::xi18ndcp(const QString &domain, |
561 | const QString &context, |
562 | const QString &singular, |
563 | const QString &plural, |
564 | const QVariant ¶m1, |
565 | const QVariant ¶m2, |
566 | const QVariant ¶m3, |
567 | const QVariant ¶m4, |
568 | const QVariant ¶m5, |
569 | const QVariant ¶m6, |
570 | const QVariant ¶m7, |
571 | const QVariant ¶m8, |
572 | const QVariant ¶m9, |
573 | const QVariant ¶m10) const |
574 | { |
575 | if (domain.isEmpty() || context.isEmpty() || singular.isEmpty() || plural.isEmpty()) { |
576 | qCWarning(KI18N) << "xi18ndcp() needs at least four arguments" ; |
577 | return QString(); |
578 | } |
579 | |
580 | KLocalizedString trMessage = |
581 | kxi18ndcp(domain: domain.toUtf8().constData(), context: context.toUtf8().constData(), singular: singular.toUtf8().constData(), plural: plural.toUtf8().constData()); |
582 | |
583 | resolvePlural(trMessage, param: param1); |
584 | resolveMessage(trMessage, param1: param2, param2: param3, param3: param4, param4: param5, param5: param6, param6: param7, param7: param8, param8: param9, param9: param10); |
585 | |
586 | return trMessage.toString(); |
587 | } |
588 | |
589 | #include "moc_klocalizedcontext.cpp" |
590 | |