Skip to content
Merged
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
3 changes: 3 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,9 @@ jobs:
- run: cmake --preset dev
- run: cmake --build --preset dev
- run: ctest --preset dev
- name: Failed tests, again, with their full output
if: failure()
run: ctest --preset dev --rerun-failed --extra-verbose

format:
name: clang-format
Expand Down
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
option(EMBLINK_STUDIO_BUILD_TESTS "Build the Qt tests" ON)

# Qt 6.8 LTS is the release target (spec section 9); newer 6.x builds for development.
find_package(Qt6 6.8 REQUIRED COMPONENTS Core Gui Widgets)
find_package(Qt6 6.8 REQUIRED COMPONENTS Core Gui Widgets LinguistTools)
qt_standard_project_setup()

# The Python that runs the core during development (spec section 11, question 4).
Expand Down
43 changes: 40 additions & 3 deletions app/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
# This file is part of EmbLink Studio, the IDE for EmbLinkRTOS.
# Licensed under the Apache License, Version 2.0; see the LICENSE file at the repository root.
#
# Build of the desktop: the corelink library, the EmbLinkStudio application,
# its notices resource, and the Qt tests.
# Build of the desktop: the corelink, workbench and frame libraries, the EmbLinkStudio
# application, its notices resource, its translations, and the Qt tests.

