From 435f47a647769539ab75f0dca47a5cb5c893458a Mon Sep 17 00:00:00 2001 From: goynov Date: Mon, 9 Feb 2026 16:52:41 +0200 Subject: [PATCH] translations --- .../InteractiveObjects/InteractiveObject.js | 35 ++++++----------- src/components/SceneDesigner/GameObject.vue | 2 +- src/components/SceneDesigner/Scene.vue | 8 ++-- src/plugins/lang.js | 38 ++++++++++++++++++- 4 files changed, 53 insertions(+), 30 deletions(-) diff --git a/src/components/InteractiveObjects/InteractiveObject.js b/src/components/InteractiveObjects/InteractiveObject.js index d93204b..b4f9e91 100644 --- a/src/components/InteractiveObjects/InteractiveObject.js +++ b/src/components/InteractiveObjects/InteractiveObject.js @@ -34,6 +34,7 @@ class InteractiveObject extends EventManager{ this.maxPoints = obj.points || 0; this.name = obj.name; return new Promise(async (resolve, reject) => { + //TODO: refactor this! switch (obj.type || 'GenericObject') { case 'Group': this.object = new Group(); @@ -164,29 +165,17 @@ class LockActivator{ GameEngine.loadTexture('locked.webp', '/static/textures/', null, [LockActivator.materialLocked, 'alphaMap']) const InteractiveObjectTypes = [ - { - id: 'GenericObject', name: 'Generic Game Object' - },{ - id: 'CharacterObject', name: 'Character' - }, { - id: 'PuzzleGame1', name: 'Puzzle Game 1' - },{ - id: 'PuzzleGame2', name: 'Puzzle Game 2' - },{ - id: 'MazeQuizGame', name: 'Maze Quiz Game' - },{ - id: 'ClassicPuzzle', name: 'Classic Puzzle Game' - },{ - id: 'PairMatchingGame', name: 'Pair Matching Game' - },{ - id: 'SingleQuestion', name: 'Single Question' - },{ - id: 'VideoPlayer', name: 'Video Player' - },{ - id: 'Particles', name: 'Particles' - },{ - id: 'SceneSwitcher', name: 'Scene Switcher' - } + 'GenericObject', + 'CharacterObject', + 'PuzzleGame1', + 'PuzzleGame2', + 'MazeQuizGame', + 'ClassicPuzzle', + 'PairMatchingGame', + 'SingleQuestion', + 'VideoPlayer', + 'Particles', + 'SceneSwitcher', ]; export { InteractiveObject, InteractiveObjectTypes, InteractiveObjectsImports } \ No newline at end of file diff --git a/src/components/SceneDesigner/GameObject.vue b/src/components/SceneDesigner/GameObject.vue index 3ff360b..1da1f27 100644 --- a/src/components/SceneDesigner/GameObject.vue +++ b/src/components/SceneDesigner/GameObject.vue @@ -23,7 +23,7 @@ + :items="InteractiveObjectTypes.map(e=>({title: l.interactiveObjects[e], value: e}))"> diff --git a/src/components/SceneDesigner/Scene.vue b/src/components/SceneDesigner/Scene.vue index 6c77bcc..9b710ec 100644 --- a/src/components/SceneDesigner/Scene.vue +++ b/src/components/SceneDesigner/Scene.vue @@ -12,27 +12,27 @@ diff --git a/src/plugins/lang.js b/src/plugins/lang.js index 8fb6a45..c2568ac 100644 --- a/src/plugins/lang.js +++ b/src/plugins/lang.js @@ -14,7 +14,7 @@ const lang = { objectType: 'Object type', objectFile: 'File', panorama2d: 'Panorama picture', - environment3d: 'Environment', + environment3d: 'Terrain/environment', object3d: '3D object', object2d: '2D object (picture)', audio: 'Audio', @@ -57,6 +57,10 @@ const lang = { chooseGameObject: 'Choose game object', chooseVideoObject: 'Choose video object', selectCharacter: 'Select character', + selectEnvironment: 'Select environment', + selectScene: 'Select terrain/scene', + selectIntroduction: 'Select introduction video', + selectAmbientSound: 'Select ambient music', width: 'Width', height: 'Height', question: 'Question', @@ -113,6 +117,19 @@ const lang = { firstName:'First Name', lastName:'Last Name', fullScreen: 'Full screen', + interactiveObjects:{ + GenericObject: 'Generic object', + CharacterObject: 'Character', + PuzzleGame1: 'Puzzle Game 1', + PuzzleGame2: 'Puzzle Game 2', + MazeQuizGame: 'Maze Quiz Game', + ClassicPuzzle: 'Classic Puzzle Game', + PairMatchingGame: 'Pair Matching Game', + SingleQuestion: 'Single Question', + VideoPlayer: 'Video Player', + Particles: 'Particles', + SceneSwitcher: 'Scene Switcher', + }, errors:{ unauthorized: 'Unauthorized', notFound: 'Object not found', @@ -150,7 +167,7 @@ const lang = { objectType: 'Тип обект', objectFile: 'Файл', panorama2d: 'Панорамна снимка', - environment3d: 'Околна среда', + environment3d: 'Терен / Околна среда', object3d: 'Триизмерен обект', object2d: 'Двумерен обект (изображение)', audio: 'Аудио', @@ -193,6 +210,10 @@ const lang = { chooseGameObject: 'Избери игрови обект', chooseVideoObject: 'Избери видео обект', selectCharacter: 'Избери герой', + selectEnvironment: 'Избери околна среда', + selectScene: 'Избери терен/сцена', + selectIntroduction: 'Избери въвеждащо видео', + selectAmbientSound: 'Избери фонова музика', width: 'Ширина', height: 'Височина', question: 'Въпрос', @@ -249,6 +270,19 @@ const lang = { firstName:'Име', lastName:'Фамилия', fullScreen: 'Цял екран', + interactiveObjects:{ + GenericObject: 'Стандартен 3D обект', + CharacterObject: 'Герой', + PuzzleGame1: 'Пъзел игра 1', + PuzzleGame2: 'Пъзел игра 2', + MazeQuizGame: 'Лабиринт от въпроси', + ClassicPuzzle: 'Класически пъзел', + PairMatchingGame: 'Игра за съпоставяне на двойки', + SingleQuestion: 'Единичен въпрос', + VideoPlayer: 'Видео обект', + Particles: 'Частици', + SceneSwitcher: 'Превключвател на сцени', + }, errors:{ unauthorized: 'Отказан достъп', notFound: 'Обектът не е намерен',