Skip to content

Commit 302fd03

Browse files
committed
fix: translation again
1 parent 32a7607 commit 302fd03

3 files changed

Lines changed: 37 additions & 25 deletions

File tree

screen-toolkit/Annotate.qml

Lines changed: 21 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -963,19 +963,19 @@ Variants {
963963
overlayWin._tbUserX = toolbar._dragStx + (gp.x - toolbar._dragSx)
964964
overlayWin._tbUserY = toolbar._dragSty + (gp.y - toolbar._dragSy)
965965
}
966-
onEntered: TooltipService.show(parent, "Drag to move toolbar")
966+
onEntered: TooltipService.show(parent, root.mainInstance?.pluginApi?.tr("annotate.dragToolbar"))
967967
onExited: TooltipService.hide()
968968
}
969969
}
970970
readonly property var toolDefs: [
971-
{ id: "pencil", icon: "pencil", tooltip: "Draw freehand" },
972-
{ id: "highlighter", icon: "highlight", tooltip: "Highlight area" },
973-
{ id: "line", icon: "slash", tooltip: "Draw line" },
974-
{ id: "arrow", icon: "arrow-up-right", tooltip: "Draw arrow" },
975-
{ id: "rect", icon: "square", tooltip: "Draw rectangle" },
976-
{ id: "circle", icon: "circle", tooltip: "Draw ellipse" },
977-
{ id: "text", icon: "text-size", tooltip: "Add text" },
978-
{ id: "blur", icon: "eye-off", tooltip: "Pixelate region" }
971+
{ id: "pencil", icon: "pencil", tooltip: root.mainInstance?.pluginApi?.tr("annotate.toolPencil") },
972+
{ id: "highlighter", icon: "highlight", tooltip: root.mainInstance?.pluginApi?.tr("annotate.toolHighlighter") },
973+
{ id: "line", icon: "slash", tooltip: root.mainInstance?.pluginApi?.tr("annotate.toolLine") },
974+
{ id: "arrow", icon: "arrow-up-right", tooltip: root.mainInstance?.pluginApi?.tr("annotate.toolArrow") },
975+
{ id: "rect", icon: "square", tooltip: root.mainInstance?.pluginApi?.tr("annotate.toolRect") },
976+
{ id: "circle", icon: "circle", tooltip: root.mainInstance?.pluginApi?.tr("annotate.toolCircle") },
977+
{ id: "text", icon: "text-size", tooltip: root.mainInstance?.pluginApi?.tr("annotate.toolText") },
978+
{ id: "blur", icon: "eye-off", tooltip: root.mainInstance?.pluginApi?.tr("annotate.toolBlur") }
979979
]
980980
readonly property var colorDefs: [
981981
"#FF4444", "#FF8C00", "#FFD700", "#44FF88",
@@ -1019,7 +1019,7 @@ Variants {
10191019
ToolbarSeparator {}
10201020
ZoomBtn {
10211021
iconName: "zoom-out"
1022-
tip: "Zoom out"
1022+
tip: root.mainInstance?.pluginApi?.tr("annotate.zoomOut")
10231023
btnEnabled: root.zoomScale > 1.0
10241024
onClicked: overlayWin.requestZoom(Math.max(1.0, root.zoomScale - 1.0))
10251025
}
@@ -1034,7 +1034,7 @@ Variants {
10341034
}
10351035
ZoomBtn {
10361036
iconName: "zoom-in"
1037-
tip: "Zoom in (view only)"
1037+
tip: root.mainInstance?.pluginApi?.tr("annotate.zoomIn")
10381038
btnEnabled: root.zoomScale < 5.0
10391039
onClicked: overlayWin.requestZoom(Math.min(5.0, root.zoomScale + 1.0))
10401040
}
@@ -1058,8 +1058,8 @@ Variants {
10581058
}
10591059
}
10601060
ToolbarSeparator {}
1061-
ActionBtn { iconName: "corner-up-left"; tip: "Undo last stroke"; onClicked: toolbar.doUndo() }
1062-
ActionBtn { iconName: "trash"; tip: "Clear all"; danger: true; onClicked: toolbar.doClear() }
1061+
ActionBtn { iconName: "corner-up-left"; tip: root.mainInstance?.pluginApi?.tr("annotate.undo"); onClicked: toolbar.doUndo() }
1062+
ActionBtn { iconName: "trash"; tip: root.mainInstance?.pluginApi?.tr("annotate.clearAll"); danger: true; onClicked: toolbar.doClear() }
10631063
SaveBtn {
10641064
iconName: "copy"
10651065
labelText: overlayWin.isSaving
@@ -1078,7 +1078,7 @@ Variants {
10781078
primary: false
10791079
onClicked: overlayWin.flattenAndSave()
10801080
}
1081-
ActionBtn { iconName: "x"; tip: "Close"; onClicked: toolbar.doClose() }
1081+
ActionBtn { iconName: "x"; tip: root.mainInstance?.pluginApi?.tr("annotate.close"); onClicked: toolbar.doClose() }
10821082
ToolbarSeparator {}
10831083
DragBtn { isVertical: false; anchors.verticalCenter: parent.verticalCenter }
10841084
}
@@ -1094,7 +1094,7 @@ Variants {
10941094
ToolbarSeparator {}
10951095
ZoomBtn {
10961096
iconName: "zoom-out"
1097-
tip: "Zoom out"
1097+
tip: root.mainInstance?.pluginApi?.tr("annotate.zoomOut")
10981098
btnEnabled: root.zoomScale > 1.0
10991099
onClicked: overlayWin.requestZoom(Math.max(1.0, root.zoomScale - 1.0))
11001100
}
@@ -1107,7 +1107,7 @@ Variants {
11071107
}
11081108
ZoomBtn {
11091109
iconName: "zoom-in"
1110-
tip: "Zoom in (view only)"
1110+
tip: root.mainInstance?.pluginApi?.tr("annotate.zoomIn")
11111111
btnEnabled: root.zoomScale < 5.0
11121112
onClicked: overlayWin.requestZoom(Math.min(5.0, root.zoomScale + 1.0))
11131113
}
@@ -1131,11 +1131,11 @@ Variants {
11311131
}
11321132
}
11331133
ToolbarSeparator {}
1134-
ActionBtn { iconName: "corner-up-left"; tip: "Undo last stroke"; onClicked: toolbar.doUndo() }
1135-
ActionBtn { iconName: "trash"; tip: "Clear all"; danger: true; onClicked: toolbar.doClear() }
1136-
ActionBtn { iconName: "copy"; tip: root.mainInstance?.pluginApi?.tr("annotate.copyTip"); onClicked: overlayWin.flattenAndCopy() }
1137-
ActionBtn { iconName: "device-floppy"; tip: root.mainInstance?.pluginApi?.tr("annotate.saveTip"); onClicked: overlayWin.flattenAndSave() }
1138-
ActionBtn { iconName: "x"; tip: "Close"; onClicked: toolbar.doClose() }
1134+
ActionBtn { iconName: "corner-up-left"; tip: root.mainInstance?.pluginApi?.tr("annotate.undo"); onClicked: toolbar.doUndo() }
1135+
ActionBtn { iconName: "trash"; tip: root.mainInstance?.pluginApi?.tr("annotate.clearAll"); danger: true; onClicked: toolbar.doClear() }
1136+
ActionBtn { iconName: "copy"; tip: root.mainInstance?.pluginApi?.tr("annotate.copyTip"); onClicked: overlayWin.flattenAndCopy() }
1137+
ActionBtn { iconName: "device-floppy"; tip: root.mainInstance?.pluginApi?.tr("annotate.saveTip"); onClicked: overlayWin.flattenAndSave() }
1138+
ActionBtn { iconName: "x"; tip: root.mainInstance?.pluginApi?.tr("annotate.close"); onClicked: toolbar.doClose() }
11391139
ToolbarSeparator {}
11401140
DragBtn { isVertical: true; anchors.horizontalCenter: parent.horizontalCenter }
11411141
}
@@ -1328,4 +1328,3 @@ Variants {
13281328
}
13291329
}
13301330
}
1331-

