Merge pull request #148773 from sikmir/crow-translate

crow-translate: 2.8.7 → 2.9.1
This commit is contained in:
Guillaume Girol 2021-12-10 21:41:22 +00:00 committed by GitHub
commit aa4dbaa0e3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 16 additions and 16 deletions

View File

@ -34,8 +34,8 @@ let
qonlinetranslator = fetchFromGitHub {
owner = "crow-translate";
repo = "QOnlineTranslator";
rev = "df89083d2f680a8f856b1df00b8846f995cf1fae";
sha256 = "sha256-I64KGInnYd/QdI5kANJERsF95wMvRlr8kgQhUqXXN/0=";
rev = "1.5.2";
sha256 = "sha256-iGi25aKwff2hNNx6o4kHZV8gVbEQcMgpTTvop3CoLjM=";
};
circleflags = fetchFromGitHub {
owner = "HatScripts";
@ -52,13 +52,13 @@ let
in
mkDerivation rec {
pname = "crow-translate";
version = "2.8.7";
version = "2.9.1";
src = fetchFromGitHub {
owner = "crow-translate";
repo = pname;
rev = version;
sha256 = "sha256-0bq9itbFyzdOhdNuUtdCYLTCIhc91MM+YRhJgXC5PPw=";
sha256 = "sha256-7Zb6PZO8eLeGPEZD37ja+LZydIQdsgy5gMAMtlS4k5Y=";
};
patches = [

View File

@ -1,8 +1,8 @@
diff --git i/CMakeLists.txt w/CMakeLists.txt
index faa9417..059b899 100644
index 375b17c..106efa9 100644
--- i/CMakeLists.txt
+++ w/CMakeLists.txt
@@ -101,13 +101,11 @@ qt5_add_translation(QM_FILES
@@ -114,13 +114,11 @@ qt5_add_translation(QM_FILES
)
configure_file(src/cmake.h.in cmake.h)
@ -19,7 +19,7 @@ index faa9417..059b899 100644
src/addlanguagedialog.cpp
src/addlanguagedialog.ui
diff --git i/cmake/ExternalLibraries.cmake w/cmake/ExternalLibraries.cmake
index e2501e1..e15ce6c 100644
index c92e745..f265f03 100644
--- i/cmake/ExternalLibraries.cmake
+++ w/cmake/ExternalLibraries.cmake
@@ -2,34 +2,28 @@ include(FetchContent)
@ -46,7 +46,7 @@ index e2501e1..e15ce6c 100644
FetchContent_Declare(QOnlineTranslator
- GIT_REPOSITORY https://github.com/crow-translate/QOnlineTranslator
- GIT_TAG df89083d2f680a8f856b1df00b8846f995cf1fae
- GIT_TAG 1.5.2
+ SOURCE_DIR @qonlinetranslator@
)

View File

@ -1,13 +1,13 @@
diff --git i/src/settings/appsettings.cpp w/src/settings/appsettings.cpp
index aa8b357..15e4f74 100644
index a73371b..b9d66ca 100644
--- i/src/settings/appsettings.cpp
+++ w/src/settings/appsettings.cpp
@@ -81,7 +81,7 @@ void AppSettings::applyLanguage(QLocale::Language lang)
QLocale::setDefault(locale);
s_appTranslator.load(locale, QStringLiteral(PROJECT_NAME), QStringLiteral("_"), QStandardPaths::locate(QStandardPaths::AppDataLocation, QStringLiteral("translations"), QStandardPaths::LocateDirectory));
- s_qtTranslator.load(locale, QStringLiteral("qtbase"), QStringLiteral("_"), QLibraryInfo::location(QLibraryInfo::TranslationsPath));
+ s_qtTranslator.load(locale, QStringLiteral("qtbase"), QStringLiteral("_"), QLatin1String("@qttranslations@/translations"));
@@ -75,7 +75,7 @@ void AppSettings::applyLocale(const QLocale &locale)
const QLocale newLocale = locale == defaultLocale() ? QLocale::system() : locale;
QLocale::setDefault(newLocale);
s_appTranslator.load(newLocale, QStringLiteral(PROJECT_NAME), QStringLiteral("_"), QStandardPaths::locate(QStandardPaths::AppDataLocation, QStringLiteral("translations"), QStandardPaths::LocateDirectory));
- s_qtTranslator.load(newLocale, QStringLiteral("qt"), QStringLiteral("_"), QLibraryInfo::location(QLibraryInfo::TranslationsPath));
+ s_qtTranslator.load(newLocale, QStringLiteral("qt"), QStringLiteral("_"), QLatin1String("@qttranslations@/translations"));
}
QLocale::Language AppSettings::defaultLanguage()
QLocale AppSettings::defaultLocale()