fix: fix translation linking

This commit is contained in:
Alex Grozav 2023-06-22 13:06:54 +03:00
parent b616ab6287
commit ffcbaedf18
4 changed files with 34 additions and 24 deletions

View file

@ -421,9 +421,9 @@ export default defineComponent({
case 'settings': { case 'settings': {
const defaultRoute = this.findFirstAccessibleSettingsRoute(); const defaultRoute = this.findFirstAccessibleSettingsRoute();
if (defaultRoute) { if (defaultRoute) {
const routeProps = this.$router.resolve({ name: defaultRoute }); const route = this.$router.resolve({ name: defaultRoute });
if (this.$router.currentRoute.name !== defaultRoute) { if (this.$router.currentRoute.name !== defaultRoute) {
this.goToRoute(routeProps.route.path); this.goToRoute(route.path);
} }
} }
break; break;
@ -445,7 +445,6 @@ export default defineComponent({
} }
}, },
goToRoute(route: string | { name: string }) { goToRoute(route: string | { name: string }) {
console.log(this.$router);
this.$router.push(route).catch((failure) => { this.$router.push(route).catch((failure) => {
console.log(failure); console.log(failure);
// Catch navigation failures caused by route guards // Catch navigation failures caused by route guards

View file

@ -4,7 +4,6 @@
:before-close="closeDialog" :before-close="closeDialog"
:class="{ :class="{
'dialog-wrapper': true, 'dialog-wrapper': true,
[$style.center]: center,
scrollable: scrollable, scrollable: scrollable,
[getCustomClass()]: true, [getCustomClass()]: true,
}" }"

View file

@ -597,8 +597,8 @@ export const I18nPlugin: Plugin<{}> = {
async install(app) { async install(app) {
await locale.use('en'); await locale.use('en');
locale.i18n((key: string, options?: { interpolate: object }) => locale.i18n((key: string, options?: { interpolate: Record<string, unknown> }) =>
i18nInstance.global.t(key, options && options.interpolate), i18nInstance.global.t(key, options?.interpolate || {}),
); );
app.config.globalProperties.$locale = i18n; app.config.globalProperties.$locale = i18n;

View file

@ -1,21 +1,33 @@
{ {
"_reusableBaseText.cancel": "Cancel", "_reusableBaseText": {
"_reusableBaseText.codeNodeEditor.linter.useJson": "Access the properties of an item under `.json`, e.g. `item.json`", "cancel": "Cancel",
"_reusableBaseText.codeNodeEditor.completer.all": "Get all items", "codeNodeEditor": {
"_reusableBaseText.codeNodeEditor.completer.first": "Get the first item", "linter": {
"_reusableBaseText.codeNodeEditor.completer.last": "Get the last item", "useJson": "Access the properties of an item under `.json`, e.g. `item.json`"
"_reusableBaseText.codeNodeEditor.completer.itemMatching": "Get the item matching a specified input item. Pass the input item index", },
"_reusableBaseText.name": "Name", "completer": {
"_reusableBaseText.save": "Save", "all": "Get all items",
"_reusableBaseText.dismiss": "Dismiss", "first": "Get the first item",
"_reusableDynamicText.readMore": "Read more", "last": "Get the last item",
"_reusableDynamicText.learnMore": "Learn more", "itemMatching": "Get the item matching a specified input item. Pass the input item index"
"_reusableDynamicText.moreInfo": "More info", }
"_reusableDynamicText.oauth2.clientId": "Client ID", },
"_reusableDynamicText.oauth2.clientSecret": "Client Secret", "name": "Name",
"_reusableBaseText.unlimited": "Unlimited", "save": "Save",
"_reusableBaseText.activate": "Activate", "dismiss": "Dismiss",
"_reusableBaseText.error": "Error", "unlimited": "Unlimited",
"activate": "Activate",
"error": "Error"
},
"_reusableDynamicText": {
"readMore": "Read more",
"learnMore": "Learn more",
"moreInfo": "More info",
"oauth2": {
"clientId": "Client ID",
"clientSecret": "Client Secret"
}
},
"generic.any": "Any", "generic.any": "Any",
"generic.cancel": "Cancel", "generic.cancel": "Cancel",
"generic.confirm": "Confirm", "generic.confirm": "Confirm",
@ -1132,7 +1144,7 @@
"runData.editor.save": "Save", "runData.editor.save": "Save",
"runData.editor.cancel": "Cancel", "runData.editor.cancel": "Cancel",
"runData.editor.copyDataInfo": "You can copy data from previous executions and paste it above.", "runData.editor.copyDataInfo": "You can copy data from previous executions and paste it above.",
"saveButton.save": "@:{'saveButton.saved'}", "saveButton.save": "@:_reusableBaseText.save",
"saveButton.saved": "Saved", "saveButton.saved": "Saved",
"saveButton.saving": "Saving", "saveButton.saving": "Saving",
"settings": "Settings", "settings": "Settings",