Browse Source

Use localized strings for PackageManagerPage

pull/121/head
Ionite 1 year ago
parent
commit
97f9f80a32
No known key found for this signature in database
  1. 54
      StabilityMatrix.Avalonia/Languages/Resources.Designer.cs
  2. 18
      StabilityMatrix.Avalonia/Languages/Resources.resx
  3. 4
      StabilityMatrix.Avalonia/Views/CheckpointsPage.axaml
  4. 15
      StabilityMatrix.Avalonia/Views/PackageManagerPage.axaml

54
StabilityMatrix.Avalonia/Languages/Resources.Designer.cs generated

@ -77,6 +77,15 @@ namespace StabilityMatrix.Avalonia.Languages {
}
}
/// <summary>
/// Looks up a localized string similar to Add Package.
/// </summary>
public static string Action_AddPackage {
get {
return ResourceManager.GetString("Action_AddPackage", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Cancel.
/// </summary>
@ -86,6 +95,15 @@ namespace StabilityMatrix.Avalonia.Languages {
}
}
/// <summary>
/// Looks up a localized string similar to Check for Updates.
/// </summary>
public static string Action_CheckForUpdates {
get {
return ResourceManager.GetString("Action_CheckForUpdates", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Check Version.
/// </summary>
@ -176,6 +194,24 @@ namespace StabilityMatrix.Avalonia.Languages {
}
}
/// <summary>
/// Looks up a localized string similar to Open in Explorer.
/// </summary>
public static string Action_OpenInExplorer {
get {
return ResourceManager.GetString("Action_OpenInExplorer", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Open in Finder.
/// </summary>
public static string Action_OpenInFinder {
get {
return ResourceManager.GetString("Action_OpenInFinder", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Open on CivitAI.
/// </summary>
@ -293,6 +329,24 @@ namespace StabilityMatrix.Avalonia.Languages {
}
}
/// <summary>
/// Looks up a localized string similar to Uninstall.
/// </summary>
public static string Action_Uninstall {
get {
return ResourceManager.GetString("Action_Uninstall", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Update.
/// </summary>
public static string Action_Update {
get {
return ResourceManager.GetString("Action_Update", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Yes.
/// </summary>

18
StabilityMatrix.Avalonia/Languages/Resources.resx

@ -387,4 +387,22 @@
<data name="Progress_InstallingPackageRequirements" xml:space="preserve">
<value>Installing package requirements...</value>
</data>
<data name="Action_OpenInExplorer" xml:space="preserve">
<value>Open in Explorer</value>
</data>
<data name="Action_OpenInFinder" xml:space="preserve">
<value>Open in Finder</value>
</data>
<data name="Action_Uninstall" xml:space="preserve">
<value>Uninstall</value>
</data>
<data name="Action_CheckForUpdates" xml:space="preserve">
<value>Check for Updates</value>
</data>
<data name="Action_Update" xml:space="preserve">
<value>Update</value>
</data>
<data name="Action_AddPackage" xml:space="preserve">
<value>Add Package</value>
</data>
</root>

4
StabilityMatrix.Avalonia/Views/CheckpointsPage.axaml

@ -139,7 +139,7 @@
MaxHeight="48"
MaxWidth="64"
Padding="0"
ToolTip.Tip="Connected Model"
ToolTip.Tip="{x:Static lang:Resources.Label_ConnectedModel}"
VerticalAlignment="Top"
IsVisible="{Binding IsConnectedModel, Mode=OneWay}">
<ui:SymbolIcon
@ -156,7 +156,7 @@
MaxHeight="48"
MaxWidth="64"
Padding="0"
ToolTip.Tip="Local Model"
ToolTip.Tip="{x:Static lang:Resources.Label_LocalModel}"
VerticalAlignment="Top"
IsVisible="{Binding !IsConnectedModel, Mode=OneWay}">
<ui:SymbolIcon

15
StabilityMatrix.Avalonia/Views/PackageManagerPage.axaml

@ -55,21 +55,22 @@
<ui:SymbolIcon FontSize="18" Symbol="MoreVertical" />
<Button.Flyout>
<MenuFlyout Placement="BottomEdgeAlignedLeft">
<MenuItem Header="Check for Update"
<MenuItem Header="{x:Static lang:Resources.Action_CheckForUpdates}"
IsVisible="{Binding !IsUnknownPackage}"
Command="{Binding OnLoadedAsync}">
<MenuItem.Icon>
<ui:SymbolIcon Symbol="Refresh" />
</MenuItem.Icon>
</MenuItem>
<MenuItem Header="Open in Explorer"
Command="{Binding OpenFolder}">
<MenuItem
Header="{OnPlatform Default={x:Static lang:Resources.Action_OpenInExplorer}, macOS={x:Static lang:Resources.Action_OpenInFinder}}"
Command="{Binding OpenFolder}">
<MenuItem.Icon>
<ui:SymbolIcon Symbol="OpenFolder" />
</MenuItem.Icon>
</MenuItem>
<Separator />
<MenuItem Header="Uninstall"
<MenuItem Header="{x:Static lang:Resources.Action_Uninstall}"
Command="{Binding Uninstall}">
<MenuItem.Icon>
<ui:SymbolIcon Symbol="Delete" />
@ -138,7 +139,7 @@
<faicon:Icon Value="fa-solid fa-rocket"
Margin="0,0,8,0"
FontSize="14" />
<TextBlock Text="Launch" />
<TextBlock Text="{x:Static lang:Resources.Action_Launch}" />
</StackPanel>
</Button>
<Button Grid.Column="1" Classes="accent"
@ -149,7 +150,7 @@
<faicon:Icon Value="fa-solid fa-download"
Margin="0,0,8,0"
FontSize="14" />
<TextBlock Text="Update" />
<TextBlock Text="{x:Static lang:Resources.Action_Update}" />
</StackPanel>
</Button>
</Grid>
@ -250,7 +251,7 @@
Command="{Binding ShowInstallDialog}">
<StackPanel Orientation="Horizontal" Margin="8">
<ui:SymbolIcon FontSize="18" Symbol="Add" />
<TextBlock Margin="4,0,0,0" Text="Add Package" />
<TextBlock Margin="4,0,0,0" Text="{x:Static lang:Resources.Action_AddPackage}" />
</StackPanel>
</Button>
</Grid>

Loading…
Cancel
Save