Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

v2.4.2 Update #126

Merged
merged 9 commits into from
Sep 14, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,11 @@ All notable changes to Stability Matrix will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
and this project adheres to [Semantic Versioning 2.0](https://semver.org/spec/v2.0.0.html).

## v2.4.2
### Added
- Added Japanese UI language option, thanks to kgmkm_mkgm for the translation
- Language selection available in Settings, and defaults to system language if supported

## v2.4.1
### Fixed
- Fixed deleting checkpoints not updating the visual grid until the page is refreshed
Expand Down
8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,14 @@ Multi-Platform Package Manager for Stable Diffusion
</p>


## Localization
Stability Matrix is now available in the following languages, thanks to our community contributors:
- 🇺🇸 English
- 🇯🇵 日本語
- kgmkm_mkgm

If you would like to contribute a translation, please create an issue or contact us on Discord. Include an email where we'll send an invite to our [POEditor](https://poeditor.com/) project.

## License

This repository maintains the latest source code release for Stability Matrix, and is licensed under the [GNU Affero General Public License](https://www.gnu.org/licenses/agpl-3.0.en.html). Binaries and executable releases are licensed under the [End User License Agreement](https://lykos.ai/license).
1 change: 1 addition & 0 deletions StabilityMatrix.Avalonia/App.axaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
<ResourceInclude Source="Styles/Card.axaml"/>
</ResourceDictionary.MergedDictionaries>
<x:Double x:Key="ContentDialogMaxWidth">700</x:Double>
<FontFamily x:Key="NotoSansJP">avares://StabilityMatrix.Avalonia/Assets/Fonts/NotoSansJP#Noto Sans JP</FontFamily>
</ResourceDictionary>
</Application.Resources>

Expand Down
6 changes: 5 additions & 1 deletion StabilityMatrix.Avalonia/App.axaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,11 @@ private static void ConfigureServiceProvider()

if (settingsManager.TryFindLibrary())
{
Cultures.TrySetSupportedCulture(settingsManager.Settings.Language);
Cultures.SetSupportedCultureOrDefault(settingsManager.Settings.Language);
}
else
{
Cultures.TrySetSupportedCulture(Settings.GetDefaultCulture());
}

Services.GetRequiredService<ProgressManagerViewModel>().StartEventListener();
Expand Down
3 changes: 0 additions & 3 deletions StabilityMatrix.Avalonia/Assets.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,6 @@ internal static class Assets
public static AvaloniaResource AppIconPng { get; } =
new("avares://StabilityMatrix.Avalonia/Assets/Icon.png");

public static AvaloniaResource RegionalFontJapanese { get; } =
new("avares://StabilityMatrix.Avalonia/Assets/Fonts/NotoSansJP-Variable.ttf");

/// <summary>
/// Fixed image for models with no images.
/// </summary>
Expand Down
Binary file not shown.
Binary file not shown.
Binary file not shown.
8 changes: 8 additions & 0 deletions StabilityMatrix.Avalonia/Languages/Cultures.cs
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,14 @@ cultureCode is null
return culture;
}

public static void SetSupportedCultureOrDefault(string? cultureCode)
{
if (!TrySetSupportedCulture(cultureCode))
{
TrySetSupportedCulture(Default);
}
}

public static bool TrySetSupportedCulture(string? cultureCode)
{
if (
Expand Down
Loading
Loading