Skip to content

A Swiss Army knife for developers.

Fixed more strings

Etienne Baudoux30f6fc85ac23
diff --git a/src/dev/impl/DevTools.Common/LanguageManager.cs b/src/dev/impl/DevTools.Common/LanguageManager.cs
index fc83661e7..5792aca54 100644
--- a/src/dev/impl/DevTools.Common/LanguageManager.cs
+++ b/src/dev/impl/DevTools.Common/LanguageManager.cs
@@ -300,6 +300,11 @@ namespace DevTools.Common
/// </summary>
public string FourSpaces => _resources.GetString("FourSpaces");
+ /// <summary>
+ /// Gets the resource Indentation.
+ /// </summary>
+ public string Indentation => _resources.GetString("Indentation");
+
/// <summary>
/// Gets the resource Input.
/// </summary>
@@ -408,6 +413,11 @@ namespace DevTools.Common
/// </summary>
public string AppThemeDescription => _resources.GetString("AppThemeDescription");
+ /// <summary>
+ /// Gets the resource AppTitle.
+ /// </summary>
+ public string AppTitle => _resources.GetString("AppTitle");
+
/// <summary>
/// Gets the resource Behaviors.
/// </summary>
@@ -478,6 +488,19 @@ namespace DevTools.Common
/// </summary>
public string UseSystemSettings => _resources.GetString("UseSystemSettings");
+ /// <summary>
+ /// Gets the resource Version.
+ /// </summary>
+ public string Version => _resources.GetString("Version");
+
+ /// <summary>
+ /// Gets the resource Version with format.
+ /// </summary>
+ public string GetFormattedVersion(string param0)
+ {
+ return string.Format(Version, param0);
+ }
+
/// <summary>
/// Gets the resource WordWrap.
/// </summary>
diff --git a/src/dev/impl/DevTools.Common/Strings/en/JsonFormatter.resw b/src/dev/impl/DevTools.Common/Strings/en/JsonFormatter.resw
index eb391265c..1715a1911 100644
--- a/src/dev/impl/DevTools.Common/Strings/en/JsonFormatter.resw
+++ b/src/dev/impl/DevTools.Common/Strings/en/JsonFormatter.resw
@@ -126,6 +126,9 @@
<data name="FourSpaces" xml:space="preserve">
<value>4 spaces</value>
</data>
+ <data name="Indentation" xml:space="preserve">
+ <value>Indentation</value>
+ </data>
<data name="Input" xml:space="preserve">
<value>Input</value>
</data>
diff --git a/src/dev/impl/DevTools.Common/Strings/en/Settings.resw b/src/dev/impl/DevTools.Common/Strings/en/Settings.resw
index 76cf4ee7c..b4d79768d 100644
--- a/src/dev/impl/DevTools.Common/Strings/en/Settings.resw
+++ b/src/dev/impl/DevTools.Common/Strings/en/Settings.resw
@@ -126,6 +126,9 @@
<data name="AppThemeDescription" xml:space="preserve">
<value>Select which app theme to display</value>
</data>
+ <data name="AppTitle" xml:space="preserve">
+ <value>DevTools</value>
+ </data>
<data name="Behaviors" xml:space="preserve">
<value>Behaviors</value>
</data>
@@ -168,6 +171,9 @@
<data name="UseSystemSettings" xml:space="preserve">
<value>Use system settings</value>
</data>
+ <data name="Version" xml:space="preserve">
+ <value>Version {0}</value>
+ </data>
<data name="WordWrap" xml:space="preserve">
<value>Wrap word</value>
</data>
diff --git a/src/dev/impl/DevTools.Impl/Views/Settings/SettingsToolPage.xaml b/src/dev/impl/DevTools.Impl/Views/Settings/SettingsToolPage.xaml
index 83e08ddd2..70ca81685 100644
--- a/src/dev/impl/DevTools.Impl/Views/Settings/SettingsToolPage.xaml
+++ b/src/dev/impl/DevTools.Impl/Views/Settings/SettingsToolPage.xaml
@@ -96,8 +96,8 @@
<TextBlock Style="{StaticResource SubTitleTextBlock}" Text="{x:Bind ViewModel.Strings.About}" />
<controls:ExpandableSettingControl
- Title="DevTools"
- Description="Version 1.0.0.0">
+ Title="{x:Bind ViewModel.Strings.AppTitle}"
+ Description="{x:Bind ViewModel.Version}">
<controls:ExpandableSettingControl.Icon>
<muxc:ImageIcon Source="/DevTools.Impl/Assets/Logo/Square44x44Logo.scale-200.png" Height="16" />
</controls:ExpandableSettingControl.Icon>
diff --git a/src/dev/impl/DevTools.Impl/Views/Settings/SettingsToolViewModel.cs b/src/dev/impl/DevTools.Impl/Views/Settings/SettingsToolViewModel.cs
index 0d49ab491..c71334631 100644
--- a/src/dev/impl/DevTools.Impl/Views/Settings/SettingsToolViewModel.cs
+++ b/src/dev/impl/DevTools.Impl/Views/Settings/SettingsToolViewModel.cs
@@ -7,6 +7,7 @@ using DevTools.Providers;
using Microsoft.Toolkit.Mvvm.ComponentModel;
using System;
using System.Composition;
+using System.Reflection;
namespace DevTools.Impl.Views.Settings
{
@@ -55,6 +56,11 @@ namespace DevTools.Impl.Views.Settings
set => _settingsProvider.SetSetting(PredefinedSettings.TextEditorHighlightCurrentLine, value);
}
+ /// <summary>
+ /// Gets the version of the application.
+ /// </summary>
+ internal string Version => Strings.GetFormattedVersion(typeof(SettingsToolViewModel).GetTypeInfo().Assembly.GetName().Version.ToString());
+
[ImportingConstructor]
public SettingsToolViewModel(
ISettingsProvider settingsProvider)
diff --git a/src/dev/impl/DevTools.Providers.Impl/Tools/JsonFormatter/JsonFormatterToolPage.xaml b/src/dev/impl/DevTools.Providers.Impl/Tools/JsonFormatter/JsonFormatterToolPage.xaml
index a4c469c03..92ed6c4d7 100644
--- a/src/dev/impl/DevTools.Providers.Impl/Tools/JsonFormatter/JsonFormatterToolPage.xaml
+++ b/src/dev/impl/DevTools.Providers.Impl/Tools/JsonFormatter/JsonFormatterToolPage.xaml
@@ -29,7 +29,7 @@
<controls:ExpandableSettingControl
VerticalAlignment="Stretch"
VerticalContentAlignment="Stretch"
- Title="Indentation">
+ Title="{x:Bind ViewModel.Strings.Indentation}">
<ComboBox
SelectedValuePath="Tag"
SelectedValue="{x:Bind ViewModel.Indentation, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}">