Configuration Options
-Dashy version {{ appVersion }}
+{{ $t('config.app-version-note') }} {{ appVersion }}
diff --git a/src/assets/locales/en-GB.json b/src/assets/locales/en-GB.json
index c43435cd..408aee3e 100644
--- a/src/assets/locales/en-GB.json
+++ b/src/assets/locales/en-GB.json
@@ -19,6 +19,68 @@
"remember-me-day": "1 Day",
"remember-me-week": "1 Week"
},
+ "config": {
+ "main-tab": "Config",
+ "view-config-tab": "View Config",
+ "edit-config-tab": "Edit Config",
+ "custom-css-tab": "Custom Styles",
+ "heading": "Configuration Options",
+ "download-config-button": "Download Config",
+ "edit-config-button": "Edit Config",
+ "edit-css-button": "Edit Custom CSS",
+ "cloud-sync-button": "Enable Cloud Sync",
+ "edit-cloud-sync-button": "Edit Cloud Sync",
+ "rebuild-app-button": "Rebuild Application",
+ "reset-settings-button": "Reset Local Settings",
+ "app-info-button": "App Info",
+ "app-version-note": "Dashy version",
+ "backup-note": "It is recommend to make a backup of your configuration before making changes.",
+ "reset-config-msg-l1": "This will remove all user settings from local storage, but won't effect your 'conf.yml' file.",
+ "reset-config-msg-l2": "You should first backup any changes you've made locally, if you want to use them in the future.",
+ "reset-config-msg-l3": "Are you sure you want to proceed?",
+ "data-cleared-msg": "Data cleared successfully",
+ "actions-label": "Actions",
+ "copy-config-label": "Copy Config",
+ "data-copied-msg": "Config has been copied to clipboard",
+ "reset-config-label": "Reset Config",
+ "css-save-btn": "Save Changes",
+ "css-note-label": "Note",
+ "css-note-l1": "You will need to refresh the page for your changes to take effect.",
+ "css-note-l2": "Styles overrides are only stored locally, so it is recommended to make a copy of your CSS.",
+ "css-note-l3": "To remove all custom styles, delete the contents and hit Save Changes"
+ },
+ "config-editor": {
+ "save-location-label": "Save Location",
+ "location-local-label": "Apply Locally",
+ "location-disk-label": "Write Changes to Config File",
+ "save-button": "Save Changes",
+ "valid-label": "Config is Valid",
+ "status-success-msg": "Task Complete",
+ "status-fail-msg": "Task Failed",
+ "success-msg-disk": "Config file written to disk successfully",
+ "success-msg-local": "Local changes saved successfully",
+ "success-note-l1": "The app should rebuild automatically.",
+ "success-note-l2": "This may take up to a minute.",
+ "success-note-l3": "You will need to refresh the page for changes to take effect.",
+ "error-msg-save-mode": "Please select a Save Mode: Local or File",
+ "error-msg-cannot-save": "An error occurred saving config",
+ "error-msg-bad-json": "Error in JSON, possibly malformed",
+ "warning-msg-validation": "Validation Warning"
+ },
+ "app-rebuild": {
+ "title": "Rebuild Application",
+ "rebuild-note-l1": "A rebuild is required for changes written to the conf.yml file to take effect.",
+ "rebuild-note-l2": "This should happen automatically, but if it hasn't, you can manually trigger it here.",
+ "rebuild-note-l3": "This is not required for modifications stored locally.",
+ "rebuild-button": "Start Build",
+ "rebuilding-status-1": "Building...",
+ "rebuilding-status-2": "This may take a few minutes",
+ "error-permission": "You do no have permission to trigger this action",
+ "success-msg": "Build completed succesfully",
+ "fail-msg": "Build operation failed",
+ "reload-note": "A page reload is now required for changes to take effect",
+ "reload-button": "Reload Page"
+ },
"cloud-sync": {
"title": "Cloud Backup & Restore",
"intro-l1": "Cloud backup and restore is an optional feature, that enables you to upload your config to the internet, and then restore it on any other device or instance of Dashy.",
diff --git a/src/components/Configuration/ConfigContainer.vue b/src/components/Configuration/ConfigContainer.vue
index e38995aa..a7c137f9 100644
--- a/src/components/Configuration/ConfigContainer.vue
+++ b/src/components/Configuration/ConfigContainer.vue
@@ -1,67 +1,69 @@
- Note: You will need to refresh the page for your changes to take effect.
- Styles overides are only stored locally, so it is reccomended to make a copy of your CSS.
- To remove all custom styles, delete the contents and hit Save Changes
+ {{ $t('config.css-note-label') }}:
+ {{ $t('config.css-note-l1') }} {{ $t('config.css-note-l2') }} {{ $t('config.css-note-l3') }}
{{yaml}}
@@ -28,24 +34,23 @@
{{error.msg}}
- {{saveSuccess ? 'Task Complete' : 'Task Failed'}} + {{saveSuccess + ? $t('config-editor.status-success-msg') : $t('config-editor.status-fail-msg') }}
{{ responseText }}
- The app should rebuild automatically. - This may take up to a minute. - You will need to refresh the page for changes to take effect. -
-- It is recommend to backup your existing confiruration before making any changes. + {{ $t('config-editor.success-note-l1') }} + {{ $t('config-editor.success-note-l2') }} + {{ $t('config-editor.success-note-l3') }}
+{{ $t('config.backup-note') }}
@@ -103,7 +108,7 @@ export default { } else if (this.saveMode === 'file') { this.writeConfigToDisk(); } else { - this.$toasted.show('Please select a Save Mode: Local or File'); + this.$toasted.show(this.$t('config-editor.error-msg-save-mode')); } }, writeConfigToDisk() { @@ -121,9 +126,9 @@ export default { this.responseText = response.data.message; if (this.saveSuccess) { this.carefullyClearLocalStorage(); - this.showToast('Config file written to disk succesfully', true); + this.showToast(this.$t('config-editor.success-msg-disk'), true); } else { - this.showToast('An error occurred saving config', false); + this.showToast(this.$t('config-editor.error-msg-cannot-save'), false); } }) .catch((error) => { @@ -146,7 +151,7 @@ export default { if (data.appConfig.theme) { localStorage.setItem(localStorageKeys.THEME, data.appConfig.theme); } - this.showToast('Changes saved succesfully', true); + this.showToast(this.$t('config-editor.success-msg-local'), true); }, carefullyClearLocalStorage() { localStorage.removeItem(localStorageKeys.PAGE_INFO); @@ -160,7 +165,8 @@ export default { case 'validation': errorMessages.push({ type: 'validation', - msg: `Validatation Warning: ${error.error.keyword} ${error.error.message}`, + msg: `${this.$t('config-editor.warning-msg-validation')}: ` + + `${error.error.keyword} ${error.error.message}`, }); break; case 'error': @@ -172,7 +178,7 @@ export default { default: errorMessages.push({ type: 'editor', - msg: 'Error in JSON', + msg: this.$t('config-editor.error-msg-bad-json'), }); break; } diff --git a/src/components/Configuration/RebuildApp.vue b/src/components/Configuration/RebuildApp.vue index 4d1ebcaa..e6a71b17 100644 --- a/src/components/Configuration/RebuildApp.vue +++ b/src/components/Configuration/RebuildApp.vue @@ -2,35 +2,41 @@
- A rebuild is required for changes written to the conf.yml file to take effect.
- This should happen automatically, but if it hasn't, you can manually trigger it here.
- This is not required for modifications stored locally.
+ {{ $t('app-rebuild.rebuild-note-l1') }}
+ {{ $t('app-rebuild.rebuild-note-l2') }}
+ {{ $t('app-rebuild.rebuild-note-l3') }}
You do no have permission to trigger this action
+{{ $t('app-rebuild.error-permission') }}
✅ Build completed succesfully
-❌ Build operation failed
++ ✅ {{ $t('app-rebuild.success-msg') }} +
++ ❌ {{ $t('app-rebuild.fail-msg') }} +
{{ output || error }}