Skip to content
This repository has been archived by the owner on Sep 27, 2024. It is now read-only.

Fix translation support #294

Open
wants to merge 4 commits into
base: v1-2
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
- name: Install Deps
uses: mstksg/get-package@master
with:
apt-get: build-essential openssh-client libopenscap-dev libqt5xmlpatterns5-dev ssh-askpass asciidoc libpolkit-agent-1-0
apt-get: build-essential openssh-client libopenscap-dev libqt5xmlpatterns5-dev ssh-askpass asciidoc libpolkit-agent-1-0 qttools5-dev
- name: Checkout
uses: actions/checkout@v2
- name: Build
Expand All @@ -30,7 +30,7 @@ jobs:
image: fedora:33
steps:
- name: Install Deps
run: dnf install -y cmake gcc-c++ openssh-clients util-linux openscap-devel qt5-qtbase-devel qt5-qtxmlpatterns-devel openssh-askpass asciidoc polkit-libs
run: dnf install -y cmake gcc-c++ openssh-clients util-linux openscap-devel qt5-qtbase-devel qt5-qtxmlpatterns-devel openssh-askpass asciidoc polkit-libs qt5-linguist
- name: Checkout
uses: actions/checkout@v2
- name: Build
Expand All @@ -40,6 +40,9 @@ jobs:
cmake ..
make -j4
popd
- name: Install
run: make install
working-directory: build

# Disabled
# build-macos:
Expand Down
18 changes: 14 additions & 4 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ include(GNUInstallDirs)
set(CMAKE_AUTOMOC ON)
find_package(Qt5Widgets REQUIRED)
find_package(Qt5XmlPatterns REQUIRED)
find_package(Qt5LinguistTools REQUIRED)

add_definitions(-DQT_DISABLE_DEPRECATED_BEFORE=0)

Expand Down Expand Up @@ -154,12 +155,18 @@ endif()
include_directories(${SCAP_WORKBENCH_INCLUDE_DIRS})

# Which languages we want generated
#set(scap_workbench_LANGUAGES de_DE fr_FR)
set(scap_workbench_LANGUAGES)
set(scap_workbench_LANGUAGES
cs # Czech
es # Spanish
fr # French
fi # Finnish
it # Italian
pt_BR # Portuguese Brazilian
)
set(scap_workbench_LANGUAGE_TS_FILES)

foreach(LANGUAGE ${scap_workbench_LANGUAGES})
set(TS_FILE "${CMAKE_CURRENT_SOURCE_DIR}/i18n/${LANGUAGE}.ts")
set(TS_FILE "${CMAKE_CURRENT_SOURCE_DIR}/i18n/scap-workbench.${LANGUAGE}.ts")
set(scap_workbench_LANGUAGE_TS_FILES ${scap_workbench_LANGUAGE_TS_FILES} ${TS_FILE})
set_source_files_properties(${TS_FILE} PROPERTIES OUTPUT_LOCATION "${CMAKE_CURRENT_BINARY_DIR}/i18n")
endforeach()
Expand All @@ -183,7 +190,7 @@ add_executable("scap-workbench" MACOSX_BUNDLE

${scap_workbench_HEADERS_MOC}
${scap_workbench_UIS_HEADERS}
${scap_workbench_LANGUAGE_TS_FILES}
${qm_files}
)

set_target_properties("scap-workbench" PROPERTIES MACOSX_BUNDLE_INFO_PLIST MacOSXBundleInfo.plist.in)
Expand Down Expand Up @@ -300,6 +307,9 @@ install(FILES "${CMAKE_CURRENT_SOURCE_DIR}/COPYING"
install(FILES "${CMAKE_CURRENT_SOURCE_DIR}/README.md"
DESTINATION ${CMAKE_INSTALL_DOCDIR})

install(DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/i18n"
DESTINATION "${CMAKE_INSTALL_DATADIR}/scap-workbench")

if (CPPCHECK_EXECUTABLE)
set(CPPCHECK_INCL_PARAMS -I /usr/include)
foreach(DIR ${SCAP_WORKBENCH_INCLUDE_DIRS})
Expand Down
Loading