#include <ComponentInformationTranslation.h>
Signals | |
| void | downloadComplete (QString translatedJsonTempFile, QString errorMsg) |
Public Member Functions | |
| ComponentInformationTranslation (QObject *parent, QGCCachedFileDownload *cachedFileDownload) | |
| bool | downloadAndTranslate (const QString &summaryJsonFile, const QString &toTranslateJsonFile, int maxCacheAgeSec, const QString &componentName) |
| QString | translateJsonUsingTS (const QString &toTranslateJsonFile, const QString &tsFile) |
Definition at line 9 of file ComponentInformationTranslation.h.
| ComponentInformationTranslation::ComponentInformationTranslation | ( | QObject * | parent, |
| QGCCachedFileDownload * | cachedFileDownload ) |
Definition at line 16 of file ComponentInformationTranslation.cc.
References ComponentInformationTranslation().
Referenced by ComponentInformationTranslation().
| bool ComponentInformationTranslation::downloadAndTranslate | ( | const QString & | summaryJsonFile, |
| const QString & | toTranslateJsonFile, | ||
| int | maxCacheAgeSec, | ||
| const QString & | componentName ) |
Download translation file according to the currently set locale and translate the json file. emits downloadComplete() when done (with a temporary file that should be deleted)
| summaryJsonFile | json file with url's to translation files (.ts) |
| toTranslateJsonFile | json file to be translated |
| maxCacheAgeSec | Maximum age of cached item in seconds |
Definition at line 22 of file ComponentInformationTranslation.cc.
References QGCCachedFileDownload::finished().
|
signal |
| QString ComponentInformationTranslation::translateJsonUsingTS | ( | const QString & | toTranslateJsonFile, |
| const QString & | tsFile ) |
Definition at line 106 of file ComponentInformationTranslation.cc.
References JsonParsing::isJsonFile(), and JsonSchemaValidator::validate().