Skip to content

A Swiss Army knife for developers.

Fixed bug and cleaned up unused strings

Etienne Baudoux4b71d97b12ad
diff --git a/src/app/dev/DevToys.Blazor/Pages/SubPages/ToolPage.razor b/src/app/dev/DevToys.Blazor/Pages/SubPages/ToolPage.razor
index 0983566d1..16b44adf9 100644
--- a/src/app/dev/DevToys.Blazor/Pages/SubPages/ToolPage.razor
+++ b/src/app/dev/DevToys.Blazor/Pages/SubPages/ToolPage.razor
@@ -15,7 +15,8 @@
{
UIDialogService.DialogContent = (__builder) =>
{
- @if (ViewModel.ToolView?.CurrentOpenedDialog is not null)
+ @if (ViewModel.ToolView?.CurrentOpenedDialog is not null
+ && ViewModel.ToolView?.CurrentOpenedDialog.DialogContent is not null)
{
<UIElementPresenter UIElement="@ViewModel.ToolView.CurrentOpenedDialog.DialogContent" />
}
@@ -25,7 +26,19 @@
{
@if (ViewModel.ToolView?.CurrentOpenedDialog is not null)
{
- <UIElementPresenter UIElement="@ViewModel.ToolView.CurrentOpenedDialog.FooterContent" />
+ if (ViewModel.ToolView?.CurrentOpenedDialog.FooterContent is not null)
+ {
+ <UIElementPresenter UIElement="@ViewModel.ToolView.CurrentOpenedDialog.FooterContent" />
+ }
+ else
+ {
+ <StackPanel Orientation="UIOrientation.Horizontal" HorizontalAlignment="UIHorizontalAlignment.Right">
+ <Button Appearance="ButtonAppearance.Accent"
+ @onclick="@ViewModel.ToolView!.CurrentOpenedDialog.Close">
+ <TextBlock Text="@Localization.Strings.ToolPage.ToolPage.Ok" />
+ </Button>
+ </StackPanel>
+ }
}
};
diff --git a/src/app/dev/DevToys.Localization/Strings/ToolPage/ToolPage.Designer.cs b/src/app/dev/DevToys.Localization/Strings/ToolPage/ToolPage.Designer.cs
index be5dde8f9..41ed7e914 100644
--- a/src/app/dev/DevToys.Localization/Strings/ToolPage/ToolPage.Designer.cs
+++ b/src/app/dev/DevToys.Localization/Strings/ToolPage/ToolPage.Designer.cs
@@ -69,42 +69,6 @@ namespace DevToys.Localization.Strings.ToolPage {
}
}
- /// <summary>
- /// Looks up a localized string similar to All Files.
- /// </summary>
- public static string AllFileType {
- get {
- return ResourceManager.GetString("AllFileType", resourceCulture);
- }
- }
-
- /// <summary>
- /// Looks up a localized string similar to Clear.
- /// </summary>
- public static string Clear {
- get {
- return ResourceManager.GetString("Clear", resourceCulture);
- }
- }
-
- /// <summary>
- /// Looks up a localized string similar to Copy.
- /// </summary>
- public static string Copy {
- get {
- return ResourceManager.GetString("Copy", resourceCulture);
- }
- }
-
- /// <summary>
- /// Looks up a localized string similar to No tool to suggest.
- /// </summary>
- public static string NoSmartDetectedTool {
- get {
- return ResourceManager.GetString("NoSmartDetectedTool", resourceCulture);
- }
- }
-
/// <summary>
/// Looks up a localized string similar to OK.
/// </summary>
@@ -114,33 +78,6 @@ namespace DevToys.Localization.Strings.ToolPage {
}
}
- /// <summary>
- /// Looks up a localized string similar to Load a file.
- /// </summary>
- public static string OpenFile {
- get {
- return ResourceManager.GetString("OpenFile", resourceCulture);
- }
- }
-
- /// <summary>
- /// Looks up a localized string similar to Paste.
- /// </summary>
- public static string Paste {
- get {
- return ResourceManager.GetString("Paste", resourceCulture);
- }
- }
-
- /// <summary>
- /// Looks up a localized string similar to Pin to Start.
- /// </summary>
- public static string PinToStart {
- get {
- return ResourceManager.GetString("PinToStart", resourceCulture);
- }
- }
-
/// <summary>
/// Looks up a localized string similar to Remove from favorites.
/// </summary>
@@ -149,86 +86,5 @@ namespace DevToys.Localization.Strings.ToolPage {
return ResourceManager.GetString("RemoveFromFavorites", resourceCulture);
}
}
-
- /// <summary>
- /// Looks up a localized string similar to Save as....
- /// </summary>
- public static string SaveAs {
- get {
- return ResourceManager.GetString("SaveAs", resourceCulture);
- }
- }
-
- /// <summary>
- /// Looks up a localized string similar to Transfer to another tool.
- /// </summary>
- public static string SendToSmartDetection {
- get {
- return ResourceManager.GetString("SendToSmartDetection", resourceCulture);
- }
- }
-
- /// <summary>
- /// Looks up a localized string similar to Toggle keep the window on top (Ctrl+Up).
- /// </summary>
- public static string ToggleCompactOverlayTooltip {
- get {
- return ResourceManager.GetString("ToggleCompactOverlayTooltip", resourceCulture);
- }
- }
-
- /// <summary>
- /// Looks up a localized string similar to On.
- /// </summary>
- public static string ToggleSwitchOff {
- get {
- return ResourceManager.GetString("ToggleSwitchOff", resourceCulture);
- }
- }
-
- /// <summary>
- /// Looks up a localized string similar to Off.
- /// </summary>
- public static string ToggleSwitchOn {
- get {
- return ResourceManager.GetString("ToggleSwitchOn", resourceCulture);
- }
- }
-
- /// <summary>
- /// Looks up a localized string similar to Unable to open this file.
- /// </summary>
- public static string UnableOpenFile {
- get {
- return ResourceManager.GetString("UnableOpenFile", resourceCulture);
- }
- }
-
- /// <summary>
- /// Looks up a localized string similar to Unable to load the file &apos;{0}&apos;. Only textual files can be opened..
- /// </summary>
- public static string UnableOpenFileDescription {
- get {
- return ResourceManager.GetString("UnableOpenFileDescription", resourceCulture);
- }
- }
-
- /// <summary>
- /// Looks up a localized string similar to Unable to save this file.
- /// </summary>
- public static string UnableSaveFile {
- get {
- return ResourceManager.GetString("UnableSaveFile", resourceCulture);
- }
- }
-
- /// <summary>
- /// Looks up a localized string similar to Unable to save the file &apos;{0}&apos;. Check the logs to see the internal error..
- /// </summary>
- public static string UnableSaveFileDescription {
- get {
- return ResourceManager.GetString("UnableSaveFileDescription", resourceCulture);
- }
- }
}
}
diff --git a/src/app/dev/DevToys.Localization/Strings/ToolPage/ToolPage.resx b/src/app/dev/DevToys.Localization/Strings/ToolPage/ToolPage.resx
index bd45cc4e3..5ce54829b 100644
--- a/src/app/dev/DevToys.Localization/Strings/ToolPage/ToolPage.resx
+++ b/src/app/dev/DevToys.Localization/Strings/ToolPage/ToolPage.resx
@@ -120,58 +120,10 @@
<data name="AddToFavorites" xml:space="preserve">
<value>Add to favorites</value>
</data>
- <data name="AllFileType" xml:space="preserve">
- <value>All Files</value>
- </data>
- <data name="Clear" xml:space="preserve">
- <value>Clear</value>
- </data>
- <data name="Copy" xml:space="preserve">
- <value>Copy</value>
- </data>
- <data name="NoSmartDetectedTool" xml:space="preserve">
- <value>No tool to suggest</value>
- </data>
<data name="Ok" xml:space="preserve">
<value>OK</value>
</data>
- <data name="OpenFile" xml:space="preserve">
- <value>Load a file</value>
- </data>
- <data name="Paste" xml:space="preserve">
- <value>Paste</value>
- </data>
- <data name="PinToStart" xml:space="preserve">
- <value>Pin to Start</value>
- </data>
<data name="RemoveFromFavorites" xml:space="preserve">
<value>Remove from favorites</value>
</data>
- <data name="SaveAs" xml:space="preserve">
- <value>Save as...</value>
- </data>
- <data name="SendToSmartDetection" xml:space="preserve">
- <value>Transfer to another tool</value>
- </data>
- <data name="ToggleCompactOverlayTooltip" xml:space="preserve">
- <value>Toggle keep the window on top (Ctrl+Up)</value>
- </data>
- <data name="ToggleSwitchOff" xml:space="preserve">
- <value>On</value>
- </data>
- <data name="ToggleSwitchOn" xml:space="preserve">
- <value>Off</value>
- </data>
- <data name="UnableOpenFile" xml:space="preserve">
- <value>Unable to open this file</value>
- </data>
- <data name="UnableOpenFileDescription" xml:space="preserve">
- <value>Unable to load the file '{0}'. Only textual files can be opened.</value>
- </data>
- <data name="UnableSaveFile" xml:space="preserve">
- <value>Unable to save this file</value>
- </data>
- <data name="UnableSaveFileDescription" xml:space="preserve">
- <value>Unable to save the file '{0}'. Check the logs to see the internal error.</value>
- </data>
</root>
\ No newline at end of file