diff options
| author | Danilo M. <danix@danix.xyz> | 2026-09-24 17:38:52 +0200 |
|---|---|---|
| committer | Danilo M. <danix@danix.xyz> | 2026-09-24 17:38:52 +0200 |
| commit | cfd96a07b5b14abe1585f0edf68cd0b9c8975463 (patch) | |
| tree | 2e8c613af723f5b3a60e9a345ac29c85ea06f837 /src/repeatrule.cpp | |
| parent | 516b2daaeab00bb4d4c28055a434dc5ee53aeb60 (diff) | |
| download | qtmaildir-cfd96a07b5b14abe1585f0edf68cd0b9c8975463.tar.gz qtmaildir-cfd96a07b5b14abe1585f0edf68cd0b9c8975463.zip | |
docs: document the calendar, translate it, file its follow-ups
Give RepeatRule its own Q_DECLARE_TR_FUNCTIONS context so lupdate extracts
describe() and the ordinal words, mirroring the array's QT_TRANSLATE_NOOP;
without it lupdate warned and RepeatRule/last was never extractable.
Diffstat (limited to 'src/repeatrule.cpp')
| -rw-r--r-- | src/repeatrule.cpp | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/src/repeatrule.cpp b/src/repeatrule.cpp index b9b9539..95a0ec3 100644 --- a/src/repeatrule.cpp +++ b/src/repeatrule.cpp @@ -18,7 +18,6 @@ #include "repeatrule.h" -#include <QCoreApplication> #include <QLocale> #include <QMap> @@ -58,13 +57,11 @@ const char *const kOrdinals[] = { QT_TRANSLATE_NOOP("RepeatRule", "fourth"), }; -QString tr(const char *text) { return QCoreApplication::translate("RepeatRule", text); } - QString ordinalWord(int ordinal) { if (ordinal == -1) - return tr("last"); - return (ordinal >= 1 && ordinal <= 4) ? tr(kOrdinals[ordinal - 1]) : QString(); + return RepeatRule::tr("last"); + return (ordinal >= 1 && ordinal <= 4) ? RepeatRule::tr(kOrdinals[ordinal - 1]) : QString(); } } // namespace |
