dev
This commit is contained in:
+63
-34
@@ -1,5 +1,39 @@
|
||||
const lang = {
|
||||
bg0: {
|
||||
en: {
|
||||
_code: 'en',
|
||||
createGameObject: 'Add game object',
|
||||
editGameObject: 'Edit game object',
|
||||
name: 'Name',
|
||||
description: 'Description',
|
||||
fieldRequired: 'Field is required',
|
||||
objectType: 'Object type',
|
||||
objectFile: 'File',
|
||||
panorama2d: 'Panorama picture',
|
||||
environment3d: 'Environment',
|
||||
object3d: '3D object',
|
||||
object2d: '2D object (picture)',
|
||||
audio: 'Audio',
|
||||
video: 'Video',
|
||||
player3d: 'Player',
|
||||
save: 'Save',
|
||||
saveAndPreview: 'Save and preview',
|
||||
preview: 'Preview',
|
||||
captureThumbnail: 'Save thumbnail',
|
||||
publish: 'Publish',
|
||||
gameObjects: 'Objects',
|
||||
gameScenarios: 'Scenarios',
|
||||
gameRules: 'Rules',
|
||||
games: 'Games',
|
||||
darkMode: 'Dark mode',
|
||||
confirmDeletionOf: 'Confirm deletion of',
|
||||
yes: 'Yes',
|
||||
no: 'No',
|
||||
createScenario: 'Create scenario',
|
||||
editScenario: 'Edit scenario',
|
||||
addScene: 'Add scene'
|
||||
},
|
||||
bg: {
|
||||
_code: 'bg',
|
||||
createGameObject: 'Добавяне на игрови обект',
|
||||
editGameObject: 'Редактиране на игрови обект',
|
||||
name: 'Име',
|
||||
@@ -14,6 +48,7 @@ const lang = {
|
||||
audio: 'Аудио',
|
||||
video: 'Видео',
|
||||
player3d: 'Играч',
|
||||
save: 'Запис',
|
||||
saveAndPreview: 'Запис и преглед',
|
||||
preview: 'Преглед',
|
||||
captureThumbnail: 'Save thumbnail',
|
||||
@@ -30,43 +65,37 @@ const lang = {
|
||||
editScenario: 'Редактиране на сценарий',
|
||||
addScene: 'Добавяне на сцена'
|
||||
},
|
||||
bg: {
|
||||
createGameObject: 'Add game object',
|
||||
editGameObject: 'Edit game object',
|
||||
name: 'Name',
|
||||
description: 'Description',
|
||||
fieldRequired: 'Field is required',
|
||||
objectType: 'Object type',
|
||||
objectFile: 'File',
|
||||
panorama2d: 'Panorama picture',
|
||||
environment3d: 'Environment',
|
||||
object3d: '3D object',
|
||||
object2d: '2D object (picture)',
|
||||
audio: 'Audio',
|
||||
video: 'Video',
|
||||
player3d: 'Player',
|
||||
saveAndPreview: 'Save and preview',
|
||||
preview: 'Preview',
|
||||
captureThumbnail: 'Save thumbnail',
|
||||
publish: 'Publish',
|
||||
gameObjects: 'Objects',
|
||||
gameScenarios: 'Scenarios',
|
||||
gameRules: 'Rules',
|
||||
games: 'Games',
|
||||
darkMode: 'Dark mode',
|
||||
confirmDeletionOf: 'Confirm deletion of',
|
||||
yes: 'Yes',
|
||||
no: 'No',
|
||||
createScenario: 'Create scenario',
|
||||
editScenario: 'Edit scenario',
|
||||
addScene: 'Add scene'
|
||||
}
|
||||
}
|
||||
|
||||
import { ref } from 'vue';
|
||||
|
||||
export default {
|
||||
install: (app, options) => {
|
||||
// inject a globally available $translate() method
|
||||
app.config.globalProperties.$l = lang.bg
|
||||
}
|
||||
app.config.globalProperties.$lang = ref('bg');
|
||||
// app.config.globalProperties.$l = computed(()=>lang[app.config.globalProperties.$lang]);
|
||||
app.mixin({
|
||||
data(){
|
||||
return {
|
||||
|
||||
}
|
||||
},
|
||||
created(){
|
||||
|
||||
},
|
||||
computed:{
|
||||
lang:{
|
||||
get(){
|
||||
return app.config.globalProperties.$lang.value
|
||||
},
|
||||
set(v){
|
||||
app.config.globalProperties.$lang.value = v
|
||||
}
|
||||
},
|
||||
l(){
|
||||
return lang[this.lang];
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
}
|
||||
+2
-11
@@ -1,50 +1,41 @@
|
||||
export default {
|
||||
install: (app, options) => {
|
||||
// inject a globally available $translate() method
|
||||
let l = app.config.globalProperties.$l;
|
||||
app.config.globalProperties.$p = {
|
||||
objectTypes: [{
|
||||
value: 'panorama2d',
|
||||
icon: 'panorama-variant-outline',
|
||||
title: l.panorama2d,
|
||||
render: true,
|
||||
type: 'Scene',
|
||||
color: 'light-blue-darken-4'
|
||||
}, {
|
||||
value: 'environment3d',
|
||||
icon: 'panorama-sphere-outline',
|
||||
title: l.environment3d,
|
||||
render: true,
|
||||
type: 'Scene',
|
||||
color: 'teal-darken-3'
|
||||
color: 'orange-darken-4'
|
||||
}, {
|
||||
value: 'object3d',
|
||||
icon: 'video-3d',
|
||||
title: l.object3d,
|
||||
render: true,
|
||||
type: 'GameObject',
|
||||
color: 'deep-orange-darken-4'
|
||||
color: 'green-darken-4'
|
||||
}, {
|
||||
value: 'object2d',
|
||||
icon: 'file-image-outline',
|
||||
title: l.object2d,
|
||||
type: 'Descriptive',
|
||||
color: 'light-green-accent-4'
|
||||
}, {
|
||||
value: 'player3d',
|
||||
icon: 'human-greeting',
|
||||
title: l.player3d,
|
||||
render: true,
|
||||
color: 'yellow-accent-4'
|
||||
}, {
|
||||
value: 'audio',
|
||||
icon: 'volume-medium',
|
||||
title: l.audio,
|
||||
color: 'deep-purple-accent-4'
|
||||
}, {
|
||||
value: 'video',
|
||||
icon: 'filmstrip',
|
||||
title: l.video,
|
||||
type: 'Descriptive',
|
||||
color: 'purple-darken-3'
|
||||
}]
|
||||
|
||||
Reference in New Issue
Block a user