Füge Unterstützung für Regressionstests hinzu und erweitere die Benutzeroberfläche mit neuen Schaltflächen zur Genehmigung identischer Übersetzungen und zur Wiederverwendung vorhandener Übersetzungen.

This commit is contained in:
Torsten Schulz (local)
2026-10-29 09:48:07 +01:00
parent d1c68d78f1
commit 05d62aad5f
5 changed files with 508 additions and 58 deletions

View File

@@ -74,3 +74,16 @@ install(TARGETS RenpyTranslationHelper
if(QT_VERSION_MAJOR EQUAL 6)
qt_finalize_executable(RenpyTranslationHelper)
endif()
option(RENPY_BUILD_TESTS "Build translation save regression tests" OFF)
if(RENPY_BUILD_TESTS)
enable_testing()
add_executable(RenpyTranslationHelperSaveTests
tests/save_tests.cpp mainwindow.cpp mainwindow.h mainwindow.ui)
target_include_directories(RenpyTranslationHelperSaveTests PRIVATE ${CMAKE_CURRENT_SOURCE_DIR})
target_link_libraries(RenpyTranslationHelperSaveTests PRIVATE
Qt${QT_VERSION_MAJOR}::Widgets Qt${QT_VERSION_MAJOR}::Network)
add_test(NAME translation_saving COMMAND RenpyTranslationHelperSaveTests)
set_tests_properties(translation_saving PROPERTIES
ENVIRONMENT "QT_QPA_PLATFORM=offscreen" TIMEOUT 30)
endif()