# The link to the core, shared by the application and its tests.
qt_add_library(emblink_studio_corelink STATIC
Expand All @@ -26,6 +26,20 @@ qt_add_library(emblink_studio_workbench STATIC
target_include_directories(emblink_studio_workbench PUBLIC src)
target_link_libraries(emblink_studio_workbench PUBLIC Qt6::Widgets ads::qtadvanceddocking-qt6)

# The frame (design brief section 4f): the theme read from the design tokens, the segmented
# control, the interface language and Settings. The tokens file in docs/design is the only
# source of the look; it is built in as :/design/tokens.json.
qt_add_library(emblink_studio_ui STATIC
src/theme.cpp src/theme.h
src/segmentedcontrol.cpp src/segmentedcontrol.h
src/language.cpp src/language.h
src/settingsdialog.cpp src/settingsdialog.h
)
target_include_directories(emblink_studio_ui PUBLIC src)
target_link_libraries(emblink_studio_ui PUBLIC Qt6::Widgets)
qt_add_resources(emblink_studio_ui design PREFIX "/design" BASE "${PROJECT_SOURCE_DIR}/docs/design"
FILES "${PROJECT_SOURCE_DIR}/docs/design/tokens.json")

# The notices list shown in the About box, generated from third_party/components.json.
set(notices "${CMAKE_CURRENT_BINARY_DIR}/NOTICES.md")
add_custom_command(
Expand All @@ -45,7 +59,8 @@ qt_add_executable(emblinkstudio WIN32 MACOSX_BUNDLE
src/main.cpp
src/mainwindow.cpp src/mainwindow.h
)
target_link_libraries(emblinkstudio PRIVATE emblink_studio_corelink emblink_studio_workbench Qt6::Widgets)
target_link_libraries(emblinkstudio PRIVATE emblink_studio_corelink emblink_studio_workbench
emblink_studio_ui Qt6::Widgets)
target_compile_definitions(emblinkstudio PRIVATE EMBLINK_STUDIO_VERSION="${PROJECT_VERSION}")
set_source_files_properties("${notices}" PROPERTIES QT_RESOURCE_ALIAS NOTICES.md)
qt_add_resources(emblinkstudio notices PREFIX "/" BASE "${CMAKE_CURRENT_BINARY_DIR}" FILES "${notices}")
Expand All @@ -56,6 +71,16 @@ set_target_properties(emblinkstudio PROPERTIES
MACOSX_BUNDLE_SHORT_VERSION_STRING "${PROJECT_VERSION}"
)

# The interface in French and Simplified Chinese (design brief section 4f). English is the
# source. `cmake --build --preset dev --target update_translations` refreshes the .ts files
# from the sources; translate them in Qt Linguist. They are compiled into the frame library.
qt_add_translations(TARGETS emblink_studio_ui
SOURCE_TARGETS emblinkstudio emblink_studio_ui
TS_FILES i18n/emblinkstudio_fr.ts i18n/emblinkstudio_zh_CN.ts
RESOURCE_PREFIX /i18n
LUPDATE_OPTIONS -no-obsolete -locations none
)

if(EMBLINK_STUDIO_BUILD_TESTS)
foreach(test tst_framing tst_coreclient)
qt_add_executable(${test} tests/${test}.cpp)
Expand All @@ -68,4 +93,16 @@ if(EMBLINK_STUDIO_BUILD_TESTS)
qt_add_executable(tst_workbench tests/tst_workbench.cpp)
target_link_libraries(tst_workbench PRIVATE emblink_studio_workbench Qt6::Test)
add_test(NAME tst_workbench COMMAND tst_workbench)

foreach(test tst_theme tst_segmentedcontrol tst_language)
qt_add_executable(${test} tests/${test}.cpp)
target_link_libraries(${test} PRIVATE emblink_studio_ui Qt6::Test)
add_test(NAME ${test} COMMAND ${test})
endforeach()
# qt_standard_project_setup() makes executables GUI programs on Windows and bundles on
# macOS; a test is a console program, so its output reaches CTest on every system.
set_target_properties(tst_framing tst_coreclient tst_workbench tst_theme tst_segmentedcontrol
tst_language PROPERTIES WIN32_EXECUTABLE OFF MACOSX_BUNDLE OFF)
target_compile_definitions(tst_theme PRIVATE
EMBLINK_STUDIO_TOKENS="${PROJECT_SOURCE_DIR}/docs/design/tokens.json")
endif()
158 changes: 158 additions & 0 deletions app/i18n/emblinkstudio_fr.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,158 @@
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE TS>
<TS version="2.1" language="fr" sourcelanguage="en">
<context>
<name>emblinkstudio::MainWindow</name>
<message>
<source>Connected to %1 %2, protocol %3.</source>
<translation>Connecté à %1 %2, protocole %3.</translation>
</message>
<message>
<source>EmbLink Studio Core stopped unexpectedly (exit code %1). Views are read-only until it restarts.</source>
<translation>EmbLink Studio Core s’est arrêté de façon inattendue (code de sortie %1). Les vues restent en lecture seule jusqu’à son redémarrage.</translation>
</message>
<message>
<source>EmbLink Studio</source>
<translation>EmbLink Studio</translation>
</message>
<message>
<source>No project open</source>
<translation>Aucun projet ouvert</translation>
</message>
<message>
<source>Configure</source>
<translation>Configurer</translation>
</message>
<message>
<source>Code</source>
<translation>Code</translation>
</message>
<message>
<source>Debug</source>
<translation>Débogage</translation>
</message>
<message>
<source>Verify</source>
<translation>Vérification</translation>
</message>
<message>
<source>Stage</source>
<translation>Étape</translation>
</message>
<message>
<source>Core</source>
<translation>Core</translation>
</message>
<message>
<source>Core log</source>
<translation>Journal du Core</translation>
</message>
<message>
<source>&amp;Restart the core</source>
<translation>&amp;Redémarrer le Core</translation>
</message>
<message>
<source>&amp;File</source>
<translation>&amp;Fichier</translation>
</message>
<message>
<source>&amp;Settings...</source>
<translation>&amp;Réglages...</translation>
</message>
<message>
<source>&amp;Quit</source>
<translation>&amp;Quitter</translation>
</message>
<message>
<source>&amp;View</source>
<translation>&amp;Affichage</translation>
</message>
<message>
<source>&amp;Layouts</source>
<translation>&amp;Dispositions</translation>
</message>
<message>
<source>&amp;Save layout as...</source>
<translation>&amp;Enregistrer la disposition sous...</translation>
</message>
<message>
<source>&amp;Reset layout</source>
<translation>&amp;Rétablir la disposition</translation>
</message>
<message>
<source>&amp;Help</source>
<translation>&amp;Aide</translation>
</message>
<message>
<source>&amp;About EmbLink Studio</source>
<translation>À &amp;propos d’EmbLink Studio</translation>
</message>
<message>
<source>Starting EmbLink Studio Core...</source>
<translation>Démarrage d’EmbLink Studio Core...</translation>
</message>
<message>
<source>Core starting</source>
<translation>Core en démarrage</translation>
</message>
<message>
<source>Core connected</source>
<translation>Core connecté</translation>
</message>
<message>
<source>Core stopped</source>
<translation>Core arrêté</translation>
</message>
<message>
<source>About EmbLink Studio</source>
<translation>À propos d’EmbLink Studio</translation>
</message>
<message>
<source>&lt;b&gt;EmbLink Studio&lt;/b&gt; %1&lt;br&gt;The development system for EmbLinkRTOS. Licensed under the Apache License 2.0.</source>
<translation>&lt;b&gt;EmbLink Studio&lt;/b&gt; %1&lt;br&gt;Le système de développement d’EmbLinkRTOS. Sous licence Apache 2.0.</translation>
</message>
<message>
<source>The notices list is missing.</source>
<translation>La liste des mentions légales est absente.</translation>
</message>
<message>
<source>No saved layouts</source>
<translation>Aucune disposition enregistrée</translation>
</message>
<message>
<source>&amp;Delete</source>
<translation>&amp;Supprimer</translation>
</message>
<message>
<source>Save layout</source>
<translation>Enregistrer la disposition</translation>
</message>
<message>
<source>Name of this layout, such as Debug:</source>
<translation>Nom de cette disposition, par exemple Débogage :</translation>
</message>
</context>
<context>
<name>emblinkstudio::SettingsDialog</name>
<message>
<source>Settings</source>
<translation>Réglages</translation>
</message>
<message>
<source>General</source>
<translation>Général</translation>
</message>
<message>
<source>&amp;Language</source>
<translation>&amp;Langue</translation>
</message>
<message>
<source>Applies at once, without a restart.</source>
<translation>S’applique tout de suite, sans redémarrage.</translation>
</message>
<message>
<source>Option keys, pin and register names, file names and code stay as they are in every language.</source>
<translation>Les clés d’option, les noms de broches et de registres, les noms de fichiers et le code restent tels quels dans toutes les langues.</translation>
</message>
</context>
</TS>
Loading
Loading