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> /// <summary>
/// Looks up a localized string similar to Cancel. /// Looks up a localized string similar to Cancel.
/// </summary> /// </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> /// <summary>
/// Looks up a localized string similar to Check Version. /// Looks up a localized string similar to Check Version.
/// </summary> /// </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> /// <summary>
/// Looks up a localized string similar to Open on CivitAI. /// Looks up a localized string similar to Open on CivitAI.
/// </summary> /// </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> /// <summary>
/// Looks up a localized string similar to Yes. /// Looks up a localized string similar to Yes.
/// </summary> /// </summary>

18
StabilityMatrix.Avalonia/Languages/Resources.resx

@ -387,4 +387,22 @@
<data name="Progress_InstallingPackageRequirements" xml:space="preserve"> <data name="Progress_InstallingPackageRequirements" xml:space="preserve">
<value>Installing package requirements...</value> <value>Installing package requirements...</value>
</data> </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> </root>

4
StabilityMatrix.Avalonia/Views/CheckpointsPage.axaml

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

15
StabilityMatrix.Avalonia/Views/PackageManagerPage.axaml

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

Loading…
Cancel
Save