Skip to content

Commit

Permalink
Finish preliminary Japanese translation
Browse files Browse the repository at this point in the history
  • Loading branch information
ShinHogera committed Aug 10, 2017
1 parent ab14385 commit 133449d
Show file tree
Hide file tree
Showing 8 changed files with 349 additions and 60 deletions.
320 changes: 302 additions & 18 deletions Config/SceneCapture/translations.xml

Large diffs are not rendered by default.

6 changes: 0 additions & 6 deletions ConstantValues.cs
Expand Up @@ -173,12 +173,6 @@ public enum Scene
/// <summary>ライト個数上限</summary>
public const int MaxLightCount = 10;

/// <summary>メインライト名称</summary>
public const String MainLightName = "メインライト";

/// <summary>追加ライト名称</summary>
public const String AddLightName = "追加ライト";

/// <summary>モーション一覧</summary>
public static Dictionary<String, List<String>> MotionList = null;

Expand Down
4 changes: 2 additions & 2 deletions CustomControls.cs
Expand Up @@ -1588,8 +1588,8 @@ override public void OnGUI()

if(this.Text != string.Empty)
{
curveRect = new Rect( this.Left, this.Top, this.Width, this.Height / 2 );
Rect labelRect = new Rect( this.Left + this.Height, this.Top, this.Width - this.Height, this.Height );
Rect labelRect = new Rect( this.Left, this.Top, this.Width, this.FixedFontSize * 2 );
curveRect = new Rect( this.Left, this.Top + labelRect.height + ControlBase.FixedMargin, this.Width, this.Height - labelRect.height - ControlBase.FixedMargin );

GUI.Label( labelRect, this.Text, labelStyle );
}
Expand Down
14 changes: 7 additions & 7 deletions EffectPanes/ColorCorrectionCurvesPane.cs
Expand Up @@ -65,15 +65,15 @@ override public void ShowPane()
GUIUtil.AddGUICheckbox(this, this.modeCheckbox);
GUIUtil.AddGUISlider(this, this.saturationSlider);

GUIUtil.AddGUICheckbox(this, this.redChannelCurve);
GUIUtil.AddGUICheckbox(this, this.greenChannelCurve);
GUIUtil.AddGUICheckbox(this, this.blueChannelCurve);
GUIUtil.AddGUICurve(this, this.redChannelCurve);
GUIUtil.AddGUICurve(this, this.greenChannelCurve);
GUIUtil.AddGUICurve(this, this.blueChannelCurve);
if( this.ModeValue == ColorCorrectionMode.Advanced )
{
GUIUtil.AddGUICheckbox(this, this.depthRedChannelCurve);
GUIUtil.AddGUICheckbox(this, this.depthGreenChannelCurve);
GUIUtil.AddGUICheckbox(this, this.depthBlueChannelCurve);
GUIUtil.AddGUICheckbox(this, this.zCurveCurve);
GUIUtil.AddGUICurve(this, this.depthRedChannelCurve);
GUIUtil.AddGUICurve(this, this.depthGreenChannelCurve);
GUIUtil.AddGUICurve(this, this.depthBlueChannelCurve);
GUIUtil.AddGUICurve(this, this.zCurveCurve);
}

