From f2bf3bc0d4cabed1a4f6d74e6d3902313181963f Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E6=81=8D=E5=85=AE=E6=83=9A=E5=85=AE?=
<101191390+HIllya51@users.noreply.github.com>
Date: Wed, 19 Jun 2024 22:42:38 +0800
Subject: [PATCH] verygood
---
.../LunaTranslator/gui/inputdialog.py | 2 +-
.../textbrowser/{faguang.py => yinying.py} | 4 +-
.../rendertext/internal/webview/base.py | 73 ++++++++++++++
.../rendertext/internal/webview/faguang.py | 25 -----
.../rendertext/internal/webview/miaobian0.py | 18 ++++
.../rendertext/internal/webview/miaobian1.py | 37 +++++++
.../rendertext/internal/webview/miaobian2.py | 8 ++
.../rendertext/internal/webview/normal.py | 28 +++---
.../rendertext/internal/webview/yinying.py | 24 +++++
.../rendertext/somefunctions.py | 4 +-
.../LunaTranslator/rendertext/webview.py | 79 +++++++++------
.../files/defaultconfig/config.json | 96 +++++++++++++++++--
LunaTranslator/files/lang/ar.json | 5 +-
LunaTranslator/files/lang/cht.json | 5 +-
LunaTranslator/files/lang/en.json | 5 +-
LunaTranslator/files/lang/es.json | 5 +-
LunaTranslator/files/lang/fr.json | 5 +-
LunaTranslator/files/lang/it.json | 5 +-
LunaTranslator/files/lang/ja.json | 5 +-
LunaTranslator/files/lang/ko.json | 5 +-
LunaTranslator/files/lang/pl.json | 5 +-
LunaTranslator/files/lang/ru.json | 5 +-
LunaTranslator/files/lang/th.json | 5 +-
LunaTranslator/files/lang/tr.json | 5 +-
LunaTranslator/files/lang/uk.json | 5 +-
LunaTranslator/files/lang/vi.json | 5 +-
LunaTranslator/files/lang/zh.json | 5 +-
plugins/CMakeLists.txt | 4 +-
28 files changed, 347 insertions(+), 130 deletions(-)
rename LunaTranslator/LunaTranslator/rendertext/internal/textbrowser/{faguang.py => yinying.py} (70%)
create mode 100644 LunaTranslator/LunaTranslator/rendertext/internal/webview/base.py
delete mode 100644 LunaTranslator/LunaTranslator/rendertext/internal/webview/faguang.py
create mode 100644 LunaTranslator/LunaTranslator/rendertext/internal/webview/miaobian0.py
create mode 100644 LunaTranslator/LunaTranslator/rendertext/internal/webview/miaobian1.py
create mode 100644 LunaTranslator/LunaTranslator/rendertext/internal/webview/miaobian2.py
create mode 100644 LunaTranslator/LunaTranslator/rendertext/internal/webview/yinying.py
diff --git a/LunaTranslator/LunaTranslator/gui/inputdialog.py b/LunaTranslator/LunaTranslator/gui/inputdialog.py
index 95cabd4f..d5b46f1c 100644
--- a/LunaTranslator/LunaTranslator/gui/inputdialog.py
+++ b/LunaTranslator/LunaTranslator/gui/inputdialog.py
@@ -328,7 +328,7 @@ class multicolorset(QDialog):
self.resize(QSize(300, 10))
formLayout = QFormLayout(self) # 配置layout
_hori = QHBoxLayout()
- l = QLabel(_TR("透明度"))
+ l = QLabel(_TR("不透明度"))
_hori.addWidget(l)
_s = FocusSpin()
_s.setValue(globalconfig["showcixing_touming"])
diff --git a/LunaTranslator/LunaTranslator/rendertext/internal/textbrowser/faguang.py b/LunaTranslator/LunaTranslator/rendertext/internal/textbrowser/yinying.py
similarity index 70%
rename from LunaTranslator/LunaTranslator/rendertext/internal/textbrowser/faguang.py
rename to LunaTranslator/LunaTranslator/rendertext/internal/textbrowser/yinying.py
index 19045051..59fb6908 100644
--- a/LunaTranslator/LunaTranslator/rendertext/internal/textbrowser/faguang.py
+++ b/LunaTranslator/LunaTranslator/rendertext/internal/textbrowser/yinying.py
@@ -9,5 +9,7 @@ class TextLine(TextLabel_0):
def setShadow(self):
font = self.font()
self.setShadow_internal(
- self.basecolor, font.pointSizeF(), self.config["shadowforce"]
+ self.basecolor,
+ font.pointSizeF() * self.config["shadowR"],
+ self.config["shadowforce"],
)
diff --git a/LunaTranslator/LunaTranslator/rendertext/internal/webview/base.py b/LunaTranslator/LunaTranslator/rendertext/internal/webview/base.py
new file mode 100644
index 00000000..e3b3009a
--- /dev/null
+++ b/LunaTranslator/LunaTranslator/rendertext/internal/webview/base.py
@@ -0,0 +1,73 @@
+from qtsymbols import *
+from myutils.config import globalconfig
+from dataclasses import dataclass
+import uuid
+
+
+@dataclass
+class datas:
+ font_family: str
+ font_size: float
+ bold: bool
+ atcenter: bool
+ color: str
+ extra_space: float
+
+
+class base:
+
+ @property
+ def config(self):
+ return globalconfig["rendertext"]["webview"][self.typename].get("args", {})
+
+ def __init__(self, typename, webview, parent) -> None:
+ self.typename = typename
+ self.parent = parent
+ self.webview = webview
+
+ def gen_html__(
+ self, text, font_family, font_size, bold, atcenter, color, extra_space
+ ):
+ self.data_ = datas(font_family, font_size, bold, atcenter, color, extra_space)
+ return self.gen_html(text, self.data_)
+
+ def gen_html(self, text, data: datas):
+ raise
+
+ def eval(self, js):
+ self.parent.testeval(js)
+
+ def bind(self, name, func):
+ self.webview.bind(name, func)
+
+ def measureH(self, font_family, font_size):
+ font = QFont(font_family, font_size)
+ fmetrics = QFontMetrics(font)
+
+ return fmetrics.height()
+
+ @property
+ def line_height(self):
+ if self.data_.extra_space == 0:
+ return ""
+ else:
+ return f"line-height: {self.measureH(self.data_.font_family,self.data_.font_size)+self.data_.extra_space}px;"
+
+ @property
+ def align(self):
+ align = "text-align: center;" if self.data_.atcenter else ""
+ return align
+
+ @property
+ def fontinfo(self):
+ bold = "font-weight: bold;" if self.data_.bold else ""
+ fms = f"font-family: {self.data_.font_family};font-size: {self.data_.font_size}pt;"
+ return fms + bold
+
+ def getuid(self):
+ _id = f"luna_{uuid.uuid4()}"
+ return _id
+
+ def makedivstyle(self, _id, inner, style):
+
+ return f'
{inner}
'
diff --git a/LunaTranslator/LunaTranslator/rendertext/internal/webview/faguang.py b/LunaTranslator/LunaTranslator/rendertext/internal/webview/faguang.py
deleted file mode 100644
index afcf6ccd..00000000
--- a/LunaTranslator/LunaTranslator/rendertext/internal/webview/faguang.py
+++ /dev/null
@@ -1,25 +0,0 @@
-from qtsymbols import *
-import uuid
-
-
-def gen_html(configs, text, fm, fs, bold, atcenter, color, extra_space):
- align = "text-align: center;" if atcenter else ""
- bold = "font-weight: bold;" if bold else ""
- _id = f"luna_{uuid.uuid4()}"
- ntimes = ""
- for i in range(configs["shadowforce"]):
- ntimes += f"0px 0px {fs*0.4}px {color}"
- if i == configs["shadowforce"] - 1:
- ntimes += ";"
- else:
- ntimes += ","
- style = f""""""
- return style + f'{text}
'
diff --git a/LunaTranslator/LunaTranslator/rendertext/internal/webview/miaobian0.py b/LunaTranslator/LunaTranslator/rendertext/internal/webview/miaobian0.py
new file mode 100644
index 00000000..5d5dccb2
--- /dev/null
+++ b/LunaTranslator/LunaTranslator/rendertext/internal/webview/miaobian0.py
@@ -0,0 +1,18 @@
+from qtsymbols import *
+from rendertext.internal.webview.base import base, datas
+
+
+class TextLine(base):
+
+ def gen_html(self, text, data: datas):
+ _id = self.getuid()
+
+ style = f"""#{_id}{{
+ {self.fontinfo}
+ color:{self.config["fillcolor"]};
+ {self.align}
+ {self.line_height}
+ -webkit-text-stroke: {self.config['width']}px {data.color};
+ }}
+ """
+ return self.makedivstyle(_id, text, style)
diff --git a/LunaTranslator/LunaTranslator/rendertext/internal/webview/miaobian1.py b/LunaTranslator/LunaTranslator/rendertext/internal/webview/miaobian1.py
new file mode 100644
index 00000000..510e1707
--- /dev/null
+++ b/LunaTranslator/LunaTranslator/rendertext/internal/webview/miaobian1.py
@@ -0,0 +1,37 @@
+from qtsymbols import *
+from rendertext.internal.webview.base import base, datas
+
+
+class TextLine(base):
+
+ def colorpair(self, color):
+ return self.config["fillcolor"], color
+
+ def gen_html(self, text, data: datas):
+ c1, c2 = self.colorpair(data.color)
+ _id = self.getuid()
+ _text = text.replace('"', '\\"')
+
+ style = f"""#{_id} .text{{
+ {self.fontinfo}
+ {self.align}
+ {self.line_height}
+ }}
+ #{_id} .stroke {{
+ -webkit-text-stroke: {self.config['width']}px {c1};
+ position: relative;
+ }}
+ #{_id} .stroke::after {{
+ content: "{_text}";
+ color: {c2};
+ position: absolute;
+ left: 0;
+ right: 0;
+ top: 0;
+ -webkit-text-stroke-width: 0;
+ }}
+ """
+ text = f"""
+ {text}
+
"""
+ return self.makedivstyle(_id, text, style)
diff --git a/LunaTranslator/LunaTranslator/rendertext/internal/webview/miaobian2.py b/LunaTranslator/LunaTranslator/rendertext/internal/webview/miaobian2.py
new file mode 100644
index 00000000..1bed9c87
--- /dev/null
+++ b/LunaTranslator/LunaTranslator/rendertext/internal/webview/miaobian2.py
@@ -0,0 +1,8 @@
+from qtsymbols import *
+from rendertext.internal.webview.miaobian1 import TextLine as TL1
+
+
+class TextLine(TL1):
+
+ def colorpair(self, color):
+ return color, self.config["fillcolor"]
diff --git a/LunaTranslator/LunaTranslator/rendertext/internal/webview/normal.py b/LunaTranslator/LunaTranslator/rendertext/internal/webview/normal.py
index b3125fd9..7e9e1f28 100644
--- a/LunaTranslator/LunaTranslator/rendertext/internal/webview/normal.py
+++ b/LunaTranslator/LunaTranslator/rendertext/internal/webview/normal.py
@@ -1,19 +1,17 @@
from qtsymbols import *
-import uuid
+from rendertext.internal.webview.base import base, datas
-def gen_html(configs, text, fm, fs, bold, atcenter, color, extra_space):
- align = "text-align: center;" if atcenter else ""
- bold = "font-weight: bold;" if bold else ""
- _id = f"luna_{uuid.uuid4()}"
- style = f""""""
+class TextLine(base):
- return style + f'{text}
'
+ def gen_html(self, text, data: datas):
+ _id = self.getuid()
+
+ style = f"""#{_id}{{
+ {self.fontinfo}
+ color:{data.color};
+ {self.align}
+ {self.line_height}
+ }}
+ """
+ return self.makedivstyle(_id, text, style)
diff --git a/LunaTranslator/LunaTranslator/rendertext/internal/webview/yinying.py b/LunaTranslator/LunaTranslator/rendertext/internal/webview/yinying.py
new file mode 100644
index 00000000..ea4af704
--- /dev/null
+++ b/LunaTranslator/LunaTranslator/rendertext/internal/webview/yinying.py
@@ -0,0 +1,24 @@
+from qtsymbols import *
+from rendertext.internal.webview.base import base, datas
+
+
+class TextLine(base):
+
+ def gen_html(self, text, data: datas):
+ _id = self.getuid()
+ ntimes = ""
+ for i in range(self.config["shadowforce"]):
+ ntimes += f"0px 0px {data.font_size*self.config['shadowR']}px {data.color}"
+ if i == self.config["shadowforce"] - 1:
+ ntimes += ";"
+ else:
+ ntimes += ","
+ style = f"""#{_id}{{
+ {self.fontinfo}
+ color:{self.config['fillcolor']};
+ text-shadow:{ntimes};
+ {self.align}
+ {self.line_height}
+ }}
+ """
+ return self.makedivstyle(_id, text, style)
diff --git a/LunaTranslator/LunaTranslator/rendertext/somefunctions.py b/LunaTranslator/LunaTranslator/rendertext/somefunctions.py
index fcf2e604..7542417e 100644
--- a/LunaTranslator/LunaTranslator/rendertext/somefunctions.py
+++ b/LunaTranslator/LunaTranslator/rendertext/somefunctions.py
@@ -17,13 +17,11 @@ class dataget:
pass
return (c.red(), c.green(), c.blue(), globalconfig["showcixing_touming"] / 100)
- def _randomcolor(self, word, ignorealpha=False):
+ def _randomcolor(self, word):
color = self._randomcolor_1(word)
if not color:
return None
r, g, b, a = color
- if ignorealpha:
- a = 1
return f"rgba({r}, {g}, {b}, {a})"
def _getfontinfo(self, origin):
diff --git a/LunaTranslator/LunaTranslator/rendertext/webview.py b/LunaTranslator/LunaTranslator/rendertext/webview.py
index 93837f73..22f96f78 100644
--- a/LunaTranslator/LunaTranslator/rendertext/webview.py
+++ b/LunaTranslator/LunaTranslator/rendertext/webview.py
@@ -96,7 +96,7 @@ class TextBrowser(QWidget, dataget):
)
def internalheighchange(self):
- self.testeval(
+ self.webivewwidget.webview.eval(
f'calllunaheightchange(document.getElementById("{self.rootdivid}").offsetHeight)'
)
@@ -132,64 +132,87 @@ class TextBrowser(QWidget, dataget):
def gen_html(self, *args):
currenttype = globalconfig["rendertext_using_internal"]["webview"]
- configs = globalconfig["rendertext"]["webview"][currenttype].get("args", {})
try:
__ = importlib.import_module(f"rendertext.internal.webview.{currenttype}")
except:
+ from traceback import print_exc
+
+ print_exc()
globalconfig["rendertext_using_internal"]["webview"] = currenttype = list(
globalconfig["rendertext"]["webview"].keys()
)[0]
__ = importlib.import_module(f"rendertext.internal.webview.{currenttype}")
- return __.gen_html(configs, *args)
+ return __.TextLine(currenttype, self.webivewwidget.webview, self).gen_html__(
+ *args
+ )
def _webview_append(self, _id, origin, atcenter, text, tag, flags, color):
text = text.replace("\n", "
").replace("\\", "\\\\")
+
+ fmori, fsori, boldori = self._getfontinfo(origin)
+ fmkana, fskana, boldkana = self._getfontinfo_kana()
+ kanacolor = self._getkanacolor()
if len(tag):
+ rb, rb2 = "", ""
isshowhira, isshow_fenci, isfenciclick = flags
- fm, fskana, bold = self._getfontinfo_kana()
- kanacolor = self._getkanacolor()
if isshowhira:
- rb, rb2, rt, rt2 = "", "", ""
+ rt, rt2 = ""
else:
- rb, rb2, rt, rt2 = "", "", "", ""
+ rt, rt2 = "", ""
text = rb
for word in tag:
- color1 = self._randomcolor(word, ignorealpha=True)
- if isshow_fenci and color1:
- style = f' style="color: {color1};" '
- else:
- style = ""
+ if word["orig"] == "\n":
+ text = text + rb2 + "
" + rb
+ continue
if isfenciclick:
click = f'''onclick="calllunaclickedword('{quote(json.dumps(word))}')"'''
else:
click = ""
- if word["orig"] == "\n":
- text = text + rb2 + "
" + rb
- continue
- text += (
- f""""""
- + word["orig"].replace("\\", "\\\\")
- + "
"
+ _maskid = f"luna_{uuid.uuid4()}"
+ textori = word["orig"].replace("\\", "\\\\")
+ textori = self.gen_html(
+ textori,
+ fmori,
+ fsori,
+ boldori,
+ atcenter,
+ color,
+ globalconfig["extra_space"],
)
+ text += f"""""" + textori + "
"
+ if isshow_fenci:
+ color1 = self._randomcolor(word)
+ _style = f"""
+ """
+ text += _style
if (word["orig"] != word["hira"]) and isshowhira:
inner = self.gen_html(
- word["hira"],
- fm,
+ word["hira"].replace("\\", "\\\\"),
+ fmkana,
fskana,
- bold,
+ boldkana,
True,
kanacolor,
- globalconfig["extra_space"],
+ 0,
)
else:
inner = ""
text += rt + inner + rt2
text = text + rb2
-
- fm, fs, bold = self._getfontinfo(origin)
- text = self.gen_html(
- text, fm, fs, bold, atcenter, color, globalconfig["extra_space"]
- )
+ if atcenter:
+ text = f'{text}
'
+ else:
+ text = self.gen_html(
+ text,
+ fmori,
+ fsori,
+ boldori,
+ atcenter,
+ color,
+ globalconfig["extra_space"],
+ )
self.testeval(f"document.getElementById(`{_id}`).innerHTML=`{text}`")
self.internalheighchange()
diff --git a/LunaTranslator/files/defaultconfig/config.json b/LunaTranslator/files/defaultconfig/config.json
index c2a0c9f9..c05f5dab 100644
--- a/LunaTranslator/files/defaultconfig/config.json
+++ b/LunaTranslator/files/defaultconfig/config.json
@@ -20,19 +20,20 @@
"primitivtemetaorigin": "vid",
"rendertext_using": "textbrowser",
"rendertext_using_internal": {
- "webview": "faguang",
- "textbrowser": "faguang"
+ "webview": "yinying",
+ "textbrowser": "yinying"
},
"rendertext": {
"webview": {
"normal": {
"name": "普通字体"
},
- "faguang": {
- "name": "发光字体",
+ "yinying": {
+ "name": "阴影字体",
"args": {
"fillcolor": "#eeeeee",
- "shadowforce": 5
+ "shadowforce": 5,
+ "shadowR": 0.4
},
"argstype": {
"fillcolor": {
@@ -40,11 +41,78 @@
"type": "colorselect"
},
"shadowforce": {
- "name": "发光亮度",
+ "name": "阴影强度",
"type": "intspin",
"min": 1,
"max": 100,
"step": 1
+ },
+ "shadowR": {
+ "name": "阴影半径_倍率",
+ "type": "spin",
+ "min": 0.1,
+ "max": 10,
+ "step": 0.1
+ }
+ }
+ },
+ "miaobian0": {
+ "name": "描边字体_1",
+ "args": {
+ "fillcolor": "#eeeeee",
+ "width": 3
+ },
+ "argstype": {
+ "fillcolor": {
+ "name": "填充颜色",
+ "type": "colorselect"
+ },
+ "width": {
+ "name": "描边宽度",
+ "type": "spin",
+ "min": 0.1,
+ "max": 100,
+ "step": 0.1
+ }
+ }
+ },
+ "miaobian1": {
+ "name": "描边字体_2",
+ "args": {
+ "fillcolor": "#eeeeee",
+ "width": 3
+ },
+ "argstype": {
+ "fillcolor": {
+ "name": "填充颜色",
+ "type": "colorselect"
+ },
+ "width": {
+ "name": "描边宽度",
+ "type": "spin",
+ "min": 0.1,
+ "max": 100,
+ "step": 0.1
+ }
+ }
+ },
+ "miaobian2": {
+ "name": "描边字体_3",
+ "args": {
+ "fillcolor": "#eeeeee",
+ "width": 3
+ },
+ "argstype": {
+ "fillcolor": {
+ "name": "填充颜色",
+ "type": "colorselect"
+ },
+ "width": {
+ "name": "描边宽度",
+ "type": "spin",
+ "min": 0.1,
+ "max": 100,
+ "step": 0.1
}
}
}
@@ -113,11 +181,12 @@
}
}
},
- "faguang": {
- "name": "发光字体",
+ "yinying": {
+ "name": "阴影字体",
"args": {
"fillcolor": "#eeeeee",
- "shadowforce": 5
+ "shadowforce": 5,
+ "shadowR":1
},
"argstype": {
"fillcolor": {
@@ -125,11 +194,18 @@
"type": "colorselect"
},
"shadowforce": {
- "name": "发光亮度",
+ "name": "阴影强度",
"type": "intspin",
"min": 1,
"max": 100,
"step": 1
+ },
+ "shadowR": {
+ "name": "阴影半径_倍率",
+ "type": "spin",
+ "min": 0.1,
+ "max": 10,
+ "step": 0.1
}
}
}
diff --git a/LunaTranslator/files/lang/ar.json b/LunaTranslator/files/lang/ar.json
index 831a9d08..39953724 100644
--- a/LunaTranslator/files/lang/ar.json
+++ b/LunaTranslator/files/lang/ar.json
@@ -705,8 +705,6 @@
"百度OCR": "بايدو التعرف الضوئي على الحروف",
"飞书OCR": "كتاب الطيران التعرف الضوئي على الحروف",
"讯飞OCR": "التعرف الضوئي على الحروف",
- "发光字体": "خط الانارة",
- "发光亮度": "سطوع مضيئة",
"最大缓冲区长度": "أقصى طول المخزن المؤقت",
"最大缓存文本长度": "أقصى طول النص مخبأ",
"半径": "نصف قطر",
@@ -793,5 +791,6 @@
"兼容接口": "واجهة متوافقة",
"调试浏览器": "تصحيح المتصفح",
"手动翻译": "دليل الترجمة",
- "显示引擎": "عرض المحرك"
+ "显示引擎": "عرض المحرك",
+ "阴影字体": "خطوط الظل"
}
\ No newline at end of file
diff --git a/LunaTranslator/files/lang/cht.json b/LunaTranslator/files/lang/cht.json
index 8b88b04d..068e4b40 100644
--- a/LunaTranslator/files/lang/cht.json
+++ b/LunaTranslator/files/lang/cht.json
@@ -705,8 +705,6 @@
"百度OCR": "百度OCR",
"飞书OCR": "飛書OCR",
"讯飞OCR": "訊飛OCR",
- "发光字体": "發光字體",
- "发光亮度": "發光亮度",
"最大缓冲区长度": "最大緩衝區長度",
"最大缓存文本长度": "最大緩存文字長度",
"半径": "半徑",
@@ -793,5 +791,6 @@
"兼容接口": "相容介面",
"调试浏览器": "調試瀏覽器",
"手动翻译": "手動翻譯",
- "显示引擎": "顯示引擎"
+ "显示引擎": "顯示引擎",
+ "阴影字体": "陰影字體"
}
\ No newline at end of file
diff --git a/LunaTranslator/files/lang/en.json b/LunaTranslator/files/lang/en.json
index b4deebfe..61069157 100644
--- a/LunaTranslator/files/lang/en.json
+++ b/LunaTranslator/files/lang/en.json
@@ -705,8 +705,6 @@
"百度OCR": "Baidu OCR",
"飞书OCR": "Feishu OCR",
"讯飞OCR": "IFlytek OCR",
- "发光字体": "Luminous font",
- "发光亮度": "luminance",
"最大缓冲区长度": "Maximum buffer length",
"最大缓存文本长度": "Maximum cached text length",
"半径": "radius",
@@ -793,5 +791,6 @@
"兼容接口": "Compatible interface",
"调试浏览器": "Debugging browser",
"手动翻译": "Manual translation",
- "显示引擎": "Display Engine"
+ "显示引擎": "Display Engine",
+ "阴影字体": "Shadow font"
}
\ No newline at end of file
diff --git a/LunaTranslator/files/lang/es.json b/LunaTranslator/files/lang/es.json
index e5fb5573..8a0929c5 100644
--- a/LunaTranslator/files/lang/es.json
+++ b/LunaTranslator/files/lang/es.json
@@ -705,8 +705,6 @@
"百度OCR": "Baidu OCR",
"飞书OCR": "Flying Book OCR",
"讯飞OCR": "IFLYTEK OCR",
- "发光字体": "Fuente luminosa",
- "发光亮度": "Brillo luminoso",
"最大缓冲区长度": "Longitud máxima de la zona de amortiguación",
"最大缓存文本长度": "Longitud máxima del texto en caché",
"半径": "Radio",
@@ -793,5 +791,6 @@
"兼容接口": "Interfaz compatible",
"调试浏览器": "Depurar el navegador",
"手动翻译": "Traducción manual",
- "显示引擎": "Motor de visualización"
+ "显示引擎": "Motor de visualización",
+ "阴影字体": "Fuente de sombra"
}
\ No newline at end of file
diff --git a/LunaTranslator/files/lang/fr.json b/LunaTranslator/files/lang/fr.json
index 20470e52..2b8c2af4 100644
--- a/LunaTranslator/files/lang/fr.json
+++ b/LunaTranslator/files/lang/fr.json
@@ -705,8 +705,6 @@
"百度OCR": "Baidu ocr",
"飞书OCR": "Livre volant ocr",
"讯飞OCR": "OCR volant",
- "发光字体": "Polices lumineuses",
- "发光亮度": "Luminosité lumineuse",
"最大缓冲区长度": "Longueur maximale du tampon",
"最大缓存文本长度": "Longueur maximale du texte mis en cache",
"半径": "Rayon",
@@ -793,5 +791,6 @@
"兼容接口": "Interface compatible",
"调试浏览器": "Déboguer le Navigateur",
"手动翻译": "Traduction manuelle",
- "显示引擎": "Moteur d'affichage"
+ "显示引擎": "Moteur d'affichage",
+ "阴影字体": "Shadow font"
}
\ No newline at end of file
diff --git a/LunaTranslator/files/lang/it.json b/LunaTranslator/files/lang/it.json
index d2679ae5..de4534a4 100644
--- a/LunaTranslator/files/lang/it.json
+++ b/LunaTranslator/files/lang/it.json
@@ -705,8 +705,6 @@
"百度OCR": "OCR Baidu",
"飞书OCR": "OCR Feishu",
"讯飞OCR": "OCR IFlytek",
- "发光字体": "Carattere luminoso",
- "发光亮度": "luminanza",
"最大缓冲区长度": "Lunghezza massima del buffer",
"最大缓存文本长度": "Lunghezza massima del testo memorizzato nella cache",
"半径": "raggio",
@@ -793,5 +791,6 @@
"兼容接口": "Interfaccia compatibile",
"调试浏览器": "Browser di debug",
"手动翻译": "Traduzione manuale",
- "显示引擎": "Motore di visualizzazione"
+ "显示引擎": "Motore di visualizzazione",
+ "阴影字体": "Carattere ombra"
}
\ No newline at end of file
diff --git a/LunaTranslator/files/lang/ja.json b/LunaTranslator/files/lang/ja.json
index 1d490d75..d0f31c74 100644
--- a/LunaTranslator/files/lang/ja.json
+++ b/LunaTranslator/files/lang/ja.json
@@ -705,8 +705,6 @@
"百度OCR": "百度OCR",
"飞书OCR": "フライブックOCR",
"讯飞OCR": "アイフライテックOCR",
- "发光字体": "発光フォント",
- "发光亮度": "発光輝度",
"最大缓冲区长度": "最大バッファ長",
"最大缓存文本长度": "最大キャッシュテキスト長",
"半径": "半径はんけい",
@@ -793,5 +791,6 @@
"兼容接口": "互換インタフェース",
"调试浏览器": "デバッグブラウザ",
"手动翻译": "手動翻訳",
- "显示引擎": "ディスプレイエンジン"
+ "显示引擎": "ディスプレイエンジン",
+ "阴影字体": "シャドウフォント"
}
\ No newline at end of file
diff --git a/LunaTranslator/files/lang/ko.json b/LunaTranslator/files/lang/ko.json
index 288a7c59..ebfe6e31 100644
--- a/LunaTranslator/files/lang/ko.json
+++ b/LunaTranslator/files/lang/ko.json
@@ -705,8 +705,6 @@
"百度OCR": "바이두 OCR",
"飞书OCR": "페이서 OCR",
"讯飞OCR": "아이플라이테크 OCR",
- "发光字体": "발광 글꼴",
- "发光亮度": "광도",
"最大缓冲区长度": "최대 버퍼 길이",
"最大缓存文本长度": "최대 캐시 텍스트 길이",
"半径": "반지름",
@@ -793,5 +791,6 @@
"兼容接口": "호환 인터페이스",
"调试浏览器": "디버그 브라우저",
"手动翻译": "수동 번역",
- "显示引擎": "디스플레이 엔진"
+ "显示引擎": "디스플레이 엔진",
+ "阴影字体": "그림자 글꼴"
}
\ No newline at end of file
diff --git a/LunaTranslator/files/lang/pl.json b/LunaTranslator/files/lang/pl.json
index 7f313aa9..b5febdd0 100644
--- a/LunaTranslator/files/lang/pl.json
+++ b/LunaTranslator/files/lang/pl.json
@@ -705,8 +705,6 @@
"百度OCR": "OCR Baidu",
"飞书OCR": "OCR Feishu",
"讯飞OCR": "OCR IFlytek",
- "发光字体": "Jasna czcionka",
- "发光亮度": "luminancja",
"最大缓冲区长度": "Maksymalna długość bufora",
"最大缓存文本长度": "Maksymalna długość buforowanego tekstu",
"半径": "promień",
@@ -793,5 +791,6 @@
"兼容接口": "Kompatybilny interfejs",
"调试浏览器": "Debugowanie przeglądarki",
"手动翻译": "Tłumaczenie ręczne",
- "显示引擎": "Silnik wyświetlania"
+ "显示引擎": "Silnik wyświetlania",
+ "阴影字体": "Czcionka cienia"
}
\ No newline at end of file
diff --git a/LunaTranslator/files/lang/ru.json b/LunaTranslator/files/lang/ru.json
index 783f92e1..971f313f 100644
--- a/LunaTranslator/files/lang/ru.json
+++ b/LunaTranslator/files/lang/ru.json
@@ -705,8 +705,6 @@
"百度OCR": "Сотня OCR",
"飞书OCR": "Летающая книга OCR",
"讯飞OCR": "Сигнал OCR",
- "发光字体": "Светящийся шрифт",
- "发光亮度": "Светимость",
"最大缓冲区长度": "Максимальная длина буфера",
"最大缓存文本长度": "Максимальная длина текста кэша",
"半径": "Радиус",
@@ -793,5 +791,6 @@
"兼容接口": "Совместимый интерфейс",
"调试浏览器": "Отладка браузера",
"手动翻译": "Ручной перевод",
- "显示引擎": "Показать движок"
+ "显示引擎": "Показать движок",
+ "阴影字体": "Шрифт теней"
}
\ No newline at end of file
diff --git a/LunaTranslator/files/lang/th.json b/LunaTranslator/files/lang/th.json
index 65dbeac3..9370eabe 100644
--- a/LunaTranslator/files/lang/th.json
+++ b/LunaTranslator/files/lang/th.json
@@ -705,8 +705,6 @@
"百度OCR": "ไป่ตู้ OCR",
"飞书OCR": "หนังสือบิน OCR",
"讯飞OCR": "โปรแกรม iFlytek OCR",
- "发光字体": "Luminous ตัวอักษร",
- "发光亮度": "ความสว่างส่องสว่าง",
"最大缓冲区长度": "ความยาวบัฟเฟอร์สูงสุด",
"最大缓存文本长度": "ความยาวสูงสุดของข้อความแคช",
"半径": "รัศมี",
@@ -793,5 +791,6 @@
"兼容接口": "อินเตอร์เฟซที่เข้ากันได้",
"调试浏览器": "ดีบักเบราว์เซอร์",
"手动翻译": "การแปลด้วยตนเอง",
- "显示引擎": "แสดงเครื่องยนต์"
+ "显示引擎": "แสดงเครื่องยนต์",
+ "阴影字体": "Shadow ตัวอักษร"
}
\ No newline at end of file
diff --git a/LunaTranslator/files/lang/tr.json b/LunaTranslator/files/lang/tr.json
index eb01fb99..079f8e86 100644
--- a/LunaTranslator/files/lang/tr.json
+++ b/LunaTranslator/files/lang/tr.json
@@ -705,8 +705,6 @@
"百度OCR": "Baidu OCR",
"飞书OCR": "Feishu OCR",
"讯飞OCR": "IFlytek OCR",
- "发光字体": "Açık yazıtipi",
- "发光亮度": "ışık",
"最大缓冲区长度": "Azamik buffer uzunluğu",
"最大缓存文本长度": "Maximum cached text length",
"半径": "radius",
@@ -793,5 +791,6 @@
"兼容接口": "Kompatibil arayüz",
"调试浏览器": "Hata ayıklama tarayıcısı",
"手动翻译": "Elle çevirim",
- "显示引擎": "Gösterim Motoru"
+ "显示引擎": "Gösterim Motoru",
+ "阴影字体": "Gölge yazıtipi"
}
\ No newline at end of file
diff --git a/LunaTranslator/files/lang/uk.json b/LunaTranslator/files/lang/uk.json
index 62efb24d..80ff98a3 100644
--- a/LunaTranslator/files/lang/uk.json
+++ b/LunaTranslator/files/lang/uk.json
@@ -705,8 +705,6 @@
"百度OCR": "Baidu OCR",
"飞书OCR": "Feishu OCR",
"讯飞OCR": "IFlytek OCR",
- "发光字体": "Світливий шрифт",
- "发光亮度": "світло",
"最大缓冲区长度": "Максимальна довжина буфера",
"最大缓存文本长度": "Максимальна довжина кешування тексту",
"半径": "радіус",
@@ -793,5 +791,6 @@
"兼容接口": "Сумісний інтерфейс",
"调试浏览器": "Відладка навігатора",
"手动翻译": "Ручний переклад",
- "显示引擎": "Рушій показу"
+ "显示引擎": "Рушій показу",
+ "阴影字体": "Шрифт тіні"
}
\ No newline at end of file
diff --git a/LunaTranslator/files/lang/vi.json b/LunaTranslator/files/lang/vi.json
index 758ac0ba..f80fed47 100644
--- a/LunaTranslator/files/lang/vi.json
+++ b/LunaTranslator/files/lang/vi.json
@@ -705,8 +705,6 @@
"百度OCR": "Số lượng OCR",
"飞书OCR": "Sách bay OCR",
"讯飞OCR": "Máy bay OCR",
- "发光字体": "Phông phát sáng",
- "发光亮度": "Độ sáng phát sáng",
"最大缓冲区长度": "Chiều dài bộ đệm tối đa",
"最大缓存文本长度": "Độ dài văn bản bộ nhớ cache tối đa",
"半径": "Bán kính",
@@ -793,5 +791,6 @@
"兼容接口": "Giao diện tương thích",
"调试浏览器": "Gỡ lỗi trình duyệt",
"手动翻译": "Dịch thủ công",
- "显示引擎": "Công cụ hiển thị"
+ "显示引擎": "Công cụ hiển thị",
+ "阴影字体": "Phông bóng"
}
\ No newline at end of file
diff --git a/LunaTranslator/files/lang/zh.json b/LunaTranslator/files/lang/zh.json
index c8913825..c7963c8e 100644
--- a/LunaTranslator/files/lang/zh.json
+++ b/LunaTranslator/files/lang/zh.json
@@ -709,8 +709,6 @@
"百度OCR": "",
"飞书OCR": "",
"讯飞OCR": "",
- "发光字体": "",
- "发光亮度": "",
"最大缓冲区长度": "",
"最大缓存文本长度": "",
"半径": "",
@@ -793,5 +791,6 @@
"最大行数": "",
"超过时截断而非过滤": "",
"调试浏览器": "",
- "显示引擎": ""
+ "显示引擎": "",
+ "阴影字体": ""
}
\ No newline at end of file
diff --git a/plugins/CMakeLists.txt b/plugins/CMakeLists.txt
index 275b22e1..7b76d856 100644
--- a/plugins/CMakeLists.txt
+++ b/plugins/CMakeLists.txt
@@ -28,8 +28,8 @@ set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CMAKE_SOURCE_DIR}/version)
include(generate_product_version)
set(VERSION_MAJOR 5)
-set(VERSION_MINOR 0)
-set(VERSION_PATCH 2)
+set(VERSION_MINOR 1)
+set(VERSION_PATCH 0)
add_library(pch pch.cpp)
target_precompile_headers(pch PUBLIC pch.h)