Skip to content

Commit

Permalink
Merge pull request #218 from LykosAI/main
Browse files Browse the repository at this point in the history
  • Loading branch information
ionite34 authored Oct 23, 2023
2 parents a6da678 + 5f3e589 commit 7f8c87a
Show file tree
Hide file tree
Showing 6 changed files with 723 additions and 2 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@ 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.5.6
### Added
- Added Russian UI language option, thanks to aolko for the translation

## v2.5.5
### Added
- Added Spanish UI language options, thanks to Carlos Baena and Lautaroturina for the translations
Expand Down
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,8 @@ Stability Matrix is now available in the following languages, thanks to our comm
- 🇪🇸 Español
- Carlos Baena
- Lautaroturina
- 🇷🇺 Русский
- aolko

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.

Expand Down
28 changes: 28 additions & 0 deletions StabilityMatrix.Avalonia/Converters/CultureInfoDisplayConverter.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
using System;
using System.Globalization;
using Avalonia.Data.Converters;

namespace StabilityMatrix.Avalonia.Converters;

public class CultureInfoDisplayConverter : IValueConverter
{
/// <inheritdoc />
public object? Convert(object? value, Type targetType, object? parameter, CultureInfo culture)
{
if (value is not CultureInfo cultureInfo)
return null;

return cultureInfo.TextInfo.ToTitleCase(cultureInfo.NativeName);
}

/// <inheritdoc />
public object ConvertBack(
object? value,
Type targetType,
object? parameter,
CultureInfo culture
)
{
throw new NotImplementedException();
}
}
3 changes: 2 additions & 1 deletion StabilityMatrix.Avalonia/Languages/Cultures.cs
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,8 @@ public static class Cultures
["zh-Hant"] = new("zh-Hant"),
["it-IT"] = new("it-IT"),
["fr-FR"] = new("fr-FR"),
["es"] = new("es")
["es"] = new("es"),
["ru-RU"] = new("ru-RU")
};

public static IReadOnlyList<CultureInfo> SupportedCultures =>
Expand Down
Loading

0 comments on commit 7f8c87a

Please sign in to comment.