mirror of
https://github.com/louislam/dockge.git
synced 2024-11-27 13:14:03 +00:00
Add Translation keys (#506)
This commit is contained in:
parent
df95d7ce9d
commit
b2c8fdab75
9 changed files with 45 additions and 20 deletions
|
@ -17,6 +17,7 @@ export class DockerSocketHandler extends AgentSocketHandler {
|
||||||
callbackResult({
|
callbackResult({
|
||||||
ok: true,
|
ok: true,
|
||||||
msg: "Deployed",
|
msg: "Deployed",
|
||||||
|
msgi18n: true,
|
||||||
}, callback);
|
}, callback);
|
||||||
stack.joinCombinedTerminal(socket);
|
stack.joinCombinedTerminal(socket);
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
|
@ -30,7 +31,8 @@ export class DockerSocketHandler extends AgentSocketHandler {
|
||||||
await this.saveStack(server, name, composeYAML, composeENV, isAdd);
|
await this.saveStack(server, name, composeYAML, composeENV, isAdd);
|
||||||
callbackResult({
|
callbackResult({
|
||||||
ok: true,
|
ok: true,
|
||||||
"msg": "Saved"
|
msg: "Saved",
|
||||||
|
msgi18n: true,
|
||||||
}, callback);
|
}, callback);
|
||||||
server.sendStackList();
|
server.sendStackList();
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
|
@ -56,7 +58,8 @@ export class DockerSocketHandler extends AgentSocketHandler {
|
||||||
server.sendStackList();
|
server.sendStackList();
|
||||||
callbackResult({
|
callbackResult({
|
||||||
ok: true,
|
ok: true,
|
||||||
msg: "Deleted"
|
msg: "Deleted",
|
||||||
|
msgi18n: true,
|
||||||
}, callback);
|
}, callback);
|
||||||
|
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
|
@ -94,7 +97,8 @@ export class DockerSocketHandler extends AgentSocketHandler {
|
||||||
server.sendStackList();
|
server.sendStackList();
|
||||||
callbackResult({
|
callbackResult({
|
||||||
ok: true,
|
ok: true,
|
||||||
msg: "Updated"
|
msg: "Updated",
|
||||||
|
msgi18n: true,
|
||||||
}, callback);
|
}, callback);
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
callbackError(e, callback);
|
callbackError(e, callback);
|
||||||
|
@ -114,7 +118,8 @@ export class DockerSocketHandler extends AgentSocketHandler {
|
||||||
await stack.start(socket);
|
await stack.start(socket);
|
||||||
callbackResult({
|
callbackResult({
|
||||||
ok: true,
|
ok: true,
|
||||||
msg: "Started"
|
msg: "Started",
|
||||||
|
msgi18n: true,
|
||||||
}, callback);
|
}, callback);
|
||||||
server.sendStackList();
|
server.sendStackList();
|
||||||
|
|
||||||
|
@ -138,7 +143,8 @@ export class DockerSocketHandler extends AgentSocketHandler {
|
||||||
await stack.stop(socket);
|
await stack.stop(socket);
|
||||||
callbackResult({
|
callbackResult({
|
||||||
ok: true,
|
ok: true,
|
||||||
msg: "Stopped"
|
msg: "Stopped",
|
||||||
|
msgi18n: true,
|
||||||
}, callback);
|
}, callback);
|
||||||
server.sendStackList();
|
server.sendStackList();
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
|
@ -159,7 +165,8 @@ export class DockerSocketHandler extends AgentSocketHandler {
|
||||||
await stack.restart(socket);
|
await stack.restart(socket);
|
||||||
callbackResult({
|
callbackResult({
|
||||||
ok: true,
|
ok: true,
|
||||||
msg: "Restarted"
|
msg: "Restarted",
|
||||||
|
msgi18n: true,
|
||||||
}, callback);
|
}, callback);
|
||||||
server.sendStackList();
|
server.sendStackList();
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
|
@ -180,7 +187,8 @@ export class DockerSocketHandler extends AgentSocketHandler {
|
||||||
await stack.update(socket);
|
await stack.update(socket);
|
||||||
callbackResult({
|
callbackResult({
|
||||||
ok: true,
|
ok: true,
|
||||||
msg: "Updated"
|
msg: "Updated",
|
||||||
|
msgi18n: true,
|
||||||
}, callback);
|
}, callback);
|
||||||
server.sendStackList();
|
server.sendStackList();
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
|
@ -201,7 +209,8 @@ export class DockerSocketHandler extends AgentSocketHandler {
|
||||||
await stack.down(socket);
|
await stack.down(socket);
|
||||||
callbackResult({
|
callbackResult({
|
||||||
ok: true,
|
ok: true,
|
||||||
msg: "Downed"
|
msg: "Downed",
|
||||||
|
msgi18n: true,
|
||||||
}, callback);
|
}, callback);
|
||||||
server.sendStackList();
|
server.sendStackList();
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
<ul v-if="isArrayInited" class="list-group">
|
<ul v-if="isArrayInited" class="list-group">
|
||||||
<li v-for="(value, index) in array" :key="index" class="list-group-item">
|
<li v-for="(value, index) in array" :key="index" class="list-group-item">
|
||||||
<select v-model="array[index]" class="no-bg domain-input">
|
<select v-model="array[index]" class="no-bg domain-input">
|
||||||
<option value="">Select a network...</option>
|
<option value="">{{ $t(`Select a network...`) }}</option>
|
||||||
<option v-for="option in options" :key="option" :value="option">{{ option }}</option>
|
<option v-for="option in options" :key="option" :value="option">{{ option }}</option>
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
|
|
@ -116,7 +116,7 @@
|
||||||
</label>
|
</label>
|
||||||
|
|
||||||
<div v-if="networkList.length === 0 && service.networks && service.networks.length > 0" class="text-warning mb-3">
|
<div v-if="networkList.length === 0 && service.networks && service.networks.length > 0" class="text-warning mb-3">
|
||||||
No networks available. You need to add internal networks or enable external networks in the right side first.
|
{{ $t("NoNetworksAvailable") }}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<ArraySelect name="networks" :display-name="$t('network')" placeholder="Network Name" :options="networkList" />
|
<ArraySelect name="networks" :display-name="$t('network')" placeholder="Network Name" :options="networkList" />
|
||||||
|
@ -127,7 +127,7 @@
|
||||||
<label class="form-label">
|
<label class="form-label">
|
||||||
{{ $t("dependsOn") }}
|
{{ $t("dependsOn") }}
|
||||||
</label>
|
</label>
|
||||||
<ArrayInput name="depends_on" :display-name="$t('dependsOn')" placeholder="Container Name" />
|
<ArrayInput name="depends_on" :display-name="$t('dependsOn')" :placeholder="$t(`containerName`)" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</transition>
|
</transition>
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
<h5>{{ $t("Internal Networks") }}</h5>
|
<h5>{{ $t("Internal Networks") }}</h5>
|
||||||
<ul class="list-group">
|
<ul class="list-group">
|
||||||
<li v-for="(networkRow, index) in networkList" :key="index" class="list-group-item">
|
<li v-for="(networkRow, index) in networkList" :key="index" class="list-group-item">
|
||||||
<input v-model="networkRow.key" type="text" class="no-bg domain-input" placeholder="Network name..." />
|
<input v-model="networkRow.key" type="text" class="no-bg domain-input" :placeholder="$t(`Network name...`)" />
|
||||||
<font-awesome-icon icon="times" class="action remove ms-2 me-3 text-danger" @click="remove(index)" />
|
<font-awesome-icon icon="times" class="action remove ms-2 me-3 text-danger" @click="remove(index)" />
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
|
@ -47,7 +47,7 @@
|
||||||
<input
|
<input
|
||||||
v-model="settings.primaryHostname"
|
v-model="settings.primaryHostname"
|
||||||
class="form-control"
|
class="form-control"
|
||||||
placeholder="(Unset: Follow current hostname)"
|
:placeholder="$t(`CurrentHostname`)"
|
||||||
/>
|
/>
|
||||||
<button class="btn btn-outline-primary" type="button" @click="autoGetPrimaryHostname">
|
<button class="btn btn-outline-primary" type="button" @click="autoGetPrimaryHostname">
|
||||||
{{ $t("autoGet") }}
|
{{ $t("autoGet") }}
|
||||||
|
|
|
@ -95,6 +95,7 @@
|
||||||
"reverseProxyMsg1": "Using a Reverse Proxy?",
|
"reverseProxyMsg1": "Using a Reverse Proxy?",
|
||||||
"reverseProxyMsg2": "Check how to config it for WebSocket",
|
"reverseProxyMsg2": "Check how to config it for WebSocket",
|
||||||
"Cannot connect to the socket server.": "Cannot connect to the socket server.",
|
"Cannot connect to the socket server.": "Cannot connect to the socket server.",
|
||||||
|
"Lost connection to the socket server. Reconnecting...": "Lost connection to the socket server. Reconnecting...",
|
||||||
"reconnecting...": "Reconnecting…",
|
"reconnecting...": "Reconnecting…",
|
||||||
"connecting...": "Connecting to the socket server…",
|
"connecting...": "Connecting to the socket server…",
|
||||||
"url": "URL | URLs",
|
"url": "URL | URLs",
|
||||||
|
@ -112,5 +113,20 @@
|
||||||
"agentRemovedSuccessfully": "Agent removed successfully.",
|
"agentRemovedSuccessfully": "Agent removed successfully.",
|
||||||
"removeAgent": "Remove Agent",
|
"removeAgent": "Remove Agent",
|
||||||
"removeAgentMsg": "Are you sure you want to remove this agent?",
|
"removeAgentMsg": "Are you sure you want to remove this agent?",
|
||||||
"LongSyntaxNotSupported": "Long syntax is not supported here. Please use the YAML editor."
|
"LongSyntaxNotSupported": "Long syntax is not supported here. Please use the YAML editor.",
|
||||||
|
"Saved": "Saved",
|
||||||
|
"Deployed": "Deployed",
|
||||||
|
"Deleted": "Deleted",
|
||||||
|
"Updated": "Updated",
|
||||||
|
"Started": "Started",
|
||||||
|
"Stopped": "Stopped",
|
||||||
|
"Restarted": "Restarted",
|
||||||
|
"Downed": "Downed",
|
||||||
|
"Switch to sh": "Switch to sh",
|
||||||
|
"terminal": "Terminal",
|
||||||
|
"CurrentHostname": "(Unset: Follow current hostname)",
|
||||||
|
"New Container Name...": "New Container Name...",
|
||||||
|
"Network name...": "Network name...",
|
||||||
|
"Select a network...": "Select a network...",
|
||||||
|
"NoNetworksAvailable": "No networks available. You need to add internal networks or enable external networks in the right side first."
|
||||||
}
|
}
|
||||||
|
|
|
@ -203,7 +203,7 @@ export default defineComponent({
|
||||||
|
|
||||||
socket.on("disconnect", () => {
|
socket.on("disconnect", () => {
|
||||||
console.log("disconnect");
|
console.log("disconnect");
|
||||||
this.socketIO.connectionErrorMsg = "Lost connection to the socket server. Reconnecting...";
|
this.socketIO.connectionErrorMsg = `${this.$t("Lost connection to the socket server. Reconnecting...")}`;
|
||||||
this.socketIO.connected = false;
|
this.socketIO.connected = false;
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
<template>
|
<template>
|
||||||
<transition name="slide-fade" appear>
|
<transition name="slide-fade" appear>
|
||||||
<div>
|
<div>
|
||||||
<h1 v-if="isAdd" class="mb-3">Compose</h1>
|
<h1 v-if="isAdd" class="mb-3">{{$t("compose")}}</h1>
|
||||||
<h1 v-else class="mb-3">
|
<h1 v-else class="mb-3">
|
||||||
<Uptime :stack="globalStack" :pill="true" /> {{ stack.name }}
|
<Uptime :stack="globalStack" :pill="true" /> {{ stack.name }}
|
||||||
<span v-if="$root.agentCount > 1" class="agent-name">
|
<span v-if="$root.agentCount > 1" class="agent-name">
|
||||||
|
@ -112,7 +112,7 @@
|
||||||
<div v-if="isEditMode" class="input-group mb-3">
|
<div v-if="isEditMode" class="input-group mb-3">
|
||||||
<input
|
<input
|
||||||
v-model="newContainerName"
|
v-model="newContainerName"
|
||||||
placeholder="New Container Name..."
|
:placeholder="$t(`New Container Name...`)"
|
||||||
class="form-control"
|
class="form-control"
|
||||||
@keyup.enter="addContainer"
|
@keyup.enter="addContainer"
|
||||||
/>
|
/>
|
||||||
|
@ -150,7 +150,7 @@
|
||||||
|
|
||||||
<!-- Combined Terminal Output -->
|
<!-- Combined Terminal Output -->
|
||||||
<div v-show="!isEditMode">
|
<div v-show="!isEditMode">
|
||||||
<h4 class="mb-3">Terminal</h4>
|
<h4 class="mb-3">{{$t("terminal")}}</h4>
|
||||||
<Terminal
|
<Terminal
|
||||||
ref="combinedTerminal"
|
ref="combinedTerminal"
|
||||||
class="mb-3 terminal"
|
class="mb-3 terminal"
|
||||||
|
|
|
@ -1,10 +1,10 @@
|
||||||
<template>
|
<template>
|
||||||
<transition name="slide-fade" appear>
|
<transition name="slide-fade" appear>
|
||||||
<div>
|
<div>
|
||||||
<h1 class="mb-3">Terminal - {{ serviceName }} ({{ stackName }})</h1>
|
<h1 class="mb-3">{{$t("terminal")}} - {{ serviceName }} ({{ stackName }})</h1>
|
||||||
|
|
||||||
<div class="mb-3">
|
<div class="mb-3">
|
||||||
<router-link :to="sh" class="btn btn-normal me-2">Switch to sh</router-link>
|
<router-link :to="sh" class="btn btn-normal me-2">{{ $t("Switch to sh") }}</router-link>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<Terminal class="terminal" :rows="20" mode="interactive" :name="terminalName" :stack-name="stackName" :service-name="serviceName" :shell="shell" :endpoint="endpoint"></Terminal>
|
<Terminal class="terminal" :rows="20" mode="interactive" :name="terminalName" :stack-name="stackName" :service-name="serviceName" :shell="shell" :endpoint="endpoint"></Terminal>
|
||||||
|
|
Loading…
Reference in a new issue