mirror of
https://github.com/tengge1/ShadowEditor.git
synced 2026-01-25 15:08:11 +00:00
命令文件夹多语言。
This commit is contained in:
parent
878c1cf225
commit
d41b36d2e9
@ -1,2 +1,21 @@
|
||||
// api
|
||||
ADD_MENU = '添加菜单';
|
||||
L_ADD_MENU = '添加菜单';
|
||||
|
||||
// command
|
||||
L_ADD_OBJECT_COLON = '添加物体:';
|
||||
L_ADD_SCRIPT = '添加脚本';
|
||||
L_MOVE_OBJECT = '移动物体';
|
||||
L_MULTI_MODIFY = '多种改变';
|
||||
L_REMOVE_OBJECT = '移除物体';
|
||||
L_REMOVE_SCRIPT = '移除脚本';
|
||||
L_SET = '设置';
|
||||
L_SET_GEOMETRY = '设置几何体';
|
||||
L_SET_GEOMETRY_DOT = '设置几何体.';
|
||||
L_SET_MATERIAL = '设置材质';
|
||||
L_NEW_MATERIAL = '新材质';
|
||||
L_SET_POSITION = '设置位置';
|
||||
L_SET_ROTATION = '设置旋转';
|
||||
L_SET_SCALE = '设置缩放';
|
||||
L_SET_SCENE = '设置场景';
|
||||
L_SET_SCRIPT = '设置脚本';
|
||||
L_UPDATE_UUID = '更新UUID';
|
||||
|
||||
@ -6,7 +6,7 @@ function UIAPI() {
|
||||
}
|
||||
|
||||
UIAPI.prototype.addMenu = function () {
|
||||
alert(ADD_MENU);
|
||||
alert(L_ADD_MENU);
|
||||
};
|
||||
|
||||
export default UIAPI;
|
||||
@ -15,7 +15,7 @@ function AddObjectCommand(object) {
|
||||
this.object = object;
|
||||
|
||||
if (object !== undefined) {
|
||||
this.name = '添加物体:' + object.name;
|
||||
this.name = L_ADD_OBJECT_COLON + object.name;
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@ -12,7 +12,7 @@ var AddScriptCommand = function (object, script) {
|
||||
Command.call(this);
|
||||
|
||||
this.type = 'AddScriptCommand';
|
||||
this.name = '添加脚本';
|
||||
this.name = L_ADD_SCRIPT;
|
||||
|
||||
this.object = object;
|
||||
this.script = script;
|
||||
|
||||
@ -13,7 +13,7 @@ function MoveObjectCommand(object, newParent, newBefore) {
|
||||
Command.call(this);
|
||||
|
||||
this.type = 'MoveObjectCommand';
|
||||
this.name = '移动物体';
|
||||
this.name = L_MOVE_OBJECT;
|
||||
|
||||
this.object = object;
|
||||
this.oldParent = (object !== undefined) ? object.parent : undefined;
|
||||
|
||||
@ -11,7 +11,7 @@ function MultiCmdsCommand(cmdArray) {
|
||||
Command.call(this);
|
||||
|
||||
this.type = 'MultiCmdsCommand';
|
||||
this.name = '多种改变';
|
||||
this.name = L_MULTI_MODIFY;
|
||||
|
||||
this.cmdArray = (cmdArray !== undefined) ? cmdArray : [];
|
||||
};
|
||||
|
||||
@ -11,7 +11,7 @@ function RemoveObjectCommand(object) {
|
||||
Command.call(this);
|
||||
|
||||
this.type = 'RemoveObjectCommand';
|
||||
this.name = '移除物体';
|
||||
this.name = L_REMOVE_OBJECT;
|
||||
|
||||
this.object = object;
|
||||
|
||||
|
||||
@ -12,7 +12,7 @@ function RemoveScriptCommand(object, script) {
|
||||
Command.call(this);
|
||||
|
||||
this.type = 'RemoveScriptCommand';
|
||||
this.name = '移除脚本';
|
||||
this.name = L_REMOVE_SCRIPT;
|
||||
|
||||
this.object = object;
|
||||
this.script = script;
|
||||
|
||||
@ -13,7 +13,7 @@ function SetColorCommand(object, attributeName, newValue) {
|
||||
Command.call(this);
|
||||
|
||||
this.type = 'SetColorCommand';
|
||||
this.name = '设置 ' + attributeName;
|
||||
this.name = L_SET + ' ' + attributeName;
|
||||
this.updatable = true;
|
||||
|
||||
this.object = object;
|
||||
|
||||
@ -12,7 +12,7 @@ function SetGeometryCommand(object, newGeometry) {
|
||||
Command.call(this);
|
||||
|
||||
this.type = 'SetGeometryCommand';
|
||||
this.name = '设置几何体';
|
||||
this.name = L_SET_GEOMETRY;
|
||||
this.updatable = true;
|
||||
|
||||
this.object = object;
|
||||
|
||||
@ -13,7 +13,7 @@ function SetGeometryValueCommand(object, attributeName, newValue) {
|
||||
Command.call(this);
|
||||
|
||||
this.type = 'SetGeometryValueCommand';
|
||||
this.name = '设置几何体.' + attributeName;
|
||||
this.name = L_SET_GEOMETRY + '.' + attributeName;
|
||||
|
||||
this.object = object;
|
||||
this.attributeName = attributeName;
|
||||
|
||||
@ -13,7 +13,7 @@ function SetMaterialColorCommand(object, attributeName, newValue) {
|
||||
Command.call(this);
|
||||
|
||||
this.type = 'SetMaterialColorCommand';
|
||||
this.name = '设置材质.' + attributeName;
|
||||
this.name = L_SET_MATERIAL + '.' + attributeName;
|
||||
this.updatable = true;
|
||||
|
||||
this.object = object;
|
||||
|
||||
@ -12,7 +12,7 @@ function SetMaterialCommand(object, newMaterial) {
|
||||
Command.call(this);
|
||||
|
||||
this.type = 'SetMaterialCommand';
|
||||
this.name = '新材质';
|
||||
this.name = L_NEW_MATERIAL;
|
||||
|
||||
this.object = object;
|
||||
this.oldMaterial = (object !== undefined) ? object.material : undefined;
|
||||
|
||||
@ -13,7 +13,7 @@ function SetMaterialMapCommand(object, mapName, newMap) {
|
||||
Command.call(this);
|
||||
|
||||
this.type = 'SetMaterialMapCommand';
|
||||
this.name = '设置材质.' + mapName;
|
||||
this.name = L_SET_MATERIAL + '.' + mapName;
|
||||
|
||||
this.object = object;
|
||||
this.mapName = mapName;
|
||||
|
||||
@ -13,7 +13,7 @@ function SetMaterialValueCommand(object, attributeName, newValue) {
|
||||
Command.call(this);
|
||||
|
||||
this.type = 'SetMaterialValueCommand';
|
||||
this.name = '设置材质.' + attributeName;
|
||||
this.name = L_SET_MATERIAL + '.' + attributeName;
|
||||
this.updatable = true;
|
||||
|
||||
this.object = object;
|
||||
|
||||
@ -13,7 +13,7 @@ function SetPositionCommand(object, newPosition, optionalOldPosition) {
|
||||
Command.call(this);
|
||||
|
||||
this.type = 'SetPositionCommand';
|
||||
this.name = '设置位置';
|
||||
this.name = L_SET_POSITION;
|
||||
this.updatable = true;
|
||||
|
||||
this.object = object;
|
||||
|
||||
@ -13,7 +13,7 @@ function SetRotationCommand(object, newRotation, optionalOldRotation) {
|
||||
Command.call(this);
|
||||
|
||||
this.type = 'SetRotationCommand';
|
||||
this.name = '设置旋转';
|
||||
this.name = L_SET_ROTATION;
|
||||
this.updatable = true;
|
||||
|
||||
this.object = object;
|
||||
|
||||
@ -13,7 +13,7 @@ function SetScaleCommand(object, newScale, optionalOldScale) {
|
||||
Command.call(this);
|
||||
|
||||
this.type = 'SetScaleCommand';
|
||||
this.name = '设置缩放';
|
||||
this.name = L_SET_SCALE;
|
||||
this.updatable = true;
|
||||
|
||||
this.object = object;
|
||||
|
||||
@ -14,7 +14,7 @@ function SetSceneCommand(scene) {
|
||||
Command.call(this);
|
||||
|
||||
this.type = 'SetSceneCommand';
|
||||
this.name = '设置场景';
|
||||
this.name = L_SET_SCENE;
|
||||
|
||||
this.cmdArray = [];
|
||||
|
||||
|
||||
@ -16,7 +16,7 @@ function SetScriptValueCommand(object, script, attributeName, newValue, cursorPo
|
||||
Command.call(this);
|
||||
|
||||
this.type = 'SetScriptValueCommand';
|
||||
this.name = '设置脚本.' + attributeName;
|
||||
this.name = L_SET_SCRIPT + '.' + attributeName;
|
||||
this.updatable = true;
|
||||
|
||||
this.object = object;
|
||||
|
||||
@ -12,7 +12,7 @@ function SetUuidCommand(object, newUuid) {
|
||||
Command.call(this);
|
||||
|
||||
this.type = 'SetUuidCommand';
|
||||
this.name = '更新UUID';
|
||||
this.name = L_UPDATE_UUID;
|
||||
|
||||
this.object = object;
|
||||
|
||||
|
||||
@ -13,7 +13,7 @@ function SetValueCommand(object, attributeName, newValue) {
|
||||
Command.call(this);
|
||||
|
||||
this.type = 'SetValueCommand';
|
||||
this.name = '设置' + attributeName;
|
||||
this.name = L_SET + ' ' + attributeName;
|
||||
this.updatable = true;
|
||||
|
||||
this.object = object;
|
||||
|
||||
@ -1,4 +1,22 @@
|
||||
Object.assign(window, {
|
||||
// api
|
||||
ADD_MENU: 'Add Menu'
|
||||
L_ADD_MENU: 'Add Menu',
|
||||
|
||||
// command
|
||||
L_ADD_OBJECT_COLON: 'Add Object:',
|
||||
L_ADD_SCRIPT: 'Add Script',
|
||||
L_MOVE_OBJECT: 'Move Object',
|
||||
L_MULTI_MODIFY: 'Multi Modify',
|
||||
L_REMOVE_OBJECT: 'Remove Object',
|
||||
L_REMOVE_SCRIPT: 'Remove Script',
|
||||
L_SET: 'Set',
|
||||
L_SET_GEOMETRY: 'Set Geometry',
|
||||
L_SET_MATERIAL: 'Set Material',
|
||||
L_NEW_MATERIAL: 'New Material',
|
||||
L_SET_POSITION: 'Set Position',
|
||||
L_SET_ROTATION: 'Set Rotation',
|
||||
L_SET_SCALE: 'Set Scale',
|
||||
L_SET_SCENE: 'Set Scene',
|
||||
L_SET_SCRIPT: 'Set Script',
|
||||
L_UPDATE_UUID: 'Update UUID',
|
||||
});
|
||||
Loading…
x
Reference in New Issue
Block a user