diff --git a/extensions/community/EasyTranslate.json b/extensions/community/EasyTranslate.json new file mode 100644 index 000000000..6f41ab8fe --- /dev/null +++ b/extensions/community/EasyTranslate.json @@ -0,0 +1,565 @@ +{ + "author": "", + "category": "General", + "dimension": "2D/3D", + "extensionNamespace": "", + "fullName": "Easy Translate", + "gdevelopVersion": "", + "helpPath": "https://youtu.be/gxSpnkGKkUw", + "iconUrl": "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4NCjwhLS0gR2VuZXJhdG9yOiBBZG9iZSBJbGx1c3RyYXRvciAyMy4wLjMsIFNWRyBFeHBvcnQgUGx1Zy1JbiAuIFNWRyBWZXJzaW9uOiA2LjAwIEJ1aWxkIDApICAtLT4NCjxzdmcgdmVyc2lvbj0iMS4xIiBpZD0iSWNvbnMiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHg9IjBweCIgeT0iMHB4Ig0KCSB2aWV3Qm94PSIwIDAgMzIgMzIiIHN0eWxlPSJlbmFibGUtYmFja2dyb3VuZDpuZXcgMCAwIDMyIDMyOyIgeG1sOnNwYWNlPSJwcmVzZXJ2ZSI+DQo8Zz4NCgk8cGF0aCBkPSJNMTAsMTFjMC40LTAuNiwwLjgtMS4yLDAuOS0ySDkuMUM5LjIsOS43LDkuNiwxMC40LDEwLDExeiIvPg0KCTxwYXRoIGQ9Ik0xOSwxOFYyYzAtMC42LTAuNC0xLTEtMUgyQzEuNCwxLDEsMS40LDEsMnYxNmMwLDAuNiwwLjQsMSwxLDFoMTZDMTguNiwxOSwxOSwxOC42LDE5LDE4eiBNMTQsMTNjMC42LDAsMSwwLjQsMSwxDQoJCXMtMC40LDEtMSwxYy0xLjUsMC0yLjktMC41LTQtMS4zQzguOSwxNC41LDcuNSwxNSw2LDE1Yy0wLjYsMC0xLTAuNC0xLTFzMC40LTEsMS0xYzAuOSwwLDEuOC0wLjMsMi41LTAuN0M3LjgsMTEuNCw3LjMsMTAuMiw3LjEsOQ0KCQlINkM1LjQsOSw1LDguNiw1LDhzMC40LTEsMS0xaDNWNWMwLTAuNiwwLjQtMSwxLTFzMSwwLjQsMSwxdjJoM2MwLjYsMCwxLDAuNCwxLDFzLTAuNCwxLTEsMWgtMS4xYy0wLjIsMS4yLTAuNywyLjQtMS40LDMuMw0KCQlDMTIuMiwxMi43LDEzLjEsMTMsMTQsMTN6Ii8+DQoJPHBvbHlnb24gcG9pbnRzPSIyMC42LDIzIDIzLjQsMjMgMjIsMjAuMiAJIi8+DQoJPHBhdGggZD0iTTMwLDEzaC05djQuOGwwLjEtMC4yYzAuMy0wLjcsMS40LTAuNywxLjgsMGw0LDhjMC4yLDAuNSwwLDEuMS0wLjQsMS4zQzI2LjMsMjcsMjYuMiwyNywyNiwyN2MtMC40LDAtMC43LTAuMi0wLjktMC42DQoJCWwtMC44LTEuNUMyNC4yLDI1LDI0LjEsMjUsMjQsMjVoLTRjLTAuMSwwLTAuMiwwLTAuMy0wLjFsLTAuOCwxLjVjLTAuMiwwLjUtMC44LDAuNy0xLjMsMC40Yy0wLjUtMC4yLTAuNy0wLjgtMC40LTEuM2wyLjUtNQ0KCQljLTAuNSwwLjMtMSwwLjUtMS42LDAuNWgtNXY5YzAsMC42LDAuNCwxLDEsMWgxNmMwLjYsMCwxLTAuNCwxLTFWMTRDMzEsMTMuNCwzMC42LDEzLDMwLDEzeiIvPg0KPC9nPg0KPC9zdmc+DQo=", + "name": "EasyTranslate", + "previewIconUrl": "https://asset-resources.gdevelop.io/public-resources/Icons/Glyphster Pack/Master/SVG/Text Editing/d115904b52a6cb4fdecf0f9741fb3756ba459112ab00070f839a118e9a724c2b_Text Editing_special_characters_translate.svg", + "shortDescription": "Easily translate Text objects by defining their content for different languages.", + "version": "0.1.0", + "description": [ + "Quickly localize your Text objects in GDevelop by defining different text values for each language. Simply add the extension to a Text object and configure the text you want to display for each supported language.", + "", + "The extension automatically displays the appropriate text based on the selected language, making it easier to manage translations without creating separate events or manually changing the text of each object.", + "", + "English is used as the default language, and additional languages can be configured as needed.", + "" + ], + "tags": [ + "Translate" + ], + "authorIds": [ + "ThTNbO5CH2PFLjew5p0BhyRJtv72" + ], + "dependencies": [], + "globalVariables": [ + { + "name": "select_languaje", + "persistentUuid": "58f9ea67-fe30-4cb8-985d-1e08dc7ae1fd", + "type": "string", + "value": "English" + } + ], + "sceneVariables": [], + "eventsFunctions": [ + { + "description": "Changes the game's language to the specified language. This action is executed once per trigger.\n", + "fullName": "Change Language", + "functionType": "Action", + "name": "Change_Language", + "sentence": "Change the language of the game to _PARAM1_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetStringVariable" + }, + "parameters": [ + "select_languaje", + "=", + "language_selected" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Languages", + "name": "language_selected", + "supplementaryInformation": "[\"English\",\"French\",\"German\",\"Italian\",\"Japanese\",\"Portuguese\",\"Spanish\",\"Other\"]", + "type": "stringWithSelector" + } + ], + "objectGroups": [] + } + ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "Change_Language" + } + ] + }, + "eventsBasedBehaviors": [ + { + "description": "Easily translate Text objects by defining their content for different languages.", + "fullName": "Easy Translate", + "helpPath": "", + "iconUrl": "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4NCjwhLS0gR2VuZXJhdG9yOiBBZG9iZSBJbGx1c3RyYXRvciAyMy4wLjMsIFNWRyBFeHBvcnQgUGx1Zy1JbiAuIFNWRyBWZXJzaW9uOiA2LjAwIEJ1aWxkIDApICAtLT4NCjxzdmcgdmVyc2lvbj0iMS4xIiBpZD0iSWNvbnMiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGx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42DQoJCWwtMC44LTEuNUMyNC4yLDI1LDI0LjEsMjUsMjQsMjVoLTRjLTAuMSwwLTAuMiwwLTAuMy0wLjFsLTAuOCwxLjVjLTAuMiwwLjUtMC44LDAuNy0xLjMsMC40Yy0wLjUtMC4yLTAuNy0wLjgtMC40LTEuM2wyLjUtNQ0KCQljLTAuNSwwLjMtMSwwLjUtMS42LDAuNWgtNXY5YzAsMC42LDAuNCwxLDEsMWgxNmMwLjYsMCwxLTAuNCwxLTFWMTRDMzEsMTMuNCwzMC42LDEzLDMwLDEzeiIvPg0KPC9nPg0KPC9zdmc+DQo=", + "name": "EasyTranslate", + "objectType": "TextObject::Text", + "previewIconUrl": "https://asset-resources.gdevelop.io/public-resources/Icons/Glyphster Pack/Master/SVG/Text Editing/d115904b52a6cb4fdecf0f9741fb3756ba459112ab00070f839a118e9a724c2b_Text Editing_special_characters_translate.svg", + "eventsFunctions": [ + { + "fullName": "", + "functionType": "Action", + "name": "doStepPostEvents", + "sentence": "", + "events": [ + { + "folded": true, + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "select_languaje", + "=", + "\"English\"" + ] + } + ], + "actions": [], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BuiltinCommonInstructions::Once" + }, + "parameters": [] + } + ], + "actions": [ + { + "type": { + "value": "TextContainerCapability::TextContainerBehavior::SetValue" + }, + "parameters": [ + "Object", + "Text", + "=", + "English" + ] + } + ] + } + ] + }, + { + "folded": true, + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "select_languaje", + "=", + "\"French\"" + ] + } + ], + "actions": [], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BuiltinCommonInstructions::Once" + }, + "parameters": [] + } + ], + "actions": [ + { + "type": { + "value": "TextContainerCapability::TextContainerBehavior::SetValue" + }, + "parameters": [ + "Object", + "Text", + "=", + "French" + ] + } + ] + } + ] + }, + { + "folded": true, + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "select_languaje", + "=", + "\"German\"" + ] + } + ], + "actions": [], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BuiltinCommonInstructions::Once" + }, + "parameters": [] + } + ], + "actions": [ + { + "type": { + "value": "TextContainerCapability::TextContainerBehavior::SetValue" + }, + "parameters": [ + "Object", + "Text", + "=", + "German" + ] + } + ] + } + ] + }, + { + "folded": true, + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "select_languaje", + "=", + "\"Italian\"" + ] + } + ], + "actions": [], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BuiltinCommonInstructions::Once" + }, + "parameters": [] + } + ], + "actions": [ + { + "type": { + "value": "TextContainerCapability::TextContainerBehavior::SetValue" + }, + "parameters": [ + "Object", + "Text", + "=", + "Italian" + ] + } + ] + } + ] + }, + { + "folded": true, + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "select_languaje", + "=", + "\"Japanese\"" + ] + } + ], + "actions": [], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BuiltinCommonInstructions::Once" + }, + "parameters": [] + } + ], + "actions": [ + { + "type": { + "value": "TextContainerCapability::TextContainerBehavior::SetValue" + }, + "parameters": [ + "Object", + "Text", + "=", + "Japanese" + ] + } + ] + } + ] + }, + { + "folded": true, + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "select_languaje", + "=", + "\"Portuguese\"" + ] + } + ], + "actions": [], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BuiltinCommonInstructions::Once" + }, + "parameters": [] + } + ], + "actions": [ + { + "type": { + "value": "TextContainerCapability::TextContainerBehavior::SetValue" + }, + "parameters": [ + "Object", + "Text", + "=", + "Portuguese" + ] + } + ] + } + ] + }, + { + "folded": true, + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "select_languaje", + "=", + "\"Spanish\"" + ] + } + ], + "actions": [], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BuiltinCommonInstructions::Once" + }, + "parameters": [] + } + ], + "actions": [ + { + "type": { + "value": "TextContainerCapability::TextContainerBehavior::SetValue" + }, + "parameters": [ + "Object", + "Text", + "=", + "Spanish" + ] + } + ] + } + ] + }, + { + "folded": true, + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "select_languaje", + "=", + "\"Other\"" + ] + } + ], + "actions": [], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BuiltinCommonInstructions::Once" + }, + "parameters": [] + } + ], + "actions": [ + { + "type": { + "value": "TextContainerCapability::TextContainerBehavior::SetValue" + }, + "parameters": [ + "Object", + "Text", + "=", + "Other" + ] + } + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "TextObject::Text", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "EasyTranslate::EasyTranslate", + "type": "behavior" + } + ], + "objectGroups": [] + } + ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "doStepPostEvents" + } + ] + }, + "propertyDescriptors": [ + { + "value": "Hola", + "type": "String", + "label": "", + "group": "All languages", + "name": "Spanish" + }, + { + "value": "Olá", + "type": "String", + "label": "", + "group": "All languages", + "name": "Portuguese" + }, + { + "value": "Hallo", + "type": "String", + "label": "", + "group": "All languages", + "name": "German" + }, + { + "value": "Bonjour", + "type": "String", + "label": "", + "group": "All languages", + "name": "French" + }, + { + "value": "こんにちは", + "type": "String", + "label": "", + "group": "All languages", + "name": "Japanese" + }, + { + "value": "Ciao", + "type": "String", + "label": "", + "group": "All languages", + "name": "Italian" + }, + { + "value": "Hello", + "type": "String", + "label": "", + "description": "> You don't need to fill in or modify every language field. Only configure the languages you want to use.", + "group": "All languages", + "name": "English" + }, + { + "value": "Hello", + "type": "String", + "label": "", + "description": "> You can agree an extra language here", + "advanced": true, + "name": "Other" + } + ], + "propertiesFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "folderName": "All languages", + "children": [ + { + "propertyName": "Spanish" + }, + { + "propertyName": "English" + }, + { + "propertyName": "Italian" + }, + { + "propertyName": "Portuguese" + }, + { + "propertyName": "French" + }, + { + "propertyName": "German" + }, + { + "propertyName": "Japanese" + } + ] + }, + { + "propertyName": "Other" + } + ] + } + } + ], + "eventsBasedObjects": [] +}