MCPcopy Create free account
hub / github.com/dail8859/NotepadNext / loadTranslation

Method loadTranslation

src/TranslationManager.cpp:74–90  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

72}
73
74void TranslationManager::loadTranslation(QLocale locale)
75{
76 qInfo(Q_FUNC_INFO);
77
78 const QStringList filenames{QStringList{QApplication::applicationName(), "qt", "qtbase"}};
79
80 for (const auto& filename : filenames) {
81 std::unique_ptr<QTranslator> translator = std::make_unique<QTranslator>();
82
83 if (translator->load(locale, filename, QStringLiteral("_"), path)) {
84 if (QCoreApplication::installTranslator(translator.get())) {
85 qInfo() << "Loaded translation" << translator.get()->filePath();
86 translators.append(translator.release());
87 }
88 }
89 }
90}
91
92void TranslationManager::loadTranslation(QString localeName)
93{

Callers 1

initMethod · 0.80

Calls 1

getMethod · 0.80

Tested by

no test coverage detected