Compare commits

...

16 Commits

Author SHA1 Message Date
leca e60aafd653 separated translations as a new make target 2024-12-12 00:58:36 +03:00
leca a10271e595 added debian package 2024-12-09 19:30:48 +03:00
leca 3a2901b49c added PKGBUILD 2024-12-09 19:06:49 +03:00
leca 22922aecaa added handler on internal server error 2024-12-09 17:34:36 +03:00
leca baa8ae6e65 added russian readme 2024-12-09 17:06:35 +03:00
leca 2ebcf68838 fix UI and translations 2024-12-09 16:27:30 +03:00
leca b135f8a94d readme changes 2024-12-07 02:18:03 +03:00
leca 7290769750 readme update 2024-12-05 16:04:55 +03:00
leca 64da9e9327 fixed language settings 2024-12-05 14:53:20 +03:00
leca b7b7c054d3 fixed loading system locale from wrong place 2024-12-05 13:58:23 +03:00
leca c478dcf8d4 embeding translations into qrc 2024-12-05 03:48:20 +03:00
leca 7959bc5492 added language combo box in preferences 2024-12-04 18:44:40 +03:00
leca 031c1d5792 translations 2024-12-04 04:35:51 +03:00
leca cca20abbfd pretty-printing settings.json 2024-12-04 04:05:02 +03:00
leca 988dc0e133 upload icons 2024-12-04 01:08:08 +03:00
leca 888f658a9c added icon 2024-12-04 01:07:48 +03:00
29 changed files with 981 additions and 608 deletions

3
.gitignore vendored
View File

@ -35,6 +35,8 @@ Thumbs.db
/.qmake.cache /.qmake.cache
/.qmake.stash /.qmake.stash
*.qrc.depends
# qtcreator generated files # qtcreator generated files
*.pro.user* *.pro.user*
CMakeLists.txt.user* CMakeLists.txt.user*
@ -121,3 +123,4 @@ checks-parser
deploy/appimage/AppDir/usr/share/doc/ deploy/appimage/AppDir/usr/share/doc/
deploy/appimage/AppDir/usr/share/ deploy/appimage/AppDir/usr/share/
*.deb

View File

@ -4,14 +4,14 @@ project(checks-parser VERSION 0.1 LANGUAGES CXX)
set(CMAKE_AUTOUIC ON) set(CMAKE_AUTOUIC ON)
set(CMAKE_AUTOMOC ON) set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON) set(CMAKE_AUTORCC OFF)
set(CMAKE_INCLUDE_CURRENT_DIR ON) set(CMAKE_INCLUDE_CURRENT_DIR ON)
set(CMAKE_AUTOUIC_SEARCH_PATHS Designer) set(CMAKE_AUTOUIC_SEARCH_PATHS Designer)
set(CMAKE_CXX_STANDARD 17) set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON) set(CMAKE_CXX_STANDARD_REQUIRED ON)
find_package(QT NAMES Qt6 Qt5 REQUIRED COMPONENTS Widgets LinguistTools) find_package(QT NAMES Qt6 Qt5 REQUIRED COMPONENTS Widgets)
find_package(Qt${QT_VERSION_MAJOR} REQUIRED COMPONENTS Widgets) find_package(Qt${QT_VERSION_MAJOR} REQUIRED COMPONENTS Widgets)
find_package(Qt5 COMPONENTS LinguistTools) find_package(Qt5 COMPONENTS LinguistTools)
@ -21,7 +21,23 @@ set(PROJECT_SOURCES
mainwindow.h mainwindow.h
mainwindow.ui mainwindow.ui
# Add other source files here that contain translatable strings goods/goods.h goods/goods.cpp
check/check.h check/check.cpp
parser/parser.h parser/parser.cpp
parser/module.h parser/module.cpp
outputdialog.h outputdialog.cpp outputdialog.ui
output/output_options.h output/output_options.cpp
utils/utils.h utils/utils.cpp
image/checkimage.h image/checkimage.cpp
net/net.h net/net.cpp
settings/settings.h settings/settings.cpp
settingsdialog.h settingsdialog.cpp settingsdialog.ui
adjustpicturedialog.h adjustpicturedialog.cpp adjustpicturedialog.ui
image_redactor/imageredactor.h image_redactor/imageredactor.cpp
solvecaptchadialog.h solvecaptchadialog.cpp solvecaptchadialog.ui
exceptions/ofdrequestexception.h exceptions/ofdrequestexception.cpp
) )
# Specify the UI files and source files for translation # Specify the UI files and source files for translation
@ -32,8 +48,30 @@ set(TRANSLATION_SOURCES
settingsdialog.cpp settingsdialog.h settingsdialog.ui settingsdialog.cpp settingsdialog.h settingsdialog.ui
solvecaptchadialog.cpp solvecaptchadialog.h solvecaptchadialog.ui solvecaptchadialog.cpp solvecaptchadialog.h solvecaptchadialog.ui
adjustpicturedialog.cpp adjustpicturedialog.h adjustpicturedialog.ui adjustpicturedialog.cpp adjustpicturedialog.h adjustpicturedialog.ui
)
# Add other .cpp or .ui files that need translation here set(TRANSLATION_FILES translations/en_US.ts translations/ru_RU.ts)
# set(QM_FILES "")
# qt5_create_translation(QM_FILES "${TRANSLATION_SOURCES}" translations/en_US.ts translations/ru_RU.ts)
# foreach(TS_FILE IN LISTS "${TRANSLATION_FILES}")
# qt5_create_translation(QM_FILE "${TRANSLATION_SOURCES}" TS_FILE)
# set(QM_FILE "${CMAKE_CURRENT_BINARY_DIR}/${QM_FILE}")
# set(QM_FILES "${QM_FILES};${QM_FILE}")
# endforeach()
qt5_create_translation(QM_FILES "${TRANSLATION_SOURCES}" translations/en_US.ts translations/ru_RU.ts)
# message(STATUS ${CMAKE_CURRENT_BINARY_DIR})
qt5_add_resources(TRANSLATIONQRC translations.qrc OPTIONS --root ${CMAKE_CURRENT_BINARY_DIR})
add_custom_target(translations
DEPENDS ${QM_FILES}
DEPENDS ${TRANSLATIONQRC}
VERBATIM
) )
if(${QT_VERSION_MAJOR} GREATER_EQUAL 6) if(${QT_VERSION_MAJOR} GREATER_EQUAL 6)
@ -41,10 +79,6 @@ if(${QT_VERSION_MAJOR} GREATER_EQUAL 6)
MANUAL_FINALIZATION MANUAL_FINALIZATION
${PROJECT_SOURCES} ${PROJECT_SOURCES}
) )
# Generate translation files for Qt 6
qt_add_translation(TRANSLATIONS "${TRANSLATION_SOURCES}")
else() else()
if(ANDROID) if(ANDROID)
add_library(checks-parser SHARED add_library(checks-parser SHARED
@ -52,40 +86,18 @@ else()
) )
else() else()
# Generate translation files for Qt 5
# QT5_ADD_TRANSLATION()
qt5_create_translation(QM_FILES "${TRANSLATION_SOURCES}" translations/en_US.ts translations/ru_RU.ts)
add_executable(checks-parser add_executable(checks-parser
${PROJECT_SOURCES} ${PROJECT_SOURCES}
goods/goods.h goods/goods.cpp # ${QM_FILES}
check/check.h check/check.cpp ${TRANSLATIONQRC}
parser/parser.h parser/parser.cpp
parser/module.h parser/module.cpp
outputdialog.h outputdialog.cpp outputdialog.ui
output/output_options.h output/output_options.cpp
utils/utils.h utils/utils.cpp
image/checkimage.h image/checkimage.cpp
net/net.h net/net.cpp
settings/settings.h settings/settings.cpp
settingsdialog.h settingsdialog.cpp settingsdialog.ui
adjustpicturedialog.h adjustpicturedialog.cpp adjustpicturedialog.ui
image_redactor/imageredactor.h image_redactor/imageredactor.cpp
solvecaptchadialog.h solvecaptchadialog.cpp solvecaptchadialog.ui
exceptions/ofdrequestexception.h exceptions/ofdrequestexception.cpp
${QM_FILES}
) )
# configure_file(translations.qrc ${CMAKE_BINARY_DIR} COPYONLY)
# QT5_ADD_TRANSLATION(TRANSLATIONS ${CMAKE_SOURCE_DIR} translations/en_US.ts)
endif() endif()
endif() endif()
target_link_libraries(checks-parser PRIVATE Qt${QT_VERSION_MAJOR}::Widgets) target_link_libraries(checks-parser PRIVATE Qt${QT_VERSION_MAJOR}::Widgets)
target_include_directories(checks-parser PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/image_redactor)
# Qt for iOS sets MACOSX_BUNDLE_GUI_IDENTIFIER automatically since Qt 6.1. # Qt for iOS sets MACOSX_BUNDLE_GUI_IDENTIFIER automatically since Qt 6.1.
# If you are developing for iOS or macOS you should consider setting an # If you are developing for iOS or macOS you should consider setting an
# explicit, fixed bundle identifier manually though. # explicit, fixed bundle identifier manually though.
@ -111,6 +123,11 @@ if(QT_VERSION_MAJOR EQUAL 6)
qt_finalize_executable(checks-parser) qt_finalize_executable(checks-parser)
endif() endif()
if(WIN32)
# set(OPENCV_MAP_IMPORTED_CONFIG "")
set(OpenCV_DIR /usr/local/lib/cmake/opencv4)
# set (OpenCV_DIR /usr/lib/x86_64-linux-gnu/cmake/opencv4)
endif()
find_package(OpenCV REQUIRED) find_package(OpenCV REQUIRED)
include_directories( ${OpenCV_INCLUDE_DIRS} ) include_directories( ${OpenCV_INCLUDE_DIRS} )

View File

@ -1,122 +0,0 @@
cmake_minimum_required(VERSION 3.16)
project(checks-parser VERSION 0.1 LANGUAGES CXX)
set(CMAKE_AUTOUIC ON)
set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_INCLUDE_CURRENT_DIR ON)
set(CMAKE_AUTOUIC_SEARCH_PATHS Designer)
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
find_package(QT NAMES Qt6 Qt5 REQUIRED COMPONENTS Widgets)
find_package(Qt${QT_VERSION_MAJOR} REQUIRED COMPONENTS Widgets)
set(PROJECT_SOURCES
main.cpp
mainwindow.cpp
mainwindow.h
mainwindow.ui
)
if(${QT_VERSION_MAJOR} GREATER_EQUAL 6)
qt_add_executable(checks-parser
MANUAL_FINALIZATION
${PROJECT_SOURCES}
)
SET (LANGUAGES rus eng)
SET (TRANSLATIONS_PATH "./translations")
foreach (LANGUAGE ${LANGUAGES})
set (TS ${TRANSLATIONS_PATH}/${LANGUAGE}.ts)
set (QM ${TRANSLATIONS_PATH}/${LANGUAGE}.qm)
set (TRANSLATIONS ${TRANSLATIONS} ${TS})
set (TRANSLATIONS_BINARY ${TRANSLATIONS_BINARY} ${QM})
add_custom_command(
OUTPUT ${QM}
COMMAND ${QT_LRELEASE_EXECUTABLE} ${TS}
MAIN_DEPENDENCY ${TS}
)
endforeach()
qt5_create_translation(QM_FILES ${CMAKE_SOURCE_DIR} translations/english.ts)
# Define target properties for Android with Qt 6 as:
# set_property(TARGET checks-parser APPEND PROPERTY QT_ANDROID_PACKAGE_SOURCE_DIR
# ${CMAKE_CURRENT_SOURCE_DIR}/android)
# For more information, see https://doc.qt.io/qt-6/qt-add-executable.html#target-creation
else()
if(ANDROID)
add_library(checks-parser SHARED
${PROJECT_SOURCES}
)
# Define properties for Android with Qt 5 after find_package() calls as:
# set(ANDROID_PACKAGE_SOURCE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/android")
else()
add_executable(checks-parser
${PROJECT_SOURCES}
goods/goods.h goods/goods.cpp
check/check.h check/check.cpp
parser/parser.h parser/parser.cpp
parser/module.h parser/module.cpp
outputdialog.h outputdialog.cpp outputdialog.ui
output/output_options.h output/output_options.cpp
utils/utils.h utils/utils.cpp
image/checkimage.h image/checkimage.cpp
net/net.h net/net.cpp
settings/settings.h settings/settings.cpp
settingsdialog.h settingsdialog.cpp settingsdialog.ui
adjustpicturedialog.h adjustpicturedialog.cpp adjustpicturedialog.ui
imageview/imageview.h imageview/imageview.cpp
image_redactor/imageredactor.h image_redactor/imageredactor.cpp
solvecaptchadialog.h solvecaptchadialog.cpp solvecaptchadialog.ui
exceptions/ofdrequestexception.h exceptions/ofdrequestexception.cpp
${TRANSLATIONS}
${QM_FILES}
${QM}
${TS}
)
endif()
endif()
add_custom_target(translations DEPENDS ${QM_FILES})
add_dependencies(checks-parser translations)
target_link_libraries(checks-parser PRIVATE Qt${QT_VERSION_MAJOR}::Widgets)
# Qt for iOS sets MACOSX_BUNDLE_GUI_IDENTIFIER automatically since Qt 6.1.
# If you are developing for iOS or macOS you should consider setting an
# explicit, fixed bundle identifier manually though.
if(${QT_VERSION} VERSION_LESS 6.1.0)
set(BUNDLE_ID_OPTION MACOSX_BUNDLE_GUI_IDENTIFIER com.example.checks-parser)
endif()
set_target_properties(checks-parser PROPERTIES
${BUNDLE_ID_OPTION}
MACOSX_BUNDLE_BUNDLE_VERSION ${PROJECT_VERSION}
MACOSX_BUNDLE_SHORT_VERSION_STRING ${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}
MACOSX_BUNDLE TRUE
WIN32_EXECUTABLE TRUE
)
include(GNUInstallDirs)
install(TARGETS checks-parser
BUNDLE DESTINATION .
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
)
if(QT_VERSION_MAJOR EQUAL 6)
qt_finalize_executable(checks-parser)
endif()
find_package(OpenCV REQUIRED)
include_directories( ${OpenCV_INCLUDE_DIRS} )
target_link_libraries(checks-parser PRIVATE -lzbar)
target_link_libraries(checks-parser PRIVATE -ltesseract)
target_link_libraries(checks-parser PRIVATE -lcurl)
target_link_libraries(checks-parser PRIVATE ${OpenCV_LIBS} )

