mirror of
https://github.com/sunnypilot/sunnypilot.git
synced 2026-02-18 22:23:56 +08:00
* rough multiple language demo
* more wrappings
* stash
* add some bad translations
* updates
* map from french to spanish still has same problem of needing to call setText on everything
* add files
* restart UI
* use return code
* relative path
* more translations
* don't loop restart
* Toggle and prime translations
* try on device
* try QComboBox with readable style
* stash
* not yet scrollable
* stash
* dynamic translations (doesn't work for dynamic widget strings yet)
* clean up multiple option selector
* store languages in json
* try transparent
* Try transparent popup
* see how this looks
* tweaks
* clean up
* clean up
* clean up 2 and missing tr
* wrap more strings
* missing updater
* fixes
* add basic test to ensure all strings wrapped
* try in CI
* clean up
* test name
* fix test
* always install qt dev tools
* fix deps
* fast test
* add section so it prints multiple errors
* debug
* debug
get rid of those
* make any difference?
* comment
* oh...
* run with offscreen platform
* try out section
* clean up
* fix missing wrappings (it works!)
* move down
* space
* clear relevant params, set TICI=1
old-commit-hash: 879a7c3201
26 lines
689 B
C++
26 lines
689 B
C++
#define CATCH_CONFIG_RUNNER
|
|
#include "catch2/catch.hpp"
|
|
|
|
#include <QApplication>
|
|
#include <QDebug>
|
|
#include <QDir>
|
|
#include <QTranslator>
|
|
|
|
int main(int argc, char **argv) {
|
|
// unit tests for Qt
|
|
QApplication app(argc, argv);
|
|
|
|
QString language_file = "main_test_en";
|
|
qDebug() << "Loading language:" << language_file;
|
|
|
|
QTranslator translator;
|
|
QString translationsPath = QDir::cleanPath(qApp->applicationDirPath() + "/../translations");
|
|
if (!translator.load(language_file, translationsPath)) {
|
|
qDebug() << "Failed to load translation file!";
|
|
}
|
|
app.installTranslator(&translator);
|
|
|
|
const int res = Catch::Session().run(argc, argv);
|
|
return (res < 0xff ? res : 0xff);
|
|
}
|