File indexing completed on 2024-05-19 05:38:24

0001 /*
0002     localegeneratorbase.h
0003     SPDX-FileCopyrightText: 2022 Han Young <hanyoung@protonmail.com>
0004 
0005     SPDX-License-Identifier: GPL-2.0-or-later
0006 */
0007 
0008 #pragma once
0009 
0010 #include <KLocalizedString>
0011 #include <QObject>
0012 
0013 class LocaleGeneratorBase : public QObject
0014 {
0015     Q_OBJECT
0016 public:
0017     using QObject::QObject;
0018     Q_INVOKABLE virtual void localesGenerate(const QStringList &list);
0019 
0020 Q_SIGNALS:
0021     void success();
0022     void needsFont();
0023     void userHasToGenerateManually(const QString &reason);
0024 
0025 protected:
0026     static inline QString defaultManuallyGenerateMessage()
0027     {
0028         return i18nc("@info:warning",
0029                      "Locale has been configured, but this KCM currently "
0030                      "doesn't support auto locale generation on your system, "
0031                      "please refer to your distribution's manual to install fonts and generate locales");
0032     }
0033 };