diff --git a/.tx/config b/.tx/config index 2092a4bb5..89bae6069 100644 --- a/.tx/config +++ b/.tx/config @@ -2,7 +2,7 @@ host = https://www.transifex.com [keepassxc.keepassxc] -source_file = share/translations/keepassx_en.ts -file_filter = share/translations/keepassx_.ts +source_file = share/translations/keepassxc_en.ts +file_filter = share/translations/keepassxc_.ts source_lang = en type = QT diff --git a/share/translations/CMakeLists.txt b/share/translations/CMakeLists.txt index 161b21ac1..bf1870042 100644 --- a/share/translations/CMakeLists.txt +++ b/share/translations/CMakeLists.txt @@ -15,8 +15,8 @@ # along with this program. If not, see . file(GLOB TRANSLATION_FILES *.ts) -get_filename_component(TRANSLATION_EN_ABS keepassx_en.ts ABSOLUTE) -list(REMOVE_ITEM TRANSLATION_FILES keepassx_en.ts) +get_filename_component(TRANSLATION_EN_ABS keepassxc_en.ts ABSOLUTE) +list(REMOVE_ITEM TRANSLATION_FILES keepassxc_en.ts) list(REMOVE_ITEM TRANSLATION_FILES ${TRANSLATION_EN_ABS}) message(STATUS "Including translations...\n") @@ -35,7 +35,7 @@ set(QM_FILES ${QM_FILES} ${QTBASE_TRANSLATIONS}) install(FILES ${QM_FILES} DESTINATION ${DATA_INSTALL_DIR}/translations) # Add keepassx_en.qm as a fallback for uncommon english locales -install(FILES ${CMAKE_CURRENT_BINARY_DIR}/keepassx_en_US.qm DESTINATION ${DATA_INSTALL_DIR}/translations RENAME keepassx_en.qm) +install(FILES ${CMAKE_CURRENT_BINARY_DIR}/keepassxc_en_US.qm DESTINATION ${DATA_INSTALL_DIR}/translations RENAME keepassxc_en.qm) add_custom_target(translations DEPENDS ${QM_FILES}) add_dependencies(${PROGNAME} translations) diff --git a/share/translations/keepassx_ar.ts b/share/translations/keepassxc_ar.ts similarity index 100% rename from share/translations/keepassx_ar.ts rename to share/translations/keepassxc_ar.ts diff --git a/share/translations/keepassx_bg.ts b/share/translations/keepassxc_bg.ts similarity index 100% rename from share/translations/keepassx_bg.ts rename to share/translations/keepassxc_bg.ts diff --git a/share/translations/keepassx_ca.ts b/share/translations/keepassxc_ca.ts similarity index 100% rename from share/translations/keepassx_ca.ts rename to share/translations/keepassxc_ca.ts diff --git a/share/translations/keepassx_cs.ts b/share/translations/keepassxc_cs.ts similarity index 100% rename from share/translations/keepassx_cs.ts rename to share/translations/keepassxc_cs.ts diff --git a/share/translations/keepassx_da.ts b/share/translations/keepassxc_da.ts similarity index 100% rename from share/translations/keepassx_da.ts rename to share/translations/keepassxc_da.ts diff --git a/share/translations/keepassx_de.ts b/share/translations/keepassxc_de.ts similarity index 100% rename from share/translations/keepassx_de.ts rename to share/translations/keepassxc_de.ts diff --git a/share/translations/keepassx_el.ts b/share/translations/keepassxc_el.ts similarity index 100% rename from share/translations/keepassx_el.ts rename to share/translations/keepassxc_el.ts diff --git a/share/translations/keepassx_en.ts b/share/translations/keepassxc_en.ts similarity index 100% rename from share/translations/keepassx_en.ts rename to share/translations/keepassxc_en.ts diff --git a/share/translations/keepassx_en_GB.ts b/share/translations/keepassxc_en_GB.ts similarity index 100% rename from share/translations/keepassx_en_GB.ts rename to share/translations/keepassxc_en_GB.ts diff --git a/share/translations/keepassx_en_US.ts b/share/translations/keepassxc_en_US.ts similarity index 100% rename from share/translations/keepassx_en_US.ts rename to share/translations/keepassxc_en_US.ts diff --git a/share/translations/keepassx_es.ts b/share/translations/keepassxc_es.ts similarity index 100% rename from share/translations/keepassx_es.ts rename to share/translations/keepassxc_es.ts diff --git a/share/translations/keepassx_et.ts b/share/translations/keepassxc_et.ts similarity index 100% rename from share/translations/keepassx_et.ts rename to share/translations/keepassxc_et.ts diff --git a/share/translations/keepassx_fi.ts b/share/translations/keepassxc_fi.ts similarity index 100% rename from share/translations/keepassx_fi.ts rename to share/translations/keepassxc_fi.ts diff --git a/share/translations/keepassx_fr.ts b/share/translations/keepassxc_fr.ts similarity index 100% rename from share/translations/keepassx_fr.ts rename to share/translations/keepassxc_fr.ts diff --git a/share/translations/keepassx_fr_CA.ts b/share/translations/keepassxc_fr_CA.ts similarity index 100% rename from share/translations/keepassx_fr_CA.ts rename to share/translations/keepassxc_fr_CA.ts diff --git a/share/translations/keepassx_he.ts b/share/translations/keepassxc_he.ts similarity index 100% rename from share/translations/keepassx_he.ts rename to share/translations/keepassxc_he.ts diff --git a/share/translations/keepassx_hr_HR.ts b/share/translations/keepassxc_hr_HR.ts similarity index 100% rename from share/translations/keepassx_hr_HR.ts rename to share/translations/keepassxc_hr_HR.ts diff --git a/share/translations/keepassx_hu.ts b/share/translations/keepassxc_hu.ts similarity index 100% rename from share/translations/keepassx_hu.ts rename to share/translations/keepassxc_hu.ts diff --git a/share/translations/keepassx_id.ts b/share/translations/keepassxc_id.ts similarity index 100% rename from share/translations/keepassx_id.ts rename to share/translations/keepassxc_id.ts diff --git a/share/translations/keepassx_it.ts b/share/translations/keepassxc_it.ts similarity index 100% rename from share/translations/keepassx_it.ts rename to share/translations/keepassxc_it.ts diff --git a/share/translations/keepassx_ja.ts b/share/translations/keepassxc_ja.ts similarity index 100% rename from share/translations/keepassx_ja.ts rename to share/translations/keepassxc_ja.ts diff --git a/share/translations/keepassx_ko.ts b/share/translations/keepassxc_ko.ts similarity index 100% rename from share/translations/keepassx_ko.ts rename to share/translations/keepassxc_ko.ts diff --git a/share/translations/keepassx_lt.ts b/share/translations/keepassxc_lt.ts similarity index 100% rename from share/translations/keepassx_lt.ts rename to share/translations/keepassxc_lt.ts diff --git a/share/translations/keepassx_nb.ts b/share/translations/keepassxc_nb.ts similarity index 100% rename from share/translations/keepassx_nb.ts rename to share/translations/keepassxc_nb.ts diff --git a/share/translations/keepassx_nl_NL.ts b/share/translations/keepassxc_nl_NL.ts similarity index 100% rename from share/translations/keepassx_nl_NL.ts rename to share/translations/keepassxc_nl_NL.ts diff --git a/share/translations/keepassx_pl.ts b/share/translations/keepassxc_pl.ts similarity index 100% rename from share/translations/keepassx_pl.ts rename to share/translations/keepassxc_pl.ts diff --git a/share/translations/keepassx_pt_BR.ts b/share/translations/keepassxc_pt_BR.ts similarity index 100% rename from share/translations/keepassx_pt_BR.ts rename to share/translations/keepassxc_pt_BR.ts diff --git a/share/translations/keepassx_pt_PT.ts b/share/translations/keepassxc_pt_PT.ts similarity index 100% rename from share/translations/keepassx_pt_PT.ts rename to share/translations/keepassxc_pt_PT.ts diff --git a/share/translations/keepassx_ro.ts b/share/translations/keepassxc_ro.ts similarity index 100% rename from share/translations/keepassx_ro.ts rename to share/translations/keepassxc_ro.ts diff --git a/share/translations/keepassx_ru.ts b/share/translations/keepassxc_ru.ts similarity index 100% rename from share/translations/keepassx_ru.ts rename to share/translations/keepassxc_ru.ts diff --git a/share/translations/keepassx_sk.ts b/share/translations/keepassxc_sk.ts similarity index 100% rename from share/translations/keepassx_sk.ts rename to share/translations/keepassxc_sk.ts diff --git a/share/translations/keepassx_sr.ts b/share/translations/keepassxc_sr.ts similarity index 100% rename from share/translations/keepassx_sr.ts rename to share/translations/keepassxc_sr.ts diff --git a/share/translations/keepassx_sv.ts b/share/translations/keepassxc_sv.ts similarity index 100% rename from share/translations/keepassx_sv.ts rename to share/translations/keepassxc_sv.ts diff --git a/share/translations/keepassx_th.ts b/share/translations/keepassxc_th.ts similarity index 100% rename from share/translations/keepassx_th.ts rename to share/translations/keepassxc_th.ts diff --git a/share/translations/keepassx_tr.ts b/share/translations/keepassxc_tr.ts similarity index 100% rename from share/translations/keepassx_tr.ts rename to share/translations/keepassxc_tr.ts diff --git a/share/translations/keepassx_uk.ts b/share/translations/keepassxc_uk.ts similarity index 100% rename from share/translations/keepassx_uk.ts rename to share/translations/keepassxc_uk.ts diff --git a/share/translations/keepassx_zh_CN.ts b/share/translations/keepassxc_zh_CN.ts similarity index 100% rename from share/translations/keepassx_zh_CN.ts rename to share/translations/keepassxc_zh_CN.ts diff --git a/share/translations/keepassx_zh_TW.ts b/share/translations/keepassxc_zh_TW.ts similarity index 100% rename from share/translations/keepassx_zh_TW.ts rename to share/translations/keepassxc_zh_TW.ts diff --git a/src/core/Translator.cpp b/src/core/Translator.cpp index d97a35dd1..ac2072bf4 100644 --- a/src/core/Translator.cpp +++ b/src/core/Translator.cpp @@ -69,9 +69,9 @@ bool Translator::installTranslator(const QStringList& languages, const QString& for (const auto& language : languages) { QLocale locale(language); QScopedPointer translator(new QTranslator(qApp)); - if (translator->load(locale, "keepassx_", "", path)) { + if (translator->load(locale, "keepassxc_", "", path)) { return QCoreApplication::installTranslator(translator.take()); - } else if (translator->load(locale, "keepassx_", "", QLibraryInfo::location(QLibraryInfo::TranslationsPath))) { + } else if (translator->load(locale, "keepassxc_", "", QLibraryInfo::location(QLibraryInfo::TranslationsPath))) { return QCoreApplication::installTranslator(translator.take()); } } @@ -109,7 +109,7 @@ QList> Translator::availableLanguages() QList> languages; languages.append(QPair("system", "System default")); - QRegularExpression regExp("^keepassx_([a-zA-Z_]+)\\.qm$", QRegularExpression::CaseInsensitiveOption); + QRegularExpression regExp("^keepassxc_([a-zA-Z_]+)\\.qm$", QRegularExpression::CaseInsensitiveOption); const QStringList fileList = QDir(resources()->dataPath("translations")).entryList(); for (const QString& filename : fileList) { QRegularExpressionMatch match = regExp.match(filename);