Skip to content

Commit

Permalink
Fix translation of "Geometry (All)" type (directus#21028)
Browse files Browse the repository at this point in the history
  • Loading branch information
paescuj authored Jan 10, 2024
1 parent c46fb89 commit a089e8b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ const typeOptions = computed(() => {
if (!chosenInterfaceConfig.value) return [];
return chosenInterfaceConfig.value.types.map((type) => ({
text: t(type),
text: t(type === 'geometry' ? 'geometry.All' : type),
value: type,
}));
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,8 @@ async function onGroupSortChange(fields: Field[]) {
emit('setNestedSort', updates);
}
const tFieldType = (type: string) => t(type === 'geometry' ? 'geometry.All' : type);
</script>

<template>
Expand All @@ -170,7 +172,7 @@ async function onGroupSortChange(fields: Field[]) {
<template #input>
<div
v-tooltip="`${field.name} (${formatTitle(field.type)})${interfaceName ? ` - ${interfaceName}` : ''}`"
v-tooltip="`${field.name} (${tFieldType(field.type)})${interfaceName ? ` - ${interfaceName}` : ''}`"
class="label"
>
<div class="label-inner">
Expand Down Expand Up @@ -225,7 +227,7 @@ async function onGroupSortChange(fields: Field[]) {
<template #input>
<div
v-tooltip="`${field.name} (${formatTitle(field.type)})${interfaceName ? ` - ${interfaceName}` : ''}`"
v-tooltip="`${field.name} (${tFieldType(field.type)})${interfaceName ? ` - ${interfaceName}` : ''}`"
class="label"
@click="openFieldDetail"
>
Expand Down

0 comments on commit a089e8b

Please sign in to comment.