Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
ionite34 committed Sep 14, 2023
2 parents 7f98f53 + 8a828b8 commit 5893fb3
Show file tree
Hide file tree
Showing 14 changed files with 153 additions and 101 deletions.
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 @@ -68,6 +68,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

0 comments on commit 5893fb3

Please sign in to comment.