View File

@ -1,16 +1,19 @@
-->[Русская версия](https://git.foxarmy.org/leca/checks-parser/src/branch/master/README.ru.md)<--
# Checks parser # Checks parser
checks parser is a program that help parsing different checks to csv. checks parser is a program that help parsing different checks to csv.
!!!CURRENTLY SUPPORTED ONLY RUSSIAN CHECKS!!! !!!CURRENTLY SUPPORTED ONLY RUSSIAN CHECKS!!!
To know why, see [this section](#Checks-from-different-countries) To know why, see [this section](https://git.foxarmy.org/leca/checks-parser#checks-from-different-countries)
# Usage # Usage
For more detailed description, please, refer to [the wiki](https://git.foxarmy.org/leca/checks-parser/wiki/Description-%5BEN%5D)
### Input ### Input
Ways you can input a check to this programm: Ways you can input a check to this programm:
* Via image (it uses OCR(Optical Character Recognition) to parse check content. The picture of a check must be contrast and well-lined (text must be perpendicular to right and left borders of an image) enough in order to be parsed well.) * Via image (it uses OCR(Optical Character Recognition) to parse check content. The picture of a check must be contrast and well-lined (text must be perpendicular to right and left borders of an image) enough in order to be parsed well.) OCR is not a magic wand :(
* Via plaintext, copied from an E-Mail. Just copy&paste text from your email, pick a correct store type (autodetect is in my plans!) and parse. * Via plaintext, copied from an E-Mail. Just copy&paste text from your email, pick a correct store type (autodetect is in my plans!) and parse.
* Via a picture of a check. Be sure to make the image straight and sharp. OCR is not a magic wand :( * Via QRCode on check (this method queries check content from OFD (ОФД, Оператор Фискальных Данных in Russian) (My program makes requests to ofd.ru)).
* Via QrCode on check (OFD (ОФД, Оператор Фискальных Данных in Russian)).
### Output ### Output
At the start of writing this program, I considered 3 or more output formats: csv, xlsx and ods. But throught the development I understood that most of modern table processor (i.e. electronic tables) can import csv much better than I'd be writing a shitty export module, adding more dependencies and shitty code to the codebase. So I decided that there's no need to use anything other than csv format. At the start of writing this program, I considered 3 or more output formats: csv, xlsx and ods. But throught the development I understood that most of modern table processor (i.e. electronic tables) can import csv much better than I'd be writing a shitty export module, adding more dependencies and shitty code to the codebase. So I decided that there's no need to use anything other than csv format.
@ -31,10 +34,12 @@ In general, you need to install following dependencies in order to build that ap
Please, do not hesitate to open an issue if you cannot build that. I will help and if you are building on a distro that is not listed there, we can append that list as soon as we will solve your problem! Please, do not hesitate to open an issue if you cannot build that. I will help and if you are building on a distro that is not listed there, we can append that list as soon as we will solve your problem!
### Linux ### Linux
##### Arch Linux-based ##### Arch Linux-based
I recommend using aur helper (I use yay) to install dependencies. Or, if you're masochist, you can build all by yourself /shrug I recommend using aur helper (I use yay) to install dependencies. Or, if you're masochist, you can build all by yourself ¯\\\_(ツ)\_/¯
``` ```
#Install dependencies #Install dependencies
yay -S sudo cmake git coreutils base-devel eigen qt5-base mbedtls gtkglext opencv opencv2 zbar nlohmann-json tesseract tesseract-data-rus vtk yay -S base-devel qt5-base opencv zbar nlohmann-json tesseract
#Install a language package for OCR. Replace ``LANG` to your language. For example, ``tesseract-data-rus`` for russian language
yay -S tesseract-data-LANG
#Clone and compile an app #Clone and compile an app
git clone https://git.foxarmy.org/leca/checks-parser git clone https://git.foxarmy.org/leca/checks-parser
cd checks-parser cd checks-parser
@ -64,12 +69,20 @@ sudo make install
``` ```
### Windows ### Windows
Maybe See [Precompiled binaries](https://git.foxarmy.org/leca/checks-parser#precompiled-binaries)
### Mac OS ### Mac OS
Probably not, I do not have nor desire or time. But if you can maintain that program on Mac, I'd be grateful! Please, contact me, if you can! Probably not, I do not have nor desire or time. But if you can maintain that program on Mac, I'd be grateful! Please, contact me, if you can!
## Precompiled binaries ## Precompiled binaries
I plan to make precompiled binaries for Linux and Windows. Maybe I will put it on AUR. I also think that I will be making an AppImage Currently I have published the program to the [AUR](https://aur.archlinux.org/packages/checks-parser-git).
Every new release will certainly contain AppImage and tarball. I am working towards binaries for Windows and deb packets. Expect them to appear in next releases!
# Special thanks
HyperFlint (@hyperflint:foxarmy.org) - for the great idea to use OFD and a huge help in release preparations!
https://check.ofd.ru - for providing a way to request data from FNS.
# Contribution # Contribution
@ -79,11 +92,12 @@ If you want to contribute to the project, you can do it by some of the following
I live in Russia and only know how Russian state checks system works. If you live in another country and want to help me with adding support to checks from your country - feel free to contact me! I live in Russia and only know how Russian state checks system works. If you live in another country and want to help me with adding support to checks from your country - feel free to contact me!
## Issues and PRs ## Issues and PRs
If you have found a bug, or want to suggest a feature - don't hesitate to open an issue / PR! If you have found a bug, or want to suggest a feature - don't hesitate to open an issue / a PR!
## Tell friends ## Tell friends
You can help me by distributing that program. If you know people that are in search of such program, please let them know about its existance! You can help me by distributing that program. If you know people that are in search of such program, please let them know about its existance!
## Donate ## Donate
```XMR 45ZjyH5YWdRfKxLoKEBYaiHUTcP5Z8Gv64QQxmabbooPAa7KPBxZLmqft5ohKXn5VpHiVj1x9JKCcAcAjdu9jA8b5N8XqR7``` ```XMR 45ZjyH5YWdRfKxLoKEBYaiHUTcP5Z8Gv64QQxmabbooPAa7KPBxZLmqft5ohKXn5VpHiVj1x9JKCcAcAjdu9jA8b5N8XqR7```

104
README.ru.md Normal file
View File

@ -0,0 +1,104 @@
-->[English version](https://git.foxarmy.org/leca/checks-parser/src/branch/master/README.md)<--
# Чек парсер
Чек парсер - это приложение, позволяющее доставать содержимое чека и переводить его в .csv файлы.
!!!НА ДАННЫЙ МОМЕНТ ПОДДЕРЖИВАЮТСЯ ТОЛЬКО РУССКИЕ ЧЕКИ!!!
Чтобы узнать, почему [смотрите здесь](https://git.foxarmy.org/leca/checks-parser/src/branch/master/README.ru.md#checks-from-different-countries)
# Пользование
Для более детального описания, пожалуйста, обратитесь к [вики](https://git.foxarmy.org/leca/checks-parser/wiki/Description-%5BRU%5D)
### Ввод данных
Доступны следующие способы ввода данных:
* Через изображениие (используется OCR(Optical Character Recognition, Оптическое распознавание символов) чтобы прочитать содержимое чека. Изображение чека должно быть контрастным и выровненным (текст обязан быть перпендикулярным к границам изображения) хорошо, чтобы нормально прочитаться.) OCR - не волшебная палочка :(
* Через просто текст, скопированный из эл. письма. Просто скопируйте и вставьте текст с вашего письма, выберите подходящий магазин (автодетект в планах!) и парсите.
* Через QRCode на чеке (этот метод запрашивает данные у ОФД (Оператор Фискальных Данных) (В данном конкретном случае, к ofd.ru)).
### Вывод данных
На начальном этапе разработки программы, Я задумывался о 3 или более форматов вывода: csv, xlsx и ods. Но по мере разработки, я понял, что большинство современных табличных процессоров (электронных таблиц) способны импортировать в себя csv гораздо лучше, чем смог бы написать я сам. Так что я решил не делать вывод во все остальные форматы, кроме csv.
Чтобы экспортировать, вам нужно указать путь до файла, если вы желаете, вы можете изменить порядок и/или переименовать (алиасы) столбцы, выбрать печатать или не печатать заголовок (алиасы столбцов) и "итого"
# Установка
## Сборка из исходников
В целом, вам нужно установить следующие зависимости чтобы собрать приложение (я предполагаю, что вы уже имеете на системе базовые пакеты вроде cmake, make, gcc, git и так далее):
* tesseract (также вам нужно будет установить языковой пакет для него, например tesseract-data-rus на Arch Linux или tesseract-ocr-rus на Debian Linux.)
* opencv
* zbar
* curl
* nlohmann-json
* qt5
* vtk
Пожалуйста, не стесняйтесь и открывайте issue, если вы не можете собрать приложение. Я помогу вам, и если вы собираете приложение на дистрибутиве, который здесь не перечислен, как только мы решим вашу проблему, я добавлю новый дистрибутив в этот список!
### Linux
##### Arch Linux и ответвления
Я рекомендую использовать помощник для АУРа (я использую yay) чтобы установить зависимости. Или, если вы мазохист, можете собрать все зависимости ручками ¯\\\_(ツ)\_/¯
```
#Установка зависимостей
yay -S base-devel qt5-base opencv zbar nlohmann-json tesseract
#Установка языкового пакета для OCR. Замените ``LANG` на желаемый язык. Например, ``tesseract-data-rus`` для русского языка
yay -S tesseract-data-LANG
#Загрузка исходгого кода и сборка приложения
git clone https://git.foxarmy.org/leca/checks-parser
cd checks-parser
cmake .
make -j{nproc}
#Если вы хотите скопировать запускной файл в свою систему, исполните:
sudo make install
```
##### Debian и ответвления
В debian и ответвлениях большинство, но не все, имена пакетов одинаковы.
Установка зависимостей для различных debian дистрибутивов:
###### Ubuntu 18.04
```apt install -y qtbase5-dev openssl libmbedtls-dev tesseract-ocr tesseract-ocr-rus libopencv-dev libzbar-dev qttools5-dev nlohmann-json-dev libcurl4-openssl-dev libtesseract-dev```
###### Ubuntu 20.04, LMDE (проверил только 6), Debian (проверил только 12)
```apt install -y qtbase5-dev openssl libmbedtls-dev tesseract-ocr tesseract-ocr-rus libopencv-dev libzbar-dev qttools5-dev nlohmann-json3-dev libcurl4-openssl-dev libtesseract-dev```
Следующие шаги идеинтичны для всех дистрибутивов, основанных на debian:
```
#Загрузка исходного кода и сборка приложения
git clone https://git.foxarmy.org/leca/checks-parser
cd checks-parser
cmake .
make -j{nproc}
#Если вы хотите скопировать запускной файл в свою систему, исполните:
sudo make install
```
### Windows
Смотрите [бинарники](https://git.foxarmy.org/leca/checks-parser/src/branch/master/README.ru.md#бинарники)
### Mac OS
Скорее всего нет, у меня нет ни времени, ни желания, ни устройства. Но если вы можете собирать программу на Mac OS, я буду рад, если вы поможете. Пожалуйста, свяжитесь со мной, если можете!
## Бинарники
На текущий момент я опубликовал программу в [АУР](https://aur.archlinux.org/packages/checks-parser-git).
Каждый релиз будет содержать AppImage и арчёвский tarball. Я работаю над бинарниками для Windows и .deb пакетами. Ожидайте их в следующих релизах!
# Особое спасибо
HyperFlint (@hyperflint:foxarmy.org) - за гениальную идею использовать ОФД и огромную помощь в подготовке проекта к релизу!
https://check.ofd.ru - за способ вытаскивать данные о чеках из ФНС.
# Помощь
Если вы хотите помочь проекту, вы можете сделать это следующими способами:
## Чеки из других стран
Я живу в России и знаком только с местной системой чеков. Если вы живёте в другой стране и хотите помочь мне с поддержкой чеков из Вашей страны - свяжитесь со мной!
## Issues и PRs
Если вы нашли баг или хотите предложить что-то в программу - не стесняйтесь и открывайте issue или PR!
## Рассказать друзьями
Вы можете помочь проекту, распространяя программу. Если вы знаете людей, которые ищут подобную программу, пожалуйста, дайте им знать о существовании таковой!
## Пожертвования
```XMR 45ZjyH5YWdRfKxLoKEBYaiHUTcP5Z8Gv64QQxmabbooPAa7KPBxZLmqft5ohKXn5VpHiVj1x9JKCcAcAjdu9jA8b5N8XqR7```

View File

@ -61,10 +61,10 @@
<widget class="ImageRedactor" name="graphicsView"> <widget class="ImageRedactor" name="graphicsView">
<property name="geometry"> <property name="geometry">
<rect> <rect>
<x>15</x> <x>5</x>
<y>41</y> <y>21</y>
<width>791</width> <width>801</width>
<height>391</height> <height>421</height>
</rect> </rect>
</property> </property>
</widget> </widget>
@ -77,10 +77,7 @@
<customwidget> <customwidget>
<class>ImageRedactor</class> <class>ImageRedactor</class>
<extends>QGraphicsView</extends> <extends>QGraphicsView</extends>
<header>../../image_redactor/imageredactor.h</header> <header location="global">imageredactor.h</header>
<slots>
<slot>slot1()</slot>
</slots>
</customwidget> </customwidget>
</customwidgets> </customwidgets>
<resources/> <resources/>

View File

@ -4,10 +4,7 @@ FROM archlinux
RUN pacman --noconfirm -Sy RUN pacman --noconfirm -Sy
#Build dependencies #Build dependencies
RUN pacman --noconfirm -S sudo cmake git coreutils base-devel eigen RUN pacman --noconfirm -S sudo cmake git coreutils base-devel qt5-base
#Dependencies from repos
RUN pacman --noconfirm -S qt5-base mbedtls
RUN echo "MAKEFLAGS=\"-j${nproc}\"" >> /etc/makepkg.conf RUN echo "MAKEFLAGS=\"-j${nproc}\"" >> /etc/makepkg.conf
@ -24,15 +21,13 @@ RUN git clone https://aur.archlinux.org/yay.git && \
makepkg -si --noconfirm && \ makepkg -si --noconfirm && \
cd .. && sudo rm -rf yay cd .. && sudo rm -rf yay
RUN yay -Sy --noconfirm gtkglext RUN yay -S opencv zbar nlohmann-json tesseract tesseract-data-rus
RUN yay -S --noconfirm cpr opencv opencv2 nlohmann-json tesseract tesseract-data-rus
#building #building
WORKDIR /home/checks-parser WORKDIR /home/checks-parser
RUN git clone https://git.foxarmy.org/leca/checks-parser && \ RUN git clone https://git.foxarmy.org/leca/checks-parser && \
cd checks-parser && \ cd checks-parser && \
mkdir build && cd build && \ cmake . && \
cmake .. && \
make -j ${nproc} && \ make -j ${nproc} && \
sudo make install sudo make install

Binary file not shown.

Before

Width:  |  Height:  |  Size: 627 KiB

View File

@ -4,4 +4,3 @@ Exec=usr/bin/checks-parser
Icon=checks-parser Icon=checks-parser
Type=Application Type=Application
Categories=Utility; Categories=Utility;
X-AppImage-Version=41463c7

Binary file not shown.

Before

Width:  |  Height:  |  Size: 627 KiB

After

Width:  |  Height:  |  Size: 138 KiB

View File

@ -1,7 +0,0 @@
# Generated by linuxdeployqt
# https://github.com/probonopd/linuxdeployqt/
[Paths]
Prefix = ./
Plugins = plugins
Imports = qml
Qml2Imports = qml

View File

@ -1,7 +0,0 @@
# Generated by linuxdeployqt
# https://github.com/probonopd/linuxdeployqt/
[Paths]
Prefix = ../
Plugins = plugins
Imports = qml
Qml2Imports = qml

View File

@ -1,4 +1,7 @@
#!/usr/bin/env bash #!/usr/bin/env bash
rm -rf AppDir
mkdir -p AppDir
mkdir -p AppDir/usr/bin mkdir -p AppDir/usr/bin
mkdir -p AppDir/usr/lib mkdir -p AppDir/usr/lib
mkdir -p AppDir/usr/share/tesseract-ocr/4.00/tessdata mkdir -p AppDir/usr/share/tesseract-ocr/4.00/tessdata
@ -21,6 +24,8 @@ export TESSDATA_PREFIX=\$APPDIR/usr/share/tesseract-ocr/4.00/tessdata
\$APPDIR/usr/bin/checks-parser" \ \$APPDIR/usr/bin/checks-parser" \
> AppDir/AppRun > AppDir/AppRun
cp ../../icon.png AppDir/checks-parser.png
chmod +x AppDir/AppRun chmod +x AppDir/AppRun
cp ../../checks-parser AppDir/usr/bin cp ../../checks-parser AppDir/usr/bin
linuxdeployqt AppDir/usr/bin/checks-parser -no-copy-copyright-files -appimage linuxdeployqt AppDir/usr/bin/checks-parser -no-copy-copyright-files -appimage

36
deploy/archlinux/PKGBUILD Normal file
View File

@ -0,0 +1,36 @@
# Maintainer: Leca <leca@foxarmy.org>
pkgname=checks-parser-git
pkgver=alpha_0.0.2
pkgrel=1
epoch=
pkgdesc="Utility for parsing checks(receipts) to csv"
arch=('x86_64')
url="https://git.foxarmy.org/leca/checks-parser"
license=('GPL-3.0-or-later')
groups=()
depends=('qt5-base' 'opencv' 'zbar' 'nlohmann-json' 'tesseract')
makedepends=('cmake' 'make' 'gcc' 'git' 'qt5-tools')
checkdepends=()
optdepends=('tesseract-data-rus: scan russian checks with OCR')
provides=()
conflicts=()
replaces=()
backup=()
options=()
install=
changelog=
source=("checks-parser-git::git+$url")
noextract=()
sha256sums=('SKIP')
build() {
cd "$pkgname"
cmake -DCMAKE_INSTALL_PREFIX:PATH=/usr .
make -j ${nproc}
}
package() {
cd "$pkgname"
install -Dm644 LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
make DESTDIR="$pkgdir/" PREFIX="/usr" install
}

30
deploy/debian/package.sh Executable file
View File

@ -0,0 +1,30 @@
#!/usr/bin/env bash
pkgname="checks-parser"
pkgver="3.0"
revision="1"
pkg=${pkgname}_$pkgver-$revision
mkdir $pkg
mkdir -p $pkg/usr/bin
cp ../../checks-parser $pkg/usr/bin
mkdir $pkg/DEBIAN
echo \
"Package: $pkgname
Version: $pkgver-$revision
Section: utils
Priority: optional
Architecture: amd64
Homepage: https://git.foxarmy.org/checks-parser
Depends: libc, qtbase5-dev, openssl, libmbedtls-dev, tesseract-ocr, tesseract-ocr-rus, libopencv-dev, libzbar-dev, qttools5-dev, nlohmann-json3-dev, libcurl4-openssl-dev, libtesseract-dev
Maintainer: Leca <leca@foxarmy.org>
Description: Utility for parsing checks(receipts) to csv
Utility for extraction of content of a check(receipt) using plaintext, OCR or request to FTS (Federal Taxation Service)"\
> $pkg/DEBIAN/control
dpkg-deb --build $pkg
rm -rf $pkg

BIN
icon.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 138 KiB

116
icon.svg Normal file

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 649 KiB

View File

@ -12,6 +12,8 @@
# include <filesystem> # include <filesystem>
using namespace std::filesystem; using namespace std::filesystem;
#endif #endif
#include <QFile>
#include <QTextStream>
#include <QTranslator> #include <QTranslator>
int main(int argc, char *argv[]) { int main(int argc, char *argv[]) {
@ -43,9 +45,17 @@ int main(int argc, char *argv[]) {
QApplication a(argc, argv); QApplication a(argc, argv);
QTranslator translator; QTranslator translator;
if(!translator.load(QLocale::system().name())) { QString lang = "en_US";
translator.load("en_US");
if (s.get_all_settings().contains("language")) {
lang = QString::fromStdString(s.get_all_settings()["language"]);
} else if (translator.load(":/translation/"+QLocale::system().name()+".qm")) {
lang = QLocale::system().name();
} else {
lang = QString::fromStdString("en_US");
} }
translator.load(":/translation/" + lang + ".qm");
a.installTranslator(&translator); a.installTranslator(&translator);
MainWindow w; MainWindow w;
w.update(); w.update();

View File

@ -87,6 +87,13 @@ void MainWindow::on_parseButton_clicked() {
infoDialog.setWindowTitle(tr("Captcha is incorrect")); infoDialog.setWindowTitle(tr("Captcha is incorrect"));
infoDialog.exec(); infoDialog.exec();
break; 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")) { } else if (!strcmp(e.what(), "Does not exist")) {
QMessageBox infoDialog; QMessageBox infoDialog;
infoDialog.setText(tr("Check not found. Please, ensure correctness of entered data.")); infoDialog.setText(tr("Check not found. Please, ensure correctness of entered data."));
@ -112,7 +119,11 @@ void MainWindow::on_parseButton_clicked() {
std::vector<Goods> c = parser.parse(check_plaintext); std::vector<Goods> c = parser.parse(check_plaintext);
if (c.size() == 0) { if (c.size() == 0) {
std::cerr << "An error has occured. Check was matched incorrectly. Vector sizes are different" << std::endl; 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; return;
} }

View File

@ -110,7 +110,7 @@
<widget class="QPushButton" name="chooseImageButton_ocr"> <widget class="QPushButton" name="chooseImageButton_ocr">
<property name="geometry"> <property name="geometry">
<rect> <rect>
<x>0</x> <x>10</x>
<y>0</y> <y>0</y>
<width>80</width> <width>80</width>
<height>26</height> <height>26</height>

View File

@ -60,7 +60,7 @@
<rect> <rect>
<x>10</x> <x>10</x>
<y>50</y> <y>50</y>
<width>111</width> <width>371</width>
<height>24</height> <height>24</height>
</rect> </rect>
</property> </property>
@ -168,7 +168,7 @@
<rect> <rect>
<x>10</x> <x>10</x>
<y>90</y> <y>90</y>
<width>111</width> <width>381</width>
<height>24</height> <height>24</height>
</rect> </rect>
</property> </property>

View File

@ -50,7 +50,7 @@ Settings::Settings(std::string path) {
} }
})"_json; })"_json;
output << settings; output << settings.dump(4);
output.flush(); output.flush();
output.close(); output.close();
this->settings = settings; this->settings = settings;
@ -70,7 +70,7 @@ void Settings::write_setting(std::string setting, std::string value) {
this->settings[setting] = value; this->settings[setting] = value;
output << this->settings; output << this->settings.dump(4);
} }
std::string Settings::get_setting(std::string setting) { std::string Settings::get_setting(std::string setting) {
return this->settings[setting]; return this->settings[setting];
@ -93,5 +93,5 @@ void Settings::alter_setting(std::string setting, std::string value) {
void Settings::flush() { void Settings::flush() {
std::ofstream output(this->settings_file_path, std::fstream::trunc); std::ofstream output(this->settings_file_path, std::fstream::trunc);
output << this->settings; output << this->settings.dump(4);
} }

View File

@ -3,6 +3,8 @@
#include "ui_settingsdialog.h" #include "ui_settingsdialog.h"
#include "utils/utils.h" #include "utils/utils.h"
#include <QMessageBox>
SettingsDialog::SettingsDialog(QWidget *parent) SettingsDialog::SettingsDialog(QWidget *parent)
: QDialog(parent), ui(new Ui::settingsdialog), : QDialog(parent), ui(new Ui::settingsdialog),
settings(Settings(get_path_relative_to_home( settings(Settings(get_path_relative_to_home(
@ -32,6 +34,19 @@ SettingsDialog::SettingsDialog(QWidget *parent)
ui->printHeaderCheckBox->setChecked(this->settings.get_all_settings()["print_header"]); ui->printHeaderCheckBox->setChecked(this->settings.get_all_settings()["print_header"]);
ui->printTotalCheckBox->setChecked(this->settings.get_all_settings()["print_total"]); ui->printTotalCheckBox->setChecked(this->settings.get_all_settings()["print_total"]);
int currentLanguageIndex = 0;
if (!this->settings.get_all_settings().contains("language")) {
currentLanguageIndex = ui->languageComboBox->findText(QLocale::system().name());
if (currentLanguageIndex < 0) {
currentLanguageIndex = ui->languageComboBox->findText("en_US");
}
} else {
currentLanguageIndex = ui->languageComboBox->findText(QString::fromStdString(this->settings.get_all_settings()["language"]));
}
ui->languageComboBox->setCurrentIndex(currentLanguageIndex);
} }
SettingsDialog::~SettingsDialog() { delete ui; } SettingsDialog::~SettingsDialog() { delete ui; }
@ -121,4 +136,19 @@ void SettingsDialog::on_buttonBox_accepted() { this->settings.flush(); }
void SettingsDialog::on_buttonBox_rejected() { this->close(); } void SettingsDialog::on_buttonBox_rejected() { this->close(); }
void SettingsDialog::on_languageComboBox_currentTextChanged(const QString &changed) {
if (this->settings.get_all_settings().contains("language")) {
if (changed == QString::fromStdString(this->settings.get_all_settings()["language"])) return;
} else {
if (changed == QLocale::system().name()) return;
}
this->settings.get_all_settings()["language"] = changed.toStdString();
QMessageBox infoDialog;
infoDialog.setText(tr("You need to restart program to apply language changes"));
infoDialog.setIcon(QMessageBox::Information);
infoDialog.setWindowTitle(tr("Restart required"));
infoDialog.exec();
}

View File

@ -52,6 +52,8 @@ private slots:
void on_buttonBox_rejected(); void on_buttonBox_rejected();
void on_languageComboBox_currentTextChanged(const QString &arg1);
private: private:
Ui::settingsdialog *ui; Ui::settingsdialog *ui;
}; };

View File

@ -7,7 +7,7 @@
<x>0</x> <x>0</x>
<y>0</y> <y>0</y>
<width>599</width> <width>599</width>
<height>727</height> <height>799</height>
</rect> </rect>
</property> </property>
<property name="windowTitle"> <property name="windowTitle">
@ -17,16 +17,16 @@
<property name="geometry"> <property name="geometry">
<rect> <rect>
<x>310</x> <x>310</x>
<y>690</y> <y>740</y>
<width>251</width> <width>251</width>
<height>32</height> <height>32</height>
</rect> </rect>
</property> </property>
<property name="orientation"> <property name="orientation">
<enum>Qt::Orientation::Horizontal</enum> <enum>Qt::Horizontal</enum>
</property> </property>
<property name="standardButtons"> <property name="standardButtons">
<set>QDialogButtonBox::StandardButton::Cancel|QDialogButtonBox::StandardButton::Save</set> <set>QDialogButtonBox::Cancel|QDialogButtonBox::Save</set>
</property> </property>
</widget> </widget>
<widget class="QScrollArea" name="scrollArea"> <widget class="QScrollArea" name="scrollArea">
@ -35,7 +35,7 @@
<x>10</x> <x>10</x>
<y>0</y> <y>0</y>
<width>541</width> <width>541</width>
<height>661</height> <height>741</height>
</rect> </rect>
</property> </property>
<property name="widgetResizable"> <property name="widgetResizable">
@ -47,7 +47,7 @@
<x>0</x> <x>0</x>
<y>0</y> <y>0</y>
<width>539</width> <width>539</width>
<height>659</height> <height>739</height>
</rect> </rect>
</property> </property>
<widget class="QWidget" name="gridLayoutWidget"> <widget class="QWidget" name="gridLayoutWidget">
@ -56,16 +56,126 @@
<x>0</x> <x>0</x>
<y>0</y> <y>0</y>
<width>531</width> <width>531</width>
<height>651</height> <height>731</height>
</rect> </rect>
</property> </property>
<layout class="QGridLayout" name="gridLayout"> <layout class="QGridLayout" name="gridLayout">
<item row="11" column="1"> <item row="15" column="1">
<widget class="QLineEdit" name="goodsNetWeightAliasEdit"/> <widget class="QCheckBox" name="printTotalCheckBox">
<property name="text">
<string/>
</property>
</widget>
</item>
<item row="10" column="0">
<widget class="QLabel" name="label_15">
<property name="text">
<string>Goods net weight position</string>
</property>
</widget>
</item>
<item row="4" column="1">
<widget class="QSpinBox" name="goodsNamePositionSpin"/>
</item>
<item row="3" column="0">
<widget class="QLabel" name="label_8">
<property name="text">
<string>Stores modules url</string>
</property>
</widget>
</item>
<item row="8" column="0">
<widget class="QLabel" name="label_13">
<property name="text">
<string>Goods quantity position</string>
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="QLineEdit" name="OFDModulesDirEdit"/>
</item>
<item row="2" column="0">
<widget class="QLabel" name="label">
<property name="text">
<string>OFD modules url</string>
</property>
</widget>
</item>
<item row="14" column="0">
<widget class="QLabel" name="label_2">
<property name="text">
<string>Print header</string>
</property>
</widget>
</item>
<item row="6" column="1">
<widget class="QSpinBox" name="goodsPricePerUnitPositionSpin"/>
</item>
<item row="3" column="1">
<widget class="QLineEdit" name="storesModulesURLEdit"/>
</item>
<item row="9" column="0">
<widget class="QLabel" name="label_14">
<property name="text">
<string>Goods quantity alias</string>
</property>
</widget>
</item>
<item row="0" column="0">
<widget class="QLabel" name="label_6">
<property name="text">
<string>OFD modules directory</string>
</property>
</widget>
</item>
<item row="5" column="1">
<widget class="QLineEdit" name="goodsNameAliasEdit"/>
</item>
<item row="15" column="0">
<widget class="QLabel" name="label_3">
<property name="text">
<string>Print total</string>
</property>
</widget>
</item>
<item row="13" column="1">
<widget class="QLineEdit" name="goodsTotalAliasEdit"/>
</item>
<item row="8" column="1">
<widget class="QSpinBox" name="goodsQuantityPositionSpin"/>
</item>
<item row="11" column="0">
<widget class="QLabel" name="label_16">
<property name="text">
<string>Goods net weight alias</string>
</property>
</widget>
</item>
<item row="10" column="1">
<widget class="QSpinBox" name="goodsNetWeightPositionSpin"/>
</item>
<item row="2" column="1">
<widget class="QLineEdit" name="OFDModulesURLEdit"/>
</item>
<item row="13" column="0">
<widget class="QLabel" name="label_18">
<property name="text">
<string>Goods total alias</string>
</property>
</widget>
</item> </item>
<item row="1" column="1"> <item row="1" column="1">
<widget class="QLineEdit" name="storesModulesDirEdit"/> <widget class="QLineEdit" name="storesModulesDirEdit"/>
</item> </item>
<item row="7" column="1">
<widget class="QLineEdit" name="goodsPricePerUnitAliasEdit"/>
</item>
<item row="9" column="1">
<widget class="QLineEdit" name="goodsQuantityAliasEdit"/>
</item>
<item row="11" column="1">
<widget class="QLineEdit" name="goodsNetWeightAliasEdit"/>
</item>
<item row="4" column="0"> <item row="4" column="0">
<widget class="QLabel" name="label_9"> <widget class="QLabel" name="label_9">
<property name="text"> <property name="text">
@ -73,6 +183,51 @@
</property> </property>
</widget> </widget>
</item> </item>
<item row="14" column="1">
<widget class="QCheckBox" name="printHeaderCheckBox">
<property name="text">
<string/>
</property>
</widget>
</item>
<item row="5" column="0">
<widget class="QLabel" name="label_10">
<property name="text">
<string>Goods name alias</string>
</property>
</widget>
</item>
<item row="6" column="0">
<widget class="QLabel" name="label_11">
<property name="text">
<string>Goods price per unit position</string>
</property>
</widget>
</item>
<item row="1" column="0">
<widget class="QLabel" name="label_7">
<property name="text">
<string>Stores modules directory</string>
</property>
</widget>
</item>
<item row="12" column="0">
<widget class="QLabel" name="label_17">
<property name="text">
<string>Goods total position</string>
</property>
</widget>
</item>
<item row="0" column="2">
<widget class="QPushButton" name="OFDModulesDirChooseButton">
<property name="text">
<string>Choose</string>
</property>
</widget>
</item>
<item row="12" column="1">
<widget class="QSpinBox" name="goodsTotalPositionSpin"/>
</item>
<item row="7" column="0"> <item row="7" column="0">
<widget class="QLabel" name="label_12"> <widget class="QLabel" name="label_12">
<property name="text"> <property name="text">
@ -87,159 +242,25 @@
</property> </property>
</widget> </widget>
</item> </item>
<item row="13" column="1"> <item row="16" column="0">
<widget class="QLineEdit" name="goodsTotalAliasEdit"/> <widget class="QLabel" name="label_4">
</item>
<item row="14" column="0">
<widget class="QLabel" name="label_2">
<property name="text"> <property name="text">
<string>Print header</string> <string>TextLabel</string>
</property> </property>
</widget> </widget>
</item> </item>
<item row="11" column="0"> <item row="16" column="1">
<widget class="QLabel" name="label_16"> <widget class="QComboBox" name="languageComboBox">
<property name="text"> <item>
<string>Goods net weight alias</string> <property name="text">
</property> <string>en_US</string>
</widget> </property>
</item> </item>
<item row="3" column="0"> <item>
<widget class="QLabel" name="label_8"> <property name="text">
<property name="text"> <string>ru_RU</string>
<string>Stores modules url</string> </property>
</property> </item>
</widget>
</item>
<item row="3" column="1">
<widget class="QLineEdit" name="storesModulesURLEdit"/>
</item>
<item row="13" column="0">
<widget class="QLabel" name="label_18">
<property name="text">
<string>Goods total alias</string>
</property>
</widget>
</item>
<item row="5" column="0">
<widget class="QLabel" name="label_10">
<property name="text">
<string>Goods name alias</string>
</property>
</widget>
</item>
<item row="12" column="1">
<widget class="QSpinBox" name="goodsTotalPositionSpin"/>
</item>
<item row="9" column="0">
<widget class="QLabel" name="label_14">
<property name="text">
<string>Goods quantity alias</string>
</property>
</widget>
</item>
<item row="1" column="0">
<widget class="QLabel" name="label_7">
<property name="text">
<string>Stores modules directory</string>
</property>
</widget>
</item>
<item row="5" column="1">
<widget class="QLineEdit" name="goodsNameAliasEdit"/>
</item>
<item row="10" column="1">
<widget class="QSpinBox" name="goodsNetWeightPositionSpin"/>
</item>
<item row="0" column="0">
<widget class="QLabel" name="label_6">
<property name="text">
<string>OFD modules directory</string>
</property>
</widget>
</item>
<item row="4" column="1">
<widget class="QSpinBox" name="goodsNamePositionSpin"/>
</item>
<item row="9" column="1">
<widget class="QLineEdit" name="goodsQuantityAliasEdit"/>
</item>
<item row="7" column="1">
<widget class="QLineEdit" name="goodsPricePerUnitAliasEdit"/>
</item>
<item row="6" column="0">
<widget class="QLabel" name="label_11">
<property name="text">
<string>Goods price per unit position</string>
</property>
</widget>
</item>
<item row="10" column="0">
<widget class="QLabel" name="label_15">
<property name="text">
<string>Goods net weight position</string>
</property>
</widget>
</item>
<item row="2" column="0">
<widget class="QLabel" name="label">
<property name="text">
<string>OFD modules url</string>
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="QLineEdit" name="OFDModulesDirEdit"/>
</item>
<item row="12" column="0">
<widget class="QLabel" name="label_17">
<property name="text">
<string>Goods total position</string>
</property>
</widget>
</item>
<item row="8" column="0">
<widget class="QLabel" name="label_13">
<property name="text">
<string>Goods quantity position</string>
</property>
</widget>
</item>
<item row="2" column="1">
<widget class="QLineEdit" name="OFDModulesURLEdit"/>
</item>
<item row="8" column="1">
<widget class="QSpinBox" name="goodsQuantityPositionSpin"/>
</item>
<item row="0" column="2">
<widget class="QPushButton" name="OFDModulesDirChooseButton">
<property name="text">
<string>Choose</string>
</property>
</widget>
</item>
<item row="6" column="1">
<widget class="QSpinBox" name="goodsPricePerUnitPositionSpin"/>
</item>
<item row="15" column="0">
<widget class="QLabel" name="label_3">
<property name="text">
<string>Print total</string>
</property>
</widget>
</item>
<item row="14" column="1">
<widget class="QCheckBox" name="printHeaderCheckBox">
<property name="text">
<string/>
</property>
</widget>
</item>
<item row="15" column="1">
<widget class="QCheckBox" name="printTotalCheckBox">
<property name="text">
<string/>
</property>
</widget> </widget>
</item> </item>
</layout> </layout>

7
translations.qrc Normal file
View File

@ -0,0 +1,7 @@
<RCC>
<qresource prefix="/translation">
<file>en_US.qm</file>
<file>ru_RU.qm</file>
</qresource>
<qresource prefix="/translations"/>
</RCC>

View File

@ -1,27 +1,27 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE TS> <!DOCTYPE TS>
<TS version="2.1"> <TS version="2.1" language="en_US">
<context> <context>
<name>AdjustPictureDialog</name> <name>AdjustPictureDialog</name>
<message> <message>
<location filename="../adjustpicturedialog.ui" line="14"/> <location filename="../adjustpicturedialog.ui" line="14"/>
<source>Dialog</source> <source>Dialog</source>
<translation type="unfinished"></translation> <translation>Dialog</translation>
</message> </message>
<message> <message>
<location filename="../adjustpicturedialog.ui" line="58"/> <location filename="../adjustpicturedialog.ui" line="58"/>
<source>Please, zoom to qr code and adjust contrast so that qr code looks sharp</source> <source>Please, zoom to qr code and adjust contrast so that qr code looks sharp</source>
<translation type="unfinished"></translation> <translation>Please, zoom to qr code and adjust contrast so that qr code looks sharp</translation>
</message> </message>
<message> <message>
<location filename="../adjustpicturedialog.cpp" line="39"/> <location filename="../adjustpicturedialog.cpp" line="39"/>
<source>QR code was not detected on that image. Please edit it again or enter data manually</source> <source>QR code was not detected on that image. Please edit it again or enter data manually</source>
<translation type="unfinished"></translation> <translation>QR code was not detected on that image. Please edit it again or enter data manually</translation>
</message> </message>
<message> <message>
<location filename="../adjustpicturedialog.cpp" line="41"/> <location filename="../adjustpicturedialog.cpp" line="41"/>
<source>No QR code</source> <source>No QR code</source>
<translation type="unfinished"></translation> <translation>No QR code</translation>
</message> </message>
</context> </context>
<context> <context>
@ -29,151 +29,180 @@
<message> <message>
<location filename="../mainwindow.ui" line="14"/> <location filename="../mainwindow.ui" line="14"/>
<source>MainWindow</source> <source>MainWindow</source>
<translation type="unfinished"></translation> <translation>Главное окно</translation>
</message> </message>
<message> <message>
<location filename="../mainwindow.ui" line="37"/> <location filename="../mainwindow.ui" line="37"/>
<source>Store type</source> <source>Store type</source>
<translation type="unfinished"></translation> <translation>Store type</translation>
</message> </message>
<message> <message>
<location filename="../mainwindow.ui" line="50"/> <location filename="../mainwindow.ui" line="50"/>
<source>Parse</source> <source>Parse</source>
<translation type="unfinished"></translation> <translation>Parse</translation>
</message> </message>
<message> <message>
<location filename="../mainwindow.ui" line="63"/> <location filename="../mainwindow.ui" line="63"/>
<source>Preferences</source> <source>Preferences</source>
<translation type="unfinished"></translation> <translation>Preferences</translation>
</message> </message>
<message> <message>
<location filename="../mainwindow.ui" line="80"/> <location filename="../mainwindow.ui" line="80"/>
<source>Text</source> <source>Text</source>
<translation type="unfinished"></translation> <translation>Text</translation>
</message> </message>
<message> <message>
<location filename="../mainwindow.ui" line="92"/> <location filename="../mainwindow.ui" line="92"/>
<source>Check content</source> <source>Check content</source>
<translation type="unfinished"></translation> <translation>Check content</translation>
</message> </message>
<message> <message>
<location filename="../mainwindow.ui" line="108"/> <location filename="../mainwindow.ui" line="108"/>
<source>OCR</source> <source>OCR</source>
<translation type="unfinished"></translation> <translatorcomment>OCR = Optical Character Recognition</translatorcomment>
<translation>OCR</translation>
</message> </message>
<message> <message>
<location filename="../mainwindow.ui" line="120"/> <location filename="../mainwindow.ui" line="120"/>
<location filename="../mainwindow.ui" line="213"/> <location filename="../mainwindow.ui" line="213"/>
<source>Choose</source> <source>Choose</source>
<translation type="unfinished"></translation> <translation>Choose</translation>
</message> </message>
<message> <message>
<location filename="../mainwindow.ui" line="143"/> <location filename="../mainwindow.ui" line="143"/>
<location filename="../mainwindow.ui" line="200"/> <location filename="../mainwindow.ui" line="200"/>
<source>Path to image: </source> <source>Path to image: </source>
<translation type="unfinished"></translation> <translation>Path to image: </translation>
</message> </message>
<message> <message>
<location filename="../mainwindow.ui" line="156"/> <location filename="../mainwindow.ui" line="156"/>
<source>Here is recognised check text. Please, edit it if something&apos;s wrong:</source> <source>Here is recognised check text. Please, edit it if something&apos;s wrong:</source>
<translation type="unfinished"></translation> <translation>Here is recognised check text. Please, edit it if something&apos;s wrong:</translation>
</message> </message>
<message> <message>
<location filename="../mainwindow.ui" line="175"/> <location filename="../mainwindow.ui" line="175"/>
<source>OFD</source> <source>OFD</source>
<translation type="unfinished"></translation> <translatorcomment>OFD = Оператор Фискальных Данных</translatorcomment>
<translation>OFD</translation>
</message> </message>
<message> <message>
<location filename="../mainwindow.ui" line="226"/> <location filename="../mainwindow.ui" line="226"/>
<source>0000000000000000</source> <source>0000000000000000</source>
<translation type="unfinished"></translation> <translation>0000000000000000</translation>
</message> </message>
<message> <message>
<location filename="../mainwindow.ui" line="245"/> <location filename="../mainwindow.ui" line="245"/>
<source>FN (Fiscal Number)</source> <source>FN (Fiscal Number)</source>
<translation type="unfinished"></translation> <translatorcomment>FN = Фискальный Номер</translatorcomment>
<translation>FN (Fiscal Number)</translation>
</message> </message>
<message> <message>
<location filename="../mainwindow.ui" line="264"/> <location filename="../mainwindow.ui" line="264"/>
<source>FD (Fiscal Document)</source> <source>FD (Fiscal Document)</source>
<translation type="unfinished"></translation> <translatorcomment>FD = Фискальный Документ</translatorcomment>
<translation>FD (Fiscal Document)</translation>
</message> </message>
<message> <message>
<location filename="../mainwindow.ui" line="277"/> <location filename="../mainwindow.ui" line="277"/>
<location filename="../mainwindow.ui" line="309"/> <location filename="../mainwindow.ui" line="309"/>
<source>0000000000</source> <source>0000000000</source>
<translation type="unfinished"></translation> <translation>000000000</translation>
</message> </message>
<message> <message>
<location filename="../mainwindow.ui" line="296"/> <location filename="../mainwindow.ui" line="296"/>
<source>FI (Fiscal Identifier)</source> <source>FI (Fiscal Identifier)</source>
<translation type="unfinished"></translation> <translatorcomment>FI = Фискальный Признак</translatorcomment>
<translation>FI (Fiscal Identifier)</translation>
</message> </message>
<message> <message>
<location filename="../mainwindow.ui" line="333"/> <location filename="../mainwindow.ui" line="333"/>
<source>Funds income</source> <source>Funds income</source>
<translation type="unfinished"></translation> <translatorcomment>Приход средств</translatorcomment>
<translation>Funds income</translation>
</message> </message>
<message> <message>
<location filename="../mainwindow.ui" line="338"/> <location filename="../mainwindow.ui" line="338"/>
<source>Funds return</source> <source>Funds return</source>
<translation type="unfinished"></translation> <translatorcomment>Возврат средств</translatorcomment>
<translation>Funds return</translation>
</message> </message>
<message> <message>
<location filename="../mainwindow.ui" line="343"/> <location filename="../mainwindow.ui" line="343"/>
<source>Funds spend</source> <source>Funds spend</source>
<translation type="unfinished"></translation> <translatorcomment>Расход средств</translatorcomment>
<translation>Funds spend</translation>
</message> </message>
<message> <message>
<location filename="../mainwindow.ui" line="348"/> <location filename="../mainwindow.ui" line="348"/>
<source>Spends return</source> <source>Spends return</source>
<translation type="unfinished"></translation> <translatorcomment>Возврат расхода</translatorcomment>
<translation>Spends return</translation>
</message> </message>
<message> <message>
<location filename="../mainwindow.ui" line="375"/> <location filename="../mainwindow.ui" line="375"/>
<source>Total</source> <source>Total</source>
<translation type="unfinished"></translation> <translation>Total</translation>
</message> </message>
<message> <message>
<location filename="../mainwindow.ui" line="392"/> <location filename="../mainwindow.ui" line="392"/>
<source>checks parser</source> <source>checks parser</source>
<translation type="unfinished"></translation> <translation>checks parser</translation>
</message> </message>
<message> <message>
<location filename="../mainwindow.cpp" line="85"/> <location filename="../mainwindow.cpp" line="85"/>
<source>Captcha was not solved correctly!</source> <source>Captcha was not solved correctly!</source>
<translation type="unfinished"></translation> <translation>Captcha was not solved correctly!</translation>
</message> </message>
<message> <message>
<location filename="../mainwindow.cpp" line="87"/> <location filename="../mainwindow.cpp" line="87"/>
<source>Captcha is incorrect</source> <source>Captcha is incorrect</source>
<translation type="unfinished"></translation> <translation>Captcha is incorrect</translation>
</message> </message>
<message> <message>
<location filename="../mainwindow.cpp" line="92"/> <location filename="../mainwindow.cpp" line="92"/>
<source>Check not found. Please, ensure correctness of entered data.</source> <source>Internal server error. Please, try again later.</source>
<translation type="unfinished"></translation> <translation>Internal server error. Please, try again later.</translation>
</message> </message>
<message> <message>
<location filename="../mainwindow.cpp" line="94"/> <location filename="../mainwindow.cpp" line="94"/>
<source>Internal server error</source>
<translation>Internal server error</translation>
</message>
<message>
<location filename="../mainwindow.cpp" line="99"/>
<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="../mainwindow.cpp" line="101"/>
<source>Check was not found</source> <source>Check was not found</source>
<translation type="unfinished"></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="../mainwindow.cpp" line="145"/> <location filename="../mainwindow.cpp" line="123"/>
<source>An error has occured. Check was matched incorrectly. Vector sizes are different. Please, contact the developer.</source>
<translation>An error has occured. Check was matched incorrectly. Vector sizes are different. Please, contact the developer.</translation>
</message>
<message>
<location filename="../mainwindow.cpp" line="125"/>
<source>Error in parsing</source>
<translation>Error in parsing</translation>
</message>
<message>
<location filename="../mainwindow.cpp" line="156"/>
<source>Please, select a picture where QR code that contains info about check is present</source> <source>Please, select a picture where QR code that contains info about check is present</source>
<translation type="unfinished"></translation> <translation>Please, select a picture where QR code that contains info about check is present</translation>
</message> </message>
<message> <message>
<location filename="../mainwindow.cpp" line="147"/> <location filename="../mainwindow.cpp" line="158"/>
<location filename="../mainwindow.cpp" line="193"/> <location filename="../mainwindow.cpp" line="204"/>
<source>Picture was not selected</source> <source>Picture was not selected</source>
<translation type="unfinished"></translation> <translation>Picture was not selected</translation>
</message> </message>
<message> <message>
<location filename="../mainwindow.cpp" line="191"/> <location filename="../mainwindow.cpp" line="202"/>
<source>Please, select a picture to scan</source> <source>Please, select a picture to scan</source>
<translation type="unfinished"></translation> <translation>Please, select a picture to scan</translation>
</message> </message>
</context> </context>
<context> <context>
@ -181,112 +210,125 @@
<message> <message>
<location filename="../outputdialog.ui" line="14"/> <location filename="../outputdialog.ui" line="14"/>
<source>Dialog</source> <source>Dialog</source>
<translation type="unfinished"></translation> <translation>Dialog</translation>
</message> </message>
<message> <message>
<location filename="../outputdialog.ui" line="42"/> <location filename="../outputdialog.ui" line="42"/>
<source>Path to export: </source> <source>Path to export: </source>
<translation type="unfinished"></translation> <translation>Path to export: </translation>
</message> </message>
<message> <message>
<location filename="../outputdialog.ui" line="55"/> <location filename="../outputdialog.ui" line="55"/>
<source>Choose</source> <source>Choose</source>
<translation type="unfinished"></translation> <translation>Choose</translation>
</message> </message>
<message> <message>
<location filename="../outputdialog.ui" line="68"/> <location filename="../outputdialog.ui" line="68"/>
<source>Print header</source> <source>Print header</source>
<translation type="unfinished"></translation> <translation>Print header</translation>
</message> </message>
<message> <message>
<location filename="../outputdialog.ui" line="82"/> <location filename="../outputdialog.ui" line="82"/>
<source>Goods name</source> <source>Goods name</source>
<translation type="unfinished"></translation> <translation>Goods name</translation>
</message> </message>
<message> <message>
<location filename="../outputdialog.ui" line="87"/> <location filename="../outputdialog.ui" line="87"/>
<source>Goods price</source> <source>Goods price</source>
<translation type="unfinished"></translation> <translation>Goods price</translation>
</message> </message>
<message> <message>
<location filename="../outputdialog.ui" line="92"/> <location filename="../outputdialog.ui" line="92"/>
<source>Goods quantity</source> <source>Goods quantity</source>
<translation type="unfinished"></translation> <translation>Goods quality</translation>
</message> </message>
<message> <message>
<location filename="../outputdialog.ui" line="97"/> <location filename="../outputdialog.ui" line="97"/>
<source>Goods net weight</source> <source>Goods net weight</source>
<translation type="unfinished"></translation> <translation>Goods net weight</translation>
</message> </message>
<message> <message>
<location filename="../outputdialog.ui" line="102"/> <location filename="../outputdialog.ui" line="102"/>
<source>Goods total</source> <source>Goods total</source>
<translation type="unfinished"></translation> <translation>Goods total</translation>
</message> </message>
<message> <message>
<location filename="../outputdialog.ui" line="107"/> <location filename="../outputdialog.ui" line="107"/>
<source>position</source> <source>position</source>
<translation type="unfinished"></translation> <translation>position</translation>
</message> </message>
<message> <message>
<location filename="../outputdialog.ui" line="112"/> <location filename="../outputdialog.ui" line="112"/>
<source>name</source> <source>name</source>
<translation type="unfinished"></translation> <translation>name</translation>
</message> </message>
<message> <message>
<location filename="../outputdialog.ui" line="117"/> <location filename="../outputdialog.ui" line="117"/>
<source>1</source> <source>1</source>
<translation type="unfinished"></translation> <translation>1</translation>
</message> </message>
<message> <message>
<location filename="../outputdialog.ui" line="122"/> <location filename="../outputdialog.ui" line="122"/>
<source>Name</source> <source>Name</source>
<translation type="unfinished"></translation> <translation>Name</translation>
</message> </message>
<message> <message>
<location filename="../outputdialog.ui" line="127"/> <location filename="../outputdialog.ui" line="127"/>
<source>2</source> <source>2</source>
<translation type="unfinished"></translation> <translation>2</translation>
</message> </message>
<message> <message>
<location filename="../outputdialog.ui" line="132"/> <location filename="../outputdialog.ui" line="132"/>
<source>Price</source> <source>Price</source>
<translation type="unfinished"></translation> <translation>Price</translation>
</message> </message>
<message> <message>
<location filename="../outputdialog.ui" line="137"/> <location filename="../outputdialog.ui" line="137"/>
<source>3</source> <source>3</source>
<translation type="unfinished"></translation> <translation>3</translation>
</message> </message>
<message> <message>
<location filename="../outputdialog.ui" line="142"/> <location filename="../outputdialog.ui" line="142"/>
<source>Quantity</source> <source>Quantity</source>
<translation type="unfinished"></translation> <translation>Quantity</translation>
</message> </message>
<message> <message>
<location filename="../outputdialog.ui" line="147"/> <location filename="../outputdialog.ui" line="147"/>
<source>4</source> <source>4</source>
<translation type="unfinished"></translation> <translation>4</translation>
</message> </message>
<message> <message>
<location filename="../outputdialog.ui" line="152"/> <location filename="../outputdialog.ui" line="152"/>
<source>Net weight</source> <source>Net weight</source>
<translation type="unfinished"></translation> <translation>Net Weight</translation>
</message> </message>
<message> <message>
<location filename="../outputdialog.ui" line="157"/> <location filename="../outputdialog.ui" line="157"/>
<source>5</source> <source>5</source>
<translation type="unfinished"></translation> <translation>5</translation>
</message> </message>
<message> <message>
<location filename="../outputdialog.ui" line="162"/> <location filename="../outputdialog.ui" line="162"/>
<source>Total price</source> <source>Total price</source>
<translation type="unfinished"></translation> <translation>Total price</translation>
</message> </message>
<message> <message>
<location filename="../outputdialog.ui" line="176"/> <location filename="../outputdialog.ui" line="176"/>
<source>Print total</source> <source>Print total</source>
<translation type="unfinished"></translation> <translation>Print total</translation>
</message>
</context>
<context>
<name>SettingsDialog</name>
<message>
<location filename="../settingsdialog.cpp" line="149"/>
<source>You need to restart program to apply language changes</source>
<translation>You need to restart program to apply language changes</translation>
</message>
<message>
<location filename="../settingsdialog.cpp" line="151"/>
<source>Restart required</source>
<translation>Restart required</translation>
</message> </message>
</context> </context>
<context> <context>
@ -294,17 +336,17 @@
<message> <message>
<location filename="../solvecaptchadialog.ui" line="14"/> <location filename="../solvecaptchadialog.ui" line="14"/>
<source>Dialog</source> <source>Dialog</source>
<translation type="unfinished"></translation> <translation>Dialog</translation>
</message> </message>
<message> <message>
<location filename="../solvecaptchadialog.cpp" line="23"/> <location filename="../solvecaptchadialog.cpp" line="23"/>
<source>Please, enter a valid captcha</source> <source>Please, enter a valid captcha</source>
<translation type="unfinished"></translation> <translation>Please, enter a valid captcha</translation>
</message> </message>
<message> <message>
<location filename="../solvecaptchadialog.cpp" line="25"/> <location filename="../solvecaptchadialog.cpp" line="25"/>
<source>No captcha</source> <source>No captcha</source>
<translation type="unfinished"></translation> <translation>No captcha</translation>
</message> </message>
</context> </context>
<context> <context>
@ -312,93 +354,108 @@
<message> <message>
<location filename="../settingsdialog.ui" line="14"/> <location filename="../settingsdialog.ui" line="14"/>
<source>Dialog</source> <source>Dialog</source>
<translation type="unfinished"></translation> <translation>Dialog</translation>
</message> </message>
<message> <message>
<location filename="../settingsdialog.ui" line="72"/> <location filename="../settingsdialog.ui" line="182"/>
<source>Goods name position</source> <source>Goods name position</source>
<translation type="unfinished"></translation> <translation>Goods name position</translation>
</message> </message>
<message> <message>
<location filename="../settingsdialog.ui" line="79"/> <location filename="../settingsdialog.ui" line="234"/>
<source>Goods price per unit alias</source> <source>Goods price per unit alias</source>
<translation type="unfinished"></translation> <translation>Goods price per unit alias</translation>
</message> </message>
<message> <message>
<location filename="../settingsdialog.ui" line="86"/> <location filename="../settingsdialog.ui" line="248"/>
<location filename="../settingsdialog.ui" line="217"/> <source>TextLabel</source>
<translation>Language</translation>
</message>
<message>
<location filename="../settingsdialog.ui" line="256"/>
<source>en_US</source>
<translation>en_US</translation>
</message>
<message>
<location filename="../settingsdialog.ui" line="261"/>
<source>ru_RU</source>
<translation>ru_RU</translation>
</message>
<message>
<location filename="../settingsdialog.ui" line="224"/>
<location filename="../settingsdialog.ui" line="241"/>
<source>Choose</source> <source>Choose</source>
<translation type="unfinished"></translation> <translation>Choose</translation>
</message> </message>
<message> <message>
<location filename="../settingsdialog.ui" line="96"/> <location filename="../settingsdialog.ui" line="107"/>
<source>Print header</source> <source>Print header</source>
<translation type="unfinished"></translation> <translation>Print header</translation>
</message> </message>
<message> <message>
<location filename="../settingsdialog.ui" line="103"/> <location filename="../settingsdialog.ui" line="150"/>
<source>Goods net weight alias</source> <source>Goods net weight alias</source>
<translation type="unfinished"></translation> <translation>Goods net weight alias</translation>
</message> </message>
<message> <message>
<location filename="../settingsdialog.ui" line="110"/> <location filename="../settingsdialog.ui" line="83"/>
<source>Stores modules url</source> <source>Stores modules url</source>
<translation type="unfinished"></translation> <translation>Stores modules url</translation>
</message>
<message>
<location filename="../settingsdialog.ui" line="163"/>
<source>Goods total alias</source>
<translation>Goods total alias</translation>
</message>
<message>
<location filename="../settingsdialog.ui" line="196"/>
<source>Goods name alias</source>
<translation>Goods name alias</translation>
</message> </message>
<message> <message>
<location filename="../settingsdialog.ui" line="120"/> <location filename="../settingsdialog.ui" line="120"/>
<source>Goods total alias</source> <source>Goods quantity alias</source>
<translation type="unfinished"></translation> <translation>Goods quantity alias</translation>
</message>
<message>
<location filename="../settingsdialog.ui" line="210"/>
<source>Stores modules directory</source>
<translation>Stores modules directory</translation>
</message> </message>
<message> <message>
<location filename="../settingsdialog.ui" line="127"/> <location filename="../settingsdialog.ui" line="127"/>
<source>Goods name alias</source> <source>OFD modules directory</source>
<translation type="unfinished"></translation> <translation>OFD modules directory</translation>
</message>
<message>
<location filename="../settingsdialog.ui" line="203"/>
<source>Goods price per unit position</source>
<translation>Goods price per unit position</translation>
</message>
<message>
<location filename="../settingsdialog.ui" line="73"/>
<source>Goods net weight position</source>
<translation>Goods net weight position</translation>
</message>
<message>
<location filename="../settingsdialog.ui" line="100"/>
<source>OFD modules url</source>
<translation>OFD modules url</translation>
</message>
<message>
<location filename="../settingsdialog.ui" line="217"/>
<source>Goods total position</source>
<translation>Goods total position</translation>
</message>
<message>
<location filename="../settingsdialog.ui" line="90"/>
<source>Goods quantity position</source>
<translation>Goods quantity position</translation>
</message> </message>
<message> <message>
<location filename="../settingsdialog.ui" line="137"/> <location filename="../settingsdialog.ui" line="137"/>
<source>Goods quantity alias</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../settingsdialog.ui" line="144"/>
<source>Stores modules directory</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../settingsdialog.ui" line="157"/>
<source>OFD modules directory</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../settingsdialog.ui" line="173"/>
<source>Goods price per unit position</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../settingsdialog.ui" line="180"/>
<source>Goods net weight position</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../settingsdialog.ui" line="187"/>
<source>OFD modules url</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../settingsdialog.ui" line="197"/>
<source>Goods total position</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../settingsdialog.ui" line="204"/>
<source>Goods quantity position</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../settingsdialog.ui" line="227"/>
<source>Print total</source> <source>Print total</source>
<translation type="unfinished"></translation> <translation>Print total</translation>
</message> </message>
</context> </context>
</TS> </TS>

View File

@ -6,22 +6,22 @@
<message> <message>
<location filename="../adjustpicturedialog.ui" line="14"/> <location filename="../adjustpicturedialog.ui" line="14"/>
<source>Dialog</source> <source>Dialog</source>
<translation type="unfinished"></translation> <translation>Диалог</translation>
</message> </message>
<message> <message>
<location filename="../adjustpicturedialog.ui" line="58"/> <location filename="../adjustpicturedialog.ui" line="58"/>
<source>Please, zoom to qr code and adjust contrast so that qr code looks sharp</source> <source>Please, zoom to qr code and adjust contrast so that qr code looks sharp</source>
<translation type="unfinished"></translation> <translation>Пожалуйста, приблизьте QR код и настройте контраст, чтобы он читался</translation>
</message> </message>
<message> <message>
<location filename="../adjustpicturedialog.cpp" line="39"/> <location filename="../adjustpicturedialog.cpp" line="39"/>
<source>QR code was not detected on that image. Please edit it again or enter data manually</source> <source>QR code was not detected on that image. Please edit it again or enter data manually</source>
<translation type="unfinished"></translation> <translation>QR код не найден на этом изображении. Пожалуйста, попытайтесь снова или введите данные вручную</translation>
</message> </message>
<message> <message>
<location filename="../adjustpicturedialog.cpp" line="41"/> <location filename="../adjustpicturedialog.cpp" line="41"/>
<source>No QR code</source> <source>No QR code</source>
<translation type="unfinished"></translation> <translation>QR код не найден</translation>
</message> </message>
</context> </context>
<context> <context>
@ -29,151 +29,176 @@
<message> <message>
<location filename="../mainwindow.ui" line="14"/> <location filename="../mainwindow.ui" line="14"/>
<source>MainWindow</source> <source>MainWindow</source>
<translation type="unfinished"></translation> <translation>ГлавноеОкно</translation>
</message> </message>
<message> <message>
<location filename="../mainwindow.ui" line="37"/> <location filename="../mainwindow.ui" line="37"/>
<source>Store type</source> <source>Store type</source>
<translation type="unfinished"></translation> <translation>Магазин</translation>
</message> </message>
<message> <message>
<location filename="../mainwindow.ui" line="50"/> <location filename="../mainwindow.ui" line="50"/>
<source>Parse</source> <source>Parse</source>
<translation type="unfinished"></translation> <translation>Парсить</translation>
</message> </message>
<message> <message>
<location filename="../mainwindow.ui" line="63"/> <location filename="../mainwindow.ui" line="63"/>
<source>Preferences</source> <source>Preferences</source>
<translation type="unfinished"></translation> <translation>Настройки</translation>
</message> </message>
<message> <message>
<location filename="../mainwindow.ui" line="80"/> <location filename="../mainwindow.ui" line="80"/>
<source>Text</source> <source>Text</source>
<translation type="unfinished"></translation> <translation>Текст</translation>
</message> </message>
<message> <message>
<location filename="../mainwindow.ui" line="92"/> <location filename="../mainwindow.ui" line="92"/>
<source>Check content</source> <source>Check content</source>
<translation type="unfinished"></translation> <translation>Контент чека</translation>
</message> </message>
<message> <message>
<location filename="../mainwindow.ui" line="108"/> <location filename="../mainwindow.ui" line="108"/>
<source>OCR</source> <source>OCR</source>
<translation type="unfinished"></translation> <translatorcomment>Оптическое Распознавание Символов</translatorcomment>
<translation>ОРС</translation>
</message> </message>
<message> <message>
<location filename="../mainwindow.ui" line="120"/> <location filename="../mainwindow.ui" line="120"/>
<location filename="../mainwindow.ui" line="213"/> <location filename="../mainwindow.ui" line="213"/>
<source>Choose</source> <source>Choose</source>
<translation type="unfinished"></translation> <translation>Выбрать</translation>
</message> </message>
<message> <message>
<location filename="../mainwindow.ui" line="143"/> <location filename="../mainwindow.ui" line="143"/>
<location filename="../mainwindow.ui" line="200"/> <location filename="../mainwindow.ui" line="200"/>
<source>Path to image: </source> <source>Path to image: </source>
<translation type="unfinished"></translation> <translation>Путь к изображению: </translation>
</message> </message>
<message> <message>
<location filename="../mainwindow.ui" line="156"/> <location filename="../mainwindow.ui" line="156"/>
<source>Here is recognised check text. Please, edit it if something&apos;s wrong:</source> <source>Here is recognised check text. Please, edit it if something&apos;s wrong:</source>
<translation type="unfinished"></translation> <translation>Ниже приведён распознанный текст. Пожалуйста, отредактируйте его:</translation>
</message> </message>
<message> <message>
<location filename="../mainwindow.ui" line="175"/> <location filename="../mainwindow.ui" line="175"/>
<source>OFD</source> <source>OFD</source>
<translation type="unfinished"></translation> <translatorcomment>Оператор Фискальных Данных</translatorcomment>
<translation>ОФД</translation>
</message> </message>
<message> <message>
<location filename="../mainwindow.ui" line="226"/> <location filename="../mainwindow.ui" line="226"/>
<source>0000000000000000</source> <source>0000000000000000</source>
<translation type="unfinished"></translation> <translation>0000000000000000</translation>
</message> </message>
<message> <message>
<location filename="../mainwindow.ui" line="245"/> <location filename="../mainwindow.ui" line="245"/>
<source>FN (Fiscal Number)</source> <source>FN (Fiscal Number)</source>
<translation type="unfinished"></translation> <translatorcomment>Фискальный Норма</translatorcomment>
<translation>ФН</translation>
</message> </message>
<message> <message>
<location filename="../mainwindow.ui" line="264"/> <location filename="../mainwindow.ui" line="264"/>
<source>FD (Fiscal Document)</source> <source>FD (Fiscal Document)</source>
<translation type="unfinished"></translation> <translatorcomment>Фискальный Документ</translatorcomment>
<translation>ФД</translation>
</message> </message>
<message> <message>
<location filename="../mainwindow.ui" line="277"/> <location filename="../mainwindow.ui" line="277"/>
<location filename="../mainwindow.ui" line="309"/> <location filename="../mainwindow.ui" line="309"/>
<source>0000000000</source> <source>0000000000</source>
<translation type="unfinished"></translation> <translation>000000000</translation>
</message> </message>
<message> <message>
<location filename="../mainwindow.ui" line="296"/> <location filename="../mainwindow.ui" line="296"/>
<source>FI (Fiscal Identifier)</source> <source>FI (Fiscal Identifier)</source>
<translation type="unfinished"></translation> <translatorcomment>Фискальный Признак</translatorcomment>
<translation>ФП</translation>
</message> </message>
<message> <message>
<location filename="../mainwindow.ui" line="333"/> <location filename="../mainwindow.ui" line="333"/>
<source>Funds income</source> <source>Funds income</source>
<translation type="unfinished"></translation> <translation>Приход средств</translation>
</message> </message>
<message> <message>
<location filename="../mainwindow.ui" line="338"/> <location filename="../mainwindow.ui" line="338"/>
<source>Funds return</source> <source>Funds return</source>
<translation type="unfinished"></translation> <translation>Возврат средств</translation>
</message> </message>
<message> <message>
<location filename="../mainwindow.ui" line="343"/> <location filename="../mainwindow.ui" line="343"/>
<source>Funds spend</source> <source>Funds spend</source>
<translation type="unfinished"></translation> <translation>Расход средств</translation>
</message> </message>
<message> <message>
<location filename="../mainwindow.ui" line="348"/> <location filename="../mainwindow.ui" line="348"/>
<source>Spends return</source> <source>Spends return</source>
<translation type="unfinished"></translation> <translation>Возврат расхода</translation>
</message> </message>
<message> <message>
<location filename="../mainwindow.ui" line="375"/> <location filename="../mainwindow.ui" line="375"/>
<source>Total</source> <source>Total</source>
<translation type="unfinished"></translation> <translation>Итого</translation>
</message> </message>
<message> <message>
<location filename="../mainwindow.ui" line="392"/> <location filename="../mainwindow.ui" line="392"/>
<source>checks parser</source> <source>checks parser</source>
<translation type="unfinished"></translation> <translation>Парсер чеков</translation>
</message> </message>
<message> <message>
<location filename="../mainwindow.cpp" line="85"/> <location filename="../mainwindow.cpp" line="85"/>
<source>Captcha was not solved correctly!</source> <source>Captcha was not solved correctly!</source>
<translation type="unfinished"></translation> <translation>Капча была решена неверно!</translation>
</message> </message>
<message> <message>
<location filename="../mainwindow.cpp" line="87"/> <location filename="../mainwindow.cpp" line="87"/>
<source>Captcha is incorrect</source> <source>Captcha is incorrect</source>
<translation type="unfinished"></translation> <translation>Капча введена неверно</translation>
</message> </message>
<message> <message>
<location filename="../mainwindow.cpp" line="92"/> <location filename="../mainwindow.cpp" line="92"/>
<source>Check not found. Please, ensure correctness of entered data.</source> <source>Internal server error. Please, try again later.</source>
<translation type="unfinished"></translation> <translation>Внутренняя ошибка сервера. Пожалуйста, попробуйте снова позже.</translation>
</message> </message>
<message> <message>
<location filename="../mainwindow.cpp" line="94"/> <location filename="../mainwindow.cpp" line="94"/>
<source>Internal server error</source>
<translation>Внутренняя ошибка сервера</translation>
</message>
<message>
<location filename="../mainwindow.cpp" line="99"/>
<source>Check not found. Please, ensure correctness of entered data.</source>
<translation>Чек не найден. Пожалуйста, убедитесь в правильности введённых данных.</translation>
</message>
<message>
<location filename="../mainwindow.cpp" line="101"/>
<source>Check was not found</source> <source>Check was not found</source>
<translation type="unfinished"></translation> <translation>Чек не найден</translation>
</message> </message>
<message> <message>
<location filename="../mainwindow.cpp" line="145"/> <location filename="../mainwindow.cpp" line="123"/>
<source>An error has occured. Check was matched incorrectly. Vector sizes are different. Please, contact the developer.</source>
<translation>Произошла ошибка. Чек был прочитан неверно. Размеры векторов различаются. Пожалуйста, сообщите об этом разработчику.</translation>
</message>
<message>
<location filename="../mainwindow.cpp" line="125"/>
<source>Error in parsing</source>
<translation>Ошибка в парсинге</translation>
</message>
<message>
<location filename="../mainwindow.cpp" line="156"/>
<source>Please, select a picture where QR code that contains info about check is present</source> <source>Please, select a picture where QR code that contains info about check is present</source>
<translation type="unfinished"></translation> <translation>Пожалуйста, выберете изображение, содержащее QR код с информацией о чеке</translation>
</message> </message>
<message> <message>
<location filename="../mainwindow.cpp" line="147"/> <location filename="../mainwindow.cpp" line="158"/>
<location filename="../mainwindow.cpp" line="193"/> <location filename="../mainwindow.cpp" line="204"/>
<source>Picture was not selected</source> <source>Picture was not selected</source>
<translation type="unfinished"></translation> <translation>Изображение не было выбрано</translation>
</message> </message>
<message> <message>
<location filename="../mainwindow.cpp" line="191"/> <location filename="../mainwindow.cpp" line="202"/>
<source>Please, select a picture to scan</source> <source>Please, select a picture to scan</source>
<translation type="unfinished"></translation> <translation>Пожалуйста, выберете изображение для сканирования</translation>
</message> </message>
</context> </context>
<context> <context>
@ -181,112 +206,125 @@
<message> <message>
<location filename="../outputdialog.ui" line="14"/> <location filename="../outputdialog.ui" line="14"/>
<source>Dialog</source> <source>Dialog</source>
<translation type="unfinished"></translation> <translation>Диалог</translation>
</message> </message>
<message> <message>
<location filename="../outputdialog.ui" line="42"/> <location filename="../outputdialog.ui" line="42"/>
<source>Path to export: </source> <source>Path to export: </source>
<translation type="unfinished"></translation> <translation>Путь для экспорта: </translation>
</message> </message>
<message> <message>
<location filename="../outputdialog.ui" line="55"/> <location filename="../outputdialog.ui" line="55"/>
<source>Choose</source> <source>Choose</source>
<translation type="unfinished"></translation> <translation>Выбрать</translation>
</message> </message>
<message> <message>
<location filename="../outputdialog.ui" line="68"/> <location filename="../outputdialog.ui" line="68"/>
<source>Print header</source> <source>Print header</source>
<translation type="unfinished"></translation> <translation>Печатать заголовок</translation>
</message> </message>
<message> <message>
<location filename="../outputdialog.ui" line="82"/> <location filename="../outputdialog.ui" line="82"/>
<source>Goods name</source> <source>Goods name</source>
<translation type="unfinished"></translation> <translation>Имя товара</translation>
</message> </message>
<message> <message>
<location filename="../outputdialog.ui" line="87"/> <location filename="../outputdialog.ui" line="87"/>
<source>Goods price</source> <source>Goods price</source>
<translation type="unfinished"></translation> <translation>Цена товара</translation>
</message> </message>
<message> <message>
<location filename="../outputdialog.ui" line="92"/> <location filename="../outputdialog.ui" line="92"/>
<source>Goods quantity</source> <source>Goods quantity</source>
<translation type="unfinished"></translation> <translation>Количество товара</translation>
</message> </message>
<message> <message>
<location filename="../outputdialog.ui" line="97"/> <location filename="../outputdialog.ui" line="97"/>
<source>Goods net weight</source> <source>Goods net weight</source>
<translation type="unfinished"></translation> <translation>Масса нетто товара</translation>
</message> </message>
<message> <message>
<location filename="../outputdialog.ui" line="102"/> <location filename="../outputdialog.ui" line="102"/>
<source>Goods total</source> <source>Goods total</source>
<translation type="unfinished"></translation> <translation>Всего за товар</translation>
</message> </message>
<message> <message>
<location filename="../outputdialog.ui" line="107"/> <location filename="../outputdialog.ui" line="107"/>
<source>position</source> <source>position</source>
<translation type="unfinished"></translation> <translation>позиция</translation>
</message> </message>
<message> <message>
<location filename="../outputdialog.ui" line="112"/> <location filename="../outputdialog.ui" line="112"/>
<source>name</source> <source>name</source>
<translation type="unfinished"></translation> <translation>алиас</translation>
</message> </message>
<message> <message>
<location filename="../outputdialog.ui" line="117"/> <location filename="../outputdialog.ui" line="117"/>
<source>1</source> <source>1</source>
<translation type="unfinished"></translation> <translation>1</translation>
</message> </message>
<message> <message>
<location filename="../outputdialog.ui" line="122"/> <location filename="../outputdialog.ui" line="122"/>
<source>Name</source> <source>Name</source>
<translation type="unfinished"></translation> <translation>Имя</translation>
</message> </message>
<message> <message>
<location filename="../outputdialog.ui" line="127"/> <location filename="../outputdialog.ui" line="127"/>
<source>2</source> <source>2</source>
<translation type="unfinished"></translation> <translation>2</translation>
</message> </message>
<message> <message>
<location filename="../outputdialog.ui" line="132"/> <location filename="../outputdialog.ui" line="132"/>
<source>Price</source> <source>Price</source>
<translation type="unfinished"></translation> <translation>Цена</translation>
</message> </message>
<message> <message>
<location filename="../outputdialog.ui" line="137"/> <location filename="../outputdialog.ui" line="137"/>
<source>3</source> <source>3</source>
<translation type="unfinished"></translation> <translation>3</translation>
</message> </message>
<message> <message>
<location filename="../outputdialog.ui" line="142"/> <location filename="../outputdialog.ui" line="142"/>
<source>Quantity</source> <source>Quantity</source>
<translation type="unfinished"></translation> <translation>Количество</translation>
</message> </message>
<message> <message>
<location filename="../outputdialog.ui" line="147"/> <location filename="../outputdialog.ui" line="147"/>
<source>4</source> <source>4</source>
<translation type="unfinished"></translation> <translation>4</translation>
</message> </message>
<message> <message>
<location filename="../outputdialog.ui" line="152"/> <location filename="../outputdialog.ui" line="152"/>
<source>Net weight</source> <source>Net weight</source>
<translation type="unfinished"></translation> <translation>Масса нетто</translation>
</message> </message>
<message> <message>
<location filename="../outputdialog.ui" line="157"/> <location filename="../outputdialog.ui" line="157"/>
<source>5</source> <source>5</source>
<translation type="unfinished"></translation> <translation>5</translation>
</message> </message>
<message> <message>
<location filename="../outputdialog.ui" line="162"/> <location filename="../outputdialog.ui" line="162"/>
<source>Total price</source> <source>Total price</source>
<translation type="unfinished"></translation> <translation>Всего</translation>
</message> </message>
<message> <message>
<location filename="../outputdialog.ui" line="176"/> <location filename="../outputdialog.ui" line="176"/>
<source>Print total</source> <source>Print total</source>
<translation type="unfinished"></translation> <translation>Печатать Итого</translation>
</message>
</context>
<context>
<name>SettingsDialog</name>
<message>
<location filename="../settingsdialog.cpp" line="149"/>
<source>You need to restart program to apply language changes</source>
<translation>Требуется перезагрузить программу, чтобы применить изменения языка</translation>
</message>
<message>
<location filename="../settingsdialog.cpp" line="151"/>
<source>Restart required</source>
<translation>Требуется перезагрузка</translation>
</message> </message>
</context> </context>
<context> <context>
@ -294,17 +332,17 @@
<message> <message>
<location filename="../solvecaptchadialog.ui" line="14"/> <location filename="../solvecaptchadialog.ui" line="14"/>
<source>Dialog</source> <source>Dialog</source>
<translation type="unfinished"></translation> <translation>Диалог</translation>
</message> </message>
<message> <message>
<location filename="../solvecaptchadialog.cpp" line="23"/> <location filename="../solvecaptchadialog.cpp" line="23"/>
<source>Please, enter a valid captcha</source> <source>Please, enter a valid captcha</source>
<translation type="unfinished"></translation> <translation>Пожалуйста, введите верную капчу</translation>
</message> </message>
<message> <message>
<location filename="../solvecaptchadialog.cpp" line="25"/> <location filename="../solvecaptchadialog.cpp" line="25"/>
<source>No captcha</source> <source>No captcha</source>
<translation type="unfinished"></translation> <translation>Нет капчи</translation>
</message> </message>
</context> </context>
<context> <context>
@ -312,93 +350,108 @@
<message> <message>
<location filename="../settingsdialog.ui" line="14"/> <location filename="../settingsdialog.ui" line="14"/>
<source>Dialog</source> <source>Dialog</source>
<translation type="unfinished"></translation> <translation>Диалог</translation>
</message> </message>
<message> <message>
<location filename="../settingsdialog.ui" line="72"/> <location filename="../settingsdialog.ui" line="182"/>
<source>Goods name position</source> <source>Goods name position</source>
<translation type="unfinished"></translation> <translation>Позиция имени товара</translation>
</message> </message>
<message> <message>
<location filename="../settingsdialog.ui" line="79"/> <location filename="../settingsdialog.ui" line="234"/>
<source>Goods price per unit alias</source> <source>Goods price per unit alias</source>
<translation type="unfinished"></translation> <translation>Алиас цены товара</translation>
</message> </message>
<message> <message>
<location filename="../settingsdialog.ui" line="86"/> <location filename="../settingsdialog.ui" line="248"/>
<location filename="../settingsdialog.ui" line="217"/> <source>TextLabel</source>
<translation>Язык</translation>
</message>
<message>
<location filename="../settingsdialog.ui" line="256"/>
<source>en_US</source>
<translation>en_US</translation>
</message>
<message>
<location filename="../settingsdialog.ui" line="261"/>
<source>ru_RU</source>
<translation>ru_RU</translation>
</message>
<message>
<location filename="../settingsdialog.ui" line="224"/>
<location filename="../settingsdialog.ui" line="241"/>
<source>Choose</source> <source>Choose</source>
<translation type="unfinished"></translation> <translation>Выбрать</translation>
</message> </message>
<message> <message>
<location filename="../settingsdialog.ui" line="96"/> <location filename="../settingsdialog.ui" line="107"/>
<source>Print header</source> <source>Print header</source>
<translation type="unfinished"></translation> <translation>Печатать заголовок</translation>
</message> </message>
<message> <message>
<location filename="../settingsdialog.ui" line="103"/> <location filename="../settingsdialog.ui" line="150"/>
<source>Goods net weight alias</source> <source>Goods net weight alias</source>
<translation type="unfinished"></translation> <translation>Алиас массы нетто товара</translation>
</message> </message>
<message> <message>
<location filename="../settingsdialog.ui" line="110"/> <location filename="../settingsdialog.ui" line="83"/>
<source>Stores modules url</source> <source>Stores modules url</source>
<translation type="unfinished"></translation> <translation>URL модулей магазина</translation>
</message>
<message>
<location filename="../settingsdialog.ui" line="163"/>
<source>Goods total alias</source>
<translation>Алиас всего за продукт</translation>
</message>
<message>
<location filename="../settingsdialog.ui" line="196"/>
<source>Goods name alias</source>
<translation>Алиас имени товара</translation>
</message> </message>
<message> <message>
<location filename="../settingsdialog.ui" line="120"/> <location filename="../settingsdialog.ui" line="120"/>
<source>Goods total alias</source> <source>Goods quantity alias</source>
<translation type="unfinished"></translation> <translation>Алиас количества товара</translation>
</message>
<message>
<location filename="../settingsdialog.ui" line="210"/>
<source>Stores modules directory</source>
<translation>Директория модулей магазина</translation>
</message> </message>
<message> <message>
<location filename="../settingsdialog.ui" line="127"/> <location filename="../settingsdialog.ui" line="127"/>
<source>Goods name alias</source> <source>OFD modules directory</source>
<translation type="unfinished"></translation> <translation>Директория модулей ОФД</translation>
</message>
<message>
<location filename="../settingsdialog.ui" line="203"/>
<source>Goods price per unit position</source>
<translation>Позиция центы товара</translation>
</message>
<message>
<location filename="../settingsdialog.ui" line="73"/>
<source>Goods net weight position</source>
<translation>Позиция массы нетто товара</translation>
</message>
<message>
<location filename="../settingsdialog.ui" line="100"/>
<source>OFD modules url</source>
<translation>URL модулей ОФД</translation>
</message>
<message>
<location filename="../settingsdialog.ui" line="217"/>
<source>Goods total position</source>
<translation>Позиция всего за товар</translation>
</message>
<message>
<location filename="../settingsdialog.ui" line="90"/>
<source>Goods quantity position</source>
<translation>Позиция количества товара</translation>
</message> </message>
<message> <message>
<location filename="../settingsdialog.ui" line="137"/> <location filename="../settingsdialog.ui" line="137"/>
<source>Goods quantity alias</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../settingsdialog.ui" line="144"/>
<source>Stores modules directory</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../settingsdialog.ui" line="157"/>
<source>OFD modules directory</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../settingsdialog.ui" line="173"/>
<source>Goods price per unit position</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../settingsdialog.ui" line="180"/>
<source>Goods net weight position</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../settingsdialog.ui" line="187"/>
<source>OFD modules url</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../settingsdialog.ui" line="197"/>
<source>Goods total position</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../settingsdialog.ui" line="204"/>
<source>Goods quantity position</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../settingsdialog.ui" line="227"/>
<source>Print total</source> <source>Print total</source>
<translation type="unfinished"></translation> <translation>Печатать Итого</translation>
</message> </message>
</context> </context>
</TS> </TS>

View File

@ -124,6 +124,8 @@ Check parseOfdRuAnswer(std::string html) {
if ((products.size() + amounts.size() + prices.size()) == 0) { if ((products.size() + amounts.size() + prices.size()) == 0) {
if (html == "Bad Request4") { // Failed to solve a captcha if (html == "Bad Request4") { // Failed to solve a captcha
throw OfdRequestException("Incorrect captcha"); throw OfdRequestException("Incorrect captcha");
} else if (html.find("500 - Internal server error.") != std::string::npos) {
throw OfdRequestException("Internal server error");
} else { // Most likely that the check does not exist } else { // Most likely that the check does not exist
throw OfdRequestException("Does not exist"); throw OfdRequestException("Does not exist");
} }