Skip to content

Commit 5893fb3

Browse files
committed
2 parents 7f98f53 + 8a828b8 commit 5893fb3

File tree

14 files changed

+153
-101
lines changed

14 files changed

+153
-101
lines changed

CHANGELOG.md

+5
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,11 @@ All notable changes to Stability Matrix will be documented in this file.
55
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
66
and this project adheres to [Semantic Versioning 2.0](https://semver.org/spec/v2.0.0.html).
77

8+
## v2.4.2
9+
### Added
10+
- Added Japanese UI language option, thanks to kgmkm_mkgm for the translation
11+
- Language selection available in Settings, and defaults to system language if supported
12+
813
## v2.4.1
914
### Fixed
1015
- Fixed deleting checkpoints not updating the visual grid until the page is refreshed

README.md

+8
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,14 @@ Multi-Platform Package Manager for Stable Diffusion
6868
</p>
6969

7070

71+
## Localization
72+
Stability Matrix is now available in the following languages, thanks to our community contributors:
73+
- 🇺🇸 English
74+
- 🇯🇵 日本語
75+
- kgmkm_mkgm
76+
77+
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.
78+
7179
## License
7280

7381
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).

StabilityMatrix.Avalonia/App.axaml

+1
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
<ResourceInclude Source="Styles/Card.axaml"/>
1919
</ResourceDictionary.MergedDictionaries>
2020
<x:Double x:Key="ContentDialogMaxWidth">700</x:Double>
21+
<FontFamily x:Key="NotoSansJP">avares://StabilityMatrix.Avalonia/Assets/Fonts/NotoSansJP#Noto Sans JP</FontFamily>
2122
</ResourceDictionary>
2223
</Application.Resources>
2324

StabilityMatrix.Avalonia/App.axaml.cs

+5-1
Original file line numberDiff line numberDiff line change
@@ -222,7 +222,11 @@ private static void ConfigureServiceProvider()
222222

223223
if (settingsManager.TryFindLibrary())
224224
{
225-
Cultures.TrySetSupportedCulture(settingsManager.Settings.Language);
225+
Cultures.SetSupportedCultureOrDefault(settingsManager.Settings.Language);
226+
}
227+
else
228+
{
229+
Cultures.TrySetSupportedCulture(Settings.GetDefaultCulture());
226230
}
227231

228232
Services.GetRequiredService<ProgressManagerViewModel>().StartEventListener();

StabilityMatrix.Avalonia/Assets.cs

-3
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,6 @@ internal static class Assets
1616
public static AvaloniaResource AppIconPng { get; } =
1717
new("avares://StabilityMatrix.Avalonia/Assets/Icon.png");
1818

19-
public static AvaloniaResource RegionalFontJapanese { get; } =
20-
new("avares://StabilityMatrix.Avalonia/Assets/Fonts/NotoSansJP-Variable.ttf");
21-
2219
/// <summary>
2320
/// Fixed image for models with no images.
2421
/// </summary>
Binary file not shown.
Binary file not shown.
Binary file not shown.

StabilityMatrix.Avalonia/Languages/Cultures.cs

+8
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,14 @@ cultureCode is null
3838
return culture;
3939
}
4040

41+
public static void SetSupportedCultureOrDefault(string? cultureCode)
42+
{
43+
if (!TrySetSupportedCulture(cultureCode))
44+
{
45+
TrySetSupportedCulture(Default);
46+
}
47+
}
48+
4149
public static bool TrySetSupportedCulture(string? cultureCode)
4250
{
4351
if (

0 commit comments

Comments
 (0)