Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Editor: Fixed non-localized history entries #28275

Merged
merged 3 commits into from
May 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion editor/js/Sidebar.Material.js
Original file line number Diff line number Diff line change
Expand Up @@ -500,7 +500,7 @@ function SidebarMaterial( editor ) {

}

editor.execute( new SetMaterialCommand( editor, currentObject, material, currentMaterialSlot ), 'New Material: ' + materialClass.getValue() );
editor.execute( new SetMaterialCommand( editor, currentObject, material, currentMaterialSlot ), strings.getKey( 'command/SetMaterial' ) + ': ' + materialClass.getValue() );
editor.addMaterial( material );
// TODO Copy other references in the scene graph
// keeping name and UUID then.
Expand Down
92 changes: 92 additions & 0 deletions editor/js/Strings.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,29 @@ function Strings( config ) {
'prompt/history/preserve': 'The history will be preserved across sessions.\nThis can have an impact on performance when working with textures.',
'prompt/history/forbid': 'Undo/Redo disabled while scene is playing.',

'command/AddObject': 'Add Object',
'command/AddScript': 'Add Script',
'command/MoveObject': 'Move Object',
'command/MultiCmds': 'Multiple Changes',
'command/RemoveObject': 'Remove Object',
'command/RemoveScript': 'Remove Script',
'command/SetColor': 'Set Color',
'command/SetGeometry': 'Set Geometry',
'command/SetGeometryValue': 'Set Geometry Value',
'command/SetMaterialColor': 'Set Material Color',
'command/SetMaterial': 'Set Material',
'command/SetMaterialMap': 'Set Material Map',
'command/SetMaterialRange': 'Set Material Range',
'command/SetMaterialValue': 'Set Material Value',
'command/SetMaterialVector': 'Set Material Vector',
'command/SetPosition': 'Set Position',
'command/SetRotation': 'Set Rotation',
'command/SetScale': 'Set Scale',
'command/SetScene': 'Set Scene',
'command/SetScriptValue': 'Set Script Value',
'command/SetUuid': 'Set UUID',
'command/SetValue': 'Set Value',

'menubar/file': 'File',
'menubar/file/new': 'New',
'menubar/file/import': 'Import',
Expand Down Expand Up @@ -378,6 +401,29 @@ function Strings( config ) {
'prompt/history/preserve': 'L\'histoire sera conservée entre les sessions.\nCela peut avoir un impact sur les performances lors de la manipulation des textures.',
'prompt/history/forbid': 'Les fonctions Annuler/Rétablir sont désactivées pendant la lecture de la scène.',

'command/AddObject': 'Ajouter un objet',
'command/AddScript': 'Ajouter un script',
'command/MoveObject': 'Déplacer l’objet',
'command/MultiCmds': 'Changements multiples',
'command/RemoveObject': 'Supprimer l’objet',
'command/RemoveScript': 'Supprimer le script',
'command/SetColor': 'Définir la couleur',
'command/SetGeometry': 'Définir la géométrie',
'command/SetGeometryValue': 'Définir la valeur de la géométrie',
'command/SetMaterialColor': 'Définir la couleur du matériau',
'command/SetMaterial': 'Matériel de l’ensemble',
'command/SetMaterialMap': 'Définir la carte des matériaux',
'command/SetMaterialRange': 'Définir la gamme de matériaux',
'command/SetMaterialValue': 'Définir la valeur du matériau',
'command/SetMaterialVector': 'Définir le vecteur de matériau',
'command/SetPosition': 'Définir la position',
'command/SetRotation': 'Définir la rotation',
'command/SetScale': 'Définir l’échelle',
'command/SetScene': 'Planter le décor',
'command/SetScriptValue': 'Définir la valeur du script',
'command/SetUuid': 'Définir l’UUID',
'command/SetValue': 'Définir la valeur',

'menubar/file': 'Fichier',
'menubar/file/new': 'Nouveau',
'menubar/file/import': 'Importer',
Expand Down Expand Up @@ -742,6 +788,29 @@ function Strings( config ) {
'prompt/history/preserve': '历史将在会话之间保留。\n这可能会影响在处理纹理时的性能。',
'prompt/history/forbid': '在播放场景时,撤消/重做被禁用。',

'command/AddObject': '添加对象',
'command/AddScript': '添加脚本',
'command/MoveObject': '移动对象',
'command/MultiCmds': '多次更改',
'command/RemoveObject': '删除对象',
'command/RemoveScript': '删除脚本',
'command/SetColor': '设置颜色',
'command/SetGeometry': '设置几何图形',
'command/SetGeometryValue': '设置几何值',
'command/SetMaterialColor': '设置材质颜色',
'command/SetMaterial': '设置材质',
'command/SetMaterialMap': '设置材质贴图',
'command/SetMaterialRange': '设置材料范围',
'command/SetMaterialValue': '设置材料值',
'command/SetMaterialVector': '设置材质矢量',
'command/SetPosition': '设置位置',
'command/SetRotation': '设置旋转',
'command/SetScale': '设置比例',
'command/SetScene': '设置布景',
'command/SetScriptValue': '设置脚本值',
'command/SetUuid': '设置 UUID',
'command/SetValue': '设定值',

'menubar/file': '文件',
'menubar/file/new': '新建',
'menubar/file/import': '导入',
Expand Down Expand Up @@ -1106,6 +1175,29 @@ function Strings( config ) {
'prompt/history/preserve': '履歴はセッションをまたいで保存されます。\nこれは、テクスチャを操作する際のパフォーマンスに影響を与える可能性があります。',
'prompt/history/forbid': 'シーンの再生中は元に戻す/やり直しは無効になります。',

'command/AddObject': 'オブジェクトを追加',
'command/AddScript': 'スクリプトを追加',
'command/MoveObject': 'オブジェクトの移動',
'command/MultiCmds': '複数の変更',
'command/RemoveObject': 'オブジェクトを削除',
'command/RemoveScript': 'スクリプトの削除',
'command/SetColor': 'カラーを設定',
'command/SetGeometry': 'ジオメトリの設定',
'command/SetGeometryValue': 'ジオメトリ値の設定',
'command/SetMaterialColor': 'マテリアル カラーの設定',
'command/SetMaterial': 'マテリアルの設定',
'command/SetMaterialMap': 'マテリアル マップの設定',
'command/SetMaterialRange': 'マテリアル範囲の設定',
'command/SetMaterialValue': 'マテリアル値の設定',
'command/SetMaterialVector': '素材のベクトルを設定します',
'command/SetPosition': '位置を設定',
'command/SetRotation': '回転を設定',
'command/SetScale': 'スケールを設定',
'command/SetScene': 'セットシーン',
'command/SetScriptValue': 'スクリプト値の設定',
'command/SetUuid': 'UUIDの設定',
'command/SetValue': '値の設定',

'menubar/file': 'ファイル',
'menubar/file/new': '新規',
'menubar/file/import': 'インポート',
Expand Down
2 changes: 1 addition & 1 deletion editor/js/commands/AddObjectCommand.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ class AddObjectCommand extends Command {
this.object = object;
if ( object !== undefined ) {

this.name = `Add Object: ${object.name}`;
this.name = editor.strings.getKey( 'command/AddObject' ) + ': ' + object.name;

}

Expand Down
2 changes: 1 addition & 1 deletion editor/js/commands/AddScriptCommand.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ class AddScriptCommand extends Command {
super( editor );

this.type = 'AddScriptCommand';
this.name = 'Add Script';
this.name = editor.strings.getKey( 'command/AddScript' );

this.object = object;
this.script = script;
Expand Down
2 changes: 1 addition & 1 deletion editor/js/commands/MoveObjectCommand.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ class MoveObjectCommand extends Command {
super( editor );

this.type = 'MoveObjectCommand';
this.name = 'Move Object';
this.name = editor.strings.getKey( 'command/MoveObject' );

this.object = object;
this.oldParent = ( object !== undefined ) ? object.parent : undefined;
Expand Down
2 changes: 1 addition & 1 deletion editor/js/commands/MultiCmdsCommand.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ class MultiCmdsCommand extends Command {
super( editor );

this.type = 'MultiCmdsCommand';
this.name = 'Multiple Changes';
this.name = editor.strings.getKey( 'command/MultiCmds' );

this.cmdArray = ( cmdArray !== undefined ) ? cmdArray : [];

Expand Down
2 changes: 1 addition & 1 deletion editor/js/commands/RemoveObjectCommand.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ class RemoveObjectCommand extends Command {
super( editor );

this.type = 'RemoveObjectCommand';
this.name = 'Remove Object';
this.name = editor.strings.getKey( 'command/RemoveObject' ) + ': ' + object.name;

this.object = object;
this.parent = ( object !== undefined ) ? object.parent : undefined;
Expand Down
2 changes: 1 addition & 1 deletion editor/js/commands/RemoveScriptCommand.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ class RemoveScriptCommand extends Command {
super( editor );

this.type = 'RemoveScriptCommand';
this.name = 'Remove Script';
this.name = editor.strings.getKey( 'command/RemoveScript' );

this.object = object;
this.script = script;
Expand Down
2 changes: 1 addition & 1 deletion editor/js/commands/SetColorCommand.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ class SetColorCommand extends Command {
super( editor );

this.type = 'SetColorCommand';
this.name = `Set ${attributeName}`;
this.name = editor.strings.getKey( 'command/SetColor' ) + ': ' + attributeName;
this.updatable = true;

this.object = object;
Expand Down
2 changes: 1 addition & 1 deletion editor/js/commands/SetGeometryCommand.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ class SetGeometryCommand extends Command {
super( editor );

this.type = 'SetGeometryCommand';
this.name = 'Set Geometry';
this.name = editor.strings.getKey( 'command/SetGeometry' );
this.updatable = true;

this.object = object;
Expand Down
2 changes: 1 addition & 1 deletion editor/js/commands/SetGeometryValueCommand.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ class SetGeometryValueCommand extends Command {
super( editor );

this.type = 'SetGeometryValueCommand';
this.name = `Set Geometry.${attributeName}`;
this.name = editor.strings.getKey( 'command/SetGeometryValue' ) + ': ' + attributeName;

this.object = object;
this.attributeName = attributeName;
Expand Down
2 changes: 1 addition & 1 deletion editor/js/commands/SetMaterialColorCommand.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ class SetMaterialColorCommand extends Command {
super( editor );

this.type = 'SetMaterialColorCommand';
this.name = `Set Material.${attributeName}`;
this.name = editor.strings.getKey( 'command/SetMaterialColor' ) + ': ' + attributeName;
this.updatable = true;

this.object = object;
Expand Down
2 changes: 1 addition & 1 deletion editor/js/commands/SetMaterialCommand.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ class SetMaterialCommand extends Command {
super( editor );

this.type = 'SetMaterialCommand';
this.name = 'New Material';
this.name = editor.strings.getKey( 'command/SetMaterial' );

this.object = object;
this.materialSlot = materialSlot;
Expand Down
2 changes: 1 addition & 1 deletion editor/js/commands/SetMaterialMapCommand.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ class SetMaterialMapCommand extends Command {
super( editor );

this.type = 'SetMaterialMapCommand';
this.name = `Set Material.${mapName}`;
this.name = editor.strings.getKey( 'command/SetMaterialMap' ) + ': ' + mapName;

this.object = object;
this.materialSlot = materialSlot;
Expand Down
2 changes: 1 addition & 1 deletion editor/js/commands/SetMaterialRangeCommand.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ class SetMaterialRangeCommand extends Command {
super( editor );

this.type = 'SetMaterialRangeCommand';
this.name = `Set Material.${attributeName}`;
this.name = editor.strings.getKey( 'command/SetMaterialRange' ) + ': ' + attributeName;
this.updatable = true;

this.object = object;
Expand Down
2 changes: 1 addition & 1 deletion editor/js/commands/SetMaterialValueCommand.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ class SetMaterialValueCommand extends Command {
super( editor );

this.type = 'SetMaterialValueCommand';
this.name = `Set Material.${attributeName}`;
this.name = editor.strings.getKey( 'command/SetMaterialValue' ) + ': ' + attributeName;
this.updatable = true;

this.object = object;
Expand Down
2 changes: 1 addition & 1 deletion editor/js/commands/SetMaterialVectorCommand.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ class SetMaterialVectorCommand extends Command {
super( editor );

this.type = 'SetMaterialVectorCommand';
this.name = `Set Material.${attributeName}`;
this.name = editor.strings.getKey( 'command/SetMaterialVector' ) + ': ' + attributeName;
this.updatable = true;

this.object = object;
Expand Down
2 changes: 1 addition & 1 deletion editor/js/commands/SetPositionCommand.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ class SetPositionCommand extends Command {
super( editor );

this.type = 'SetPositionCommand';
this.name = 'Set Position';
this.name = editor.strings.getKey( 'command/SetPosition' );
this.updatable = true;

this.object = object;
Expand Down
2 changes: 1 addition & 1 deletion editor/js/commands/SetRotationCommand.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ class SetRotationCommand extends Command {
super( editor );

this.type = 'SetRotationCommand';
this.name = 'Set Rotation';
this.name = editor.strings.getKey( 'command/SetRotation' );
this.updatable = true;

this.object = object;
Expand Down
2 changes: 1 addition & 1 deletion editor/js/commands/SetScaleCommand.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ class SetScaleCommand extends Command {
super( editor );

this.type = 'SetScaleCommand';
this.name = 'Set Scale';
this.name = editor.strings.getKey( 'command/SetScale' );
this.updatable = true;

this.object = object;
Expand Down
2 changes: 1 addition & 1 deletion editor/js/commands/SetSceneCommand.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ class SetSceneCommand extends Command {
super( editor );

this.type = 'SetSceneCommand';
this.name = 'Set Scene';
this.name = editor.strings.getKey( 'command/SetScene' );

this.cmdArray = [];

Expand Down
2 changes: 1 addition & 1 deletion editor/js/commands/SetScriptValueCommand.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ class SetScriptValueCommand extends Command {
super( editor );

this.type = 'SetScriptValueCommand';
this.name = `Set Script.${attributeName}`;
this.name = editor.strings.getKey( 'command/SetScriptValue' ) + ': ' + attributeName;
this.updatable = true;

this.object = object;
Expand Down
2 changes: 1 addition & 1 deletion editor/js/commands/SetUuidCommand.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ class SetUuidCommand extends Command {
super( editor );

this.type = 'SetUuidCommand';
this.name = 'Update UUID';
this.name = editor.strings.getKey( 'command/SetUuid' );

this.object = object;

Expand Down
2 changes: 1 addition & 1 deletion editor/js/commands/SetValueCommand.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ class SetValueCommand extends Command {
super( editor );

this.type = 'SetValueCommand';
this.name = `Set ${attributeName}`;
this.name = editor.strings.getKey( 'command/SetValue' ) + ': ' + attributeName;
this.updatable = true;

this.object = object;
Expand Down
Loading