tolerate old version of hlohmann::json
This commit is contained in:
parent
89afe836be
commit
1fa69c3a69
8
main.cpp
8
main.cpp
|
@ -50,11 +50,13 @@ int main(int argc, char *argv[]) {
|
|||
|
||||
QTranslator translator;
|
||||
QString lang = "en_US";
|
||||
#if NLOHMANN_JSON_VERSION_MAJOR < 3 && NLOHMANN_JSON_VERSION_MINOR < 6 && NLOHMANN_JSON_VERSION_PATCH
|
||||
//TODO: implement
|
||||
bool languageSettingPresent = false;
|
||||
#if NLOHMANN_JSON_VERSION_MAJOR < 3 && NLOHMANN_JSON_VERSION_MINOR < 6 && NLOHMANN_JSON_VERSION_PATCH < 0
|
||||
languageSettingPresent = s.get_all_settings().find("language") != s.get_all_settings().end();
|
||||
#else
|
||||
if (s.get_all_settings().contains("language")) {
|
||||
languageSettingPresent = s.get_all_settings().contains("language");
|
||||
#endif
|
||||
if (languageSettingPresent) {
|
||||
lang = QString::fromStdString(s.get_all_settings()["language"]);
|
||||
} else if (translator.load(":/translation/"+QLocale::system().name()+".qm")) {
|
||||
lang = QLocale::system().name();
|
||||
|
|
|
@ -382,47 +382,47 @@
|
|||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../ofdscene.cpp" line="129"/>
|
||||
<location filename="../ofdscene.cpp" line="128"/>
|
||||
<source>Please, select a picture where QR code that contains info about check is present</source>
|
||||
<translation>Please, select a picture where QR code that contains info about check is present</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../ofdscene.cpp" line="131"/>
|
||||
<location filename="../ofdscene.cpp" line="130"/>
|
||||
<source>Picture was not selected</source>
|
||||
<translation>Picture was not selected</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../ofdscene.cpp" line="136"/>
|
||||
<location filename="../ofdscene.cpp" line="135"/>
|
||||
<source>Selected image: </source>
|
||||
<translation>Selected image: </translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../ofdscene.cpp" line="196"/>
|
||||
<location filename="../ofdscene.cpp" line="195"/>
|
||||
<source>Captcha was not solved correctly!</source>
|
||||
<translation>Captcha was not solved correctly!</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../ofdscene.cpp" line="198"/>
|
||||
<location filename="../ofdscene.cpp" line="197"/>
|
||||
<source>Captcha is incorrect</source>
|
||||
<translation>Captcha is incorrect</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../ofdscene.cpp" line="203"/>
|
||||
<location filename="../ofdscene.cpp" line="202"/>
|
||||
<source>Internal server error. Please, try again later.</source>
|
||||
<translation>Internal server error. Please, try again later.</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../ofdscene.cpp" line="205"/>
|
||||
<location filename="../ofdscene.cpp" line="204"/>
|
||||
<source>Internal server error</source>
|
||||
<translation>Internal server error</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../ofdscene.cpp" line="210"/>
|
||||
<location filename="../ofdscene.cpp" line="209"/>
|
||||
<source>Check not found. Please, ensure correctness of entered data.</source>
|
||||
<translation>Check not found. Please, ensure correctness of entered data.</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../ofdscene.cpp" line="212"/>
|
||||
<location filename="../ofdscene.cpp" line="211"/>
|
||||
<source>Check was not found</source>
|
||||
<translation>Check was not found</translation>
|
||||
</message>
|
||||
|
|
|
@ -382,47 +382,47 @@
|
|||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../ofdscene.cpp" line="129"/>
|
||||
<location filename="../ofdscene.cpp" line="128"/>
|
||||
<source>Please, select a picture where QR code that contains info about check is present</source>
|
||||
<translation>Пожалуйста, выберете изображение, содержащее QR код с информацией о чеке</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../ofdscene.cpp" line="131"/>
|
||||
<location filename="../ofdscene.cpp" line="130"/>
|
||||
<source>Picture was not selected</source>
|
||||
<translation>Изображение не было выбрано</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../ofdscene.cpp" line="136"/>
|
||||
<location filename="../ofdscene.cpp" line="135"/>
|
||||
<source>Selected image: </source>
|
||||
<translation>Выбранное изображение: </translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../ofdscene.cpp" line="196"/>
|
||||
<location filename="../ofdscene.cpp" line="195"/>
|
||||
<source>Captcha was not solved correctly!</source>
|
||||
<translation>Капча была решена неверно!</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../ofdscene.cpp" line="198"/>
|
||||
<location filename="../ofdscene.cpp" line="197"/>
|
||||
<source>Captcha is incorrect</source>
|
||||
<translation>Капча введена неверно</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../ofdscene.cpp" line="203"/>
|
||||
<location filename="../ofdscene.cpp" line="202"/>
|
||||
<source>Internal server error. Please, try again later.</source>
|
||||
<translation>Внутренняя ошибка сервера. Пожалуйста, попробуйте снова позже.</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../ofdscene.cpp" line="205"/>
|
||||
<location filename="../ofdscene.cpp" line="204"/>
|
||||
<source>Internal server error</source>
|
||||
<translation>Внутренняя ошибка сервера</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../ofdscene.cpp" line="210"/>
|
||||
<location filename="../ofdscene.cpp" line="209"/>
|
||||
<source>Check not found. Please, ensure correctness of entered data.</source>
|
||||
<translation>Чек не найден. Пожалуйста, убедитесь в правильности введённых данных.</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../ofdscene.cpp" line="212"/>
|
||||
<location filename="../ofdscene.cpp" line="211"/>
|
||||
<source>Check was not found</source>
|
||||
<translation>Чек не найден</translation>
|
||||
</message>
|
||||
|
|
Loading…
Reference in New Issue