From 29b9b58759829db4863762f77a9507e4c3d9cedf Mon Sep 17 00:00:00 2001 From: leca Date: Sun, 9 Mar 2025 16:05:37 +0300 Subject: [PATCH] rework of mainwindow in progress --- CMakeLists.txt | 9 + assets/icons/OCR.svg | 131 ++++++++++ assets/icons/email-text.svg | 285 +++++++++++++++++++++ main.cpp | 3 + mainwindow.cpp | 223 +---------------- mainwindow.cpp.old | 219 +++++++++++++++++ mainwindow.h | 33 +-- mainwindow.h.old | 44 ++++ mainwindow.ui | 478 +++++++----------------------------- mainwindow.ui.old | 57 +++++ media.qrc | 6 + translations/en_US.ts | 126 ++++------ translations/ru_RU.ts | 124 ++++------ 13 files changed, 971 insertions(+), 767 deletions(-) create mode 100644 assets/icons/OCR.svg create mode 100644 assets/icons/email-text.svg create mode 100644 mainwindow.cpp.old create mode 100644 mainwindow.h.old create mode 100644 mainwindow.ui.old create mode 100644 media.qrc diff --git a/CMakeLists.txt b/CMakeLists.txt index be87240..7e4040b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -66,7 +66,16 @@ if (BUILD_TRANSLATIONS) add_dependencies(resources translations) endif() +# Media QRC +configure_file(${CMAKE_CURRENT_SOURCE_DIR}/media.qrc ${CMAKE_CURRENT_BINARY_DIR}/media.qrc COPYONLY) +file(COPY ${CMAKE_CURRENT_SOURCE_DIR}/assets DESTINATION ${CMAKE_CURRENT_BINARY_DIR}) +qt5_add_resources(MEDIAQRC ${CMAKE_CURRENT_BINARY_DIR}/media.qrc) +add_custom_target(mediaresource ALL DEPENDS ${MEDIAQRC}) + set(SOURCES "") + +list(APPEND SOURCES ${MEDIAQRC}) + if (BUILD_TRANSLATIONS) list(APPEND SOURCES ${TRANSLATIONQRC}) endif() diff --git a/assets/icons/OCR.svg b/assets/icons/OCR.svg new file mode 100644 index 0000000..2157b4d --- /dev/null +++ b/assets/icons/OCR.svg @@ -0,0 +1,131 @@ + + + + + + + + + + + + + + + + + + + + + + + + Receipt + + diff --git a/assets/icons/email-text.svg b/assets/icons/email-text.svg new file mode 100644 index 0000000..8018c7c --- /dev/null +++ b/assets/icons/email-text.svg @@ -0,0 +1,285 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Receipt + + + diff --git a/main.cpp b/main.cpp index de82bd9..06d6201 100644 --- a/main.cpp +++ b/main.cpp @@ -16,6 +16,8 @@ #include #include +#include + int main(int argc, char *argv[]) { curl_global_init(CURL_GLOBAL_ALL); @@ -61,6 +63,7 @@ int main(int argc, char *argv[]) { a.installTranslator(&translator); MainWindow w; + // MainWindow w; w.update(); w.show(); diff --git a/mainwindow.cpp b/mainwindow.cpp index 59474c7..c398761 100644 --- a/mainwindow.cpp +++ b/mainwindow.cpp @@ -1,219 +1,16 @@ #include "mainwindow.h" -#include "./ui_mainwindow.h" -#include "check/check.h" -#include "exceptions/ofdrequestexception.h" -#include "goods/goods.h" -#include "outputdialog.h" -#include "adjustpicturedialog.h" -#include "settingsdialog.h" -#include "solvecaptchadialog.h" -#include -#include -#include "image/checkimage.h" -#include "utils/utils.h" -#include -#include -#include -#include -#include +#include "ui_mainwindow.h" MainWindow::MainWindow(QWidget *parent) - : QMainWindow(parent), ui(new Ui::MainWindow) { - ui->setupUi(this); - this->setupStoresList(); -} - -MainWindow::~MainWindow() { delete ui; } - -void MainWindow::setupStoresList() { - parser = *(new Parser()); - - std::vector modules_names = parser.search_modules(); - - for (std::string name : modules_names) { - StoreModule m(name); - std::wstring module_name = m.get_name(); - - QString s = QString::fromStdWString(module_name); - ui->storeType->addItem(s); - } -} - -std::string MainWindow::makeRequestToOfd(std::string captcha) { - std::string checkContent = Net().fetch_check_data_from_ofdru( - ui->fn_edit->text().toStdString(), - ui->fd_edit->text().toStdString(), - ui->fi_edit->text().toStdString(), - ui->dateTimeEdit->dateTime().toString(Qt::ISODate).toStdString(), - ui->fundIncomeCombo->currentIndex() + 1, - // In the request to ofd.ru, total is in a strange format, like a string of a format where 2 last digits represent decimal part of a number. - ui->total_edit->text().toDouble() * 100, - captcha); - - return checkContent; -} - -void MainWindow::on_parseButton_clicked() { - QString s; - switch (ui->tabWidget->currentIndex()) { - case 0: - s = ui->checkContent->toPlainText(); - break; - case 1: - s = ui->checkContentFromImage->toPlainText(); - break; - case 2: - Net().get_captcha_from_ofdru(); - - std::string solved_captcha = ""; - bool success = true; - bool is_captcha_solved = true; - - do { - SolveCaptchaDialog dialog = SolveCaptchaDialog(this, &solved_captcha); - dialog.exec(); - is_captcha_solved = true; - - try { - std::string check_content = makeRequestToOfd(solved_captcha); - check = parseOfdRuAnswer(check_content); - } catch(OfdRequestException e) { - success = false; - if (!strcmp(e.what(), "Incorrect captcha")) { - is_captcha_solved = false; - QMessageBox infoDialog; - infoDialog.setText(tr("Captcha was not solved correctly!")); - infoDialog.setIcon(QMessageBox::Critical); - infoDialog.setWindowTitle(tr("Captcha is incorrect")); - infoDialog.exec(); - break; - } else if (!strcmp(e.what(), "Internal server error")) { - QMessageBox infoDialog; - infoDialog.setText(tr("Internal server error. Please, try again later.")); - infoDialog.setIcon(QMessageBox::Critical); - infoDialog.setWindowTitle(tr("Internal server error")); - infoDialog.exec(); - return; - } else if (!strcmp(e.what(), "Does not exist")) { - QMessageBox infoDialog; - infoDialog.setText(tr("Check not found. Please, ensure correctness of entered data.")); - infoDialog.setIcon(QMessageBox::Critical); - infoDialog.setWindowTitle(tr("Check was not found")); - infoDialog.exec(); - return; - } - } - } while (!is_captcha_solved); - - if (success) { - OutputDialog d = OutputDialog(this, check); - d.exec(); - } - - return; - } - - std::wstring check_plaintext = s.toStdWString(); - parser.set_module(parser.search_modules()[0]); - - std::vector c = parser.parse(check_plaintext); - - if (c.size() == 0) { - QMessageBox infoDialog; - infoDialog.setText(tr("An error has occured. Check was matched incorrectly. Vector sizes are different. Please, contact the developer.")); - infoDialog.setIcon(QMessageBox::Critical); - infoDialog.setWindowTitle(tr("Error in parsing")); - infoDialog.exec(); - return; - } - - for (auto& g : c) { - check.add_goods(g); - } - - OutputDialog d = OutputDialog(this, check); - d.show(); - d.exec(); -} - -void MainWindow::on_storeType_currentIndexChanged(int index) { - std::string module = parser.search_modules()[index]; - parser.set_module(module); -} - - -void MainWindow::on_preferencesButton_clicked() { - SettingsDialog s = SettingsDialog(); - s.show(); - s.exec(); -} - -void MainWindow::on_chooseImageButton_ofd_clicked() { - QString filename = QFileDialog::getOpenFileName(); - - if (filename == "") { - QMessageBox infoDialog; - infoDialog.setText(tr("Please, select a picture where QR code that contains info about check is present")); - infoDialog.setIcon(QMessageBox::Critical); - infoDialog.setWindowTitle(tr("Picture was not selected")); - infoDialog.exec(); - return; - } - - std::string new_text = "Selected: " + filename.toStdString(); - ui->pathLabel_ofd->setText(QString::fromStdString(new_text)); - - AdjustPictureDialog dialog = AdjustPictureDialog(this, filename.toStdString()); - connect(&dialog, &AdjustPictureDialog::decodedData, this, &MainWindow::onDecodedData); - dialog.exec(); - - ui->picture_ofd->setPixmap(QPixmap(filename)); - ui->picture_ofd->setScaledContents(true); -} - -void MainWindow::onDecodedData(std::string data) { - std::string delimiter = "&"; - std::vector dataSplit = split(data, delimiter); - - std::cout << data << std::endl; - - ui->fn_edit->setText(QString::fromStdString(dataSplit[2])); - ui->fd_edit->setText(QString::fromStdString(dataSplit[3])); - ui->fi_edit->setText(QString::fromStdString(dataSplit[4])); - - QString extractedDateTime = QString::fromStdString(split(dataSplit[0], "=")[1]); - QDateTime datetime = QDateTime::fromString(extractedDateTime, "yyyyMMddThhmm"); - ui->dateTimeEdit->setDateTime(datetime); - - int type = std::stoi(split(dataSplit[5], "=")[1]); - ui->fundIncomeCombo->setCurrentIndex(type - 1); - - std::string total = split(dataSplit[1], "=")[1]; - - ui->total_edit->setText(QString::fromStdString(total)); -} - -void MainWindow::on_chooseImageButton_ocr_clicked() + : QWidget(parent) + , ui(new Ui::MainWindow) { - QString filename = QFileDialog::getOpenFileName(); - - if (filename == "") { - QMessageBox infoDialog; - infoDialog.setText(tr("Please, select a picture to scan")); - infoDialog.setIcon(QMessageBox::Critical); - infoDialog.setWindowTitle(tr("Picture was not selected")); - infoDialog.exec(); - return; - } - - std::string new_text = "Selected: " + filename.toStdString(); - ui->pathLabel_ocr->setText(QString::fromStdString(new_text)); - - CheckImage i(filename.toStdString()); - std::string parsed = i.parse_text(); - - ui->picture_ocr->setPixmap(QPixmap(filename)); - ui->picture_ocr->setScaledContents(true); - ui->checkContentFromImage->setPlainText(QString::fromStdString(parsed)); + ui->setupUi(this); } +MainWindow::~MainWindow() +{ + delete ui; +} + + diff --git a/mainwindow.cpp.old b/mainwindow.cpp.old new file mode 100644 index 0000000..62e5fd9 --- /dev/null +++ b/mainwindow.cpp.old @@ -0,0 +1,219 @@ +#include "mainwindow.h" +#include "./ui_mainwindow.h" +#include "check/check.h" +#include "exceptions/ofdrequestexception.h" +#include "goods/goods.h" +#include "outputdialog.h" +#include "adjustpicturedialog.h" +#include "settingsdialog.h" +#include "solvecaptchadialog.h" +#include +#include +#include "image/checkimage.h" +#include "utils/utils.h" +#include +#include +#include +#include +#include + +MainWindow::MainWindow(QWidget *parent) + : QMainWindow(parent), ui(new Ui::MainWindow) { + ui->setupUi(this); + // this->setupStoresList(); +} + +MainWindow::~MainWindow() { delete ui; } + +// void MainWindow::setupStoresList() { +// parser = *(new Parser()); + +// std::vector modules_names = parser.search_modules(); + +// for (std::string name : modules_names) { +// StoreModule m(name); +// std::wstring module_name = m.get_name(); + +// QString s = QString::fromStdWString(module_name); +// ui->storeType->addItem(s); +// } +// } + +// std::string MainWindow::makeRequestToOfd(std::string captcha) { +// std::string checkContent = Net().fetch_check_data_from_ofdru( +// ui->fn_edit->text().toStdString(), +// ui->fd_edit->text().toStdString(), +// ui->fi_edit->text().toStdString(), +// ui->dateTimeEdit->dateTime().toString(Qt::ISODate).toStdString(), +// ui->fundIncomeCombo->currentIndex() + 1, +// // In the request to ofd.ru, total is in a strange format, like a string of a format where 2 last digits represent decimal part of a number. +// ui->total_edit->text().toDouble() * 100, +// captcha); + +// return checkContent; +// } + +// void MainWindow::on_parseButton_clicked() { +// QString s; +// switch (ui->tabWidget->currentIndex()) { +// case 0: +// s = ui->checkContent->toPlainText(); +// break; +// case 1: +// s = ui->checkContentFromImage->toPlainText(); +// break; +// case 2: +// Net().get_captcha_from_ofdru(); + +// std::string solved_captcha = ""; +// bool success = true; +// bool is_captcha_solved = true; + +// do { +// SolveCaptchaDialog dialog = SolveCaptchaDialog(this, &solved_captcha); +// dialog.exec(); +// is_captcha_solved = true; + +// try { +// std::string check_content = makeRequestToOfd(solved_captcha); +// check = parseOfdRuAnswer(check_content); +// } catch(OfdRequestException e) { +// success = false; +// if (!strcmp(e.what(), "Incorrect captcha")) { +// is_captcha_solved = false; +// QMessageBox infoDialog; +// infoDialog.setText(tr("Captcha was not solved correctly!")); +// infoDialog.setIcon(QMessageBox::Critical); +// infoDialog.setWindowTitle(tr("Captcha is incorrect")); +// infoDialog.exec(); +// break; +// } else if (!strcmp(e.what(), "Internal server error")) { +// QMessageBox infoDialog; +// infoDialog.setText(tr("Internal server error. Please, try again later.")); +// infoDialog.setIcon(QMessageBox::Critical); +// infoDialog.setWindowTitle(tr("Internal server error")); +// infoDialog.exec(); +// return; +// } else if (!strcmp(e.what(), "Does not exist")) { +// QMessageBox infoDialog; +// infoDialog.setText(tr("Check not found. Please, ensure correctness of entered data.")); +// infoDialog.setIcon(QMessageBox::Critical); +// infoDialog.setWindowTitle(tr("Check was not found")); +// infoDialog.exec(); +// return; +// } +// } +// } while (!is_captcha_solved); + +// if (success) { +// OutputDialog d = OutputDialog(this, check); +// d.exec(); +// } + +// return; +// } + +// std::wstring check_plaintext = s.toStdWString(); +// parser.set_module(parser.search_modules()[0]); + +// std::vector c = parser.parse(check_plaintext); + +// if (c.size() == 0) { +// QMessageBox infoDialog; +// infoDialog.setText(tr("An error has occured. Check was matched incorrectly. Vector sizes are different. Please, contact the developer.")); +// infoDialog.setIcon(QMessageBox::Critical); +// infoDialog.setWindowTitle(tr("Error in parsing")); +// infoDialog.exec(); +// return; +// } + +// for (auto& g : c) { +// check.add_goods(g); +// } + +// OutputDialog d = OutputDialog(this, check); +// d.show(); +// d.exec(); +// } + +// void MainWindow::on_storeType_currentIndexChanged(int index) { +// std::string module = parser.search_modules()[index]; +// parser.set_module(module); +// } + + +// void MainWindow::on_preferencesButton_clicked() { +// SettingsDialog s = SettingsDialog(); +// s.show(); +// s.exec(); +// } + +// void MainWindow::on_chooseImageButton_ofd_clicked() { +// QString filename = QFileDialog::getOpenFileName(); + +// if (filename == "") { +// QMessageBox infoDialog; +// infoDialog.setText(tr("Please, select a picture where QR code that contains info about check is present")); +// infoDialog.setIcon(QMessageBox::Critical); +// infoDialog.setWindowTitle(tr("Picture was not selected")); +// infoDialog.exec(); +// return; +// } + +// std::string new_text = "Selected: " + filename.toStdString(); +// ui->pathLabel_ofd->setText(QString::fromStdString(new_text)); + +// AdjustPictureDialog dialog = AdjustPictureDialog(this, filename.toStdString()); +// connect(&dialog, &AdjustPictureDialog::decodedData, this, &MainWindow::onDecodedData); +// dialog.exec(); + +// ui->picture_ofd->setPixmap(QPixmap(filename)); +// ui->picture_ofd->setScaledContents(true); +// } + +// void MainWindow::onDecodedData(std::string data) { +// std::string delimiter = "&"; +// std::vector dataSplit = split(data, delimiter); + +// std::cout << data << std::endl; + +// ui->fn_edit->setText(QString::fromStdString(dataSplit[2])); +// ui->fd_edit->setText(QString::fromStdString(dataSplit[3])); +// ui->fi_edit->setText(QString::fromStdString(dataSplit[4])); + +// QString extractedDateTime = QString::fromStdString(split(dataSplit[0], "=")[1]); +// QDateTime datetime = QDateTime::fromString(extractedDateTime, "yyyyMMddThhmm"); +// ui->dateTimeEdit->setDateTime(datetime); + +// int type = std::stoi(split(dataSplit[5], "=")[1]); +// ui->fundIncomeCombo->setCurrentIndex(type - 1); + +// std::string total = split(dataSplit[1], "=")[1]; + +// ui->total_edit->setText(QString::fromStdString(total)); +// } + +// void MainWindow::on_chooseImageButton_ocr_clicked() +// { +// QString filename = QFileDialog::getOpenFileName(); + +// if (filename == "") { +// QMessageBox infoDialog; +// infoDialog.setText(tr("Please, select a picture to scan")); +// infoDialog.setIcon(QMessageBox::Critical); +// infoDialog.setWindowTitle(tr("Picture was not selected")); +// infoDialog.exec(); +// return; +// } + +// std::string new_text = "Selected: " + filename.toStdString(); +// ui->pathLabel_ocr->setText(QString::fromStdString(new_text)); + +// CheckImage i(filename.toStdString()); +// std::string parsed = i.parse_text(); + +// ui->picture_ocr->setPixmap(QPixmap(filename)); +// ui->picture_ocr->setScaledContents(true); +// ui->checkContentFromImage->setPlainText(QString::fromStdString(parsed)); +// } + diff --git a/mainwindow.h b/mainwindow.h index 14386a7..e985a8a 100644 --- a/mainwindow.h +++ b/mainwindow.h @@ -1,44 +1,23 @@ #ifndef MAINWINDOW_H #define MAINWINDOW_H -#include +#include +#include -#include "check/check.h" -#include "parser/parser.h" - -QT_BEGIN_NAMESPACE namespace Ui { class MainWindow; } -QT_END_NAMESPACE -class MainWindow : public QMainWindow { +class MainWindow : public QWidget +{ Q_OBJECT - Check check; - Parser parser; - public: - MainWindow(QWidget *parent = nullptr); + explicit MainWindow(QWidget *parent = nullptr); ~MainWindow(); - void setupStoresList(); - - Check get_check(); - void onDecodedData(std::string); - - std::string makeRequestToOfd(std::string captcha); -private slots: - void on_parseButton_clicked(); - - void on_storeType_currentIndexChanged(int index); - - void on_preferencesButton_clicked(); - - void on_chooseImageButton_ofd_clicked(); - - void on_chooseImageButton_ocr_clicked(); private: Ui::MainWindow *ui; }; + #endif // MAINWINDOW_H diff --git a/mainwindow.h.old b/mainwindow.h.old new file mode 100644 index 0000000..ed77ada --- /dev/null +++ b/mainwindow.h.old @@ -0,0 +1,44 @@ +#ifndef MAINWINDOW_H +#define MAINWINDOW_H + +#include + +#include "check/check.h" +#include "parser/parser.h" + +QT_BEGIN_NAMESPACE +namespace Ui { +class MainWindow; +} +QT_END_NAMESPACE + +class MainWindow : public QMainWindow { + Q_OBJECT + + Check check; + Parser parser; + +public: + MainWindow(QWidget *parent = nullptr); + ~MainWindow(); + // void setupStoresList(); + + // Check get_check(); + // void onDecodedData(std::string); + + // std::string makeRequestToOfd(std::string captcha); +private slots: + // void on_parseButton_clicked(); + + // void on_storeType_currentIndexChanged(int index); + + // void on_preferencesButton_clicked(); + + // void on_chooseImageButton_ofd_clicked(); + + // void on_chooseImageButton_ocr_clicked(); + +private: + Ui::MainWindow *ui; +}; +#endif // MAINWINDOW_H diff --git a/mainwindow.ui b/mainwindow.ui index f4ebd1e..7864a56 100644 --- a/mainwindow.ui +++ b/mainwindow.ui @@ -1,400 +1,110 @@ MainWindow - + 0 0 - 817 - 659 + 971 + 616 - - MainWindow + + + 0 + 0 + - - - - - 90 - 10 - 211 - 31 - - - - - - - 10 - 10 - 81 - 31 - - - - Store type - - - - - - 30 - 560 - 80 - 26 - - - - Parse - - - - - - 730 - 0 - 81 - 31 - - - - Preferences - - - - - - 10 - 50 - 801 - 511 - - - - 2 - - - - Text - - - - - 0 - 0 - 101 - 18 - - - - Check content - - - - - - 0 - 30 - 611 - 441 - - - + + + 971 + 0 + + + + Form + + + + + + PushButton + - - - OCR - - - - - 10 - 0 - 80 - 26 - - - - Choose - - - - - - 0 - 60 - 511 - 401 - - - - - - - 100 - 0 - 381 - 18 - - - - Path to image: - - - - - - 0 - 30 - 571 - 18 - - - - Here is recognised check text. Please, edit it if something's wrong: - - - - - - 490 - 10 - 291 - 421 - - - - - - + + + + + PushButton + - - - OFD - - - - - 490 - 10 - 291 - 421 - - - - - - - - - - 100 - 0 - 381 - 18 - - - - Path to image: - - - - - - 10 - 0 - 80 - 26 - - - - Choose - - - - - - 180 - 50 - 261 - 26 - - - - 0000000000000000 - - - - - - 10 - 50 - 161 - 21 - - - - - 0 - 0 - - - - FN (Fiscal Number) - - - - - - 10 - 90 - 161 - 21 - - - - - 0 - 0 - - - - FD (Fiscal Document) - - - - - - 180 - 90 - 261 - 26 - - - - 0000000000 - - - - - - 10 - 130 - 161 - 21 - - - - - 0 - 0 - - - - FI (Fiscal Identifier) - - - - - - 180 - 130 - 261 - 26 - - - - 0000000000 - - - - - - 10 - 170 - 194 - 27 - - - - - - - 10 - 210 - 191 - 26 - - - - - Funds income - - - - - Funds return - - - - - Funds spend - - - - - Spends return - - - - - - - 90 - 250 - 113 - 26 - - - - - - - - - - 10 - 250 - 66 - 18 - - - - Total - - + + + + + Optical Character Recognition + + + + + + + :/icons/assets/icons/OCR.svg:/icons/assets/icons/OCR.svg + + + + 128 + 128 + + - - - - - - 0 - 0 - 817 - 23 - - - - - checks parser - - - - - + + + + + + 0 + 0 + + + + Text from E-Mail + + + false + + + + + + + :/icons/assets/icons/email-text.svg:/icons/assets/icons/email-text.svg + + + + 128 + 128 + + + + false + + + false + + + false + + + false + + + false + + + + diff --git a/mainwindow.ui.old b/mainwindow.ui.old new file mode 100644 index 0000000..a2bffa9 --- /dev/null +++ b/mainwindow.ui.old @@ -0,0 +1,57 @@ + + + MainWindow + + + + 0 + 0 + 817 + 659 + + + + MainWindow + + + + + + 0 + -10 + 821 + 621 + + + + + + + Preferences + + + + + + + + + + 0 + 0 + 817 + 33 + + + + + checks parser + + + + + + + + + diff --git a/media.qrc b/media.qrc new file mode 100644 index 0000000..8f5066a --- /dev/null +++ b/media.qrc @@ -0,0 +1,6 @@ + + + assets/icons/email-text.svg + assets/icons/OCR.svg + + diff --git a/translations/en_US.ts b/translations/en_US.ts index 8e79468..fca89a6 100644 --- a/translations/en_US.ts +++ b/translations/en_US.ts @@ -27,182 +27,162 @@ MainWindow - MainWindow - Главное окно + Главное окно - Store type - Store type + Store type - Parse - Parse + Parse - Preferences - Preferences + Preferences - Text - Text + Text - Check content - Check content + Check content - OCR OCR = Optical Character Recognition - OCR + OCR - - Choose - Choose + Choose - - Path to image: - Path to image: + Path to image: - Here is recognised check text. Please, edit it if something's wrong: - Here is recognised check text. Please, edit it if something's wrong: + Here is recognised check text. Please, edit it if something's wrong: - OFD OFD = Оператор Фискальных Данных - OFD + OFD - 0000000000000000 - 0000000000000000 + 0000000000000000 - FN (Fiscal Number) FN = Фискальный Номер - FN (Fiscal Number) + FN (Fiscal Number) - FD (Fiscal Document) FD = Фискальный Документ - FD (Fiscal Document) + FD (Fiscal Document) - - 0000000000 - 000000000 + 000000000 - FI (Fiscal Identifier) FI = Фискальный Признак - FI (Fiscal Identifier) + FI (Fiscal Identifier) - Funds income Приход средств - Funds income + Funds income - Funds return Возврат средств - Funds return + Funds return - Funds spend Расход средств - Funds spend + Funds spend - Spends return Возврат расхода - Spends return + Spends return - Total - Total + Total - checks parser - checks parser + checks parser - Captcha was not solved correctly! - Captcha was not solved correctly! + Captcha was not solved correctly! - Captcha is incorrect - Captcha is incorrect + Captcha is incorrect - Internal server error. Please, try again later. - Internal server error. Please, try again later. + Internal server error. Please, try again later. - Internal server error - Internal server error + Internal server error - Check not found. Please, ensure correctness of entered data. - Check not found. Please, ensure correctness of entered data. + Check not found. Please, ensure correctness of entered data. - - Check was not found - - - - An error has occured. Check was matched incorrectly. Vector sizes are different. Please, contact the developer. - An error has occured. Check was matched incorrectly. Vector sizes are different. Please, contact the developer. + An error has occured. Check was matched incorrectly. Vector sizes are different. Please, contact the developer. - Error in parsing - Error in parsing + Error in parsing - Please, select a picture where QR code that contains info about check is present - Please, select a picture where QR code that contains info about check is present + Please, select a picture where QR code that contains info about check is present - - Picture was not selected - Picture was not selected + Picture was not selected - Please, select a picture to scan - Please, select a picture to scan + Please, select a picture to scan + + + + Form + + + + + + PushButton + + + + + Optical Character Recognition + + + + + Text from E-Mail + diff --git a/translations/ru_RU.ts b/translations/ru_RU.ts index a2bf595..6f0b667 100644 --- a/translations/ru_RU.ts +++ b/translations/ru_RU.ts @@ -27,178 +27,162 @@ MainWindow - MainWindow - ГлавноеОкно + ГлавноеОкно - Store type - Магазин + Магазин - Parse - Парсить + Парсить - Preferences - Настройки + Настройки - Text - Текст + Текст - Check content - Контент чека + Контент чека - OCR Оптическое Распознавание Символов - ОРС + ОРС - - Choose - Выбрать + Выбрать - - Path to image: - Путь к изображению: + Путь к изображению: - Here is recognised check text. Please, edit it if something's wrong: - Ниже приведён распознанный текст. Пожалуйста, отредактируйте его: + Ниже приведён распознанный текст. Пожалуйста, отредактируйте его: - OFD Оператор Фискальных Данных - ОФД + ОФД - 0000000000000000 - 0000000000000000 + 0000000000000000 - FN (Fiscal Number) Фискальный Норма - ФН + ФН - FD (Fiscal Document) Фискальный Документ - ФД + ФД - - 0000000000 - 000000000 + 000000000 - FI (Fiscal Identifier) Фискальный Признак - ФП + ФП - Funds income - Приход средств + Приход средств - Funds return - Возврат средств + Возврат средств - Funds spend - Расход средств + Расход средств - Spends return - Возврат расхода + Возврат расхода - Total - Итого + Итого - checks parser - Парсер чеков + Парсер чеков - Captcha was not solved correctly! - Капча была решена неверно! + Капча была решена неверно! - Captcha is incorrect - Капча введена неверно + Капча введена неверно - Internal server error. Please, try again later. - Внутренняя ошибка сервера. Пожалуйста, попробуйте снова позже. + Внутренняя ошибка сервера. Пожалуйста, попробуйте снова позже. - Internal server error - Внутренняя ошибка сервера + Внутренняя ошибка сервера - Check not found. Please, ensure correctness of entered data. - Чек не найден. Пожалуйста, убедитесь в правильности введённых данных. + Чек не найден. Пожалуйста, убедитесь в правильности введённых данных. - Check was not found - Чек не найден + Чек не найден - An error has occured. Check was matched incorrectly. Vector sizes are different. Please, contact the developer. - Произошла ошибка. Чек был прочитан неверно. Размеры векторов различаются. Пожалуйста, сообщите об этом разработчику. + Произошла ошибка. Чек был прочитан неверно. Размеры векторов различаются. Пожалуйста, сообщите об этом разработчику. - Error in parsing - Ошибка в парсинге + Ошибка в парсинге - Please, select a picture where QR code that contains info about check is present - Пожалуйста, выберете изображение, содержащее QR код с информацией о чеке + Пожалуйста, выберете изображение, содержащее QR код с информацией о чеке - - Picture was not selected - Изображение не было выбрано + Изображение не было выбрано - Please, select a picture to scan - Пожалуйста, выберете изображение для сканирования + Пожалуйста, выберете изображение для сканирования + + + + Form + + + + + + PushButton + + + + + Optical Character Recognition + + + + + Text from E-Mail +