File indexing completed on 2024-04-28 15:25:20

0001 /*  This file is part of the KDE libraries
0002     SPDX-FileCopyrightText: 2006, 2013 Chusslove Illich <caslav.ilic@gmx.net>
0003 
0004     SPDX-License-Identifier: LGPL-2.0-or-later
0005 */
0006 #ifndef KLOCALIZEDSTRING_H
0007 #define KLOCALIZEDSTRING_H
0008 
0009 #include <ki18n_export.h>
0010 
0011 #include <QChar>
0012 #include <QLatin1Char>
0013 #include <QSet>
0014 #include <QString>
0015 #include <QStringList>
0016 
0017 #include <memory>
0018 
0019 #include <kuitsetup.h>
0020 
0021 // enforce header to be parsed before redefining i18n* with preprocessor macros
0022 // depending on TRANSLATION_DOMAIN (see bottom of file)
0023 #include <klocalizedcontext.h>
0024 
0025 class KLocalizedStringPrivate;
0026 class KLazyLocalizedString;
0027 
0028 /**
0029  * \file klocalizedstring.h
0030  */
0031 
0032 #if KI18N_ENABLE_DEPRECATED_SINCE(5, 89)
0033 #ifndef I18N_NOOP
0034 /**
0035  * Wrap string for extraction.
0036  *
0037  * See \ref i18n_noop for use cases.
0038  *
0039  * \deprecated since 5.89, use @c kli18n() instead.
0040  */
0041 #define I18N_NOOP(text) text
0042 #endif
0043 #endif
0044 
0045 #if KI18N_ENABLE_DEPRECATED_SINCE(5, 89)
0046 #ifndef I18NC_NOOP
0047 /**
0048  * Wrap string with context for extraction.
0049  *
0050  * See \ref i18n_noop for use cases.
0051  *
0052  * \deprecated since 5.89, use @c kli18nc() instead.
0053  */
0054 #define I18NC_NOOP(context, text) context, text
0055 #endif
0056 #endif
0057 
0058 #if KI18N_ENABLE_DEPRECATED_SINCE(5, 89)
0059 #ifndef I18N_NOOP2
0060 /**
0061  * Wrap string with context for extraction, discarding context.
0062  * WARNING: this means you'll need to pass the exact same context when calling i18nc() later on.
0063  * Do not make typos...
0064  * The preferred solution is to use I18NC_NOOP and store both @p context and @p text.
0065  * I18NC_NOOP2 exists for cases where storing the context is not possible.
0066  *
0067  * \deprecated between 5.0 and 5.64, re-enabled in 5.65, re-deprecated in 5.89, use @p kli18nc() instead.
0068  */
0069 #define I18N_NOOP2(context, text) text
0070 #endif
0071 #endif
0072 
0073 #if KI18N_ENABLE_DEPRECATED_SINCE(5, 0)
0074 #ifndef I18N_NOOP2_NOSTRIP
0075 /**
0076  * Wrap string with context for extraction.
0077  *
0078  * \deprecated Since 5.0, use \c I18NC_NOOP.
0079  */
0080 #define I18N_NOOP2_NOSTRIP(context, text) context, text
0081 #endif
0082 #endif // KI18N_ENABLE_DEPRECATED_SINCE(5, 0)
0083 
0084 /**
0085  * @class KLocalizedString klocalizedstring.h <KLocalizedString>
0086  *
0087  * \short Class for producing and handling localized messages
0088  *
0089  * \c KLocalizedString handles translation and
0090  * argument substitution and formatting of user-visible text.
0091  *
0092  * \c KLocalizedString instances are usually not constructed directly,
0093  * but through one of the wrapper \c \*i18n\* calls.
0094  *
0095  * For detailed information on how to use KI18n functions please refer
0096  * to \ref prg_guide.
0097  */
0098 class KI18N_EXPORT KLocalizedString
0099 {
0100     friend class KLocalizedStringPrivate;
0101     friend class KLazyLocalizedString;
0102 
0103     friend KLocalizedString KI18N_EXPORT ki18n(const char *text);
0104     friend KLocalizedString KI18N_EXPORT ki18nc(const char *context, const char *text);
0105     friend KLocalizedString KI18N_EXPORT ki18np(const char *singular, const char *plural);
0106     friend KLocalizedString KI18N_EXPORT ki18ncp(const char *context, const char *singular, const char *plural);
0107     friend KLocalizedString KI18N_EXPORT ki18nd(const char *domain, const char *text);
0108     friend KLocalizedString KI18N_EXPORT ki18ndc(const char *domain, const char *context, const char *text);
0109     friend KLocalizedString KI18N_EXPORT ki18ndp(const char *domain, const char *singular, const char *plural);
0110     friend KLocalizedString KI18N_EXPORT ki18ndcp(const char *domain, const char *context, const char *singular, const char *plural);
0111 
0112     friend KLocalizedString KI18N_EXPORT kxi18n(const char *text);
0113     friend KLocalizedString KI18N_EXPORT kxi18nc(const char *context, const char *text);
0114     friend KLocalizedString KI18N_EXPORT kxi18np(const char *singular, const char *plural);
0115     friend KLocalizedString KI18N_EXPORT kxi18ncp(const char *context, const char *singular, const char *plural);
0116     friend KLocalizedString KI18N_EXPORT kxi18nd(const char *domain, const char *text);
0117     friend KLocalizedString KI18N_EXPORT kxi18ndc(const char *domain, const char *context, const char *text);
0118     friend KLocalizedString KI18N_EXPORT kxi18ndp(const char *domain, const char *singular, const char *plural);
0119     friend KLocalizedString KI18N_EXPORT kxi18ndcp(const char *domain, const char *context, const char *singular, const char *plural);
0120 
0121 public:
0122     /**
0123      * Construct an empty message.
0124      *
0125      * Direct construction is used when another \c KLocalizedString instance,
0126      * obtained by one of \c ki18n\* calls, should later be assigned
0127      * to directly constructed instance.
0128      * Before the assignment happens, directly constructed instance
0129      * is not valid for finalization by \c toString methods.
0130      *
0131      * \see isEmpty
0132      */
0133     explicit KLocalizedString();
0134 
0135     /**
0136      * Copy constructor.
0137      */
0138     KLocalizedString(const KLocalizedString &rhs);
0139 
0140     /**
0141      * Assignment operator.
0142      */
0143     KLocalizedString &operator=(const KLocalizedString &rhs);
0144 
0145     /**
0146      * Destructor.
0147      */
0148     ~KLocalizedString();
0149 
0150     /**
0151      * Check whether the message is empty.
0152      *
0153      * The message is considered empty if the object was constructed
0154      * via the default constructor.
0155      *
0156      * Empty messages are not valid for finalization.
0157      * The behavior of calling \c toString on them is undefined.
0158      * In debug mode, an error mark may appear in the returned string.
0159      *
0160      * \return \c true if the message is empty, \c false otherwise
0161      */
0162     bool isEmpty() const;
0163 
0164     /**
0165      * Finalize the translation.
0166      *
0167      * Creates translated \c QString, with placeholders substituted
0168      * by arguments given by \c KLocalizedString::subs methods.
0169      * Translated text is searched for and arguments are formatted
0170      * based on the global locale.
0171      *
0172      * If there was any mismatch between placeholders and arguments,
0173      * in debug mode the returned string may contain error marks.
0174      *
0175      * \return finalized translation
0176      */
0177     Q_REQUIRED_RESULT QString toString() const;
0178 
0179     /**
0180      * Like \c toString, but look for translation only in given languages.
0181      *
0182      * Given languages override languages defined by the global locale,
0183      * and any languages set earlier using \c withLanguages.
0184      * If \p languages is empty, original message is returned.
0185      *
0186      * \param languages list of language codes (by decreasing priority)
0187      * \return finalized translation
0188      */
0189     Q_REQUIRED_RESULT QString toString(const QStringList &languages) const;
0190 
0191 #if 0 // until locale system is ready
0192     /**
0193      * Like \c toString, but look for translation based on given locale.
0194      *
0195      * Given locale overrides any set earlier using \c withLocale.
0196      * If \p locale is \c NULL, original message is returned.
0197      *
0198      * \param locale the locale for which translations are made
0199      * \return finalized translation
0200      */
0201     QString toString(const KLocale *locale) const;
0202 #endif
0203 
0204     /**
0205      * Like \c toString, but look for translation in the given domain.
0206      *
0207      * Given domain overrides any set earlier using \c withDomain.
0208      *
0209      * \param domain the translation domain
0210      * \return finalized translation
0211      */
0212     Q_REQUIRED_RESULT QString toString(const char *domain) const;
0213 
0214     /**
0215      * Like \c toString, but resolve KUIT markup into given visual format.
0216      *
0217      * Given visual format overrides that implied by the context UI marker
0218      * or set earlier using \c withFormat.
0219      * If the message is not markup-aware,
0220      * this is same as \c toString without arguments.
0221      *
0222      * \param format the target visual format
0223      * \return finalized translation
0224      */
0225     Q_REQUIRED_RESULT QString toString(Kuit::VisualFormat format) const;
0226 
0227     /**
0228      * Indicate to look for translation only in given languages.
0229      *
0230      * \param languages list of language codes (by decreasing priority)
0231      * \return updated \c KLocalizedString
0232      */
0233     Q_REQUIRED_RESULT KLocalizedString withLanguages(const QStringList &languages) const;
0234 
0235 #if 0 // until locale system is ready
0236     /**
0237      * Indicate to look for translation based on given locale.
0238      *
0239      * \param locale the locale for which translations are made
0240      * \return updated \c KLocalizedString
0241      */
0242     KLocalizedString withLocale(const KLocale *locale) const;
0243 #endif
0244 
0245     /**
0246      * Indicate to look for translation in the given domain.
0247      *
0248      * \param domain the translation domain
0249      * \return updated \c KLocalizedString
0250      */
0251     Q_REQUIRED_RESULT KLocalizedString withDomain(const char *domain) const;
0252 
0253     /**
0254      * Indicate to resolve KUIT markup into given visual format.
0255      *
0256      * If the message is not markup-aware, this has no effect.
0257      *
0258      * \param format the target visual format
0259      * \return updated \c KLocalizedString
0260      */
0261     Q_REQUIRED_RESULT KLocalizedString withFormat(Kuit::VisualFormat format) const;
0262 
0263     /**
0264      * Substitute an int argument into the message.
0265      *
0266      * \param a the argument
0267      * \param fieldWidth width of the formatted field, padded by spaces.
0268      *                   Positive value aligns right, negative aligns left
0269      * \param base the radix used to represent the number as a string.
0270      *             Valid values range from 2 to 36
0271      * \param fillChar the character used to fill up the empty places when
0272      *                 field width is greater than argument width
0273      * \return updated \c KLocalizedString
0274      */
0275     Q_REQUIRED_RESULT KLocalizedString subs(int a, int fieldWidth = 0, int base = 10, QChar fillChar = QLatin1Char(' ')) const;
0276 
0277     /**
0278      * Substitute an unsigned int argument into the message.
0279      *
0280      * \param a the argument
0281      * \param fieldWidth width of the formatted field, padded by spaces.
0282      *                   Positive value aligns right, negative aligns left
0283      * \param base the radix used to represent the number as a string.
0284      *             Valid values range from 2 to 36
0285      * \param fillChar the character used to fill up the empty places when
0286      *                 field width is greater than argument width
0287      * \return updated \c KLocalizedString
0288      */
0289     Q_REQUIRED_RESULT KLocalizedString subs(uint a, int fieldWidth = 0, int base = 10, QChar fillChar = QLatin1Char(' ')) const;
0290 
0291     /**
0292      * Substitute a long argument into the message.
0293      *
0294      * \param a the argument
0295      * \param fieldWidth width of the formatted field, padded by spaces.
0296      *                   Positive value aligns right, negative aligns left
0297      * \param base the radix used to represent the number as a string.
0298      *             Valid values range from 2 to 36
0299      * \param fillChar the character used to fill up the empty places when
0300      *                 field width is greater than argument width
0301      * \return updated \c KLocalizedString
0302      */
0303     Q_REQUIRED_RESULT KLocalizedString subs(long a, int fieldWidth = 0, int base = 10, QChar fillChar = QLatin1Char(' ')) const;
0304 
0305     /**
0306      * Substitute an unsigned long argument into the message.
0307      *
0308      * \param a the argument
0309      * \param fieldWidth width of the formatted field, padded by spaces.
0310      *                   Positive value aligns right, negative aligns left
0311      * \param base the radix used to represent the number as a string.
0312      *             Valid values range from 2 to 36
0313      * \param fillChar the character used to fill up the empty places when
0314      *                 field width is greater than argument width
0315      * \return updated \c KLocalizedString
0316      */
0317     Q_REQUIRED_RESULT KLocalizedString subs(ulong a, int fieldWidth = 0, int base = 10, QChar fillChar = QLatin1Char(' ')) const;
0318 
0319     /**
0320      * Substitute a long long argument into the message.
0321      *
0322      * \param a the argument
0323      * \param fieldWidth width of the formatted field, padded by spaces.
0324      *                   Positive value aligns right, negative aligns left
0325      * \param base the radix used to represent the number as a string.
0326      *             Valid values range from 2 to 36
0327      * \param fillChar the character used to fill up the empty places when
0328      *                 field width is greater than argument width
0329      * \return updated \c KLocalizedString
0330      */
0331     Q_REQUIRED_RESULT KLocalizedString subs(qlonglong a, int fieldWidth = 0, int base = 10, QChar fillChar = QLatin1Char(' ')) const;
0332 
0333     /**
0334      * Substitute an unsigned long long argument into the message.
0335      *
0336      * \param a the argument
0337      * \param fieldWidth width of the formatted field, padded by spaces.
0338      *                   Positive value aligns right, negative aligns left
0339      * \param base the radix used to represent the number as a string.
0340      *             Valid values range from 2 to 36
0341      * \param fillChar the character used to fill up the empty places when
0342      *                 field width is greater than argument width
0343      * \return updated \c KLocalizedString
0344      */
0345     Q_REQUIRED_RESULT KLocalizedString subs(qulonglong a, int fieldWidth = 0, int base = 10, QChar fillChar = QLatin1Char(' ')) const;
0346 
0347     /**
0348      * Substitute a double argument into the message.
0349      *
0350      * \param a the argument
0351      * \param fieldWidth width of the formatted field, padded by spaces.
0352      *                   Positive value aligns right, negative aligns left
0353      * \param format type of floating point formatting, like in QString::arg
0354      * \param precision number of digits after the decimal separator
0355      * \param fillChar the character used to fill up the empty places when
0356      *                 field width is greater than argument width
0357      * \return updated \c KLocalizedString
0358      */
0359     Q_REQUIRED_RESULT KLocalizedString subs(double a, int fieldWidth = 0, char format = 'g', int precision = -1, QChar fillChar = QLatin1Char(' ')) const;
0360 
0361     /**
0362      * Substitute a \c QChar argument into the message.
0363      *
0364      * \param a the argument
0365      * \param fieldWidth width of the formatted field, padded by spaces.
0366      *                   Positive value aligns right, negative aligns left
0367      * \param fillChar the character used to fill up the empty places when
0368      *                 field width is greater than argument width
0369      * \return updated \c KLocalizedString
0370      */
0371     Q_REQUIRED_RESULT KLocalizedString subs(QChar a, int fieldWidth = 0, QChar fillChar = QLatin1Char(' ')) const;
0372 
0373     /**
0374      * Substitute a \c QString argument into the message.
0375      *
0376      * \param a the argument
0377      * \param fieldWidth width of the formatted field, padded by spaces.
0378      *                   Positive value aligns right, negative aligns left
0379      * \param fillChar the character used to fill up the empty places when
0380      *                 field width is greater than argument width
0381      * \return updated \c KLocalizedString
0382      */
0383     Q_REQUIRED_RESULT KLocalizedString subs(const QString &a, int fieldWidth = 0, QChar fillChar = QLatin1Char(' ')) const;
0384 
0385     /**
0386      * Substitute another \c KLocalizedString into the message.
0387      *
0388      * \param a the argument
0389      * \param fieldWidth width of the formatted field, padded by spaces.
0390      *                   Positive value aligns right, negative aligns left
0391      * \param fillChar the character used to fill up the empty places when
0392      *                 field width is greater than argument width
0393      * \return updated \c KLocalizedString
0394      */
0395     Q_REQUIRED_RESULT KLocalizedString subs(const KLocalizedString &a, int fieldWidth = 0, QChar fillChar = QLatin1Char(' ')) const;
0396 
0397     /**
0398      * Add dynamic context to the message.
0399      *
0400      * See \ref dyn_ctxt for use cases.
0401      *
0402      * \param key context key
0403      * \param value context value
0404      * \return updated \c KLocalizedString
0405      */
0406     Q_REQUIRED_RESULT KLocalizedString inContext(const QString &key, const QString &value) const;
0407 
0408     /**
0409      * Relax matching between placeholders and arguments.
0410      *
0411      * Normally the placeholders should start from %1 and have no gaps,
0412      * and on finalization there must be exactly as many arguments
0413      * supplied through \c subs methods as there are unique plaecholders.
0414      * If this is not satisfied, in debug mode warnings are printed
0415      * and the finalized string may contain error marks.
0416      *
0417      * This method relaxes the placeholder-argument matching,
0418      * such that there must only be an argument available for
0419      * every present unique placeholder (taking placeholder numbers
0420      * to be 1-based indices into the argument list).
0421      * This can come useful in some situations.
0422      *
0423      * \return updated \c KLocalizedString
0424      */
0425     Q_REQUIRED_RESULT KLocalizedString relaxSubs() const;
0426 
0427     /**
0428      * Do not resolve KUIT markup.
0429      *
0430      * If the message is markup-aware
0431      * (constructed by one of \c \*xi18n\* calls),
0432      * this function can be used to make it non-markup-aware.
0433      * This may be useful for debugging markup.
0434      *
0435      * \return updated \c KLocalizedString
0436      */
0437     Q_REQUIRED_RESULT KLocalizedString ignoreMarkup() const;
0438 
0439     /**
0440      * Returns the untranslated text.
0441      *
0442      * \since 5.64
0443      */
0444     Q_REQUIRED_RESULT QByteArray untranslatedText() const;
0445 
0446     /**
0447      * Set the given domain as application's main domain.
0448      *
0449      * This function must be called in applications, in order to have
0450      * any translations at all. It should never be called in libraries.
0451      * This allows to check whether the application is translated
0452      * into a given language, so that if it is not, translations from
0453      * underlying libraries will not appear even if they are translated.
0454      * This prevents mixing of translated and untranslated text
0455      * in the user interface.
0456      *
0457      * This function should be called right after creating the instance
0458      * of QCoreApplication or one of its subclasses. At that time the locale
0459      * setup has been made, including what is hooked into the
0460      * QCoreApplication startup, like KXMLGUI's language switching support.
0461      * So the initialisation done by this function sees all the data it should.
0462      *
0463      * \param domain the translation domain of the application
0464      */
0465     static void setApplicationDomain(const char *domain);
0466 
0467     /**
0468      * Get the application's main translation domain.
0469      *
0470      * Returns the domain set by \c setApplicationDomain.
0471      */
0472     static QByteArray applicationDomain();
0473 
0474 #if 0 // until locale system is ready
0475     /**
0476      * Set the locale for which translations will be made.
0477      *
0478      * Locale determines from which languages (and in which order)
0479      * to draw translations, formatting of number arguments, etc.
0480      *
0481      * \param locale the locale
0482      * \see setLanguages
0483      */
0484     static void setLocale(const KLocale &locale);
0485 #endif
0486 
0487     /**
0488      * Get the languages for which translations will be made.
0489      *
0490      * Returned languages are ordered with decreasing priority.
0491      *
0492      * \return languages ordered list of language codes
0493      * \see setLanguages
0494      * \see clearLanguages
0495      *
0496      * \since 5.20.0
0497      */
0498     static QStringList languages();
0499 
0500     /**
0501      * Set the languages for which translations will be made.
0502      *
0503      * This overrides the languages provided by the locale.
0504      * Languages should be ordered with decreasing priority.
0505      *
0506      * \param languages ordered list of language codes
0507      * \see setLocale
0508      * \see clearLanguages
0509      * \see languages
0510      */
0511     static void setLanguages(const QStringList &languages);
0512 
0513     /**
0514      * Clear override languages.
0515      *
0516      * This clears the override languages, going back to those
0517      * provided by the locale.
0518      *
0519      * \see setLanguages
0520      * \see languages
0521      */
0522     static void clearLanguages();
0523 
0524     /**
0525      * Check whether the translation catalog file in the given language
0526      * for the set application translation domain exists.
0527      *
0528      * \param language the language code to check
0529      * \return \c true if the translation catalog for \p language exits,
0530      *         \c false otherwise
0531      * \see setApplicationDomain
0532      */
0533     static bool isApplicationTranslatedInto(const QString &language);
0534 
0535     /**
0536      * @since 5.0
0537      *
0538      * Get the languages for which there exists the translation catalog file
0539      * for the set application translation domain.
0540      *
0541      * The application domain is set by \c setApplicationDomain.
0542      * If the application domain was not set, empty set is returned.
0543      * If the application domain was set, the language set will always
0544      * contain at least the source code language (<tt>en_US</tt>).
0545      *
0546      * \return set of language codes for existing translation catalogs
0547      * \see setApplicationDomain
0548      */
0549     static QSet<QString> availableApplicationTranslations();
0550 
0551     /**
0552      * @since 5.0
0553      *
0554      * Get the languages for which a translation catalog file
0555      * for the passed translation domain exists.
0556      *
0557      * If the translation domain was not specified in the
0558      * domain parameter an empty set is returned.
0559      *
0560      * If the application domain was set, the language set will always
0561      * contain at least the source code language (<tt>en_US</tt>).
0562      *
0563      * \param domain query for translations of a specific domain, if an empty
0564      * QByteArray is passed, an empty set will be returned
0565      *
0566      * \return set of language codes for existing translation catalogs
0567      * \see setApplicationDomain
0568      * \see availableApplicationTranslations
0569      */
0570     static QSet<QString> availableDomainTranslations(const QByteArray &domain);
0571 
0572     /**
0573      * Load locales for a domain from a specific location
0574      * This is useful for resources which have their translation files
0575      * outside of the usual $XDG_DATA_DIRS/locales location
0576      *
0577      * \param the domain to load resources from
0578      * \path the full file path to the locale directory
0579      */
0580     static void addDomainLocaleDir(const QByteArray &domain, const QString &path);
0581 
0582     /**
0583      * Find a path to the localized file for the given original path.
0584      *
0585      * This is intended mainly for non-text resources (images, sounds, etc).
0586      * Text resources should be handled in more specific ways.
0587      *
0588      * Possible localized paths are checked in turn by priority of set
0589      * languages, in form of <tt>\<dirname\>/l10n/\<lang\>/\<basename\></tt>,
0590      * where <tt>\<dirname\></tt> and <tt>\<basename\></tt> are those of
0591      * the original path, and <tt>\<lang\></tt> is the language code.
0592      *
0593      * \param filePath path to the original file
0594      *
0595      * \return path to the localized file if found, original path otherwise
0596      */
0597     Q_REQUIRED_RESULT static QString localizedFilePath(const QString &filePath);
0598 
0599     /**
0600      * Remove accelerator marker from a UI text label.
0601      *
0602      * Accelerator marker is not always a plain ampersand (&),
0603      * so it is not enough to just remove it by \c QString::remove.
0604      * The label may contain escaped markers ("&&") which must be resolved
0605      * and skipped, as well as CJK-style markers ("Foo (&F)") where
0606      * the whole parenthesis construct should be removed.
0607      * Therefore always use this function to remove accelerator marker
0608      * from UI labels.
0609      *
0610      * \param label UI label which may contain an accelerator marker
0611      * \return label without the accelerator marker
0612      */
0613     Q_REQUIRED_RESULT static QString removeAcceleratorMarker(const QString &label);
0614 
0615 #if KI18N_ENABLE_DEPRECATED_SINCE(5, 0)
0616     /**
0617      * Translate a message with Qt semantics.
0618      *
0619      * This functions provides a capability to derive a Qt translator from
0620      * \c QTranslator and draw translations from PO catalogs of given domain.
0621      * All domains added with \c insertQtDomain are checked for translation,
0622      * in undefined order.
0623      * No Ki18n-specific processing is performed (formatting, scripting, etc).
0624      *
0625      * \see QTranslator
0626      *
0627      * \deprecated Use Qt's native i18n system, Qt Linguist,
0628      *             with roundtrip TS->PO->TS through
0629      *             Qt's \c lupdate and \c lconvert commands.
0630      */
0631     KI18N_DEPRECATED_VERSION(5, 0, "See API docs")
0632     Q_REQUIRED_RESULT static QString translateQt(const char *context, const char *text, const char *comment, int n);
0633 #endif
0634 
0635 #if KI18N_ENABLE_DEPRECATED_SINCE(5, 0)
0636     /**
0637      * Add another domain to search for Qt translations.
0638      *
0639      * \param domain the translation domain to add
0640      *
0641      * \see translateQt
0642      * \see removeQtDomain
0643      *
0644      * \deprecated Since 5.0
0645      */
0646     KI18N_DEPRECATED_VERSION(5, 0, "See API docs")
0647     static void insertQtDomain(const char *domain);
0648 #endif
0649 
0650 #if KI18N_ENABLE_DEPRECATED_SINCE(5, 0)
0651     /**
0652      * Remove a domain from Qt translation lookup.
0653      *
0654      * To really remove the domain, this function must be invoked
0655      * at least as many times as \c insertQtDomain was invoked to add
0656      * this domain. This makes it safe to always use paired
0657      * insertion/removal calls, without pulling out a domain
0658      * underneath an unrelated piece of code that uses it as well.
0659      *
0660      * \param domain the translation domain to remove
0661      *
0662      * \see translateQt
0663      * \see insertQtDomain
0664      *
0665      * \deprecated Since 5.0
0666      */
0667     KI18N_DEPRECATED_VERSION(5, 0, "See API docs")
0668     static void removeQtDomain(const char *domain);
0669 #endif
0670 
0671 private:
0672     // exported because called from inline KLazyLocalizedString::operator KLocalizedString()
0673     KLocalizedString(const char *domain, const char *context, const char *text, const char *plural, bool markupAware);
0674 
0675 private:
0676     std::unique_ptr<KLocalizedStringPrivate> const d;
0677 };
0678 
0679 // Do not document every multi-argument i18n* call separately,
0680 // but provide special quasi-calls that only Doxygen sees.
0681 // Placed in front of ki18n* calls, because i18n* are more basic.
0682 #ifdef K_DOXYGEN
0683 
0684 /**
0685  * Translate a string and substitute any arguments.
0686  *
0687  * \param text string to translate
0688  * \param arg arguments to insert (0 to 9),
0689  *            admissible types according to \c KLocalizedString::subs methods
0690  * \return translated string
0691  */
0692 QString i18n(const char *text, const TYPE &arg...);
0693 
0694 /**
0695  * Translate a string with context and substitute any arguments.
0696  *
0697  * \param context context of the string
0698  * \param text string to translate
0699  * \param arg arguments to insert (0 to 9),
0700  *            admissible types according to \c KLocalizedString::subs methods
0701  * \return translated string
0702  */
0703 QString i18nc(const char *context, const char *text, const TYPE &arg...);
0704 
0705 /**
0706  * Translate a string with plural and substitute any arguments.
0707  *
0708  * \param singular singular form of the string to translate
0709  * \param plural plural form of the string to translate
0710  * \param arg arguments to insert (0 to 9),
0711  *            admissible types according to \c KLocalizedString::subs methods
0712  * \return translated string
0713  */
0714 QString i18np(const char *singular, const char *plural, const TYPE &arg...);
0715 
0716 /**
0717  * Translate a string with context and plural and substitute any arguments.
0718  *
0719  * \param context context of the string
0720  * \param singular singular form of the string to translate
0721  * \param plural plural form of the string to translate
0722  * \param arg arguments to insert (0 to 9),
0723  *            admissible types according to \c KLocalizedString::subs methods
0724  * \return translated string
0725  */
0726 QString i18ncp(const char *context, const char *singular, const char *plural, const TYPE &arg...);
0727 
0728 /**
0729  * Translate a string from domain and substitute any arguments.
0730  *
0731  * \param domain domain in which to look for translations
0732  * \param text string to translate
0733  * \param arg arguments to insert (0 to 9),
0734  *            admissible types according to \c KLocalizedString::subs methods
0735  * \return translated string
0736  */
0737 QString i18nd(const char *domain, const char *text, const TYPE &arg...);
0738 
0739 /**
0740  * Translate a string from domain with context and substitute any arguments.
0741  *
0742  * \param domain domain in which to look for translations
0743  * \param context context of the string
0744  * \param text string to translate
0745  * \param arg arguments to insert (0 to 9),
0746  *            admissible types according to \c KLocalizedString::subs methods
0747  * \return translated string
0748  */
0749 QString i18ndc(const char *domain, const char *context, const char *text, const TYPE &arg...);
0750 
0751 /**
0752  * Translate a string from domain with plural and substitute any arguments.
0753  *
0754  * \param domain domain in which to look for translations
0755  * \param singular singular form of the string to translate
0756  * \param plural plural form of the string to translate
0757  * \param arg arguments to insert (0 to 9),
0758  *            admissible types according to \c KLocalizedString::subs methods
0759  * \return translated string
0760  */
0761 QString i18ndp(const char *domain, const char *singular, const char *plural, const TYPE &arg...);
0762 
0763 /**
0764  * Translate a string from domain with context and plural
0765  * and substitute any arguments.
0766  *
0767  * \param domain domain in which to look for translations
0768  * \param context context of the string
0769  * \param singular singular form of the string to translate
0770  * \param plural plural form of the string to translate
0771  * \param arg arguments to insert (0 to 9),
0772  *            admissible types according to \c KLocalizedString::subs methods
0773  * \return translated string
0774  */
0775 QString i18ndcp(const char *domain, const char *context, const char *singular, const char *plural, const TYPE &arg...);
0776 
0777 /**
0778  * Translate a markup-aware string and substitute any arguments.
0779  *
0780  * \param text string to translate
0781  * \param arg arguments to insert (0 to 9),
0782  *            admissible types according to \c KLocalizedString::subs methods
0783  * \return translated string
0784  */
0785 QString xi18n(const char *text, const TYPE &arg...);
0786 
0787 /**
0788  * Translate a markup-aware string with context and substitute any arguments.
0789  *
0790  * \param context context of the string
0791  * \param text string to translate
0792  * \param arg arguments to insert (0 to 9),
0793  *            admissible types according to \c KLocalizedString::subs methods
0794  * \return translated string
0795  */
0796 QString xi18nc(const char *context, const char *text, const TYPE &arg...);
0797 
0798 /**
0799  * Translate a markup-aware string with plural and substitute any arguments.
0800  *
0801  * \param singular singular form of the string to translate
0802  * \param plural plural form of the string to translate
0803  * \param arg arguments to insert (0 to 9),
0804  *            admissible types according to \c KLocalizedString::subs methods
0805  * \return translated string
0806  */
0807 QString xi18np(const char *singular, const char *plural, const TYPE &arg...);
0808 
0809 /**
0810  * Translate a markup-aware string with context and plural
0811  * and substitute any arguments.
0812  *
0813  * \param context context of the string
0814  * \param singular singular form of the string to translate
0815  * \param plural plural form of the string to translate
0816  * \param arg arguments to insert (0 to 9),
0817  *            admissible types according to \c KLocalizedString::subs methods
0818  * \return translated string
0819  */
0820 QString xi18ncp(const char *context, const char *singular, const char *plural, const TYPE &arg...);
0821 
0822 /**
0823  * Translate a markup-aware string from domain and substitute any arguments.
0824  *
0825  * \param domain domain in which to look for translations
0826  * \param text string to translate
0827  * \param arg arguments to insert (0 to 9),
0828  *            admissible types according to \c KLocalizedString::subs methods
0829  * \return translated string
0830  */
0831 QString xi18nd(const char *domain, const char *text, const TYPE &arg...);
0832 
0833 /**
0834  * Translate a markup-aware string from domain with context
0835  * and substitute any arguments.
0836  *
0837  * \param domain domain in which to look for translations
0838  * \param context context of the string
0839  * \param text string to translate
0840  * \param arg arguments to insert (0 to 9),
0841  *            admissible types according to \c KLocalizedString::subs methods
0842  * \return translated string
0843  */
0844 QString xi18ndc(const char *domain, const char *context, const char *text, const TYPE &arg...);
0845 
0846 /**
0847  * Translate a markup-aware string from domain with plural
0848  * and substitute any arguments.
0849  *
0850  * \param domain domain in which to look for translations
0851  * \param singular singular form of the string to translate
0852  * \param plural plural form of the string to translate
0853  * \param arg arguments to insert (0 to 9),
0854  *            admissible types according to \c KLocalizedString::subs methods
0855  * \return translated string
0856  */
0857 QString xi18ndp(const char *domain, const char *singular, const char *plural, const TYPE &arg...);
0858 
0859 /**
0860  * Translate a markup-aware string from domain with context and plural
0861  * and substitute any arguments.
0862  *
0863  * \param domain domain in which to look for translations
0864  * \param context context of the string
0865  * \param singular singular form of the string to translate
0866  * \param plural plural form of the string to translate
0867  * \param arg arguments to insert (0 to 9),
0868  *            admissible types according to \c KLocalizedString::subs methods
0869  * \return translated string
0870  */
0871 QString xi18ndcp(const char *domain, const char *context, const char *singular, const char *plural, const TYPE &arg...);
0872 
0873 #endif // K_DOXYGEN
0874 
0875 /**
0876  * Create non-finalized translated string.
0877  *
0878  * \param text string to translate
0879  * \return non-finalized translated string
0880  */
0881 KLocalizedString KI18N_EXPORT ki18n(const char *text);
0882 
0883 /**
0884  * Create non-finalized translated string with context.
0885  *
0886  * \param context context of the string
0887  * \param text string to translate
0888  * \return non-finalized translated string
0889  */
0890 KLocalizedString KI18N_EXPORT ki18nc(const char *context, const char *text);
0891 
0892 /**
0893  * Create non-finalized translated string with plural.
0894  *
0895  * \param singular singular form of the string to translate
0896  * \param plural plural form of the string to translate
0897  * \return non-finalized translated string
0898  */
0899 KLocalizedString KI18N_EXPORT ki18np(const char *singular, const char *plural);
0900 
0901 /**
0902  * Create non-finalized translated string with context and plural.
0903  *
0904  * \param context context of the string
0905  * \param singular singular form of the string to translate
0906  * \param plural plural form of the string to translate
0907  * \return non-finalized translated string
0908  */
0909 KLocalizedString KI18N_EXPORT ki18ncp(const char *context, const char *singular, const char *plural);
0910 
0911 /**
0912  * Create non-finalized translated string from domain.
0913  *
0914  * \param domain domain in which to look for translations
0915  * \param text string to translate
0916  * \return non-finalized translated string
0917  */
0918 KLocalizedString KI18N_EXPORT ki18nd(const char *domain, const char *text);
0919 
0920 /**
0921  * Create non-finalized translated string from domain with context.
0922  *
0923  * \param domain domain in which to look for translations
0924  * \param context context of the string
0925  * \param text string to translate
0926  * \return non-finalized translated string
0927  */
0928 KLocalizedString KI18N_EXPORT ki18ndc(const char *domain, const char *context, const char *text);
0929 
0930 /**
0931  * Create non-finalized translated string from domain with plural.
0932  *
0933  * \param domain domain in which to look for translations
0934  * \param singular singular form of the string to translate
0935  * \param plural plural form of the string to translate
0936  * \return non-finalized translated string
0937  */
0938 KLocalizedString KI18N_EXPORT ki18ndp(const char *domain, const char *singular, const char *plural);
0939 
0940 /**
0941  * Create non-finalized translated string from domain with context and plural.
0942  *
0943  * \param domain domain in which to look for translations
0944  * \param context context of the string
0945  * \param singular singular form of the string to translate
0946  * \param plural plural form of the string to translate
0947  * \return non-finalized translated string
0948  */
0949 KLocalizedString KI18N_EXPORT ki18ndcp(const char *domain, const char *context, const char *singular, const char *plural);
0950 
0951 /**
0952  * Create non-finalized markup-aware translated string.
0953  *
0954  * \param text string to translate
0955  * \return non-finalized translated string
0956  */
0957 KLocalizedString KI18N_EXPORT kxi18n(const char *text);
0958 
0959 /**
0960  * Create non-finalized markup-aware translated string with context.
0961  *
0962  * \param context context of the string
0963  * \param text string to translate
0964  * \return non-finalized translated string
0965  */
0966 KLocalizedString KI18N_EXPORT kxi18nc(const char *context, const char *text);
0967 
0968 /**
0969  * Create non-finalized markup-aware translated string with plural.
0970  *
0971  * \param singular singular form of the string to translate
0972  * \param plural plural form of the string to translate
0973  * \return non-finalized translated string
0974  */
0975 KLocalizedString KI18N_EXPORT kxi18np(const char *singular, const char *plural);
0976 
0977 /**
0978  * Create non-finalized markup-aware translated string.
0979  * with context and plural.
0980  *
0981  * \param context context of the string
0982  * \param singular singular form of the string to translate
0983  * \param plural plural form of the string to translate
0984  * \return non-finalized translated string
0985  */
0986 KLocalizedString KI18N_EXPORT kxi18ncp(const char *context, const char *singular, const char *plural);
0987 
0988 /**
0989  * Create non-finalized markup-aware translated string from domain.
0990  *
0991  * \param domain domain in which to look for translations
0992  * \param text string to translate
0993  * \return non-finalized translated string
0994  */
0995 KLocalizedString KI18N_EXPORT kxi18nd(const char *domain, const char *text);
0996 
0997 /**
0998  * Create non-finalized markup-aware translated string from domain with context.
0999  *
1000  * \param domain domain in which to look for translations
1001  * \param context context of the string
1002  * \param text string to translate
1003  * \return non-finalized translated string
1004  */
1005 KLocalizedString KI18N_EXPORT kxi18ndc(const char *domain, const char *context, const char *text);
1006 
1007 /**
1008  * Create non-finalized markup-aware translated string from domain with plural.
1009  *
1010  * \param domain domain in which to look for translations
1011  * \param singular singular form of the string to translate
1012  * \param plural plural form of the string to translate
1013  * \return non-finalized translated string
1014  */
1015 KLocalizedString KI18N_EXPORT kxi18ndp(const char *domain, const char *singular, const char *plural);
1016 
1017 /**
1018  * Create non-finalized markup-aware translated string from domain
1019  * with context and plural.
1020  *
1021  * \param domain domain in which to look for translations
1022  * \param context context of the string
1023  * \param singular singular form of the string to translate
1024  * \param plural plural form of the string to translate
1025  * \return non-finalized translated string
1026  */
1027 KLocalizedString KI18N_EXPORT kxi18ndcp(const char *domain, const char *context, const char *singular, const char *plural);
1028 
1029 /**
1030  * Redirect Qt's <tt>uic</tt>-generated translation calls to Ki18n.
1031  *
1032  * Use <tt>-tr tr2i18n</tt> option to \c uic to have it redirect calls.
1033  *
1034  * \param text string to translate
1035  * \param comment Qt equivalent of disambiguation context
1036  * \return translated string
1037  */
1038 inline QString tr2i18n(const char *text, const char *comment = nullptr)
1039 {
1040     if (comment && comment[0] && text && text[0]) {
1041         return ki18nc(comment, text).toString();
1042     } else if (text && text[0]) {
1043         return ki18n(text).toString();
1044     } else {
1045         return QString();
1046     }
1047 }
1048 
1049 /**
1050  * Like \c tr2i18n, but look for translation in a specific domain.
1051  *
1052  * Use <tt>-tr tr2i18nd</tt> option to \c uic to have it redirect calls.
1053  *
1054  * \param domain domain in which to look for translations
1055  * \param text string to translate
1056  * \param comment Qt equivalent of disambiguation context
1057  * \return translated string
1058  */
1059 inline QString tr2i18nd(const char *domain, const char *text, const char *comment = nullptr)
1060 {
1061     if (comment && comment[0] && text && text[0]) {
1062         return ki18ndc(domain, comment, text).toString();
1063     } else if (text && text[0]) {
1064         return ki18nd(domain, text).toString();
1065     } else {
1066         return QString();
1067     }
1068 }
1069 
1070 /**
1071  * Like \c tr2i18n, but when UI strings are KUIT markup-aware.
1072  *
1073  * Use <tt>-tr tr2xi18n</tt> option to \c uic to have it redirect calls.
1074  *
1075  * \param text markup-aware string to translate
1076  * \param comment Qt equivalent of disambiguation context
1077  * \return translated string
1078  */
1079 inline QString tr2xi18n(const char *text, const char *comment = nullptr)
1080 {
1081     if (comment && comment[0] && text && text[0]) {
1082         return kxi18nc(comment, text).toString();
1083     } else if (text && text[0]) {
1084         return kxi18n(text).toString();
1085     } else {
1086         return QString();
1087     }
1088 }
1089 
1090 /**
1091  * Like \c tr2xi18n, but look for translation in a specific domain.
1092  *
1093  * Use <tt>-tr tr2xi18nd</tt> option to \c uic to have it redirect calls.
1094  *
1095  * \param domain domain in which to look for translations
1096  * \param text markup-aware string to translate
1097  * \param comment Qt equivalent of disambiguation context
1098  * \return translated string
1099  */
1100 inline QString tr2xi18nd(const char *domain, const char *text, const char *comment = nullptr)
1101 {
1102     if (comment && comment[0] && text && text[0]) {
1103         return kxi18ndc(domain, comment, text).toString();
1104     } else if (text && text[0]) {
1105         return kxi18nd(domain, text).toString();
1106     } else {
1107         return QString();
1108     }
1109 }
1110 
1111 #ifndef K_DOXYGEN
1112 
1113 #ifndef NDEBUG
1114 #define I18N_ERR_MSG String_literal_as_second_argument_to_i18n___Perhaps_you_need_i18nc_or_i18np
1115 template<typename T, int s>
1116 class I18nTypeCheck
1117 {
1118 public:
1119     static void I18N_ERR_MSG()
1120     {
1121     }
1122 };
1123 template<int s>
1124 class I18nTypeCheck<char[s], s>
1125 {
1126 };
1127 #define STATIC_ASSERT_NOT_LITERAL_STRING(T) I18nTypeCheck<T, sizeof(T)>::I18N_ERR_MSG();
1128 #else
1129 #define STATIC_ASSERT_NOT_LITERAL_STRING(T)
1130 #endif
1131 
1132 // >>>>> Basic calls
1133 // Autogenerated; contact maintainer for batch changes.
1134 inline QString i18n(const char *text)
1135 {
1136     return ki18n(text).toString();
1137 }
1138 template<typename A1>
1139 inline QString i18n(const char *text, const A1 &a1)
1140 {
1141     STATIC_ASSERT_NOT_LITERAL_STRING(A1)
1142     return ki18n(text).subs(a1).toString();
1143 }
1144 template<typename A1, typename A2>
1145 inline QString i18n(const char *text, const A1 &a1, const A2 &a2)
1146 {
1147     STATIC_ASSERT_NOT_LITERAL_STRING(A1)
1148     return ki18n(text).subs(a1).subs(a2).toString();
1149 }
1150 template<typename A1, typename A2, typename A3>
1151 inline QString i18n(const char *text, const A1 &a1, const A2 &a2, const A3 &a3)
1152 {
1153     STATIC_ASSERT_NOT_LITERAL_STRING(A1)
1154     return ki18n(text).subs(a1).subs(a2).subs(a3).toString();
1155 }
1156 template<typename A1, typename A2, typename A3, typename A4>
1157 inline QString i18n(const char *text, const A1 &a1, const A2 &a2, const A3 &a3, const A4 &a4)
1158 {
1159     STATIC_ASSERT_NOT_LITERAL_STRING(A1)
1160     return ki18n(text).subs(a1).subs(a2).subs(a3).subs(a4).toString();
1161 }
1162 template<typename A1, typename A2, typename A3, typename A4, typename A5>
1163 inline QString i18n(const char *text, const A1 &a1, const A2 &a2, const A3 &a3, const A4 &a4, const A5 &a5)
1164 {
1165     STATIC_ASSERT_NOT_LITERAL_STRING(A1)
1166     return ki18n(text).subs(a1).subs(a2).subs(a3).subs(a4).subs(a5).toString();
1167 }
1168 template<typename A1, typename A2, typename A3, typename A4, typename A5, typename A6>
1169 inline QString i18n(const char *text, const A1 &a1, const A2 &a2, const A3 &a3, const A4 &a4, const A5 &a5, const A6 &a6)
1170 {
1171     STATIC_ASSERT_NOT_LITERAL_STRING(A1)
1172     return ki18n(text).subs(a1).subs(a2).subs(a3).subs(a4).subs(a5).subs(a6).toString();
1173 }
1174 template<typename A1, typename A2, typename A3, typename A4, typename A5, typename A6, typename A7>
1175 inline QString i18n(const char *text, const A1 &a1, const A2 &a2, const A3 &a3, const A4 &a4, const A5 &a5, const A6 &a6, const A7 &a7)
1176 {
1177     STATIC_ASSERT_NOT_LITERAL_STRING(A1)
1178     return ki18n(text).subs(a1).subs(a2).subs(a3).subs(a4).subs(a5).subs(a6).subs(a7).toString();
1179 }
1180 template<typename A1, typename A2, typename A3, typename A4, typename A5, typename A6, typename A7, typename A8>
1181 inline QString i18n(const char *text, const A1 &a1, const A2 &a2, const A3 &a3, const A4 &a4, const A5 &a5, const A6 &a6, const A7 &a7, const A8 &a8)
1182 {
1183     STATIC_ASSERT_NOT_LITERAL_STRING(A1)
1184     return ki18n(text).subs(a1).subs(a2).subs(a3).subs(a4).subs(a5).subs(a6).subs(a7).subs(a8).toString();
1185 }
1186 template<typename A1, typename A2, typename A3, typename A4, typename A5, typename A6, typename A7, typename A8, typename A9>
1187 inline QString
1188 i18n(const char *text, const A1 &a1, const A2 &a2, const A3 &a3, const A4 &a4, const A5 &a5, const A6 &a6, const A7 &a7, const A8 &a8, const A9 &a9)
1189 {
1190     STATIC_ASSERT_NOT_LITERAL_STRING(A1)
1191     return ki18n(text).subs(a1).subs(a2).subs(a3).subs(a4).subs(a5).subs(a6).subs(a7).subs(a8).subs(a9).toString();
1192 }
1193 // <<<<<<< End of basic calls
1194 
1195 // >>>>> Context calls
1196 // Autogenerated; contact maintainer for batch changes.
1197 inline QString i18nc(const char *context, const char *text)
1198 {
1199     return ki18nc(context, text).toString();
1200 }
1201 template<typename A1>
1202 inline QString i18nc(const char *context, const char *text, const A1 &a1)
1203 {
1204     return ki18nc(context, text).subs(a1).toString();
1205 }
1206 template<typename A1, typename A2>
1207 inline QString i18nc(const char *context, const char *text, const A1 &a1, const A2 &a2)
1208 {
1209     return ki18nc(context, text).subs(a1).subs(a2).toString();
1210 }
1211 template<typename A1, typename A2, typename A3>
1212 inline QString i18nc(const char *context, const char *text, const A1 &a1, const A2 &a2, const A3 &a3)
1213 {
1214     return ki18nc(context, text).subs(a1).subs(a2).subs(a3).toString();
1215 }
1216 template<typename A1, typename A2, typename A3, typename A4>
1217 inline QString i18nc(const char *context, const char *text, const A1 &a1, const A2 &a2, const A3 &a3, const A4 &a4)
1218 {
1219     return ki18nc(context, text).subs(a1).subs(a2).subs(a3).subs(a4).toString();
1220 }
1221 template<typename A1, typename A2, typename A3, typename A4, typename A5>
1222 inline QString i18nc(const char *context, const char *text, const A1 &a1, const A2 &a2, const A3 &a3, const A4 &a4, const A5 &a5)
1223 {
1224     return ki18nc(context, text).subs(a1).subs(a2).subs(a3).subs(a4).subs(a5).toString();
1225 }
1226 template<typename A1, typename A2, typename A3, typename A4, typename A5, typename A6>
1227 inline QString i18nc(const char *context, const char *text, const A1 &a1, const A2 &a2, const A3 &a3, const A4 &a4, const A5 &a5, const A6 &a6)
1228 {
1229     return ki18nc(context, text).subs(a1).subs(a2).subs(a3).subs(a4).subs(a5).subs(a6).toString();
1230 }
1231 template<typename A1, typename A2, typename A3, typename A4, typename A5, typename A6, typename A7>
1232 inline QString i18nc(const char *context, const char *text, const A1 &a1, const A2 &a2, const A3 &a3, const A4 &a4, const A5 &a5, const A6 &a6, const A7 &a7)
1233 {
1234     return ki18nc(context, text).subs(a1).subs(a2).subs(a3).subs(a4).subs(a5).subs(a6).subs(a7).toString();
1235 }
1236 template<typename A1, typename A2, typename A3, typename A4, typename A5, typename A6, typename A7, typename A8>
1237 inline QString
1238 i18nc(const char *context, const char *text, const A1 &a1, const A2 &a2, const A3 &a3, const A4 &a4, const A5 &a5, const A6 &a6, const A7 &a7, const A8 &a8)
1239 {
1240     return ki18nc(context, text).subs(a1).subs(a2).subs(a3).subs(a4).subs(a5).subs(a6).subs(a7).subs(a8).toString();
1241 }
1242 template<typename A1, typename A2, typename A3, typename A4, typename A5, typename A6, typename A7, typename A8, typename A9>
1243 inline QString i18nc(const char *context,
1244                      const char *text,
1245                      const A1 &a1,
1246                      const A2 &a2,
1247                      const A3 &a3,
1248                      const A4 &a4,
1249                      const A5 &a5,
1250                      const A6 &a6,
1251                      const A7 &a7,
1252                      const A8 &a8,
1253                      const A9 &a9)
1254 {
1255     return ki18nc(context, text).subs(a1).subs(a2).subs(a3).subs(a4).subs(a5).subs(a6).subs(a7).subs(a8).subs(a9).toString();
1256 }
1257 // <<<<< End of context calls
1258 
1259 // >>>>> Plural calls
1260 // Autogenerated; contact maintainer for batch changes.
1261 template<typename A1>
1262 inline QString i18np(const char *singular, const char *plural, const A1 &a1)
1263 {
1264     return ki18np(singular, plural).subs(a1).toString();
1265 }
1266 template<typename A1, typename A2>
1267 inline QString i18np(const char *singular, const char *plural, const A1 &a1, const A2 &a2)
1268 {
1269     return ki18np(singular, plural).subs(a1).subs(a2).toString();
1270 }
1271 template<typename A1, typename A2, typename A3>
1272 inline QString i18np(const char *singular, const char *plural, const A1 &a1, const A2 &a2, const A3 &a3)
1273 {
1274     return ki18np(singular, plural).subs(a1).subs(a2).subs(a3).toString();
1275 }
1276 template<typename A1, typename A2, typename A3, typename A4>
1277 inline QString i18np(const char *singular, const char *plural, const A1 &a1, const A2 &a2, const A3 &a3, const A4 &a4)
1278 {
1279     return ki18np(singular, plural).subs(a1).subs(a2).subs(a3).subs(a4).toString();
1280 }
1281 template<typename A1, typename A2, typename A3, typename A4, typename A5>
1282 inline QString i18np(const char *singular, const char *plural, const A1 &a1, const A2 &a2, const A3 &a3, const A4 &a4, const A5 &a5)
1283 {
1284     return ki18np(singular, plural).subs(a1).subs(a2).subs(a3).subs(a4).subs(a5).toString();
1285 }
1286 template<typename A1, typename A2, typename A3, typename A4, typename A5, typename A6>
1287 inline QString i18np(const char *singular, const char *plural, const A1 &a1, const A2 &a2, const A3 &a3, const A4 &a4, const A5 &a5, const A6 &a6)
1288 {
1289     return ki18np(singular, plural).subs(a1).subs(a2).subs(a3).subs(a4).subs(a5).subs(a6).toString();
1290 }
1291 template<typename A1, typename A2, typename A3, typename A4, typename A5, typename A6, typename A7>
1292 inline QString i18np(const char *singular, const char *plural, const A1 &a1, const A2 &a2, const A3 &a3, const A4 &a4, const A5 &a5, const A6 &a6, const A7 &a7)
1293 {
1294     return ki18np(singular, plural).subs(a1).subs(a2).subs(a3).subs(a4).subs(a5).subs(a6).subs(a7).toString();
1295 }
1296 template<typename A1, typename A2, typename A3, typename A4, typename A5, typename A6, typename A7, typename A8>
1297 inline QString
1298 i18np(const char *singular, const char *plural, const A1 &a1, const A2 &a2, const A3 &a3, const A4 &a4, const A5 &a5, const A6 &a6, const A7 &a7, const A8 &a8)
1299 {
1300     return ki18np(singular, plural).subs(a1).subs(a2).subs(a3).subs(a4).subs(a5).subs(a6).subs(a7).subs(a8).toString();
1301 }
1302 template<typename A1, typename A2, typename A3, typename A4, typename A5, typename A6, typename A7, typename A8, typename A9>
1303 inline QString i18np(const char *singular,
1304                      const char *plural,
1305                      const A1 &a1,
1306                      const A2 &a2,
1307                      const A3 &a3,
1308                      const A4 &a4,
1309                      const A5 &a5,
1310                      const A6 &a6,
1311                      const A7 &a7,
1312                      const A8 &a8,
1313                      const A9 &a9)
1314 {
1315     return ki18np(singular, plural).subs(a1).subs(a2).subs(a3).subs(a4).subs(a5).subs(a6).subs(a7).subs(a8).subs(a9).toString();
1316 }
1317 // <<<<< End of plural calls
1318 
1319 // >>>>> Context-plural calls
1320 // Autogenerated; contact maintainer for batch changes.
1321 template<typename A1>
1322 inline QString i18ncp(const char *context, const char *singular, const char *plural, const A1 &a1)
1323 {
1324     return ki18ncp(context, singular, plural).subs(a1).toString();
1325 }
1326 template<typename A1, typename A2>
1327 inline QString i18ncp(const char *context, const char *singular, const char *plural, const A1 &a1, const A2 &a2)
1328 {
1329     return ki18ncp(context, singular, plural).subs(a1).subs(a2).toString();
1330 }
1331 template<typename A1, typename A2, typename A3>
1332 inline QString i18ncp(const char *context, const char *singular, const char *plural, const A1 &a1, const A2 &a2, const A3 &a3)
1333 {
1334     return ki18ncp(context, singular, plural).subs(a1).subs(a2).subs(a3).toString();
1335 }
1336 template<typename A1, typename A2, typename A3, typename A4>
1337 inline QString i18ncp(const char *context, const char *singular, const char *plural, const A1 &a1, const A2 &a2, const A3 &a3, const A4 &a4)
1338 {
1339     return ki18ncp(context, singular, plural).subs(a1).subs(a2).subs(a3).subs(a4).toString();
1340 }
1341 template<typename A1, typename A2, typename A3, typename A4, typename A5>
1342 inline QString i18ncp(const char *context, const char *singular, const char *plural, const A1 &a1, const A2 &a2, const A3 &a3, const A4 &a4, const A5 &a5)
1343 {
1344     return ki18ncp(context, singular, plural).subs(a1).subs(a2).subs(a3).subs(a4).subs(a5).toString();
1345 }
1346 template<typename A1, typename A2, typename A3, typename A4, typename A5, typename A6>
1347 inline QString
1348 i18ncp(const char *context, const char *singular, const char *plural, const A1 &a1, const A2 &a2, const A3 &a3, const A4 &a4, const A5 &a5, const A6 &a6)
1349 {
1350     return ki18ncp(context, singular, plural).subs(a1).subs(a2).subs(a3).subs(a4).subs(a5).subs(a6).toString();
1351 }
1352 template<typename A1, typename A2, typename A3, typename A4, typename A5, typename A6, typename A7>
1353 inline QString i18ncp(const char *context,
1354                       const char *singular,
1355                       const char *plural,
1356                       const A1 &a1,
1357                       const A2 &a2,
1358                       const A3 &a3,
1359                       const A4 &a4,
1360                       const A5 &a5,
1361                       const A6 &a6,
1362                       const A7 &a7)
1363 {
1364     return ki18ncp(context, singular, plural).subs(a1).subs(a2).subs(a3).subs(a4).subs(a5).subs(a6).subs(a7).toString();
1365 }
1366 template<typename A1, typename A2, typename A3, typename A4, typename A5, typename A6, typename A7, typename A8>
1367 inline QString i18ncp(const char *context,
1368                       const char *singular,
1369                       const char *plural,
1370                       const A1 &a1,
1371                       const A2 &a2,
1372                       const A3 &a3,
1373                       const A4 &a4,
1374                       const A5 &a5,
1375                       const A6 &a6,
1376                       const A7 &a7,
1377                       const A8 &a8)
1378 {
1379     return ki18ncp(context, singular, plural).subs(a1).subs(a2).subs(a3).subs(a4).subs(a5).subs(a6).subs(a7).subs(a8).toString();
1380 }
1381 template<typename A1, typename A2, typename A3, typename A4, typename A5, typename A6, typename A7, typename A8, typename A9>
1382 inline QString i18ncp(const char *context,
1383                       const char *singular,
1384                       const char *plural,
1385                       const A1 &a1,
1386                       const A2 &a2,
1387                       const A3 &a3,
1388                       const A4 &a4,
1389                       const A5 &a5,
1390                       const A6 &a6,
1391                       const A7 &a7,
1392                       const A8 &a8,
1393                       const A9 &a9)
1394 {
1395     return ki18ncp(context, singular, plural).subs(a1).subs(a2).subs(a3).subs(a4).subs(a5).subs(a6).subs(a7).subs(a8).subs(a9).toString();
1396 }
1397 // <<<<< End of context-plural calls
1398 
1399 // >>>>> Basic calls with domain
1400 // Autogenerated; contact maintainer for batch changes.
1401 inline QString i18nd(const char *domain, const char *text)
1402 {
1403     return ki18nd(domain, text).toString();
1404 }
1405 template<typename A1>
1406 inline QString i18nd(const char *domain, const char *text, const A1 &a1)
1407 {
1408     STATIC_ASSERT_NOT_LITERAL_STRING(A1)
1409     return ki18nd(domain, text).subs(a1).toString();
1410 }
1411 template<typename A1, typename A2>
1412 inline QString i18nd(const char *domain, const char *text, const A1 &a1, const A2 &a2)
1413 {
1414     STATIC_ASSERT_NOT_LITERAL_STRING(A1)
1415     return ki18nd(domain, text).subs(a1).subs(a2).toString();
1416 }
1417 template<typename A1, typename A2, typename A3>
1418 inline QString i18nd(const char *domain, const char *text, const A1 &a1, const A2 &a2, const A3 &a3)
1419 {
1420     STATIC_ASSERT_NOT_LITERAL_STRING(A1)
1421     return ki18nd(domain, text).subs(a1).subs(a2).subs(a3).toString();
1422 }
1423 template<typename A1, typename A2, typename A3, typename A4>
1424 inline QString i18nd(const char *domain, const char *text, const A1 &a1, const A2 &a2, const A3 &a3, const A4 &a4)
1425 {
1426     STATIC_ASSERT_NOT_LITERAL_STRING(A1)
1427     return ki18nd(domain, text).subs(a1).subs(a2).subs(a3).subs(a4).toString();
1428 }
1429 template<typename A1, typename A2, typename A3, typename A4, typename A5>
1430 inline QString i18nd(const char *domain, const char *text, const A1 &a1, const A2 &a2, const A3 &a3, const A4 &a4, const A5 &a5)
1431 {
1432     STATIC_ASSERT_NOT_LITERAL_STRING(A1)
1433     return ki18nd(domain, text).subs(a1).subs(a2).subs(a3).subs(a4).subs(a5).toString();
1434 }
1435 template<typename A1, typename A2, typename A3, typename A4, typename A5, typename A6>
1436 inline QString i18nd(const char *domain, const char *text, const A1 &a1, const A2 &a2, const A3 &a3, const A4 &a4, const A5 &a5, const A6 &a6)
1437 {
1438     STATIC_ASSERT_NOT_LITERAL_STRING(A1)
1439     return ki18nd(domain, text).subs(a1).subs(a2).subs(a3).subs(a4).subs(a5).subs(a6).toString();
1440 }
1441 template<typename A1, typename A2, typename A3, typename A4, typename A5, typename A6, typename A7>
1442 inline QString i18nd(const char *domain, const char *text, const A1 &a1, const A2 &a2, const A3 &a3, const A4 &a4, const A5 &a5, const A6 &a6, const A7 &a7)
1443 {
1444     STATIC_ASSERT_NOT_LITERAL_STRING(A1)
1445     return ki18nd(domain, text).subs(a1).subs(a2).subs(a3).subs(a4).subs(a5).subs(a6).subs(a7).toString();
1446 }
1447 template<typename A1, typename A2, typename A3, typename A4, typename A5, typename A6, typename A7, typename A8>
1448 inline QString
1449 i18nd(const char *domain, const char *text, const A1 &a1, const A2 &a2, const A3 &a3, const A4 &a4, const A5 &a5, const A6 &a6, const A7 &a7, const A8 &a8)
1450 {
1451     STATIC_ASSERT_NOT_LITERAL_STRING(A1)
1452     return ki18nd(domain, text).subs(a1).subs(a2).subs(a3).subs(a4).subs(a5).subs(a6).subs(a7).subs(a8).toString();
1453 }
1454 template<typename A1, typename A2, typename A3, typename A4, typename A5, typename A6, typename A7, typename A8, typename A9>
1455 inline QString i18nd(const char *domain,
1456                      const char *text,
1457                      const A1 &a1,
1458                      const A2 &a2,
1459                      const A3 &a3,
1460                      const A4 &a4,
1461                      const A5 &a5,
1462                      const A6 &a6,
1463                      const A7 &a7,
1464                      const A8 &a8,
1465                      const A9 &a9)
1466 {
1467     STATIC_ASSERT_NOT_LITERAL_STRING(A1)
1468     return ki18nd(domain, text).subs(a1).subs(a2).subs(a3).subs(a4).subs(a5).subs(a6).subs(a7).subs(a8).subs(a9).toString();
1469 }
1470 // <<<<<<< End of basic calls with domain
1471 
1472 // >>>>> Context calls with domain
1473 // Autogenerated; contact maintainer for batch changes.
1474 inline QString i18ndc(const char *domain, const char *context, const char *text)
1475 {
1476     return ki18ndc(domain, context, text).toString();
1477 }
1478 template<typename A1>
1479 inline QString i18ndc(const char *domain, const char *context, const char *text, const A1 &a1)
1480 {
1481     return ki18ndc(domain, context, text).subs(a1).toString();
1482 }
1483 template<typename A1, typename A2>
1484 inline QString i18ndc(const char *domain, const char *context, const char *text, const A1 &a1, const A2 &a2)
1485 {
1486     return ki18ndc(domain, context, text).subs(a1).subs(a2).toString();
1487 }
1488 template<typename A1, typename A2, typename A3>
1489 inline QString i18ndc(const char *domain, const char *context, const char *text, const A1 &a1, const A2 &a2, const A3 &a3)
1490 {
1491     return ki18ndc(domain, context, text).subs(a1).subs(a2).subs(a3).toString();
1492 }
1493 template<typename A1, typename A2, typename A3, typename A4>
1494 inline QString i18ndc(const char *domain, const char *context, const char *text, const A1 &a1, const A2 &a2, const A3 &a3, const A4 &a4)
1495 {
1496     return ki18ndc(domain, context, text).subs(a1).subs(a2).subs(a3).subs(a4).toString();
1497 }
1498 template<typename A1, typename A2, typename A3, typename A4, typename A5>
1499 inline QString i18ndc(const char *domain, const char *context, const char *text, const A1 &a1, const A2 &a2, const A3 &a3, const A4 &a4, const A5 &a5)
1500 {
1501     return ki18ndc(domain, context, text).subs(a1).subs(a2).subs(a3).subs(a4).subs(a5).toString();
1502 }
1503 template<typename A1, typename A2, typename A3, typename A4, typename A5, typename A6>
1504 inline QString
1505 i18ndc(const char *domain, const char *context, const char *text, const A1 &a1, const A2 &a2, const A3 &a3, const A4 &a4, const A5 &a5, const A6 &a6)
1506 {
1507     return ki18ndc(domain, context, text).subs(a1).subs(a2).subs(a3).subs(a4).subs(a5).subs(a6).toString();
1508 }
1509 template<typename A1, typename A2, typename A3, typename A4, typename A5, typename A6, typename A7>
1510 inline QString i18ndc(const char *domain,
1511                       const char *context,
1512                       const char *text,
1513                       const A1 &a1,
1514                       const A2 &a2,
1515                       const A3 &a3,
1516                       const A4 &a4,
1517                       const A5 &a5,
1518                       const A6 &a6,
1519                       const A7 &a7)
1520 {
1521     return ki18ndc(domain, context, text).subs(a1).subs(a2).subs(a3).subs(a4).subs(a5).subs(a6).subs(a7).toString();
1522 }
1523 template<typename A1, typename A2, typename A3, typename A4, typename A5, typename A6, typename A7, typename A8>
1524 inline QString i18ndc(const char *domain,
1525                       const char *context,
1526                       const char *text,
1527                       const A1 &a1,
1528                       const A2 &a2,
1529                       const A3 &a3,
1530                       const A4 &a4,
1531                       const A5 &a5,
1532                       const A6 &a6,
1533                       const A7 &a7,
1534                       const A8 &a8)
1535 {
1536     return ki18ndc(domain, context, text).subs(a1).subs(a2).subs(a3).subs(a4).subs(a5).subs(a6).subs(a7).subs(a8).toString();
1537 }
1538 template<typename A1, typename A2, typename A3, typename A4, typename A5, typename A6, typename A7, typename A8, typename A9>
1539 inline QString i18ndc(const char *domain,
1540                       const char *context,
1541                       const char *text,
1542                       const A1 &a1,
1543                       const A2 &a2,
1544                       const A3 &a3,
1545                       const A4 &a4,
1546                       const A5 &a5,
1547                       const A6 &a6,
1548                       const A7 &a7,
1549                       const A8 &a8,
1550                       const A9 &a9)
1551 {
1552     return ki18ndc(domain, context, text).subs(a1).subs(a2).subs(a3).subs(a4).subs(a5).subs(a6).subs(a7).subs(a8).subs(a9).toString();
1553 }
1554 // <<<<< End of context calls with domain
1555 
1556 // >>>>> Plural calls with domain
1557 // Autogenerated; contact maintainer for batch changes.
1558 template<typename A1>
1559 inline QString i18ndp(const char *domain, const char *singular, const char *plural, const A1 &a1)
1560 {
1561     return ki18ndp(domain, singular, plural).subs(a1).toString();
1562 }
1563 template<typename A1, typename A2>
1564 inline QString i18ndp(const char *domain, const char *singular, const char *plural, const A1 &a1, const A2 &a2)
1565 {
1566     return ki18ndp(domain, singular, plural).subs(a1).subs(a2).toString();
1567 }
1568 template<typename A1, typename A2, typename A3>
1569 inline QString i18ndp(const char *domain, const char *singular, const char *plural, const A1 &a1, const A2 &a2, const A3 &a3)
1570 {
1571     return ki18ndp(domain, singular, plural).subs(a1).subs(a2).subs(a3).toString();
1572 }
1573 template<typename A1, typename A2, typename A3, typename A4>
1574 inline QString i18ndp(const char *domain, const char *singular, const char *plural, const A1 &a1, const A2 &a2, const A3 &a3, const A4 &a4)
1575 {
1576     return ki18ndp(domain, singular, plural).subs(a1).subs(a2).subs(a3).subs(a4).toString();
1577 }
1578 template<typename A1, typename A2, typename A3, typename A4, typename A5>
1579 inline QString i18ndp(const char *domain, const char *singular, const char *plural, const A1 &a1, const A2 &a2, const A3 &a3, const A4 &a4, const A5 &a5)
1580 {
1581     return ki18ndp(domain, singular, plural).subs(a1).subs(a2).subs(a3).subs(a4).subs(a5).toString();
1582 }
1583 template<typename A1, typename A2, typename A3, typename A4, typename A5, typename A6>
1584 inline QString
1585 i18ndp(const char *domain, const char *singular, const char *plural, const A1 &a1, const A2 &a2, const A3 &a3, const A4 &a4, const A5 &a5, const A6 &a6)
1586 {
1587     return ki18ndp(domain, singular, plural).subs(a1).subs(a2).subs(a3).subs(a4).subs(a5).subs(a6).toString();
1588 }
1589 template<typename A1, typename A2, typename A3, typename A4, typename A5, typename A6, typename A7>
1590 inline QString i18ndp(const char *domain,
1591                       const char *singular,
1592                       const char *plural,
1593                       const A1 &a1,
1594                       const A2 &a2,
1595                       const A3 &a3,
1596                       const A4 &a4,
1597                       const A5 &a5,
1598                       const A6 &a6,
1599                       const A7 &a7)
1600 {
1601     return ki18ndp(domain, singular, plural).subs(a1).subs(a2).subs(a3).subs(a4).subs(a5).subs(a6).subs(a7).toString();
1602 }
1603 template<typename A1, typename A2, typename A3, typename A4, typename A5, typename A6, typename A7, typename A8>
1604 inline QString i18ndp(const char *domain,
1605                       const char *singular,
1606                       const char *plural,
1607                       const A1 &a1,
1608                       const A2 &a2,
1609                       const A3 &a3,
1610                       const A4 &a4,
1611                       const A5 &a5,
1612                       const A6 &a6,
1613                       const A7 &a7,
1614                       const A8 &a8)
1615 {
1616     return ki18ndp(domain, singular, plural).subs(a1).subs(a2).subs(a3).subs(a4).subs(a5).subs(a6).subs(a7).subs(a8).toString();
1617 }
1618 template<typename A1, typename A2, typename A3, typename A4, typename A5, typename A6, typename A7, typename A8, typename A9>
1619 inline QString i18ndp(const char *domain,
1620                       const char *singular,
1621                       const char *plural,
1622                       const A1 &a1,
1623                       const A2 &a2,
1624                       const A3 &a3,
1625                       const A4 &a4,
1626                       const A5 &a5,
1627                       const A6 &a6,
1628                       const A7 &a7,
1629                       const A8 &a8,
1630                       const A9 &a9)
1631 {
1632     return ki18ndp(domain, singular, plural).subs(a1).subs(a2).subs(a3).subs(a4).subs(a5).subs(a6).subs(a7).subs(a8).subs(a9).toString();
1633 }
1634 // <<<<< End of plural calls with domain
1635 
1636 // >>>>> Context-plural calls with domain
1637 // Autogenerated; contact maintainer for batch changes.
1638 template<typename A1>
1639 inline QString i18ndcp(const char *domain, const char *context, const char *singular, const char *plural, const A1 &a1)
1640 {
1641     return ki18ndcp(domain, context, singular, plural).subs(a1).toString();
1642 }
1643 template<typename A1, typename A2>
1644 inline QString i18ndcp(const char *domain, const char *context, const char *singular, const char *plural, const A1 &a1, const A2 &a2)
1645 {
1646     return ki18ndcp(domain, context, singular, plural).subs(a1).subs(a2).toString();
1647 }
1648 template<typename A1, typename A2, typename A3>
1649 inline QString i18ndcp(const char *domain, const char *context, const char *singular, const char *plural, const A1 &a1, const A2 &a2, const A3 &a3)
1650 {
1651     return ki18ndcp(domain, context, singular, plural).subs(a1).subs(a2).subs(a3).toString();
1652 }
1653 template<typename A1, typename A2, typename A3, typename A4>
1654 inline QString
1655 i18ndcp(const char *domain, const char *context, const char *singular, const char *plural, const A1 &a1, const A2 &a2, const A3 &a3, const A4 &a4)
1656 {
1657     return ki18ndcp(domain, context, singular, plural).subs(a1).subs(a2).subs(a3).subs(a4).toString();
1658 }
1659 template<typename A1, typename A2, typename A3, typename A4, typename A5>
1660 inline QString
1661 i18ndcp(const char *domain, const char *context, const char *singular, const char *plural, const A1 &a1, const A2 &a2, const A3 &a3, const A4 &a4, const A5 &a5)
1662 {
1663     return ki18ndcp(domain, context, singular, plural).subs(a1).subs(a2).subs(a3).subs(a4).subs(a5).toString();
1664 }
1665 template<typename A1, typename A2, typename A3, typename A4, typename A5, typename A6>
1666 inline QString i18ndcp(const char *domain,
1667                        const char *context,
1668                        const char *singular,
1669                        const char *plural,
1670                        const A1 &a1,
1671                        const A2 &a2,
1672                        const A3 &a3,
1673                        const A4 &a4,
1674                        const A5 &a5,
1675                        const A6 &a6)
1676 {
1677     return ki18ndcp(domain, context, singular, plural).subs(a1).subs(a2).subs(a3).subs(a4).subs(a5).subs(a6).toString();
1678 }
1679 template<typename A1, typename A2, typename A3, typename A4, typename A5, typename A6, typename A7>
1680 inline QString i18ndcp(const char *domain,
1681                        const char *context,
1682                        const char *singular,
1683                        const char *plural,
1684                        const A1 &a1,
1685                        const A2 &a2,
1686                        const A3 &a3,
1687                        const A4 &a4,
1688                        const A5 &a5,
1689                        const A6 &a6,
1690                        const A7 &a7)
1691 {
1692     return ki18ndcp(domain, context, singular, plural).subs(a1).subs(a2).subs(a3).subs(a4).subs(a5).subs(a6).subs(a7).toString();
1693 }
1694 template<typename A1, typename A2, typename A3, typename A4, typename A5, typename A6, typename A7, typename A8>
1695 inline QString i18ndcp(const char *domain,
1696                        const char *context,
1697                        const char *singular,
1698                        const char *plural,
1699                        const A1 &a1,
1700                        const A2 &a2,
1701                        const A3 &a3,
1702                        const A4 &a4,
1703                        const A5 &a5,
1704                        const A6 &a6,
1705                        const A7 &a7,
1706                        const A8 &a8)
1707 {
1708     return ki18ndcp(domain, context, singular, plural).subs(a1).subs(a2).subs(a3).subs(a4).subs(a5).subs(a6).subs(a7).subs(a8).toString();
1709 }
1710 template<typename A1, typename A2, typename A3, typename A4, typename A5, typename A6, typename A7, typename A8, typename A9>
1711 inline QString i18ndcp(const char *domain,
1712                        const char *context,
1713                        const char *singular,
1714                        const char *plural,
1715                        const A1 &a1,
1716                        const A2 &a2,
1717                        const A3 &a3,
1718                        const A4 &a4,
1719                        const A5 &a5,
1720                        const A6 &a6,
1721                        const A7 &a7,
1722                        const A8 &a8,
1723                        const A9 &a9)
1724 {
1725     return ki18ndcp(domain, context, singular, plural).subs(a1).subs(a2).subs(a3).subs(a4).subs(a5).subs(a6).subs(a7).subs(a8).subs(a9).toString();
1726 }
1727 // <<<<< End of context-plural calls with domain
1728 
1729 // >>>>> Markup-aware basic calls
1730 // Autogenerated; contact maintainer for batch changes.
1731 inline QString xi18n(const char *text)
1732 {
1733     return kxi18n(text).toString();
1734 }
1735 template<typename A1>
1736 inline QString xi18n(const char *text, const A1 &a1)
1737 {
1738     STATIC_ASSERT_NOT_LITERAL_STRING(A1)
1739     return kxi18n(text).subs(a1).toString();
1740 }
1741 template<typename A1, typename A2>
1742 inline QString xi18n(const char *text, const A1 &a1, const A2 &a2)
1743 {
1744     STATIC_ASSERT_NOT_LITERAL_STRING(A1)
1745     return kxi18n(text).subs(a1).subs(a2).toString();
1746 }
1747 template<typename A1, typename A2, typename A3>
1748 inline QString xi18n(const char *text, const A1 &a1, const A2 &a2, const A3 &a3)
1749 {
1750     STATIC_ASSERT_NOT_LITERAL_STRING(A1)
1751     return kxi18n(text).subs(a1).subs(a2).subs(a3).toString();
1752 }
1753 template<typename A1, typename A2, typename A3, typename A4>
1754 inline QString xi18n(const char *text, const A1 &a1, const A2 &a2, const A3 &a3, const A4 &a4)
1755 {
1756     STATIC_ASSERT_NOT_LITERAL_STRING(A1)
1757     return kxi18n(text).subs(a1).subs(a2).subs(a3).subs(a4).toString();
1758 }
1759 template<typename A1, typename A2, typename A3, typename A4, typename A5>
1760 inline QString xi18n(const char *text, const A1 &a1, const A2 &a2, const A3 &a3, const A4 &a4, const A5 &a5)
1761 {
1762     STATIC_ASSERT_NOT_LITERAL_STRING(A1)
1763     return kxi18n(text).subs(a1).subs(a2).subs(a3).subs(a4).subs(a5).toString();
1764 }
1765 template<typename A1, typename A2, typename A3, typename A4, typename A5, typename A6>
1766 inline QString xi18n(const char *text, const A1 &a1, const A2 &a2, const A3 &a3, const A4 &a4, const A5 &a5, const A6 &a6)
1767 {
1768     STATIC_ASSERT_NOT_LITERAL_STRING(A1)
1769     return kxi18n(text).subs(a1).subs(a2).subs(a3).subs(a4).subs(a5).subs(a6).toString();
1770 }
1771 template<typename A1, typename A2, typename A3, typename A4, typename A5, typename A6, typename A7>
1772 inline QString xi18n(const char *text, const A1 &a1, const A2 &a2, const A3 &a3, const A4 &a4, const A5 &a5, const A6 &a6, const A7 &a7)
1773 {
1774     STATIC_ASSERT_NOT_LITERAL_STRING(A1)
1775     return kxi18n(text).subs(a1).subs(a2).subs(a3).subs(a4).subs(a5).subs(a6).subs(a7).toString();
1776 }
1777 template<typename A1, typename A2, typename A3, typename A4, typename A5, typename A6, typename A7, typename A8>
1778 inline QString xi18n(const char *text, const A1 &a1, const A2 &a2, const A3 &a3, const A4 &a4, const A5 &a5, const A6 &a6, const A7 &a7, const A8 &a8)
1779 {
1780     STATIC_ASSERT_NOT_LITERAL_STRING(A1)
1781     return kxi18n(text).subs(a1).subs(a2).subs(a3).subs(a4).subs(a5).subs(a6).subs(a7).subs(a8).toString();
1782 }
1783 template<typename A1, typename A2, typename A3, typename A4, typename A5, typename A6, typename A7, typename A8, typename A9>
1784 inline QString
1785 xi18n(const char *text, const A1 &a1, const A2 &a2, const A3 &a3, const A4 &a4, const A5 &a5, const A6 &a6, const A7 &a7, const A8 &a8, const A9 &a9)
1786 {
1787     STATIC_ASSERT_NOT_LITERAL_STRING(A1)
1788     return kxi18n(text).subs(a1).subs(a2).subs(a3).subs(a4).subs(a5).subs(a6).subs(a7).subs(a8).subs(a9).toString();
1789 }
1790 // <<<<<<< End of markup-aware basic calls
1791 
1792 // >>>>> Markup-aware context calls
1793 // Autogenerated; contact maintainer for batch changes.
1794 inline QString xi18nc(const char *context, const char *text)
1795 {
1796     return kxi18nc(context, text).toString();
1797 }
1798 template<typename A1>
1799 inline QString xi18nc(const char *context, const char *text, const A1 &a1)
1800 {
1801     return kxi18nc(context, text).subs(a1).toString();
1802 }
1803 template<typename A1, typename A2>
1804 inline QString xi18nc(const char *context, const char *text, const A1 &a1, const A2 &a2)
1805 {
1806     return kxi18nc(context, text).subs(a1).subs(a2).toString();
1807 }
1808 template<typename A1, typename A2, typename A3>
1809 inline QString xi18nc(const char *context, const char *text, const A1 &a1, const A2 &a2, const A3 &a3)
1810 {
1811     return kxi18nc(context, text).subs(a1).subs(a2).subs(a3).toString();
1812 }
1813 template<typename A1, typename A2, typename A3, typename A4>
1814 inline QString xi18nc(const char *context, const char *text, const A1 &a1, const A2 &a2, const A3 &a3, const A4 &a4)
1815 {
1816     return kxi18nc(context, text).subs(a1).subs(a2).subs(a3).subs(a4).toString();
1817 }
1818 template<typename A1, typename A2, typename A3, typename A4, typename A5>
1819 inline QString xi18nc(const char *context, const char *text, const A1 &a1, const A2 &a2, const A3 &a3, const A4 &a4, const A5 &a5)
1820 {
1821     return kxi18nc(context, text).subs(a1).subs(a2).subs(a3).subs(a4).subs(a5).toString();
1822 }
1823 template<typename A1, typename A2, typename A3, typename A4, typename A5, typename A6>
1824 inline QString xi18nc(const char *context, const char *text, const A1 &a1, const A2 &a2, const A3 &a3, const A4 &a4, const A5 &a5, const A6 &a6)
1825 {
1826     return kxi18nc(context, text).subs(a1).subs(a2).subs(a3).subs(a4).subs(a5).subs(a6).toString();
1827 }
1828 template<typename A1, typename A2, typename A3, typename A4, typename A5, typename A6, typename A7>
1829 inline QString xi18nc(const char *context, const char *text, const A1 &a1, const A2 &a2, const A3 &a3, const A4 &a4, const A5 &a5, const A6 &a6, const A7 &a7)
1830 {
1831     return kxi18nc(context, text).subs(a1).subs(a2).subs(a3).subs(a4).subs(a5).subs(a6).subs(a7).toString();
1832 }
1833 template<typename A1, typename A2, typename A3, typename A4, typename A5, typename A6, typename A7, typename A8>
1834 inline QString
1835 xi18nc(const char *context, const char *text, const A1 &a1, const A2 &a2, const A3 &a3, const A4 &a4, const A5 &a5, const A6 &a6, const A7 &a7, const A8 &a8)
1836 {
1837     return kxi18nc(context, text).subs(a1).subs(a2).subs(a3).subs(a4).subs(a5).subs(a6).subs(a7).subs(a8).toString();
1838 }
1839 template<typename A1, typename A2, typename A3, typename A4, typename A5, typename A6, typename A7, typename A8, typename A9>
1840 inline QString xi18nc(const char *context,
1841                       const char *text,
1842                       const A1 &a1,
1843                       const A2 &a2,
1844                       const A3 &a3,
1845                       const A4 &a4,
1846                       const A5 &a5,
1847                       const A6 &a6,
1848                       const A7 &a7,
1849                       const A8 &a8,
1850                       const A9 &a9)
1851 {
1852     return kxi18nc(context, text).subs(a1).subs(a2).subs(a3).subs(a4).subs(a5).subs(a6).subs(a7).subs(a8).subs(a9).toString();
1853 }
1854 // <<<<< End of markup-aware context calls
1855 
1856 // >>>>> Markup-aware plural calls
1857 // Autogenerated; contact maintainer for batch changes.
1858 template<typename A1>
1859 inline QString xi18np(const char *singular, const char *plural, const A1 &a1)
1860 {
1861     return kxi18np(singular, plural).subs(a1).toString();
1862 }
1863 template<typename A1, typename A2>
1864 inline QString xi18np(const char *singular, const char *plural, const A1 &a1, const A2 &a2)
1865 {
1866     return kxi18np(singular, plural).subs(a1).subs(a2).toString();
1867 }
1868 template<typename A1, typename A2, typename A3>
1869 inline QString xi18np(const char *singular, const char *plural, const A1 &a1, const A2 &a2, const A3 &a3)
1870 {
1871     return kxi18np(singular, plural).subs(a1).subs(a2).subs(a3).toString();
1872 }
1873 template<typename A1, typename A2, typename A3, typename A4>
1874 inline QString xi18np(const char *singular, const char *plural, const A1 &a1, const A2 &a2, const A3 &a3, const A4 &a4)
1875 {
1876     return kxi18np(singular, plural).subs(a1).subs(a2).subs(a3).subs(a4).toString();
1877 }
1878 template<typename A1, typename A2, typename A3, typename A4, typename A5>
1879 inline QString xi18np(const char *singular, const char *plural, const A1 &a1, const A2 &a2, const A3 &a3, const A4 &a4, const A5 &a5)
1880 {
1881     return kxi18np(singular, plural).subs(a1).subs(a2).subs(a3).subs(a4).subs(a5).toString();
1882 }
1883 template<typename A1, typename A2, typename A3, typename A4, typename A5, typename A6>
1884 inline QString xi18np(const char *singular, const char *plural, const A1 &a1, const A2 &a2, const A3 &a3, const A4 &a4, const A5 &a5, const A6 &a6)
1885 {
1886     return kxi18np(singular, plural).subs(a1).subs(a2).subs(a3).subs(a4).subs(a5).subs(a6).toString();
1887 }
1888 template<typename A1, typename A2, typename A3, typename A4, typename A5, typename A6, typename A7>
1889 inline QString
1890 xi18np(const char *singular, const char *plural, const A1 &a1, const A2 &a2, const A3 &a3, const A4 &a4, const A5 &a5, const A6 &a6, const A7 &a7)
1891 {
1892     return kxi18np(singular, plural).subs(a1).subs(a2).subs(a3).subs(a4).subs(a5).subs(a6).subs(a7).toString();
1893 }
1894 template<typename A1, typename A2, typename A3, typename A4, typename A5, typename A6, typename A7, typename A8>
1895 inline QString
1896 xi18np(const char *singular, const char *plural, const A1 &a1, const A2 &a2, const A3 &a3, const A4 &a4, const A5 &a5, const A6 &a6, const A7 &a7, const A8 &a8)
1897 {
1898     return kxi18np(singular, plural).subs(a1).subs(a2).subs(a3).subs(a4).subs(a5).subs(a6).subs(a7).subs(a8).toString();
1899 }
1900 template<typename A1, typename A2, typename A3, typename A4, typename A5, typename A6, typename A7, typename A8, typename A9>
1901 inline QString xi18np(const char *singular,
1902                       const char *plural,
1903                       const A1 &a1,
1904                       const A2 &a2,
1905                       const A3 &a3,
1906                       const A4 &a4,
1907                       const A5 &a5,
1908                       const A6 &a6,
1909                       const A7 &a7,
1910                       const A8 &a8,
1911                       const A9 &a9)
1912 {
1913     return kxi18np(singular, plural).subs(a1).subs(a2).subs(a3).subs(a4).subs(a5).subs(a6).subs(a7).subs(a8).subs(a9).toString();
1914 }
1915 // <<<<< End of markup-aware plural calls
1916 
1917 // >>>>> Markup-aware context-plural calls
1918 // Autogenerated; contact maintainer for batch changes.
1919 template<typename A1>
1920 inline QString xi18ncp(const char *context, const char *singular, const char *plural, const A1 &a1)
1921 {
1922     return kxi18ncp(context, singular, plural).subs(a1).toString();
1923 }
1924 template<typename A1, typename A2>
1925 inline QString xi18ncp(const char *context, const char *singular, const char *plural, const A1 &a1, const A2 &a2)
1926 {
1927     return kxi18ncp(context, singular, plural).subs(a1).subs(a2).toString();
1928 }
1929 template<typename A1, typename A2, typename A3>
1930 inline QString xi18ncp(const char *context, const char *singular, const char *plural, const A1 &a1, const A2 &a2, const A3 &a3)
1931 {
1932     return kxi18ncp(context, singular, plural).subs(a1).subs(a2).subs(a3).toString();
1933 }
1934 template<typename A1, typename A2, typename A3, typename A4>
1935 inline QString xi18ncp(const char *context, const char *singular, const char *plural, const A1 &a1, const A2 &a2, const A3 &a3, const A4 &a4)
1936 {
1937     return kxi18ncp(context, singular, plural).subs(a1).subs(a2).subs(a3).subs(a4).toString();
1938 }
1939 template<typename A1, typename A2, typename A3, typename A4, typename A5>
1940 inline QString xi18ncp(const char *context, const char *singular, const char *plural, const A1 &a1, const A2 &a2, const A3 &a3, const A4 &a4, const A5 &a5)
1941 {
1942     return kxi18ncp(context, singular, plural).subs(a1).subs(a2).subs(a3).subs(a4).subs(a5).toString();
1943 }
1944 template<typename A1, typename A2, typename A3, typename A4, typename A5, typename A6>
1945 inline QString
1946 xi18ncp(const char *context, const char *singular, const char *plural, const A1 &a1, const A2 &a2, const A3 &a3, const A4 &a4, const A5 &a5, const A6 &a6)
1947 {
1948     return kxi18ncp(context, singular, plural).subs(a1).subs(a2).subs(a3).subs(a4).subs(a5).subs(a6).toString();
1949 }
1950 template<typename A1, typename A2, typename A3, typename A4, typename A5, typename A6, typename A7>
1951 inline QString xi18ncp(const char *context,
1952                        const char *singular,
1953                        const char *plural,
1954                        const A1 &a1,
1955                        const A2 &a2,
1956                        const A3 &a3,
1957                        const A4 &a4,
1958                        const A5 &a5,
1959                        const A6 &a6,
1960                        const A7 &a7)
1961 {
1962     return kxi18ncp(context, singular, plural).subs(a1).subs(a2).subs(a3).subs(a4).subs(a5).subs(a6).subs(a7).toString();
1963 }
1964 template<typename A1, typename A2, typename A3, typename A4, typename A5, typename A6, typename A7, typename A8>
1965 inline QString xi18ncp(const char *context,
1966                        const char *singular,
1967                        const char *plural,
1968                        const A1 &a1,
1969                        const A2 &a2,
1970                        const A3 &a3,
1971                        const A4 &a4,
1972                        const A5 &a5,
1973                        const A6 &a6,
1974                        const A7 &a7,
1975                        const A8 &a8)
1976 {
1977     return kxi18ncp(context, singular, plural).subs(a1).subs(a2).subs(a3).subs(a4).subs(a5).subs(a6).subs(a7).subs(a8).toString();
1978 }
1979 template<typename A1, typename A2, typename A3, typename A4, typename A5, typename A6, typename A7, typename A8, typename A9>
1980 inline QString xi18ncp(const char *context,
1981                        const char *singular,
1982                        const char *plural,
1983                        const A1 &a1,
1984                        const A2 &a2,
1985                        const A3 &a3,
1986                        const A4 &a4,
1987                        const A5 &a5,
1988                        const A6 &a6,
1989                        const A7 &a7,
1990                        const A8 &a8,
1991                        const A9 &a9)
1992 {
1993     return kxi18ncp(context, singular, plural).subs(a1).subs(a2).subs(a3).subs(a4).subs(a5).subs(a6).subs(a7).subs(a8).subs(a9).toString();
1994 }
1995 // <<<<< End of markup-aware context-plural calls
1996 
1997 // >>>>> Markup-aware basic calls with domain
1998 // Autogenerated; contact maintainer for batch changes.
1999 inline QString xi18nd(const char *domain, const char *text)
2000 {
2001     return kxi18nd(domain, text).toString();
2002 }
2003 template<typename A1>
2004 inline QString xi18nd(const char *domain, const char *text, const A1 &a1)
2005 {
2006     STATIC_ASSERT_NOT_LITERAL_STRING(A1)
2007     return kxi18nd(domain, text).subs(a1).toString();
2008 }
2009 template<typename A1, typename A2>
2010 inline QString xi18nd(const char *domain, const char *text, const A1 &a1, const A2 &a2)
2011 {
2012     STATIC_ASSERT_NOT_LITERAL_STRING(A1)
2013     return kxi18nd(domain, text).subs(a1).subs(a2).toString();
2014 }
2015 template<typename A1, typename A2, typename A3>
2016 inline QString xi18nd(const char *domain, const char *text, const A1 &a1, const A2 &a2, const A3 &a3)
2017 {
2018     STATIC_ASSERT_NOT_LITERAL_STRING(A1)
2019     return kxi18nd(domain, text).subs(a1).subs(a2).subs(a3).toString();
2020 }
2021 template<typename A1, typename A2, typename A3, typename A4>
2022 inline QString xi18nd(const char *domain, const char *text, const A1 &a1, const A2 &a2, const A3 &a3, const A4 &a4)
2023 {
2024     STATIC_ASSERT_NOT_LITERAL_STRING(A1)
2025     return kxi18nd(domain, text).subs(a1).subs(a2).subs(a3).subs(a4).toString();
2026 }
2027 template<typename A1, typename A2, typename A3, typename A4, typename A5>
2028 inline QString xi18nd(const char *domain, const char *text, const A1 &a1, const A2 &a2, const A3 &a3, const A4 &a4, const A5 &a5)
2029 {
2030     STATIC_ASSERT_NOT_LITERAL_STRING(A1)
2031     return kxi18nd(domain, text).subs(a1).subs(a2).subs(a3).subs(a4).subs(a5).toString();
2032 }
2033 template<typename A1, typename A2, typename A3, typename A4, typename A5, typename A6>
2034 inline QString xi18nd(const char *domain, const char *text, const A1 &a1, const A2 &a2, const A3 &a3, const A4 &a4, const A5 &a5, const A6 &a6)
2035 {
2036     STATIC_ASSERT_NOT_LITERAL_STRING(A1)
2037     return kxi18nd(domain, text).subs(a1).subs(a2).subs(a3).subs(a4).subs(a5).subs(a6).toString();
2038 }
2039 template<typename A1, typename A2, typename A3, typename A4, typename A5, typename A6, typename A7>
2040 inline QString xi18nd(const char *domain, const char *text, const A1 &a1, const A2 &a2, const A3 &a3, const A4 &a4, const A5 &a5, const A6 &a6, const A7 &a7)
2041 {
2042     STATIC_ASSERT_NOT_LITERAL_STRING(A1)
2043     return kxi18nd(domain, text).subs(a1).subs(a2).subs(a3).subs(a4).subs(a5).subs(a6).subs(a7).toString();
2044 }
2045 template<typename A1, typename A2, typename A3, typename A4, typename A5, typename A6, typename A7, typename A8>
2046 inline QString
2047 xi18nd(const char *domain, const char *text, const A1 &a1, const A2 &a2, const A3 &a3, const A4 &a4, const A5 &a5, const A6 &a6, const A7 &a7, const A8 &a8)
2048 {
2049     STATIC_ASSERT_NOT_LITERAL_STRING(A1)
2050     return kxi18nd(domain, text).subs(a1).subs(a2).subs(a3).subs(a4).subs(a5).subs(a6).subs(a7).subs(a8).toString();
2051 }
2052 template<typename A1, typename A2, typename A3, typename A4, typename A5, typename A6, typename A7, typename A8, typename A9>
2053 inline QString xi18nd(const char *domain,
2054                       const char *text,
2055                       const A1 &a1,
2056                       const A2 &a2,
2057                       const A3 &a3,
2058                       const A4 &a4,
2059                       const A5 &a5,
2060                       const A6 &a6,
2061                       const A7 &a7,
2062                       const A8 &a8,
2063                       const A9 &a9)
2064 {
2065     STATIC_ASSERT_NOT_LITERAL_STRING(A1)
2066     return kxi18nd(domain, text).subs(a1).subs(a2).subs(a3).subs(a4).subs(a5).subs(a6).subs(a7).subs(a8).subs(a9).toString();
2067 }
2068 // <<<<<<< End of markup-aware basic calls with domain
2069 
2070 // >>>>> Markup-aware context calls with domain
2071 // Autogenerated; contact maintainer for batch changes.
2072 inline QString xi18ndc(const char *domain, const char *context, const char *text)
2073 {
2074     return kxi18ndc(domain, context, text).toString();
2075 }
2076 template<typename A1>
2077 inline QString xi18ndc(const char *domain, const char *context, const char *text, const A1 &a1)
2078 {
2079     return kxi18ndc(domain, context, text).subs(a1).toString();
2080 }
2081 template<typename A1, typename A2>
2082 inline QString xi18ndc(const char *domain, const char *context, const char *text, const A1 &a1, const A2 &a2)
2083 {
2084     return kxi18ndc(domain, context, text).subs(a1).subs(a2).toString();
2085 }
2086 template<typename A1, typename A2, typename A3>
2087 inline QString xi18ndc(const char *domain, const char *context, const char *text, const A1 &a1, const A2 &a2, const A3 &a3)
2088 {
2089     return kxi18ndc(domain, context, text).subs(a1).subs(a2).subs(a3).toString();
2090 }
2091 template<typename A1, typename A2, typename A3, typename A4>
2092 inline QString xi18ndc(const char *domain, const char *context, const char *text, const A1 &a1, const A2 &a2, const A3 &a3, const A4 &a4)
2093 {
2094     return kxi18ndc(domain, context, text).subs(a1).subs(a2).subs(a3).subs(a4).toString();
2095 }
2096 template<typename A1, typename A2, typename A3, typename A4, typename A5>
2097 inline QString xi18ndc(const char *domain, const char *context, const char *text, const A1 &a1, const A2 &a2, const A3 &a3, const A4 &a4, const A5 &a5)
2098 {
2099     return kxi18ndc(domain, context, text).subs(a1).subs(a2).subs(a3).subs(a4).subs(a5).toString();
2100 }
2101 template<typename A1, typename A2, typename A3, typename A4, typename A5, typename A6>
2102 inline QString
2103 xi18ndc(const char *domain, const char *context, const char *text, const A1 &a1, const A2 &a2, const A3 &a3, const A4 &a4, const A5 &a5, const A6 &a6)
2104 {
2105     return kxi18ndc(domain, context, text).subs(a1).subs(a2).subs(a3).subs(a4).subs(a5).subs(a6).toString();
2106 }
2107 template<typename A1, typename A2, typename A3, typename A4, typename A5, typename A6, typename A7>
2108 inline QString xi18ndc(const char *domain,
2109                        const char *context,
2110                        const char *text,
2111                        const A1 &a1,
2112                        const A2 &a2,
2113                        const A3 &a3,
2114                        const A4 &a4,
2115                        const A5 &a5,
2116                        const A6 &a6,
2117                        const A7 &a7)
2118 {
2119     return kxi18ndc(domain, context, text).subs(a1).subs(a2).subs(a3).subs(a4).subs(a5).subs(a6).subs(a7).toString();
2120 }
2121 template<typename A1, typename A2, typename A3, typename A4, typename A5, typename A6, typename A7, typename A8>
2122 inline QString xi18ndc(const char *domain,
2123                        const char *context,
2124                        const char *text,
2125                        const A1 &a1,
2126                        const A2 &a2,
2127                        const A3 &a3,
2128                        const A4 &a4,
2129                        const A5 &a5,
2130                        const A6 &a6,
2131                        const A7 &a7,
2132                        const A8 &a8)
2133 {
2134     return kxi18ndc(domain, context, text).subs(a1).subs(a2).subs(a3).subs(a4).subs(a5).subs(a6).subs(a7).subs(a8).toString();
2135 }
2136 template<typename A1, typename A2, typename A3, typename A4, typename A5, typename A6, typename A7, typename A8, typename A9>
2137 inline QString xi18ndc(const char *domain,
2138                        const char *context,
2139                        const char *text,
2140                        const A1 &a1,
2141                        const A2 &a2,
2142                        const A3 &a3,
2143                        const A4 &a4,
2144                        const A5 &a5,
2145                        const A6 &a6,
2146                        const A7 &a7,
2147                        const A8 &a8,
2148                        const A9 &a9)
2149 {
2150     return kxi18ndc(domain, context, text).subs(a1).subs(a2).subs(a3).subs(a4).subs(a5).subs(a6).subs(a7).subs(a8).subs(a9).toString();
2151 }
2152 // <<<<< End of markup-aware context calls with domain
2153 
2154 // >>>>> Markup-aware plural calls with domain
2155 // Autogenerated; contact maintainer for batch changes.
2156 template<typename A1>
2157 inline QString xi18ndp(const char *domain, const char *singular, const char *plural, const A1 &a1)
2158 {
2159     return kxi18ndp(domain, singular, plural).subs(a1).toString();
2160 }
2161 template<typename A1, typename A2>
2162 inline QString xi18ndp(const char *domain, const char *singular, const char *plural, const A1 &a1, const A2 &a2)
2163 {
2164     return kxi18ndp(domain, singular, plural).subs(a1).subs(a2).toString();
2165 }
2166 template<typename A1, typename A2, typename A3>
2167 inline QString xi18ndp(const char *domain, const char *singular, const char *plural, const A1 &a1, const A2 &a2, const A3 &a3)
2168 {
2169     return kxi18ndp(domain, singular, plural).subs(a1).subs(a2).subs(a3).toString();
2170 }
2171 template<typename A1, typename A2, typename A3, typename A4>
2172 inline QString xi18ndp(const char *domain, const char *singular, const char *plural, const A1 &a1, const A2 &a2, const A3 &a3, const A4 &a4)
2173 {
2174     return kxi18ndp(domain, singular, plural).subs(a1).subs(a2).subs(a3).subs(a4).toString();
2175 }
2176 template<typename A1, typename A2, typename A3, typename A4, typename A5>
2177 inline QString xi18ndp(const char *domain, const char *singular, const char *plural, const A1 &a1, const A2 &a2, const A3 &a3, const A4 &a4, const A5 &a5)
2178 {
2179     return kxi18ndp(domain, singular, plural).subs(a1).subs(a2).subs(a3).subs(a4).subs(a5).toString();
2180 }
2181 template<typename A1, typename A2, typename A3, typename A4, typename A5, typename A6>
2182 inline QString
2183 xi18ndp(const char *domain, const char *singular, const char *plural, const A1 &a1, const A2 &a2, const A3 &a3, const A4 &a4, const A5 &a5, const A6 &a6)
2184 {
2185     return kxi18ndp(domain, singular, plural).subs(a1).subs(a2).subs(a3).subs(a4).subs(a5).subs(a6).toString();
2186 }
2187 template<typename A1, typename A2, typename A3, typename A4, typename A5, typename A6, typename A7>
2188 inline QString xi18ndp(const char *domain,
2189                        const char *singular,
2190                        const char *plural,
2191                        const A1 &a1,
2192                        const A2 &a2,
2193                        const A3 &a3,
2194                        const A4 &a4,
2195                        const A5 &a5,
2196                        const A6 &a6,
2197                        const A7 &a7)
2198 {
2199     return kxi18ndp(domain, singular, plural).subs(a1).subs(a2).subs(a3).subs(a4).subs(a5).subs(a6).subs(a7).toString();
2200 }
2201 template<typename A1, typename A2, typename A3, typename A4, typename A5, typename A6, typename A7, typename A8>
2202 inline QString xi18ndp(const char *domain,
2203                        const char *singular,
2204                        const char *plural,
2205                        const A1 &a1,
2206                        const A2 &a2,
2207                        const A3 &a3,
2208                        const A4 &a4,
2209                        const A5 &a5,
2210                        const A6 &a6,
2211                        const A7 &a7,
2212                        const A8 &a8)
2213 {
2214     return kxi18ndp(domain, singular, plural).subs(a1).subs(a2).subs(a3).subs(a4).subs(a5).subs(a6).subs(a7).subs(a8).toString();
2215 }
2216 template<typename A1, typename A2, typename A3, typename A4, typename A5, typename A6, typename A7, typename A8, typename A9>
2217 inline QString xi18ndp(const char *domain,
2218                        const char *singular,
2219                        const char *plural,
2220                        const A1 &a1,
2221                        const A2 &a2,
2222                        const A3 &a3,
2223                        const A4 &a4,
2224                        const A5 &a5,
2225                        const A6 &a6,
2226                        const A7 &a7,
2227                        const A8 &a8,
2228                        const A9 &a9)
2229 {
2230     return kxi18ndp(domain, singular, plural).subs(a1).subs(a2).subs(a3).subs(a4).subs(a5).subs(a6).subs(a7).subs(a8).subs(a9).toString();
2231 }
2232 // <<<<< End of markup-aware plural calls with domain
2233 
2234 // >>>>> Markup-aware context-plural calls with domain
2235 // Autogenerated; contact maintainer for batch changes.
2236 template<typename A1>
2237 inline QString xi18ndcp(const char *domain, const char *context, const char *singular, const char *plural, const A1 &a1)
2238 {
2239     return kxi18ndcp(domain, context, singular, plural).subs(a1).toString();
2240 }
2241 template<typename A1, typename A2>
2242 inline QString xi18ndcp(const char *domain, const char *context, const char *singular, const char *plural, const A1 &a1, const A2 &a2)
2243 {
2244     return kxi18ndcp(domain, context, singular, plural).subs(a1).subs(a2).toString();
2245 }
2246 template<typename A1, typename A2, typename A3>
2247 inline QString xi18ndcp(const char *domain, const char *context, const char *singular, const char *plural, const A1 &a1, const A2 &a2, const A3 &a3)
2248 {
2249     return kxi18ndcp(domain, context, singular, plural).subs(a1).subs(a2).subs(a3).toString();
2250 }
2251 template<typename A1, typename A2, typename A3, typename A4>
2252 inline QString
2253 xi18ndcp(const char *domain, const char *context, const char *singular, const char *plural, const A1 &a1, const A2 &a2, const A3 &a3, const A4 &a4)
2254 {
2255     return kxi18ndcp(domain, context, singular, plural).subs(a1).subs(a2).subs(a3).subs(a4).toString();
2256 }
2257 template<typename A1, typename A2, typename A3, typename A4, typename A5>
2258 inline QString xi18ndcp(const char *domain,
2259                         const char *context,
2260                         const char *singular,
2261                         const char *plural,
2262                         const A1 &a1,
2263                         const A2 &a2,
2264                         const A3 &a3,
2265                         const A4 &a4,
2266                         const A5 &a5)
2267 {
2268     return kxi18ndcp(domain, context, singular, plural).subs(a1).subs(a2).subs(a3).subs(a4).subs(a5).toString();
2269 }
2270 template<typename A1, typename A2, typename A3, typename A4, typename A5, typename A6>
2271 inline QString xi18ndcp(const char *domain,
2272                         const char *context,
2273                         const char *singular,
2274                         const char *plural,
2275                         const A1 &a1,
2276                         const A2 &a2,
2277                         const A3 &a3,
2278                         const A4 &a4,
2279                         const A5 &a5,
2280                         const A6 &a6)
2281 {
2282     return kxi18ndcp(domain, context, singular, plural).subs(a1).subs(a2).subs(a3).subs(a4).subs(a5).subs(a6).toString();
2283 }
2284 template<typename A1, typename A2, typename A3, typename A4, typename A5, typename A6, typename A7>
2285 inline QString xi18ndcp(const char *domain,
2286                         const char *context,
2287                         const char *singular,
2288                         const char *plural,
2289                         const A1 &a1,
2290                         const A2 &a2,
2291                         const A3 &a3,
2292                         const A4 &a4,
2293                         const A5 &a5,
2294                         const A6 &a6,
2295                         const A7 &a7)
2296 {
2297     return kxi18ndcp(domain, context, singular, plural).subs(a1).subs(a2).subs(a3).subs(a4).subs(a5).subs(a6).subs(a7).toString();
2298 }
2299 template<typename A1, typename A2, typename A3, typename A4, typename A5, typename A6, typename A7, typename A8>
2300 inline QString xi18ndcp(const char *domain,
2301                         const char *context,
2302                         const char *singular,
2303                         const char *plural,
2304                         const A1 &a1,
2305                         const A2 &a2,
2306                         const A3 &a3,
2307                         const A4 &a4,
2308                         const A5 &a5,
2309                         const A6 &a6,
2310                         const A7 &a7,
2311                         const A8 &a8)
2312 {
2313     return kxi18ndcp(domain, context, singular, plural).subs(a1).subs(a2).subs(a3).subs(a4).subs(a5).subs(a6).subs(a7).subs(a8).toString();
2314 }
2315 template<typename A1, typename A2, typename A3, typename A4, typename A5, typename A6, typename A7, typename A8, typename A9>
2316 inline QString xi18ndcp(const char *domain,
2317                         const char *context,
2318                         const char *singular,
2319                         const char *plural,
2320                         const A1 &a1,
2321                         const A2 &a2,
2322                         const A3 &a3,
2323                         const A4 &a4,
2324                         const A5 &a5,
2325                         const A6 &a6,
2326                         const A7 &a7,
2327                         const A8 &a8,
2328                         const A9 &a9)
2329 {
2330     return kxi18ndcp(domain, context, singular, plural).subs(a1).subs(a2).subs(a3).subs(a4).subs(a5).subs(a6).subs(a7).subs(a8).subs(a9).toString();
2331 }
2332 // <<<<< End of markup-aware context-plural calls with domain
2333 
2334 #endif // K_DOXYGEN
2335 
2336 #endif // KLOCALIZEDSTRING_H
2337 
2338 #ifndef K_DOXYGEN
2339 
2340 // Outside of include guards, to be able to map and unmap domains
2341 // by successive inclusions of this header
2342 // preceded with different definitions of TRANSLATION_DOMAIN.
2343 #ifdef TRANSLATION_DOMAIN
2344 #define i18n(...) i18nd(TRANSLATION_DOMAIN, __VA_ARGS__)
2345 #define i18nc(...) i18ndc(TRANSLATION_DOMAIN, __VA_ARGS__)
2346 #define i18np(...) i18ndp(TRANSLATION_DOMAIN, __VA_ARGS__)
2347 #define i18ncp(...) i18ndcp(TRANSLATION_DOMAIN, __VA_ARGS__)
2348 #define ki18n(...) ki18nd(TRANSLATION_DOMAIN, __VA_ARGS__)
2349 #define ki18nc(...) ki18ndc(TRANSLATION_DOMAIN, __VA_ARGS__)
2350 #define ki18np(...) ki18ndp(TRANSLATION_DOMAIN, __VA_ARGS__)
2351 #define ki18ncp(...) ki18ndcp(TRANSLATION_DOMAIN, __VA_ARGS__)
2352 #define tr2i18n(...) tr2i18nd(TRANSLATION_DOMAIN, __VA_ARGS__)
2353 #define xi18n(...) xi18nd(TRANSLATION_DOMAIN, __VA_ARGS__)
2354 #define xi18nc(...) xi18ndc(TRANSLATION_DOMAIN, __VA_ARGS__)
2355 #define xi18np(...) xi18ndp(TRANSLATION_DOMAIN, __VA_ARGS__)
2356 #define xi18ncp(...) xi18ndcp(TRANSLATION_DOMAIN, __VA_ARGS__)
2357 #define kxi18n(...) kxi18nd(TRANSLATION_DOMAIN, __VA_ARGS__)
2358 #define kxi18nc(...) kxi18ndc(TRANSLATION_DOMAIN, __VA_ARGS__)
2359 #define kxi18np(...) kxi18ndp(TRANSLATION_DOMAIN, __VA_ARGS__)
2360 #define kxi18ncp(...) kxi18ndcp(TRANSLATION_DOMAIN, __VA_ARGS__)
2361 #define tr2xi18n(...) tr2xi18nd(TRANSLATION_DOMAIN, __VA_ARGS__)
2362 #else
2363 #undef i18n
2364 #undef i18nc
2365 #undef i18np
2366 #undef i18ncp
2367 #undef ki18n
2368 #undef ki18nc
2369 #undef ki18np
2370 #undef ki18ncp
2371 #undef tr2i18n
2372 #undef xi18n
2373 #undef xi18nc
2374 #undef xi18np
2375 #undef xi18ncp
2376 #undef kxi18n
2377 #undef kxi18nc
2378 #undef kxi18np
2379 #undef kxi18ncp
2380 #undef tr2xi18n
2381 #endif
2382 
2383 #endif // K_DOXYGEN