🐛 Fixed missing translations
This commit is contained in:
parent
f34ec61276
commit
2fe89789bc
28
.github/workflows/build.yml
vendored
28
.github/workflows/build.yml
vendored
@ -25,13 +25,13 @@ jobs:
|
||||
uses: actions/cache@v2.1.6
|
||||
with:
|
||||
key: win-conan-${{ hashFiles('**/conanfile.txt') }}
|
||||
path: ~/.conan/
|
||||
path: ~/.conan/
|
||||
|
||||
- name: Cache Qt
|
||||
id: cache-qt
|
||||
uses: actions/cache@v2.1.6
|
||||
with:
|
||||
path: '${{ github.workspace }}/qt/'
|
||||
path: "${{ github.workspace }}/qt/"
|
||||
key: ${{ runner.os }}-QtCache
|
||||
|
||||
- name: Install Qt
|
||||
@ -39,19 +39,19 @@ jobs:
|
||||
with:
|
||||
cached: ${{ steps.cache-qt.outputs.cache-hit }}
|
||||
modules: qtwebengine
|
||||
dir: '${{ github.workspace }}/qt/'
|
||||
dir: "${{ github.workspace }}/qt/"
|
||||
|
||||
- name: Export qtkeychain
|
||||
run: |
|
||||
conan export recipes/qtkeychain
|
||||
conan export recipes/qtkeychain
|
||||
|
||||
- name: Build
|
||||
run: |
|
||||
mkdir build
|
||||
cd build
|
||||
conan install .. --build=missing
|
||||
cmake -G"NMake Makefiles JOM" -DCMAKE_INSTALL_PREFIX=redist ..
|
||||
jom
|
||||
mkdir build
|
||||
cd build
|
||||
conan install .. --build=missing
|
||||
cmake -G"NMake Makefiles JOM" -DCMAKE_INSTALL_PREFIX=redist ..
|
||||
jom
|
||||
shell: cmd
|
||||
|
||||
- name: Install
|
||||
@ -77,12 +77,12 @@ jobs:
|
||||
- name: Install qt
|
||||
run: |
|
||||
sudo apt-get update
|
||||
sudo apt-get install qt5keychain-dev qtwebengine5-dev -y
|
||||
sudo apt-get install qt5keychain-dev qtwebengine5-dev qttools5-dev -y
|
||||
|
||||
- name: Build
|
||||
run: |
|
||||
mkdir build
|
||||
cd build
|
||||
cmake -DCMAKE_BUILD_TYPE=Release ..
|
||||
make -j4
|
||||
mkdir build
|
||||
cd build
|
||||
cmake -DCMAKE_BUILD_TYPE=Release ..
|
||||
make -j4
|
||||
shell: bash
|
@ -82,8 +82,11 @@ set(HEADERS
|
||||
src/WorkspaceCommon.h)
|
||||
|
||||
|
||||
file(COPY rsrc/languages.qrc DESTINATION ${CMAKE_BINARY_DIR}/intl)
|
||||
|
||||
set(RESOURCES
|
||||
rsrc/resources.qrc)
|
||||
rsrc/resources.qrc
|
||||
${CMAKE_BINARY_DIR}/intl/languages.qrc)
|
||||
|
||||
set(TRANSLATIONS
|
||||
intl/en_US.ts
|
||||
@ -97,7 +100,7 @@ set(TRANSLATIONS
|
||||
intl/nl_NL.ts
|
||||
intl/ko_KR.ts)
|
||||
|
||||
set_source_files_properties(${TRANSLATIONS} PROPERTIES OUTPUT_LOCATION "${RUNTIME_OUTPUT_DIRECTORY}translations")
|
||||
set_source_files_properties(${TRANSLATIONS} PROPERTIES OUTPUT_LOCATION "intl")
|
||||
|
||||
find_package(Qt5LinguistTools)
|
||||
if (Qt5LinguistTools_FOUND)
|
||||
@ -106,7 +109,6 @@ if (Qt5LinguistTools_FOUND)
|
||||
else ()
|
||||
qt5_add_translation(QM_FILES ${TRANSLATIONS})
|
||||
endif ()
|
||||
install(FILES ${QM_FILES} DESTINATION ./translations)
|
||||
else ()
|
||||
message("Qt5LinguistTools not found")
|
||||
endif ()
|
||||
@ -144,10 +146,13 @@ endif ()
|
||||
|
||||
target_compile_definitions(${PROJECT_NAME} PRIVATE FUEL_VERSION="${PROJECT_VERSION}")
|
||||
|
||||
|
||||
# ------------------------------------------------------------------------------------------------#
|
||||
# Cpack
|
||||
# ------------------------------------------------------------------------------------------------#
|
||||
|
||||
include(GNUInstallDirs)
|
||||
|
||||
set(CPACK_PACKAGE_NAME "${PROJECT_NAME}")
|
||||
set(CPACK_PACKAGE_VENDOR "${PROJECT_NAME}")
|
||||
set(CPACK_PACKAGE_DESCRIPTION "A GUI front-end for the Fossil SCM")
|
||||
@ -201,6 +206,22 @@ if (WIN32)
|
||||
set(CPACK_GENERATOR ${CPACK_GENERATOR};WIX)
|
||||
set(CPACK_MODULE_PATH "")
|
||||
endif ()
|
||||
|
||||
if(UNIX)
|
||||
install(
|
||||
TARGETS ${PROJECT_NAME}
|
||||
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
|
||||
)
|
||||
install(
|
||||
FILES ${CMAKE_SOURCE_DIR}/rsrc/fuel.desktop
|
||||
DESTINATION ${CMAKE_INSTALL_DATADIR}/applications/
|
||||
)
|
||||
install(
|
||||
FILES ${CMAKE_SOURCE_DIR}/rsrc/icons/fuel.png
|
||||
DESTINATION ${CMAKE_INSTALL_DATADIR}/icons/hicolor/256x256/apps
|
||||
)
|
||||
endif()
|
||||
|
||||
include(CPack)
|
||||
|
||||
feature_summary(WHAT ALL)
|
2
fuel.pro
2
fuel.pro
@ -57,6 +57,8 @@ exists( $$OUT_PWD/conanbuildinfo.pri ) {
|
||||
message("Using conan packages")
|
||||
CONFIG += conan_basic_setup
|
||||
include($$OUT_PWD/conanbuildinfo.pri)
|
||||
} else {
|
||||
QT += Qt5Keychain
|
||||
}
|
||||
|
||||
INCLUDEPATH += src
|
||||
|
@ -1,10 +1,9 @@
|
||||
[Desktop Entry]
|
||||
Encoding=UTF-8
|
||||
Type=Application
|
||||
Exec=/usr/bin/fuel
|
||||
Icon=/usr/share/icons/hicolor/256x256/apps/fuel.png
|
||||
Exec=Fuel
|
||||
Icon=fuel
|
||||
Terminal=false
|
||||
Name=Fuel
|
||||
GenericName=Software Configuration Management tool
|
||||
Comment=GUI Front-End to the Fossil SCM tool
|
||||
Categories=Qt;Development;RevisionControl
|
||||
Categories=Development;RevisionControl;
|
13
rsrc/languages.qrc
Normal file
13
rsrc/languages.qrc
Normal file
@ -0,0 +1,13 @@
|
||||
<RCC>
|
||||
<qresource prefix="/intl">
|
||||
<file>el_GR.qm</file>
|
||||
<file>de_DE.qm</file>
|
||||
<file>es_ES.qm</file>
|
||||
<file>fr_FR.qm</file>
|
||||
<file>ru_RU.qm</file>
|
||||
<file>pt_PT.qm</file>
|
||||
<file>it_IT.qm</file>
|
||||
<file>nl_NL.qm</file>
|
||||
<file>ko_KR.qm</file>
|
||||
</qresource>
|
||||
</RCC>
|
@ -156,19 +156,6 @@
|
||||
<file>icons/Zoom In-01.png</file>
|
||||
<file>icons/Zoom Out-01.png</file>
|
||||
</qresource>
|
||||
<!-->
|
||||
<qresource prefix="/intl">
|
||||
<file>intl/el_GR.qm</file>
|
||||
<file>intl/de_DE.qm</file>
|
||||
<file>intl/es_ES.qm</file>
|
||||
<file>intl/fr_FR.qm</file>
|
||||
<file>intl/ru_RU.qm</file>
|
||||
<file>intl/pt_PT.qm</file>
|
||||
<file>intl/it_IT.qm</file>
|
||||
<file>intl/nl_NL.qm</file>
|
||||
<file>intl/ko_KR.qm</file>
|
||||
</qresource>
|
||||
<-->
|
||||
<qresource prefix="/docs">
|
||||
<file>docs/Translators.txt</file>
|
||||
<file>docs/Licenses.txt</file>
|
||||
|
@ -75,7 +75,7 @@ bool Settings::InstallLang(const QString &langId)
|
||||
return true;
|
||||
}
|
||||
|
||||
QString locale_path = QString(":intl/intl/%0.qm").arg(langId);
|
||||
QString locale_path = QString(":intl/%0.qm").arg(langId);
|
||||
if(!translator.load(locale_path))
|
||||
return false;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user