GUIUtil.AddGUICheckbox(this, this.selectiveCcCheckbox);
Expand Down
8 changes: 4 additions & 4 deletions EnvWindow.cs
Expand Up @@ -71,7 +71,7 @@ private void InitMainLight()
if( GameMain.Instance.MainLight.GetComponent<Light>() != null )
{
LightPane pane = new LightPane( this.FontSize, GameMain.Instance.MainLight.GetComponent<Light>() );
pane.Text = ConstantValues.MainLightName;
pane.Text = Translation.GetText("UI", "mainLight");
this.ChildControls.Add( pane );
this.lightPanes.Add( pane );
}
Expand Down Expand Up @@ -606,7 +606,7 @@ private void AddLight()
private void ResetLightPane( ref LightPane pane )
{
Light light;
if(pane.Text == ConstantValues.MainLightName)
if(pane.Text == Translation.GetText("UI", "mainLight"))
light = GameMain.Instance.MainLight.GetComponent<Light>();
else
light = this.addedLightInstance[ pane.Text ].GetComponent<Light>();
Expand Down Expand Up @@ -652,7 +652,7 @@ private void CheckForLightUpdates()
light = GameMain.Instance.MainLight.GetComponent<Light>();
lightInfo.UpdateLight(light);
LightPane pane = new LightPane( this.FontSize, light );
pane.Text = ConstantValues.MainLightName;
pane.Text = Translation.GetText("UI", "mainLight");
this.ChildControls.Add( pane );
this.lightPanes.Add( pane );

Expand Down Expand Up @@ -717,7 +717,7 @@ public void ClearLights(bool clearMain)
LightPane[] panes = this.lightPanes.ToArray();
foreach( LightPane pane in panes )
{
if( clearMain || pane.Text != ConstantValues.MainLightName )
if( clearMain || pane.Text != Translation.GetText("UI", "mainLight") )
{
pane.StopDrag();
this.ChildControls.Remove( pane );
Expand Down
12 changes: 12 additions & 0 deletions GUIUtil.cs
Expand Up @@ -80,6 +80,18 @@ public static void AddGUICheckbox(ControlBase parent, ControlBase elem, ControlB
elem.Visible = true;
}

public static void AddGUICurve(ControlBase parent, ControlBase elem)
{
float lastSize = parent.LastElementSize;
elem.Left = parent.Left + ControlBase.FixedMargin;
elem.Top = lastSize + ControlBase.FixedMargin;
elem.Width = parent.Width - ControlBase.FixedMargin * 4;
elem.Height = ControlHeight(parent) * 4;
elem.FontSize = parent.FontSize;
elem.OnGUI();
elem.Visible = true;
}

public static void AddGUISlider(ControlBase parent, ControlBase elem)
{
float lastSize = parent.LastElementSize;
Expand Down
44 changes: 22 additions & 22 deletions LightPane.cs
Expand Up @@ -47,123 +47,123 @@ override public void Awake()

this.lightTypeComboBox = new CustomComboBox( ConstantValues.Light );
this.lightTypeComboBox.FontSize = this.FontSize;
this.lightTypeComboBox.Text = "Type";
this.lightTypeComboBox.Text = Translation.GetText("Light", "lightType");
this.lightTypeComboBox.SelectedIndex = (int)this.light.type;
this.lightTypeComboBox.SelectedIndexChanged += this.SwitchLightType;
this.ChildControls.Add( this.lightTypeComboBox );

this.lightEnableToggle = new CustomToggleButton( this.light.enabled );
this.lightEnableToggle.FontSize = this.FontSize;
this.lightEnableToggle.Text = "Enable";
this.lightEnableToggle.Text = Translation.GetText("Light", "lightEnable");
this.lightEnableToggle.CheckedChanged += this.ToggleLight;
this.ChildControls.Add( this.lightEnableToggle );

this.lightDragToggle = new CustomToggleButton( false );
this.lightDragToggle.FontSize = this.FontSize;
this.lightDragToggle.Text = "DragSource";
this.lightDragToggle.Text = Translation.GetText("UI", "dragSource");
this.lightDragToggle.CheckedChanged += this.DragLight;
this.ChildControls.Add( this.lightDragToggle );

this.lightRotationXSlider = new CustomSlider( this.light.transform.eulerAngles.x, 0f, 360f, 4 );
this.lightRotationXSlider.FontSize = this.FontSize;
this.lightRotationXSlider.Text = "Rotation X";
this.lightRotationXSlider.Text = Translation.GetText("Light", "lightRotationX");
this.lightRotationXSlider.ValueChanged += this.RotateLight;
this.ChildControls.Add( this.lightRotationXSlider );

this.lightRotationYSlider = new CustomSlider( this.light.transform.eulerAngles.y, 0f, 360f, 4 );
this.lightRotationYSlider.FontSize = this.FontSize;
this.lightRotationYSlider.ValueChanged += this.RotateLight;
this.lightRotationYSlider.Text = "Rotation Y";
this.lightRotationYSlider.Text = Translation.GetText("Light", "lightRotationY");
this.ChildControls.Add( this.lightRotationYSlider );

this.lightRotationZSlider = new CustomSlider( this.light.transform.eulerAngles.z, 0f, 360f, 4 );
this.lightRotationZSlider.ValueChanged += this.RotateLight;
this.lightRotationZSlider.FontSize = this.FontSize;
this.lightRotationZSlider.Text = "Rotation Z";
this.lightRotationZSlider.Text = Translation.GetText("Light", "lightRotationZ");
this.ChildControls.Add( this.lightRotationZSlider );

this.lightResetButton = new CustomButton();
this.lightResetButton.FontSize = this.FontSize;
this.lightResetButton.Text = "Reset";
this.lightResetButton.Text = Translation.GetText("Light", "lightReset");
this.lightResetButton.Click += this.ResetLight;
this.ChildControls.Add( this.lightResetButton );

this.lightResetPosButton = new CustomButton();
this.lightResetPosButton.FontSize = this.FontSize;
this.lightResetPosButton.Text = "Reset Pos";
this.lightResetPosButton.Text = Translation.GetText("Light", "lightResetPos");
this.lightResetPosButton.Click += this.ResetLightPos;
this.ChildControls.Add( this.lightResetPosButton );

this.lightDeleteButton = new CustomButton();
this.lightDeleteButton.FontSize = this.FontSize;
this.lightDeleteButton.Text = "Delete";
this.lightDeleteButton.Text = Translation.GetText("UI", "delete");
this.lightDeleteButton.Click += this.DeleteLight;
this.ChildControls.Add( this.lightDeleteButton );

this.lightIntensitySlider = new CustomSlider( this.light.intensity, 0, 3f, 2 );
this.lightIntensitySlider.FontSize = this.FontSize;
this.lightIntensitySlider.Text = "Intensity";
this.lightIntensitySlider.Text = Translation.GetText("Light", "lightIntensity");
this.lightIntensitySlider.ValueChanged += this.ChangeIntensity;
this.ChildControls.Add( this.lightIntensitySlider );

this.lightBounceIntensitySlider = new CustomSlider( this.light.bounceIntensity, 0, 8f, 2 );
this.lightBounceIntensitySlider.FontSize = this.FontSize;
this.lightBounceIntensitySlider.Text = "Bounce Intensity";
this.lightBounceIntensitySlider.Text = Translation.GetText("Light", "lightBounceIntensity");
this.lightBounceIntensitySlider.ValueChanged += this.ChangeIntensity;
this.ChildControls.Add( this.lightBounceIntensitySlider );

this.lightRangeSlider = new CustomSlider( this.light.range, 0, 200f, 1 );
this.lightRangeSlider.FontSize = this.FontSize;
this.lightRangeSlider.Text = "Range";
this.lightRangeSlider.Text = Translation.GetText("Light", "lightRange");
this.lightRangeSlider.ValueChanged += this.ChangeRange;
this.ChildControls.Add( this.lightRangeSlider );

this.spotLightAngleSlider = new CustomSlider( this.light.spotAngle, 0, 360f, 1 );
this.spotLightAngleSlider.FontSize = this.FontSize;
this.spotLightAngleSlider.Text = "Spotlight Angle";
this.spotLightAngleSlider.Text = Translation.GetText("Light", "spotLightAngle");
this.spotLightAngleSlider.ValueChanged += this.ChangeSpotAngle;
this.ChildControls.Add( this.spotLightAngleSlider );

this.areaLightWidthSlider = new CustomSlider( 0, 0, 50f, 1 );
this.areaLightWidthSlider.FontSize = this.FontSize;
this.areaLightWidthSlider.Text = "Area Width";
this.areaLightWidthSlider.Text = Translation.GetText("Light", "areaLightWidth");
this.areaLightWidthSlider.ValueChanged += this.ChangeAreaSize;
this.ChildControls.Add( this.areaLightWidthSlider );

this.areaLightHeightSlider = new CustomSlider( 0, 0, 50f, 1 );
this.areaLightHeightSlider.FontSize = this.FontSize;
this.areaLightHeightSlider.Text = "Area Height";
this.areaLightHeightSlider.Text = Translation.GetText("Light", "areaLightHeight");
this.areaLightHeightSlider.ValueChanged += this.ChangeAreaSize;
this.ChildControls.Add( this.areaLightHeightSlider );

this.lightColorPicker = new CustomColorPicker( this.light.color );
this.lightColorPicker.FontSize = this.FontSize;
this.lightColorPicker.Text = "Color";
this.lightColorPicker.Text = Translation.GetText("Light", "lightColor");
this.lightColorPicker.ColorChanged = this.ChangeColor;
this.lightColorPicker.IsRGBA = false;
this.ChildControls.Add( this.lightColorPicker );

this.shadowStrengthSlider = new CustomSlider( this.light.shadowStrength, 0, 1f, 1 );
this.shadowStrengthSlider.FontSize = this.FontSize;
this.shadowStrengthSlider.Text = "Shadow Strength";
this.shadowStrengthSlider.Text = Translation.GetText("Light", "shadowStrength");
this.shadowStrengthSlider.ValueChanged += this.ChangeShadowStrength;
this.ChildControls.Add( this.shadowStrengthSlider );

this.shadowsBox = new CustomComboBox( LIGHT_SHADOWS );
this.shadowsBox.Text = "Shadow Type";
this.shadowsBox.Text = Translation.GetText("Light", "shadows");
this.shadowsBox.SelectedIndex = (int)this.light.shadows;
this.shadowsBox.SelectedIndexChanged += this.ChangeShadowType;
this.ChildControls.Add( this.shadowsBox );

this.shadowBiasSlider = new CustomSlider( this.light.shadowBias, 0, 2f, 1 );
this.shadowBiasSlider.FontSize = this.FontSize;
this.shadowBiasSlider.Text = "Shadow Bias";
this.shadowBiasSlider.Text = Translation.GetText("Light", "shadowBias");
this.shadowBiasSlider.ValueChanged += this.ChangeShadowBias;
this.ChildControls.Add( this.shadowBiasSlider );

this.shadowNormalBiasSlider = new CustomSlider( this.light.shadowNormalBias, 0, 3f, 1 );
this.shadowNormalBiasSlider.FontSize = this.FontSize;
this.shadowNormalBiasSlider.Text = "Shadow NormalBias";
this.shadowNormalBiasSlider.Text = Translation.GetText("Light", "shadowNormalBias");
this.shadowNormalBiasSlider.ValueChanged += this.ChangeShadowNormalBias;
this.ChildControls.Add( this.shadowNormalBiasSlider );
}
Expand Down Expand Up @@ -193,15 +193,15 @@ override public void OnGUI()

GUIUtil.AddGUICheckbox(this, this.lightTypeComboBox );

int buttonCount = this.Text != ConstantValues.MainLightName ? 5 : 3;
int buttonCount = this.Text != Translation.GetText("UI", "mainLight") ? 5 : 3;

GUIUtil.AddGUIButtonAfter(this, this.lightResetButton, this.lightTypeComboBox, buttonCount );
this.lightResetButton.Height = this.ControlHeight;

GUIUtil.AddGUIButton(this, this.lightResetPosButton, this.lightResetButton, buttonCount );
GUIUtil.AddGUIButton(this, this.lightDragToggle, this.lightResetPosButton, buttonCount );

if( this.Text != ConstantValues.MainLightName )
if( this.Text != Translation.GetText("UI", "mainLight") )
{
GUIUtil.AddGUIButton(this, this.lightEnableToggle, this.lightDragToggle, buttonCount );
GUIUtil.AddGUIButton(this, this.lightDeleteButton, this.lightEnableToggle, buttonCount );
Expand Down
1 change: 0 additions & 1 deletion Translation.cs
Expand Up @@ -56,7 +56,6 @@ public static void Initialize( string language )
}
}
string translationLanguage = translation.Attribute("language").Value.ToString();
Debug.Log("LANG " + translationLanguage);
translations[ translationLanguage ] = dict;

IEnumerator<string> enumerator = translations.Keys.GetEnumerator();
Expand Down

0 comments on commit 133449d

Please sign in to comment.