瀏覽代碼

Editor: Added zh string for menubar.

linbingquan 5 年之前
父節點
當前提交
d5437f7d3e
共有 2 個文件被更改,包括 16 次插入6 次删除
  1. 6 6
      editor/js/Menubar.Examples.js
  2. 10 0
      editor/js/Strings.js

+ 6 - 6
editor/js/Menubar.Examples.js

@@ -21,11 +21,11 @@ Menubar.Examples = function ( editor ) {
 	// Examples
 	// Examples
 
 
 	var items = [
 	var items = [
-		{ title: 'Arkanoid', file: 'arkanoid.app.json' },
-		{ title: 'Camera', file: 'camera.app.json' },
-		{ title: 'Particles', file: 'particles.app.json' },
-		{ title: 'Pong', file: 'pong.app.json' },
-		{ title: 'Shaders', file: 'shaders.app.json' }
+		{ title: 'menubar/examples/Arkanoid', file: 'arkanoid.app.json' },
+		{ title: 'menubar/examples/Camera', file: 'camera.app.json' },
+		{ title: 'menubar/examples/Particles', file: 'particles.app.json' },
+		{ title: 'menubar/examples/Pong', file: 'pong.app.json' },
+		{ title: 'menubar/examples/Shaders', file: 'shaders.app.json' }
 	];
 	];
 
 
 	var loader = new THREE.FileLoader();
 	var loader = new THREE.FileLoader();
@@ -38,7 +38,7 @@ Menubar.Examples = function ( editor ) {
 
 
 			var option = new UI.Row();
 			var option = new UI.Row();
 			option.setClass( 'option' );
 			option.setClass( 'option' );
-			option.setTextContent( item.title );
+			option.setTextContent( strings.getKey( item.title ) );
 			option.onClick( function () {
 			option.onClick( function () {
 
 
 				if ( confirm( 'Any unsaved data will be lost. Are you sure?' ) ) {
 				if ( confirm( 'Any unsaved data will be lost. Are you sure?' ) ) {

+ 10 - 0
editor/js/Strings.js

@@ -65,6 +65,11 @@ var Strings = function ( config ) {
 			'menubar/play/play': 'Play',
 			'menubar/play/play': 'Play',
 
 
 			'menubar/examples': 'Examples',
 			'menubar/examples': 'Examples',
+			'menubar/examples/Arkanoid': 'Arkanoid',
+			'menubar/examples/Camera': 'Camera',
+			'menubar/examples/Particles': 'Particles',
+			'menubar/examples/Pong': 'Pong',
+			'menubar/examples/Shaders': 'Shaders',
 
 
 			'menubar/help': 'Help',
 			'menubar/help': 'Help',
 			'menubar/help/source_code': 'Source Code',
 			'menubar/help/source_code': 'Source Code',
@@ -364,6 +369,11 @@ var Strings = function ( config ) {
 			'menubar/play/play': '启动',
 			'menubar/play/play': '启动',
 
 
 			'menubar/examples': '示例',
 			'menubar/examples': '示例',
+			'menubar/examples/Arkanoid': '打砖块',
+			'menubar/examples/Camera': ' 摄像机',
+			'menubar/examples/Particles': '粒子',
+			'menubar/examples/Pong': '乒乓球',
+			'menubar/examples/Shaders': '着色器',
 
 
 			'menubar/help': '帮助',
 			'menubar/help': '帮助',
 			'menubar/help/source_code': '源码',
 			'menubar/help/source_code': '源码',