mirror of
https://github.com/microsoft/PowerToys
synced 2025-09-01 23:15:18 +00:00
[PTRun][Plugins]Translation fixes and improvements (#19037)
* add resx comment to sys plugin (#18843) * number examples calc plugin (#18934) * TD description fix (#17377) * small fixes * add comments * make spell checker happy
This commit is contained in:
@@ -34,18 +34,19 @@ namespace Microsoft.PowerToys.Run.Plugin.Calculator
|
|||||||
|
|
||||||
public IEnumerable<PluginAdditionalOption> AdditionalOptions => new List<PluginAdditionalOption>()
|
public IEnumerable<PluginAdditionalOption> AdditionalOptions => new List<PluginAdditionalOption>()
|
||||||
{
|
{
|
||||||
|
// The number examples has to be created at runtime to prevent translation.
|
||||||
new PluginAdditionalOption()
|
new PluginAdditionalOption()
|
||||||
{
|
{
|
||||||
Key = "InputUseEnglishFormat",
|
Key = "InputUseEnglishFormat",
|
||||||
DisplayLabel = Resources.wox_plugin_calculator_in_en_format,
|
DisplayLabel = Resources.wox_plugin_calculator_in_en_format,
|
||||||
DisplayDescription = Resources.wox_plugin_calculator_in_en_format_description,
|
DisplayDescription = string.Format(CultureInfo.CurrentCulture, Resources.wox_plugin_calculator_in_en_format_description, 1000.55.ToString("N2", new CultureInfo("en-us"))),
|
||||||
Value = false,
|
Value = false,
|
||||||
},
|
},
|
||||||
new PluginAdditionalOption()
|
new PluginAdditionalOption()
|
||||||
{
|
{
|
||||||
Key = "OutputUseEnglishFormat",
|
Key = "OutputUseEnglishFormat",
|
||||||
DisplayLabel = Resources.wox_plugin_calculator_out_en_format,
|
DisplayLabel = Resources.wox_plugin_calculator_out_en_format,
|
||||||
DisplayDescription = Resources.wox_plugin_calculator_out_en_format_description,
|
DisplayDescription = string.Format(CultureInfo.CurrentCulture, Resources.wox_plugin_calculator_out_en_format_description, 1000.55.ToString("G", new CultureInfo("en-us"))),
|
||||||
Value = false,
|
Value = false,
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
@@ -115,7 +115,7 @@ namespace Microsoft.PowerToys.Run.Plugin.Calculator.Properties {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Looks up a localized string similar to Ignores your system setting and expects numbers in the format '1,000.50'.
|
/// Looks up a localized string similar to Ignores your system setting and expects numbers in the format '{0}'..
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public static string wox_plugin_calculator_in_en_format_description {
|
public static string wox_plugin_calculator_in_en_format_description {
|
||||||
get {
|
get {
|
||||||
@@ -151,7 +151,7 @@ namespace Microsoft.PowerToys.Run.Plugin.Calculator.Properties {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Looks up a localized string similar to Ignores your system setting and returns numbers in the format '1000.50'.
|
/// Looks up a localized string similar to Ignores your system setting and returns numbers in the format '{0}'..
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public static string wox_plugin_calculator_out_en_format_description {
|
public static string wox_plugin_calculator_out_en_format_description {
|
||||||
get {
|
get {
|
||||||
|
@@ -148,12 +148,14 @@
|
|||||||
<value>Use English (United States) number format for input</value>
|
<value>Use English (United States) number format for input</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="wox_plugin_calculator_in_en_format_description" xml:space="preserve">
|
<data name="wox_plugin_calculator_in_en_format_description" xml:space="preserve">
|
||||||
<value>Ignores your system setting and expects numbers in the format '1,000.50'</value>
|
<value>Ignores your system setting and expects numbers in the format '{0}'.</value>
|
||||||
|
<comment>{0} is a placeholder and will be replaced in code.</comment>
|
||||||
</data>
|
</data>
|
||||||
<data name="wox_plugin_calculator_out_en_format" xml:space="preserve">
|
<data name="wox_plugin_calculator_out_en_format" xml:space="preserve">
|
||||||
<value>Use English (United States) number format for output</value>
|
<value>Use English (United States) number format for output</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="wox_plugin_calculator_out_en_format_description" xml:space="preserve">
|
<data name="wox_plugin_calculator_out_en_format_description" xml:space="preserve">
|
||||||
<value>Ignores your system setting and returns numbers in the format '1000.50'</value>
|
<value>Ignores your system setting and returns numbers in the format '{0}'.</value>
|
||||||
|
<comment>{0} is a placeholder and will be replaced in code.</comment>
|
||||||
</data>
|
</data>
|
||||||
</root>
|
</root>
|
@@ -317,6 +317,7 @@
|
|||||||
</data>
|
</data>
|
||||||
<data name="Microsoft_plugin_sys_Type" xml:space="preserve">
|
<data name="Microsoft_plugin_sys_Type" xml:space="preserve">
|
||||||
<value>Type</value>
|
<value>Type</value>
|
||||||
|
<comment>Means type like category. Here it means network interface type (ethernet, wifi, ...).</comment>
|
||||||
</data>
|
</data>
|
||||||
<data name="Microsoft_plugin_sys_uefi" xml:space="preserve">
|
<data name="Microsoft_plugin_sys_uefi" xml:space="preserve">
|
||||||
<value>UEFI Firmware Settings</value>
|
<value>UEFI Firmware Settings</value>
|
||||||
|
@@ -92,9 +92,11 @@ namespace Microsoft.PowerToys.Run.Plugin.TimeDate
|
|||||||
|
|
||||||
public string GetTranslatedPluginDescription()
|
public string GetTranslatedPluginDescription()
|
||||||
{
|
{
|
||||||
string timeExample = DateTime.Now.ToString("T", CultureInfo.CurrentCulture);
|
// The extra strings for the examples are required for correct translations.
|
||||||
string dateExample = DateTime.Now.ToString("d", CultureInfo.CurrentCulture);
|
string timeExample = Resources.Microsoft_plugin_timedate_plugin_description_example_time + "::" + DateTime.Now.ToString("T", CultureInfo.CurrentCulture);
|
||||||
return string.Format(CultureInfo.CurrentCulture, Resources.Microsoft_plugin_timedate_plugin_description, dateExample, timeExample);
|
string dayExample = Resources.Microsoft_plugin_timedate_plugin_description_example_day + "::" + DateTime.Now.ToString("d", CultureInfo.CurrentCulture);
|
||||||
|
string calendarWeekExample = Resources.Microsoft_plugin_timedate_plugin_description_example_calendarWeek + "::" + DateTime.Now.ToString("d", CultureInfo.CurrentCulture);
|
||||||
|
return string.Format(CultureInfo.CurrentCulture, Resources.Microsoft_plugin_timedate_plugin_description, Resources.Microsoft_plugin_timedate_plugin_description_example_day, dayExample, timeExample, calendarWeekExample);
|
||||||
}
|
}
|
||||||
|
|
||||||
public string GetTranslatedPluginTitle()
|
public string GetTranslatedPluginTitle()
|
||||||
|
@@ -286,7 +286,7 @@ namespace Microsoft.PowerToys.Run.Plugin.TimeDate.Properties {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Looks up a localized string similar to Provides time and date values for the system time or a custom time stamp (Examples: 'day', 'day::{0}', 'time::{1}', 'calendar week::{0}').
|
/// Looks up a localized string similar to Provides time and date values for the system time or a custom time stamp (Examples: '{0}', '{1}', '{2}', '{3}').
|
||||||
/// </summary>
|
/// </summary>
|
||||||
internal static string Microsoft_plugin_timedate_plugin_description {
|
internal static string Microsoft_plugin_timedate_plugin_description {
|
||||||
get {
|
get {
|
||||||
@@ -294,6 +294,33 @@ namespace Microsoft.PowerToys.Run.Plugin.TimeDate.Properties {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Looks up a localized string similar to Calendar week.
|
||||||
|
/// </summary>
|
||||||
|
internal static string Microsoft_plugin_timedate_plugin_description_example_calendarWeek {
|
||||||
|
get {
|
||||||
|
return ResourceManager.GetString("Microsoft_plugin_timedate_plugin_description_example_calendarWeek", resourceCulture);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Looks up a localized string similar to Day.
|
||||||
|
/// </summary>
|
||||||
|
internal static string Microsoft_plugin_timedate_plugin_description_example_day {
|
||||||
|
get {
|
||||||
|
return ResourceManager.GetString("Microsoft_plugin_timedate_plugin_description_example_day", resourceCulture);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Looks up a localized string similar to Time.
|
||||||
|
/// </summary>
|
||||||
|
internal static string Microsoft_plugin_timedate_plugin_description_example_time {
|
||||||
|
get {
|
||||||
|
return ResourceManager.GetString("Microsoft_plugin_timedate_plugin_description_example_time", resourceCulture);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Looks up a localized string similar to Time and Date.
|
/// Looks up a localized string similar to Time and Date.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@@ -198,8 +198,17 @@
|
|||||||
<comment>'UTC' means here 'Universal Time Convention'</comment>
|
<comment>'UTC' means here 'Universal Time Convention'</comment>
|
||||||
</data>
|
</data>
|
||||||
<data name="Microsoft_plugin_timedate_plugin_description" xml:space="preserve">
|
<data name="Microsoft_plugin_timedate_plugin_description" xml:space="preserve">
|
||||||
<value>Provides time and date values for the system time or a custom time stamp (Examples: 'day', 'day::{0}', 'time::{1}', 'calendar week::{0}')</value>
|
<value>Provides time and date values for the system time or a custom time stamp (Examples: '{0}', '{1}', '{2}', '{3}')</value>
|
||||||
<comment>The character sequence '::' is a fixed delimiter in plugin code. Do not translate the placeholders '{0}' and '{1}' because it will be replaced in code.</comment>
|
<comment>Do not translate the placeholders like '{0}' because it will be replaced in code.</comment>
|
||||||
|
</data>
|
||||||
|
<data name="Microsoft_plugin_timedate_plugin_description_example_calendarWeek" xml:space="preserve">
|
||||||
|
<value>Calendar week</value>
|
||||||
|
</data>
|
||||||
|
<data name="Microsoft_plugin_timedate_plugin_description_example_day" xml:space="preserve">
|
||||||
|
<value>Day</value>
|
||||||
|
</data>
|
||||||
|
<data name="Microsoft_plugin_timedate_plugin_description_example_time" xml:space="preserve">
|
||||||
|
<value>Time</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="Microsoft_plugin_timedate_plugin_name" xml:space="preserve">
|
<data name="Microsoft_plugin_timedate_plugin_name" xml:space="preserve">
|
||||||
<value>Time and Date</value>
|
<value>Time and Date</value>
|
||||||
|
Reference in New Issue
Block a user