screen-toolkit/i18n/en.json

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,21 @@
157157
"saving": "Saving...",
158158
"copying": "Copying...",
159159
"saveTip": "Save to disk",
160-
"copyTip": "Copy to clipboard"
160+
"copyTip": "Copy to clipboard",
161+
"zoomOut": "Zoom out",
162+
"zoomIn": "Zoom in (view only)",
163+
"undo": "Undo last stroke",
164+
"clearAll": "Clear all",
165+
"close": "Close",
166+
"dragToolbar": "Drag to move toolbar",
167+
"toolPencil": "Draw freehand",
168+
"toolHighlighter": "Highlight area",
169+
"toolLine": "Draw line",
170+
"toolArrow": "Draw arrow",
171+
"toolRect": "Draw rectangle",
172+
"toolCircle": "Draw ellipse",
173+
"toolText": "Add text",
174+
"toolBlur": "Pixelate region"
161175
},
162176
"record": {
163177
"stop": "Stop",
@@ -190,4 +204,3 @@
190204
"remove": "Remove"
191205
}
192206
}
193-

screen-toolkit/manifest.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"id": "screen-toolkit",
33
"name": "Screen Toolkit",
4-
"version": "1.1.0",
4+
"version": "1.1.1",
55
"minNoctaliaVersion": "4.5.0",
66
"author": "ycf-anon",
77
"license": "MIT",

0 commit comments

Comments
 (0)