Skip to content

Commit d3ac414

Browse files
committed
feat(screencast-gif): switch hardcoded strings to pluginApi.tr
1 parent 1acfc7f commit d3ac414

2 files changed

Lines changed: 9 additions & 7 deletions

File tree

screencast-gif/BarWidget.qml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,9 @@ NIconButton {
2121
applyUiScale: false
2222
customRadius: Style.radiusL
2323
icon: "circle-filled"
24-
tooltipText: recording ? "Recording GIF — click to stop" : "Record GIF"
24+
tooltipText: recording
25+
? pluginApi?.tr("widget.tooltip.recording")
26+
: pluginApi?.tr("widget.tooltip.idle")
2527
tooltipDirection: BarService.getTooltipDirection(screenName)
2628
colorBg: recording ? Color.mError : Style.capsuleColor
2729
colorFg: recording ? Color.mOnError : Color.mOnSurface

screencast-gif/Settings.qml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -19,24 +19,24 @@ ColumnLayout {
1919

2020
NTextInput {
2121
Layout.fillWidth: true
22-
label: "Output directory"
23-
description: "Where to save the .gif files. Leading ~ is expanded to $HOME."
22+
label: pluginApi?.tr("settings.outputDir.label")
23+
description: pluginApi?.tr("settings.outputDir.description")
2424
text: root.valueOutputDir
2525
onTextChanged: root.valueOutputDir = text
2626
}
2727

2828
NTextInput {
2929
Layout.fillWidth: true
30-
label: "Frame rate"
31-
description: "GIF frame rate. 15-25 is a good balance between smoothness and file size."
30+
label: pluginApi?.tr("settings.fps.label")
31+
description: pluginApi?.tr("settings.fps.description")
3232
text: String(root.valueFps)
3333
onTextChanged: root.valueFps = parseInt(text) || 20
3434
}
3535

3636
NTextInput {
3737
Layout.fillWidth: true
38-
label: "Auto-stop after (seconds)"
39-
description: "Maximum recording duration before auto-stopping. Use 0 to disable."
38+
label: pluginApi?.tr("settings.maxRecordingSeconds.label")
39+
description: pluginApi?.tr("settings.maxRecordingSeconds.description")
4040
text: String(root.valueMaxRecordingSeconds)
4141
onTextChanged: root.valueMaxRecordingSeconds = parseInt(text) || 0
4242
}

0 commit comments

Comments
 (0)