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: Added translation for script title #28471

Merged
merged 2 commits into from
May 23, 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
7 changes: 4 additions & 3 deletions editor/js/Script.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import { SetMaterialValueCommand } from './commands/SetMaterialValueCommand.js';
function Script( editor ) {

const signals = editor.signals;
const strings = editor.strings;

const container = new UIPanel();
container.setId( 'script' );
Expand Down Expand Up @@ -371,17 +372,17 @@ function Script( editor ) {

case 'vertexShader':

title.setValue( object.material.name + ' / Vertex Shader' ); // TODO: l10n
title.setValue( object.material.name + ' / ' + strings.getKey( 'script/title/vertexShader' ) );
break;

case 'fragmentShader':

title.setValue( object.material.name + ' / Fragment Shader' ); // TODO: l10n
title.setValue( object.material.name + ' / ' + strings.getKey( 'script/title/fragmentShader' ) );
break;

case 'programInfo':

title.setValue( object.material.name + ' / Program Properties ' ); // TODO: l10n
title.setValue( object.material.name + ' / ' + strings.getKey( 'script/title/programInfo' ) );
break;

default:
Expand Down
22 changes: 19 additions & 3 deletions editor/js/Strings.js
Original file line number Diff line number Diff line change
Expand Up @@ -391,6 +391,10 @@ function Strings( config ) {
'viewport/info/samples': 'Samples',
'viewport/info/rendertime': 'Render time',

'script/title/vertexShader': 'Vertex Shader',
'script/title/fragmentShader': 'Fragment Shader',
'script/title/programInfo': 'Program Properties'

},

fr: {
Expand Down Expand Up @@ -778,7 +782,11 @@ function Strings( config ) {
'viewport/info/triangles': 'Triangles',
'viewport/info/sample': 'Échantillon',
'viewport/info/samples': 'Échantillons',
'viewport/info/rendertime': 'Temps de rendu'
'viewport/info/rendertime': 'Temps de rendu',

'script/title/vertexShader': 'Vertex Shader',
'script/title/fragmentShader': 'Fragment Shader',
'script/title/programInfo': 'Propriétés du programme'

},

Expand Down Expand Up @@ -1167,7 +1175,11 @@ function Strings( config ) {
'viewport/info/triangles': '三角形',
'viewport/info/sample': '样本',
'viewport/info/samples': '样本',
'viewport/info/rendertime': '渲染时间'
'viewport/info/rendertime': '渲染时间',

'script/title/vertexShader': '顶点着色器',
'script/title/fragmentShader': '片段着色器',
'script/title/programInfo': '程序属性'

},

Expand Down Expand Up @@ -1556,7 +1568,11 @@ function Strings( config ) {
'viewport/info/triangles': '三角形',
'viewport/info/sample': 'サンプル',
'viewport/info/samples': 'サンプル',
'viewport/info/rendertime': 'レンダリング時間'
'viewport/info/rendertime': 'レンダリング時間',

'script/title/vertexShader': '頂点シェーダー',
'script/title/fragmentShader': 'フラグメントシェーダ',
'script/title/programInfo': 'プログラムのプロパティ'

}

Expand Down