Skip to content

Commit 27bfe72

Browse files
authored
Add Translation keys (#768)
1 parent 69818d6 commit 27bfe72

File tree

3 files changed

+15
-17
lines changed

3 files changed

+15
-17
lines changed

frontend/src/lang/en.json

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
"saveStackDraft": "Save",
2626
"notAvailableShort": "N/A",
2727
"deleteStackMsg": "Are you sure you want to delete this stack?",
28+
"cancel": "Cancel",
2829
"stackNotManagedByDockgeMsg": "This stack is not managed by Dockge.",
2930
"primaryHostname": "Primary Hostname",
3031
"general": "General",
@@ -128,5 +129,10 @@
128129
"New Container Name...": "New Container Name...",
129130
"Network name...": "Network name...",
130131
"Select a network...": "Select a network...",
131-
"NoNetworksAvailable": "No networks available. You need to add internal networks or enable external networks in the right side first."
132+
"NoNetworksAvailable": "No networks available. You need to add internal networks or enable external networks in the right side first.",
133+
"Console is not enabled": "Console is not enabled",
134+
"ConsoleNotEnabledMSG1": "Console is a powerful tool that allows you to execute any commands such as <code>docker</code>, <code>rm</code> within the Dockge's container in this Web UI.",
135+
"ConsoleNotEnabledMSG2": "It might be dangerous since this Dockge container is connecting to the host's Docker daemon. Also Dockge could be possibly taken down by commands like <code>rm -rf</code>" ,
136+
"ConsoleNotEnabledMSG3": "If you understand the risk, you can enable it by setting <code>DOCKGE_ENABLE_CONSOLE=true</code> in the environment variables.",
137+
"confirmLeaveStack": "You are currently editing a stack. Are you sure you want to leave?"
132138
}

frontend/src/pages/Compose.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -229,7 +229,7 @@
229229
</div>
230230

231231
<!-- Delete Dialog -->
232-
<BModal v-model="showDeleteDialog" :okTitle="$t('deleteStack')" okVariant="danger" @ok="deleteDialog">
232+
<BModal v-model="showDeleteDialog" :cancelTitle="$t('cancel')" :okTitle="$t('deleteStack')" okVariant="danger" @ok="deleteDialog">
233233
{{ $t("deleteStackMsg") }}
234234
</BModal>
235235
</div>
@@ -508,7 +508,7 @@ export default {
508508
509509
exitConfirm(next) {
510510
if (this.isEditMode) {
511-
if (confirm("You are currently editing a stack. Are you sure you want to leave?")) {
511+
if (confirm(this.$t("confirmLeaveStack"))) {
512512
this.exitAction();
513513
next();
514514
} else {

frontend/src/pages/Console.vue

Lines changed: 6 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,15 @@
11
<template>
22
<transition name="slide-fade" appear>
33
<div v-if="!processing">
4-
<h1 class="mb-3">Console</h1>
4+
<h1 class="mb-3">{{ $t("console") }}</h1>
55

66
<Terminal v-if="enableConsole" class="terminal" :rows="20" mode="mainTerminal" name="console" :endpoint="endpoint"></Terminal>
77

88
<div v-else class="alert alert-warning shadow-box" role="alert">
9-
<h4 class="alert-heading">Console is not enabled</h4>
10-
<p>
11-
Console is a powerful tool that allows you to execute any commands such as <code>docker</code>, <code>rm</code> within the Dockge's container in this Web UI.
12-
</p>
13-
14-
<p>
15-
It might be dangerous since this Dockge container is connecting to the host's Docker daemon. Also Dockge could be possibly taken down by commands like <code>rm -rf</code>.
16-
</p>
17-
18-
<p>
19-
If you understand the risk, you can enable it by setting <code>DOCKGE_ENABLE_CONSOLE=true</code> in the environment variables.
20-
</p>
9+
<h4 class="alert-heading">{{ $t("Console is not enabled") }}</h4>
10+
<p v-html="$t('ConsoleNotEnabledMSG1')"></p>
11+
<p v-html="$t('ConsoleNotEnabledMSG2')"></p>
12+
<p v-html="$t('ConsoleNotEnabledMSG3')"></p>
2113
</div>
2214
</div>
2315
</transition>
@@ -45,7 +37,7 @@ export default {
4537
});
4638
},
4739
methods: {
48-
40+
4941
}
5042
};
5143
</script>

0 commit comments

Comments
 (0)