mirror of
https://github.com/directus/directus.git
synced 2026-02-03 16:25:04 -05:00
Add singular/plural collection name translations (#5302)
* Add singular/plural options to collection translations * Use singular/plural item names in related values * Use singular / plural names on item detail * Use singular/plural for drawer item * Fix translation
This commit is contained in:
@@ -299,6 +299,12 @@ export default defineComponent({
|
||||
const leaveTo = ref<string | null>(null);
|
||||
|
||||
const title = computed(() => {
|
||||
if (i18n.te(`collection_names_singular.${props.collection}`)) {
|
||||
return isNew.value
|
||||
? i18n.t('creating_unit', { unit: i18n.t(`collection_names_singular.${props.collection}`) })
|
||||
: i18n.t('editing_unit', { unit: i18n.t(`collection_names_singular.${props.collection}`) });
|
||||
}
|
||||
|
||||
return isNew.value
|
||||
? i18n.t('creating_in', { collection: collectionInfo.value?.name })
|
||||
: i18n.t('editing_in', { collection: collectionInfo.value?.name });
|
||||
|
||||
Reference in New Issue
Block a user