From 800260263b5a1357034211baf9458faba1bf63ac Mon Sep 17 00:00:00 2001 From: DrMint Date: Sat, 12 Feb 2022 11:01:40 +0100 Subject: [PATCH] Added further translation systems --- .../content-types/audio-subtype/schema.json | 5 + .../content-types/content-type/schema.json | 5 + .../content-types/library-item/schema.json | 23 ++- .../content-types/library-variant/schema.json | 22 --- .../controllers/library-variant.js | 9 -- .../library-variant/routes/library-variant.js | 9 -- .../services/library-variant.js | 9 -- .../content-types/merch-item/schema.json | 25 ++- .../content-types/other-subtype/schema.json | 5 + .../content-types/textual-subtype/schema.json | 5 + .../website-interface/schema.json | 152 ++++++++++++++++++ .../controllers/website-interface.js | 9 ++ .../routes/website-interface.js | 9 ++ .../services/website-interface.js | 9 ++ src/components/translations/simple-title.json | 20 +++ src/components/translations/title.json | 2 +- 16 files changed, 260 insertions(+), 58 deletions(-) delete mode 100644 src/api/library-variant/content-types/library-variant/schema.json delete mode 100644 src/api/library-variant/controllers/library-variant.js delete mode 100644 src/api/library-variant/routes/library-variant.js delete mode 100644 src/api/library-variant/services/library-variant.js create mode 100644 src/api/website-interface/content-types/website-interface/schema.json create mode 100644 src/api/website-interface/controllers/website-interface.js create mode 100644 src/api/website-interface/routes/website-interface.js create mode 100644 src/api/website-interface/services/website-interface.js create mode 100644 src/components/translations/simple-title.json diff --git a/src/api/audio-subtype/content-types/audio-subtype/schema.json b/src/api/audio-subtype/content-types/audio-subtype/schema.json index 69fb2a8..4fbba5c 100644 --- a/src/api/audio-subtype/content-types/audio-subtype/schema.json +++ b/src/api/audio-subtype/content-types/audio-subtype/schema.json @@ -17,6 +17,11 @@ "regex": "^[a-z0-9]+(?:-[a-z0-9]+)*$", "unique": true, "required": true + }, + "titles": { + "type": "component", + "repeatable": true, + "component": "translations.simple-title" } } } diff --git a/src/api/content-type/content-types/content-type/schema.json b/src/api/content-type/content-types/content-type/schema.json index 5369337..21f83cf 100644 --- a/src/api/content-type/content-types/content-type/schema.json +++ b/src/api/content-type/content-types/content-type/schema.json @@ -17,6 +17,11 @@ "regex": "^[a-z0-9]+(?:-[a-z0-9]+)*$", "unique": true, "required": true + }, + "titles": { + "type": "component", + "repeatable": true, + "component": "translations.simple-title" } } } diff --git a/src/api/library-item/content-types/library-item/schema.json b/src/api/library-item/content-types/library-item/schema.json index ec58f5a..a263a8a 100644 --- a/src/api/library-item/content-types/library-item/schema.json +++ b/src/api/library-item/content-types/library-item/schema.json @@ -61,12 +61,6 @@ "pluginOptions": {}, "component": "basics.price" }, - "variants": { - "type": "relation", - "relation": "manyToOne", - "target": "api::library-variant.library-variant", - "inversedBy": "items" - }, "metadata": { "pluginOptions": {}, "type": "dynamiczone", @@ -75,7 +69,6 @@ "metadata.video", "metadata.game", "metadata.audio", - "metadata.merch", "metadata.other" ], "max": 1 @@ -117,6 +110,22 @@ "type": "component", "repeatable": false, "component": "collections-component.library-images" + }, + "digital": { + "type": "boolean", + "default": false, + "required": true + }, + "primary": { + "type": "boolean", + "default": true, + "required": true + }, + "submerchs": { + "type": "relation", + "relation": "manyToMany", + "target": "api::merch-item.merch-item", + "mappedBy": "library_items" } } } diff --git a/src/api/library-variant/content-types/library-variant/schema.json b/src/api/library-variant/content-types/library-variant/schema.json deleted file mode 100644 index 5e71340..0000000 --- a/src/api/library-variant/content-types/library-variant/schema.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "kind": "collectionType", - "collectionName": "library_variants", - "info": { - "singularName": "library-variant", - "pluralName": "library-variants", - "displayName": "🔴 Library Variants", - "description": "" - }, - "options": { - "draftAndPublish": false - }, - "pluginOptions": {}, - "attributes": { - "items": { - "type": "relation", - "relation": "oneToMany", - "target": "api::library-item.library-item", - "mappedBy": "variants" - } - } -} diff --git a/src/api/library-variant/controllers/library-variant.js b/src/api/library-variant/controllers/library-variant.js deleted file mode 100644 index 09e62b7..0000000 --- a/src/api/library-variant/controllers/library-variant.js +++ /dev/null @@ -1,9 +0,0 @@ -'use strict'; - -/** - * library-variant controller - */ - -const { createCoreController } = require('@strapi/strapi').factories; - -module.exports = createCoreController('api::library-variant.library-variant'); diff --git a/src/api/library-variant/routes/library-variant.js b/src/api/library-variant/routes/library-variant.js deleted file mode 100644 index f9f2a02..0000000 --- a/src/api/library-variant/routes/library-variant.js +++ /dev/null @@ -1,9 +0,0 @@ -'use strict'; - -/** - * library-variant router. - */ - -const { createCoreRouter } = require('@strapi/strapi').factories; - -module.exports = createCoreRouter('api::library-variant.library-variant'); diff --git a/src/api/library-variant/services/library-variant.js b/src/api/library-variant/services/library-variant.js deleted file mode 100644 index 34e98a5..0000000 --- a/src/api/library-variant/services/library-variant.js +++ /dev/null @@ -1,9 +0,0 @@ -'use strict'; - -/** - * library-variant service. - */ - -const { createCoreService } = require('@strapi/strapi').factories; - -module.exports = createCoreService('api::library-variant.library-variant'); diff --git a/src/api/merch-item/content-types/merch-item/schema.json b/src/api/merch-item/content-types/merch-item/schema.json index 1d7ffe6..6472332 100644 --- a/src/api/merch-item/content-types/merch-item/schema.json +++ b/src/api/merch-item/content-types/merch-item/schema.json @@ -4,7 +4,8 @@ "info": { "singularName": "merch-item", "pluralName": "merch-items", - "displayName": "Merch Items" + "displayName": "🔵 Merch Items", + "description": "" }, "options": { "draftAndPublish": false @@ -15,6 +16,28 @@ "required": true, "unique": true, "regex": "^[a-z0-9]+(?:-[a-z0-9]+)*$" + }, + "library_items": { + "type": "relation", + "relation": "manyToMany", + "target": "api::library-item.library-item", + "inversedBy": "submerchs" + }, + "title": { + "type": "string", + "required": true + }, + "subtitle": { + "type": "string" + }, + "thumbnail": { + "allowedTypes": [ + "images", + "files", + "videos" + ], + "type": "media", + "multiple": false } } } diff --git a/src/api/other-subtype/content-types/other-subtype/schema.json b/src/api/other-subtype/content-types/other-subtype/schema.json index e51236e..e3a9fed 100644 --- a/src/api/other-subtype/content-types/other-subtype/schema.json +++ b/src/api/other-subtype/content-types/other-subtype/schema.json @@ -16,6 +16,11 @@ "required": true, "unique": true, "regex": "^[a-z0-9]+(?:-[a-z0-9]+)*$" + }, + "titles": { + "type": "component", + "repeatable": true, + "component": "translations.simple-title" } } } diff --git a/src/api/textual-subtype/content-types/textual-subtype/schema.json b/src/api/textual-subtype/content-types/textual-subtype/schema.json index ab994d1..51a6c0b 100644 --- a/src/api/textual-subtype/content-types/textual-subtype/schema.json +++ b/src/api/textual-subtype/content-types/textual-subtype/schema.json @@ -17,6 +17,11 @@ "regex": "^[a-z0-9]+(?:-[a-z0-9]+)*$", "unique": true, "required": true + }, + "titles": { + "type": "component", + "repeatable": true, + "component": "translations.simple-title" } } } diff --git a/src/api/website-interface/content-types/website-interface/schema.json b/src/api/website-interface/content-types/website-interface/schema.json new file mode 100644 index 0000000..5ef5127 --- /dev/null +++ b/src/api/website-interface/content-types/website-interface/schema.json @@ -0,0 +1,152 @@ +{ + "kind": "collectionType", + "collectionName": "website_interfaces", + "info": { + "singularName": "website-interface", + "pluralName": "website-interfaces", + "displayName": "⚫ Website Interfaces", + "description": "" + }, + "options": { + "draftAndPublish": false + }, + "attributes": { + "language": { + "type": "relation", + "relation": "oneToOne", + "target": "api::language.language" + }, + "main_library": { + "type": "string" + }, + "main_library_description": { + "type": "string" + }, + "main_hub": { + "type": "string" + }, + "main_hub_description": { + "type": "string" + }, + "main_chronology": { + "type": "string" + }, + "main_chronology_description": { + "type": "string" + }, + "main_news": { + "type": "string" + }, + "main_data": { + "type": "string" + }, + "main_merch": { + "type": "string" + }, + "main_gallery": { + "type": "string" + }, + "main_archives": { + "type": "string" + }, + "main_about_us": { + "type": "string" + }, + "main_licensing": { + "type": "text" + }, + "main_copyright": { + "type": "text" + }, + "library_description": { + "type": "text" + }, + "library_item_summary": { + "type": "string" + }, + "library_item_gallery": { + "type": "string" + }, + "library_item_details": { + "type": "string" + }, + "library_item_subitems": { + "type": "string" + }, + "library_item_variants": { + "type": "string" + }, + "library_item_content": { + "type": "string" + }, + "global_return_label": { + "type": "string" + }, + "global_subitem_of": { + "type": "string" + }, + "global_type": { + "type": "string" + }, + "global_width": { + "type": "string" + }, + "global_height": { + "type": "string" + }, + "global_thickness": { + "type": "string" + }, + "global_binding": { + "type": "string" + }, + "global_language": { + "type": "string" + }, + "global_languages": { + "type": "string" + }, + "global_page": { + "type": "string" + }, + "global_pages": { + "type": "string" + }, + "global_page_order": { + "type": "string" + }, + "global_release_date": { + "type": "string" + }, + "global_price": { + "type": "string" + }, + "library_item_physical_size": { + "type": "string" + }, + "library_item_type_information": { + "type": "string" + }, + "chronology_description": { + "type": "text" + }, + "chronology_timelines": { + "type": "string" + }, + "chronology_timelines_description": { + "type": "string" + }, + "chronology_overview": { + "type": "string" + }, + "chronology_overview_description": { + "type": "string" + }, + "chronology_walkthrough": { + "type": "string" + }, + "chronology_walkthrough_description": { + "type": "string" + } + } +} diff --git a/src/api/website-interface/controllers/website-interface.js b/src/api/website-interface/controllers/website-interface.js new file mode 100644 index 0000000..9629ba3 --- /dev/null +++ b/src/api/website-interface/controllers/website-interface.js @@ -0,0 +1,9 @@ +'use strict'; + +/** + * website-interface controller + */ + +const { createCoreController } = require('@strapi/strapi').factories; + +module.exports = createCoreController('api::website-interface.website-interface'); diff --git a/src/api/website-interface/routes/website-interface.js b/src/api/website-interface/routes/website-interface.js new file mode 100644 index 0000000..45389a6 --- /dev/null +++ b/src/api/website-interface/routes/website-interface.js @@ -0,0 +1,9 @@ +'use strict'; + +/** + * website-interface router. + */ + +const { createCoreRouter } = require('@strapi/strapi').factories; + +module.exports = createCoreRouter('api::website-interface.website-interface'); diff --git a/src/api/website-interface/services/website-interface.js b/src/api/website-interface/services/website-interface.js new file mode 100644 index 0000000..30cc4c1 --- /dev/null +++ b/src/api/website-interface/services/website-interface.js @@ -0,0 +1,9 @@ +'use strict'; + +/** + * website-interface service. + */ + +const { createCoreService } = require('@strapi/strapi').factories; + +module.exports = createCoreService('api::website-interface.website-interface'); diff --git a/src/components/translations/simple-title.json b/src/components/translations/simple-title.json new file mode 100644 index 0000000..e79777b --- /dev/null +++ b/src/components/translations/simple-title.json @@ -0,0 +1,20 @@ +{ + "collectionName": "components_translations_simple_titles", + "info": { + "displayName": "simple-title", + "icon": "align-justify", + "description": "" + }, + "options": {}, + "attributes": { + "language": { + "type": "relation", + "relation": "oneToOne", + "target": "api::language.language" + }, + "title": { + "type": "string", + "required": true + } + } +} diff --git a/src/components/translations/title.json b/src/components/translations/title.json index 393de18..5508d01 100644 --- a/src/components/translations/title.json +++ b/src/components/translations/title.json @@ -1,7 +1,7 @@ { "collectionName": "components_translations_titles", "info": { - "displayName": "title", + "displayName": "tri title", "icon": "feather", "description": "" },