fix: 按照截图录屏的方式翻译
Description: 按照截图录屏的方式翻译 Log: 按照截图录屏的方式翻译 Change-Id: I74c041e1647fed0da5b1598bf8ef28512415ef6e
This commit is contained in:
parent
fd31c9ef3a
commit
c2f16bd20e
|
@ -54,22 +54,24 @@ QT += dtkwidget
|
||||||
target.path=/usr/bin
|
target.path=/usr/bin
|
||||||
|
|
||||||
##翻译
|
##翻译
|
||||||
#isEmpty(TRANSLATIONS) {
|
isEmpty(TRANSLATIONS) {
|
||||||
# include(./translations.pri)
|
include(./translations.pri)
|
||||||
|
}
|
||||||
|
#CONFIG(release, debug|release) {
|
||||||
|
# TRANSLATIONS = $$files($$PWD/translations/*.ts)
|
||||||
|
# #遍历目录中的ts文件,调用lrelease将其生成为qm文件
|
||||||
|
# for(tsfile, TRANSLATIONS) {
|
||||||
|
# qmfile = $$replace(tsfile, .ts$, .qm)
|
||||||
|
# system(lrelease $$tsfile -qm $$qmfile) | error("Failed to lrelease")
|
||||||
|
# }
|
||||||
#}
|
#}
|
||||||
CONFIG(release, debug|release) {
|
|
||||||
TRANSLATIONS = $$files($$PWD/translations/*.ts)
|
|
||||||
#遍历目录中的ts文件,调用lrelease将其生成为qm文件
|
|
||||||
for(tsfile, TRANSLATIONS) {
|
|
||||||
qmfile = $$replace(tsfile, .ts$, .qm)
|
|
||||||
system(lrelease $$tsfile -qm $$qmfile) | error("Failed to lrelease")
|
|
||||||
}
|
|
||||||
}
|
|
||||||
TRANSLATIONS_COMPILED = $$TRANSLATIONS
|
TRANSLATIONS_COMPILED = $$TRANSLATIONS
|
||||||
TRANSLATIONS_COMPILED ~= s/\.ts/.qm/g
|
TRANSLATIONS_COMPILED ~= s/\.ts/.qm/g
|
||||||
|
|
||||||
translations.path=/usr/share/deepin-ocr/translations
|
translations.path=/usr/share/deepin-ocr/translations
|
||||||
#translations.files=$$TRANSLATIONS_COMPILED
|
translations.files = $$TRANSLATIONS_COMPILED
|
||||||
translations.files=$$PWD/translations/*qm
|
|
||||||
|
#translations.files=$$PWD/translations/*qm
|
||||||
|
|
||||||
#Dbus文件
|
#Dbus文件
|
||||||
dbus_service.path=/usr/share/dbus-1/services
|
dbus_service.path=/usr/share/dbus-1/services
|
||||||
|
@ -81,6 +83,21 @@ tesslangs.files=./assets/tesslangs/chi_sim.traineddata ./assets/tesslangs/chi_tr
|
||||||
|
|
||||||
INSTALLS += target dbus_service translations tesslangs
|
INSTALLS += target dbus_service translations tesslangs
|
||||||
|
|
||||||
|
CONFIG *= update_translations release_translations
|
||||||
|
|
||||||
|
CONFIG(update_translations) {
|
||||||
|
isEmpty(lupdate):lupdate=lupdate
|
||||||
|
system($$lupdate -no-obsolete -locations none $$_PRO_FILE_)
|
||||||
|
}
|
||||||
|
|
||||||
|
CONFIG(release_translations) {
|
||||||
|
isEmpty(lrelease):lrelease=lrelease
|
||||||
|
system($$lrelease $$_PRO_FILE_)
|
||||||
|
}
|
||||||
|
|
||||||
|
DSR_LANG_PATH += $$DSRDIR/translations
|
||||||
|
DEFINES += "DSR_LANG_PATH=\\\"$$DSR_LANG_PATH\\\""
|
||||||
|
|
||||||
RESOURCES += \
|
RESOURCES += \
|
||||||
resource.qrc
|
resource.qrc
|
||||||
|
|
||||||
|
|
|
@ -1,25 +1,6 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<!DOCTYPE TS>
|
<!DOCTYPE TS>
|
||||||
<TS version="2.1" language="zh_CN">
|
<TS version="2.1" language="zh_CN">
|
||||||
<context>
|
|
||||||
<name>ImageView</name>
|
|
||||||
<message>
|
|
||||||
<source>Save Image</source>
|
|
||||||
<translation type="vanished">保存图片</translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<source>Open File</source>
|
|
||||||
<translation type="vanished">打开文件</translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<source>error</source>
|
|
||||||
<translation type="vanished">错误</translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<source>open file error</source>
|
|
||||||
<translation type="vanished">打开文件错误</translation>
|
|
||||||
</message>
|
|
||||||
</context>
|
|
||||||
<context>
|
<context>
|
||||||
<name>MainWidget</name>
|
<name>MainWidget</name>
|
||||||
<message>
|
<message>
|
||||||
|
|
Loading…
Reference in New Issue
Block a user