mirror of
https://github.com/directus/directus.git
synced 2026-02-17 05:01:41 -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:
@@ -37,12 +37,18 @@ export const useCollectionsStore = createStore({
|
||||
|
||||
if (collection.meta && notEmpty(collection.meta.translations)) {
|
||||
for (let i = 0; i < collection.meta.translations.length; i++) {
|
||||
const { language, translation } = collection.meta.translations[i];
|
||||
const { language, translation, singular, plural } = collection.meta.translations[i];
|
||||
|
||||
i18n.mergeLocaleMessage(language, {
|
||||
collection_names: {
|
||||
[collection.collection]: translation,
|
||||
},
|
||||
collection_names_singular: {
|
||||
[collection.collection]: singular,
|
||||
},
|
||||
collection_names_plural: {
|
||||
[collection.collection]: plural,
|
||||
},
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user