Localization

This commit is contained in:
Glax 2024-01-03 20:15:23 +01:00
parent d4e2dbb4b1
commit faf8539196
7 changed files with 275 additions and 11 deletions

View File

@ -25,8 +25,8 @@ public partial class OSCCollar
configTable.AddRow("HTTP-Port", this.OscQueryService?.TcpPort.ToString() ?? "");
configTable.AddRow("CalibrationX", $"{this._config.CalibrationX}");
configTable.AddRow("CalibrationY", $"{this._config.CalibrationY}");
configTable.AddRow("Stretch Deadzone", $"{this._config.WalkStretchDeadzone}");
configTable.AddRow("Run Stretch", $"{this._config.RunStretch}");
configTable.AddRow(Resources.OSCCollar_ConsoleOutput_StretchDeadzone, $"{this._config.WalkStretchDeadzone}");
configTable.AddRow(Resources.OSCCollar_ConsoleOutput_RunStretch, $"{this._config.RunStretch}");
Table variableTable = new Table();
variableTable.AddColumn("OscVar");
@ -41,9 +41,9 @@ public partial class OSCCollar
variableTable.AddRow("GPS 1", "");
variableTable.AddRow("GPS 2", "");
variableTable.AddRow("GPS 3", "");
variableTable.AddRow("Position Vector", "");
variableTable.AddRow("Leash Stretch", "");
variableTable.AddRow("Movement Vector", "");
variableTable.AddRow(Resources.OSCCollar_ConsoleOutput_PositionVector, "");
variableTable.AddRow(Resources.OSCCollar_ConsoleOutput_LeashStretch, "");
variableTable.AddRow(Resources.OSCCollar_ConsoleOutput_MovementVector, "");
variableTable.AddRow("CalibrationX", "");
variableTable.AddRow("CalibrationY", "");
@ -51,7 +51,7 @@ public partial class OSCCollar
{
while (true)
{
variableTable.Rows.Update(0, 1, new Text($"{(_allowMoving ? "enabled" : "disabled")}"));
variableTable.Rows.Update(0, 1, new Text($"{(_allowMoving ? Resources.OSCCollar_ConsoleOutput_StatusEnabled : Resources.OSCCollar_ConsoleOutput_StatusDisabled)}"));
variableTable.Rows.Update(1, 1, new Text($"{_gps1.Distance:00.00000}"));
variableTable.Rows.Update(2, 1, new Text($"{_gps2.Distance:00.00000}"));
variableTable.Rows.Update(3, 1, new Text($"{_gps3.Distance:00.00000}"));

View File

@ -58,11 +58,11 @@ public partial class OSCCollar
this.SetupGPSVars();
if (!skipSetup)
{
Console.WriteLine("Position your GPS receivers:");
Console.WriteLine($"GPS 1 x: {_gps1.X} y: {_gps1.Y}");
Console.WriteLine($"GPS 2 x: {_gps2.X} y: {_gps2.Y}");
Console.WriteLine($"GPS 3 x: {_gps3.X} y: {_gps3.Y}");
Console.WriteLine($"Radius of each receiver (sphere): {this._config.Radius * 2}");
Console.WriteLine(Resources.OSCCollar_OSCCollar_Position_your_GPS_receivers_);
Console.WriteLine(Resources.OSCCollar_OSCCollar_GPS_1_position, _gps1.X, _gps1.Y);
Console.WriteLine(Resources.OSCCollar_OSCCollar_GPS_2_position, _gps2.X, _gps2.Y);
Console.WriteLine(Resources.OSCCollar_OSCCollar_GPS_3_position, _gps3.X, _gps3.Y);
Console.WriteLine(Resources.OSCCollar_OSCCollar_Radius_of_each_receiver__sphere, this._config.Radius * 2);
Console.ReadKey();
}

View File

@ -0,0 +1,2 @@
<wpf:ResourceDictionary xml:space="preserve" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:s="clr-namespace:System;assembly=mscorlib" xmlns:ss="urn:shemas-jetbrains-com:settings-storage-xaml" xmlns:wpf="http://schemas.microsoft.com/winfx/2006/xaml/presentation">
<s:String x:Key="/Default/CodeEditing/Localization/MoveToResource/LastResourceFile/@EntryValue">1D3DEA0F-4D6A-473D-AD77-834F4BC6FB02/f:Resources.resx</s:String></wpf:ResourceDictionary>

View File

@ -100,5 +100,122 @@ namespace VRC_Console {
return ResourceManager.GetString("alligatorFont", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Leash Stretch.
/// </summary>
internal static string OSCCollar_ConsoleOutput_LeashStretch {
get {
return ResourceManager.GetString("OSCCollar_ConsoleOutput_LeashStretch", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Movement Vector.
/// </summary>
internal static string OSCCollar_ConsoleOutput_MovementVector {
get {
return ResourceManager.GetString("OSCCollar_ConsoleOutput_MovementVector", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Position Vector.
/// </summary>
internal static string OSCCollar_ConsoleOutput_PositionVector {
get {
return ResourceManager.GetString("OSCCollar_ConsoleOutput_PositionVector", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Run Stretch.
/// </summary>
internal static string OSCCollar_ConsoleOutput_RunStretch {
get {
return ResourceManager.GetString("OSCCollar_ConsoleOutput_RunStretch", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Status.
/// </summary>
internal static string OSCCollar_ConsoleOutput_Status {
get {
return ResourceManager.GetString("OSCCollar_ConsoleOutput_Status", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to disabled.
/// </summary>
internal static string OSCCollar_ConsoleOutput_StatusDisabled {
get {
return ResourceManager.GetString("OSCCollar_ConsoleOutput_StatusDisabled", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to enabled.
/// </summary>
internal static string OSCCollar_ConsoleOutput_StatusEnabled {
get {
return ResourceManager.GetString("OSCCollar_ConsoleOutput_StatusEnabled", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Stretch Deadzone.
/// </summary>
internal static string OSCCollar_ConsoleOutput_StretchDeadzone {
get {
return ResourceManager.GetString("OSCCollar_ConsoleOutput_StretchDeadzone", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to GPS 1 x: {0} y: {1}.
/// </summary>
internal static string OSCCollar_OSCCollar_GPS_1_position {
get {
return ResourceManager.GetString("OSCCollar_OSCCollar_GPS_1_position", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to GPS 2 x: {0} y: {1}.
/// </summary>
internal static string OSCCollar_OSCCollar_GPS_2_position {
get {
return ResourceManager.GetString("OSCCollar_OSCCollar_GPS_2_position", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to GPS 3 x: {0} y: {1}.
/// </summary>
internal static string OSCCollar_OSCCollar_GPS_3_position {
get {
return ResourceManager.GetString("OSCCollar_OSCCollar_GPS_3_position", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Position your GPS receivers:.
/// </summary>
internal static string OSCCollar_OSCCollar_Position_your_GPS_receivers_ {
get {
return ResourceManager.GetString("OSCCollar_OSCCollar_Position_your_GPS_receivers_", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Radius of each receiver (sphere): {0}.
/// </summary>
internal static string OSCCollar_OSCCollar_Radius_of_each_receiver__sphere {
get {
return ResourceManager.GetString("OSCCollar_OSCCollar_Radius_of_each_receiver__sphere", resourceCulture);
}
}
}
}

View File

@ -0,0 +1,53 @@
<root>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>1.3</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<data name="OSCCollar_OSCCollar_GPS_1_position" xml:space="preserve">
<value>GPS 1 x: {0} y: {1}</value>
</data>
<data name="OSCCollar_OSCCollar_GPS_2_position" xml:space="preserve">
<value>GPS 2 x: {0} y: {1}</value>
</data>
<data name="OSCCollar_OSCCollar_GPS_3_position" xml:space="preserve">
<value>GPS 3 x: {0} y: {1}</value>
</data>
<data name="OSCCollar_OSCCollar_Position_your_GPS_receivers_" xml:space="preserve">
<value>Platziere GPS-Empfänger:</value>
</data>
<data name="OSCCollar_OSCCollar_Radius_of_each_receiver__sphere" xml:space="preserve">
<value>Radius der Empfänger: {0}</value>
</data>
<data name="OSCCollar_ConsoleOutput_LeashStretch" xml:space="preserve">
<value>Dehnung Leine</value>
</data>
<data name="OSCCollar_ConsoleOutput_MovementVector" xml:space="preserve">
<value>Bewegungs Vektor</value>
</data>
<data name="OSCCollar_ConsoleOutput_PositionVector" xml:space="preserve">
<value>Positions Vektor</value>
</data>
<data name="OSCCollar_ConsoleOutput_RunStretch" xml:space="preserve">
<value>Dehnung Rennen</value>
</data>
<data name="OSCCollar_ConsoleOutput_Status" xml:space="preserve">
<value>Status</value>
</data>
<data name="OSCCollar_ConsoleOutput_StatusEnabled" xml:space="preserve">
<value>aktiv</value>
</data>
<data name="OSCCollar_ConsoleOutput_StatusDisabled" xml:space="preserve">
<value>ausgeschaltet</value>
</data>
<data name="OSCCollar_ConsoleOutput_StretchDeadzone" xml:space="preserve">
<value>Dehnung Untergrenze</value>
</data>
</root>

View File

@ -0,0 +1,53 @@
<root>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>1.3</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<data name="OSCCollar_OSCCollar_Radius_of_each_receiver__sphere" xml:space="preserve">
<value>Radius of each receiver (sphere): {0}</value>
</data>
<data name="OSCCollar_OSCCollar_Position_your_GPS_receivers_" xml:space="preserve">
<value>Position your GPS receivers:</value>
</data>
<data name="OSCCollar_OSCCollar_GPS_3_position" xml:space="preserve">
<value>GPS 3 x: {0} y: {1}</value>
</data>
<data name="OSCCollar_OSCCollar_GPS_2_position" xml:space="preserve">
<value>GPS 2 x: {0} y: {1}</value>
</data>
<data name="OSCCollar_OSCCollar_GPS_1_position" xml:space="preserve">
<value>GPS 1 x: {0} y: {1}</value>
</data>
<data name="OSCCollar_ConsoleOutput_LeashStretch" xml:space="preserve">
<value>Leash Stretch</value>
</data>
<data name="OSCCollar_ConsoleOutput_PositionVector" xml:space="preserve">
<value>Position Vector</value>
</data>
<data name="OSCCollar_ConsoleOutput_MovementVector" xml:space="preserve">
<value>Movement Vector</value>
</data>
<data name="OSCCollar_ConsoleOutput_StretchDeadzone" xml:space="preserve">
<value>Stretch Deadzone</value>
</data>
<data name="OSCCollar_ConsoleOutput_Status" xml:space="preserve">
<value>Status</value>
</data>
<data name="OSCCollar_ConsoleOutput_RunStretch" xml:space="preserve">
<value>Run Stretch</value>
</data>
<data name="OSCCollar_ConsoleOutput_StatusDisabled" xml:space="preserve">
<value>disabled</value>
</data>
<data name="OSCCollar_ConsoleOutput_StatusEnabled" xml:space="preserve">
<value>enabled</value>
</data>
</root>

View File

@ -21,4 +21,43 @@
<data name="alligatorFont" type="System.Resources.ResXFileRef">
<value>Alligator.flf;System.String, mscorlib, Version=4.0.0.0, Culture=neutral</value>
</data>
<data name="OSCCollar_OSCCollar_Position_your_GPS_receivers_" xml:space="preserve">
<value>Position your GPS receivers:</value>
</data>
<data name="OSCCollar_OSCCollar_GPS_1_position" xml:space="preserve">
<value>GPS 1 x: {0} y: {1}</value>
</data>
<data name="OSCCollar_OSCCollar_GPS_2_position" xml:space="preserve">
<value>GPS 2 x: {0} y: {1}</value>
</data>
<data name="OSCCollar_OSCCollar_GPS_3_position" xml:space="preserve">
<value>GPS 3 x: {0} y: {1}</value>
</data>
<data name="OSCCollar_OSCCollar_Radius_of_each_receiver__sphere" xml:space="preserve">
<value>Radius of each receiver (sphere): {0}</value>
</data>
<data name="OSCCollar_ConsoleOutput_MovementVector" xml:space="preserve">
<value>Movement Vector</value>
</data>
<data name="OSCCollar_ConsoleOutput_PositionVector" xml:space="preserve">
<value>Position Vector</value>
</data>
<data name="OSCCollar_ConsoleOutput_Status" xml:space="preserve">
<value>Status</value>
</data>
<data name="OSCCollar_ConsoleOutput_StretchDeadzone" xml:space="preserve">
<value>Stretch Deadzone</value>
</data>
<data name="OSCCollar_ConsoleOutput_RunStretch" xml:space="preserve">
<value>Run Stretch</value>
</data>
<data name="OSCCollar_ConsoleOutput_LeashStretch" xml:space="preserve">
<value>Leash Stretch</value>
</data>
<data name="OSCCollar_ConsoleOutput_StatusEnabled" xml:space="preserve">
<value>enabled</value>
</data>
<data name="OSCCollar_ConsoleOutput_StatusDisabled" xml:space="preserve">
<value>disabled</value>
</data>
</root>