Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found
Select Git revision
Loading items

Target

Select target project
  • coscine/frontend/apps/ui
1 result
Select Git revision
Loading items
Show changes
Commits on Source (3)
{ {
"name": "ui", "name": "ui",
"version": "3.13.0", "version": "3.13.1",
"scripts": { "scripts": {
"dev": "vite", "dev": "vite",
"build": "vite build", "build": "vite build",
......
...@@ -511,6 +511,10 @@ const visibilities = computed(() => projectStore.visibilities ?? []); ...@@ -511,6 +511,10 @@ const visibilities = computed(() => projectStore.visibilities ?? []);
const disciplines = computed(() => projectStore.disciplines ?? []); const disciplines = computed(() => projectStore.disciplines ?? []);
const disciplineLabel = computed(() => { const disciplineLabel = computed(() => {
let locale = i18n.locale.value; let locale = i18n.locale.value;
// Ensure that the value of locale is a valid locale, otherwie the property for disciplineLabel will be inaccurate
if (i18n.availableLocales.includes(locale) === false) {
locale = i18n.fallbackLocale.value.toString();
}
locale = locale.charAt(0).toUpperCase() + locale.slice(1); locale = locale.charAt(0).toUpperCase() + locale.slice(1);
return `displayName${locale}`; return `displayName${locale}`;
}); });
......
...@@ -285,6 +285,10 @@ export default defineComponent({ ...@@ -285,6 +285,10 @@ export default defineComponent({
}, },
disciplineLabel(): string { disciplineLabel(): string {
let locale = this.$i18n.locale; let locale = this.$i18n.locale;
// Ensure that the value of locale is a valid locale, otherwie the property for disciplineLabel will be inaccurate
if (this.$i18n.availableLocales.includes(locale) === false) {
locale = this.$i18n.fallbackLocale.toString();
}
locale = locale.charAt(0).toUpperCase() + locale.slice(1); locale = locale.charAt(0).toUpperCase() + locale.slice(1);
return `displayName${locale}`; return `displayName${locale}`;
}, },
......
...@@ -180,6 +180,10 @@ export default defineComponent({ ...@@ -180,6 +180,10 @@ export default defineComponent({
}, },
disciplineLabel(): string { disciplineLabel(): string {
let locale = this.$i18n.locale; let locale = this.$i18n.locale;
// Ensure that the value of locale is a valid locale, otherwie the property for disciplineLabel will be inaccurate
if (this.$i18n.availableLocales.includes(locale) === false) {
locale = this.$i18n.fallbackLocale.toString();
}
locale = locale.charAt(0).toUpperCase() + locale.slice(1); locale = locale.charAt(0).toUpperCase() + locale.slice(1);
return `displayName${locale}`; return `displayName${locale}`;
}, },
......
...@@ -376,6 +376,10 @@ const disciplines = computed(() => { ...@@ -376,6 +376,10 @@ const disciplines = computed(() => {
}); });
const disciplineLabel = computed(() => { const disciplineLabel = computed(() => {
let locale = i18n.locale.value; let locale = i18n.locale.value;
// Ensure that the value of locale is a valid locale, otherwie the property for disciplineLabel will be inaccurate
if (i18n.availableLocales.includes(locale) === false) {
locale = i18n.fallbackLocale.value.toString();
}
locale = locale.charAt(0).toUpperCase() + locale.slice(1); locale = locale.charAt(0).toUpperCase() + locale.slice(1);
return `displayName${locale}`; return `displayName${locale}`;
}); });
......
...@@ -476,11 +476,13 @@ export default defineComponent({ ...@@ -476,11 +476,13 @@ export default defineComponent({
}, },
computed: { computed: {
disciplineLabel(): string { disciplineLabel(): string {
if (this.$i18n.locale === "en") { let locale = this.$i18n.locale;
return "displayNameEn"; // Ensure that the value of locale is a valid locale, otherwie the property for disciplineLabel will be inaccurate
} else { if (this.$i18n.availableLocales.includes(locale) === false) {
return "displayNameDe"; locale = this.$i18n.fallbackLocale.toString();
} }
locale = locale.charAt(0).toUpperCase() + locale.slice(1);
return `displayName${locale}`;
}, },
disciplines(): DisciplineDto[] { disciplines(): DisciplineDto[] {
return this.userStore.userProfile.disciplines return this.userStore.userProfile.disciplines
......