From 9b2c63d92ff77ebce0f90a7be05437504422bf45 Mon Sep 17 00:00:00 2001 From: ivarlovlie Date: Sat, 11 Feb 2023 23:37:12 +0100 Subject: feat: Render localized content from sanity --- sanity/schemas/localized-string.ts | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 sanity/schemas/localized-string.ts (limited to 'sanity/schemas/localized-string.ts') diff --git a/sanity/schemas/localized-string.ts b/sanity/schemas/localized-string.ts new file mode 100644 index 0000000..6ff7424 --- /dev/null +++ b/sanity/schemas/localized-string.ts @@ -0,0 +1,20 @@ +import { supportedLanguages } from "./_locales"; + +export default { + title: 'Localized string', + name: 'localizedString', + type: 'object', + fieldsets: [ + { + title: 'Translations', + name: 'translations', + options: { collapsible: true } + } + ], + fields: supportedLanguages.map(lang => ({ + title: lang.title, + name: lang.id, + type: 'string', + fieldset: lang.isDefault ? null : 'translations' + })) +} -- cgit v1.3