Browse Source

Update translations and font

pull/121/head
Ionite 1 year ago
parent
commit
dd69f2b278
No known key found for this signature in database
  1. 2
      StabilityMatrix.Avalonia/App.axaml.cs
  2. 3
      StabilityMatrix.Avalonia/Assets.cs
  3. 93
      StabilityMatrix.Avalonia/Assets/Fonts/NotoSansJP-Variable LICENSE.txt
  4. BIN
      StabilityMatrix.Avalonia/Assets/Fonts/NotoSansJP-Variable.ttf
  5. 40
      StabilityMatrix.Avalonia/Languages/Cultures.cs
  6. 171
      StabilityMatrix.Avalonia/Languages/Resources.Designer.cs
  7. 690
      StabilityMatrix.Avalonia/Languages/Resources.ja-JP.resx
  8. 1120
      StabilityMatrix.Avalonia/Languages/Resources.resx
  9. 4
      StabilityMatrix.Avalonia/StabilityMatrix.Avalonia.csproj
  10. 49
      StabilityMatrix.Avalonia/Views/MainWindow.axaml.cs
  11. 7
      StabilityMatrix.Core/Helper/EventManager.cs
  12. 10
      StabilityMatrix.Core/Python/PyVenvRunner.cs

2
StabilityMatrix.Avalonia/App.axaml.cs

@ -204,6 +204,8 @@ public sealed class App : Application
};
mainWindow.Closed += (_, _) => Shutdown();
mainWindow.SetDefaultFonts();
VisualRoot = mainWindow;
StorageProvider = mainWindow.StorageProvider;

3
StabilityMatrix.Avalonia/Assets.cs

@ -16,6 +16,9 @@ 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>

93
StabilityMatrix.Avalonia/Assets/Fonts/NotoSansJP-Variable LICENSE.txt

@ -0,0 +1,93 @@
Copyright 2014-2021 Adobe (http://www.adobe.com/), with Reserved Font Name 'Source'
This Font Software is licensed under the SIL Open Font License, Version 1.1.
This license is copied below, and is also available with a FAQ at:
http://scripts.sil.org/OFL
-----------------------------------------------------------
SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
-----------------------------------------------------------
PREAMBLE
The goals of the Open Font License (OFL) are to stimulate worldwide
development of collaborative font projects, to support the font creation
efforts of academic and linguistic communities, and to provide a free and
open framework in which fonts may be shared and improved in partnership
with others.
The OFL allows the licensed fonts to be used, studied, modified and
redistributed freely as long as they are not sold by themselves. The
fonts, including any derivative works, can be bundled, embedded,
redistributed and/or sold with any software provided that any reserved
names are not used by derivative works. The fonts and derivatives,
however, cannot be released under any other type of license. The
requirement for fonts to remain under this license does not apply
to any document created using the fonts or their derivatives.
DEFINITIONS
"Font Software" refers to the set of files released by the Copyright
Holder(s) under this license and clearly marked as such. This may
include source files, build scripts and documentation.
"Reserved Font Name" refers to any names specified as such after the
copyright statement(s).
"Original Version" refers to the collection of Font Software components as
distributed by the Copyright Holder(s).
"Modified Version" refers to any derivative made by adding to, deleting,
or substituting -- in part or in whole -- any of the components of the
Original Version, by changing formats or by porting the Font Software to a
new environment.
"Author" refers to any designer, engineer, programmer, technical
writer or other person who contributed to the Font Software.
PERMISSION & CONDITIONS
Permission is hereby granted, free of charge, to any person obtaining
a copy of the Font Software, to use, study, copy, merge, embed, modify,
redistribute, and sell modified and unmodified copies of the Font
Software, subject to the following conditions:
1) Neither the Font Software nor any of its individual components,
in Original or Modified Versions, may be sold by itself.
2) Original or Modified Versions of the Font Software may be bundled,
redistributed and/or sold with any software, provided that each copy
contains the above copyright notice and this license. These can be
included either as stand-alone text files, human-readable headers or
in the appropriate machine-readable metadata fields within text or
binary files as long as those fields can be easily viewed by the user.
3) No Modified Version of the Font Software may use the Reserved Font
Name(s) unless explicit written permission is granted by the corresponding
Copyright Holder. This restriction only applies to the primary font name as
presented to the users.
4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
Software shall not be used to promote, endorse or advertise any
Modified Version, except to acknowledge the contribution(s) of the
Copyright Holder(s) and the Author(s) or with their explicit written
permission.
5) The Font Software, modified or unmodified, in part or in whole,
must be distributed entirely under this license, and must not be
distributed under any other license. The requirement for fonts to
remain under this license does not apply to any document created
using the Font Software.
TERMINATION
This license becomes null and void if any of the above conditions are
not met.
DISCLAIMER
THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
OTHER DEALINGS IN THE FONT SOFTWARE.

BIN
StabilityMatrix.Avalonia/Assets/Fonts/NotoSansJP-Variable.ttf

Binary file not shown.

40
StabilityMatrix.Avalonia/Languages/Cultures.cs

@ -2,6 +2,7 @@
using System.Collections.Immutable;
using System.Diagnostics.CodeAnalysis;
using System.Globalization;
using StabilityMatrix.Core.Helper;
namespace StabilityMatrix.Avalonia.Languages;
@ -10,22 +11,26 @@ public static class Cultures
{
public static CultureInfo Default { get; } = new("en-US");
public static CultureInfo Current => Resources.Culture;
public static CultureInfo? Current => Resources.Culture;
public static readonly Dictionary<string, CultureInfo> SupportedCulturesByCode =
new Dictionary<string, CultureInfo>
{
["en-US"] = Default,
["ja-JP"] = new("ja-JP")
};
public static readonly Dictionary<string, CultureInfo> SupportedCulturesByCode = new Dictionary<
string,
CultureInfo
>
{
["en-US"] = Default,
["ja-JP"] = new("ja-JP")
};
public static IReadOnlyList<CultureInfo> SupportedCultures
=> SupportedCulturesByCode.Values.ToImmutableList();
public static IReadOnlyList<CultureInfo> SupportedCultures =>
SupportedCulturesByCode.Values.ToImmutableList();
public static CultureInfo GetSupportedCultureOrDefault(string? cultureCode)
{
if (cultureCode is null
|| !SupportedCulturesByCode.TryGetValue(cultureCode, out var culture))
if (
cultureCode is null
|| !SupportedCulturesByCode.TryGetValue(cultureCode, out var culture)
)
{
return Default;
}
@ -35,13 +40,20 @@ public static class Cultures
public static bool TrySetSupportedCulture(string? cultureCode)
{
if (cultureCode is null
|| !SupportedCulturesByCode.TryGetValue(cultureCode, out var culture))
if (
cultureCode is null
|| !SupportedCulturesByCode.TryGetValue(cultureCode, out var culture)
)
{
return false;
}
Resources.Culture = culture;
if (Current?.Name != culture.Name)
{
Resources.Culture = culture;
EventManager.Instance.OnCultureChanged(culture);
}
return true;
}

171
StabilityMatrix.Avalonia/Languages/Resources.Designer.cs generated

@ -122,6 +122,15 @@ namespace StabilityMatrix.Avalonia.Languages {
}
}
/// <summary>
/// Looks up a localized string similar to Connect.
/// </summary>
public static string Action_Connect {
get {
return ResourceManager.GetString("Action_Connect", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Continue.
/// </summary>
@ -509,6 +518,15 @@ namespace StabilityMatrix.Avalonia.Languages {
}
}
/// <summary>
/// Looks up a localized string similar to CFG Scale.
/// </summary>
public static string Label_CFGScale {
get {
return ResourceManager.GetString("Label_CFGScale", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Checkpoint Manager.
/// </summary>
@ -527,6 +545,15 @@ namespace StabilityMatrix.Avalonia.Languages {
}
}
/// <summary>
/// Looks up a localized string similar to Comments.
/// </summary>
public static string Label_Comments {
get {
return ResourceManager.GetString("Label_Comments", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Commit.
/// </summary>
@ -563,6 +590,15 @@ namespace StabilityMatrix.Avalonia.Languages {
}
}
/// <summary>
/// Looks up a localized string similar to Connecting....
/// </summary>
public static string Label_ConnectingEllipsis {
get {
return ResourceManager.GetString("Label_ConnectingEllipsis", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Data Directory.
/// </summary>
@ -590,6 +626,24 @@ namespace StabilityMatrix.Avalonia.Languages {
}
}
/// <summary>
/// Looks up a localized string similar to Deemphasis.
/// </summary>
public static string Label_Deemphasis {
get {
return ResourceManager.GetString("Label_Deemphasis", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Denoising Strength.
/// </summary>
public static string Label_DenoisingStrength {
get {
return ResourceManager.GetString("Label_DenoisingStrength", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Details.
/// </summary>
@ -653,6 +707,24 @@ namespace StabilityMatrix.Avalonia.Languages {
}
}
/// <summary>
/// Looks up a localized string similar to Emebeddings / Textual Inversion.
/// </summary>
public static string Label_EmbeddingsOrTextualInversion {
get {
return ResourceManager.GetString("Label_EmbeddingsOrTextualInversion", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Emphasis.
/// </summary>
public static string Label_Emphasis {
get {
return ResourceManager.GetString("Label_Emphasis", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Environment Variables.
/// </summary>
@ -725,6 +797,15 @@ namespace StabilityMatrix.Avalonia.Languages {
}
}
/// <summary>
/// Looks up a localized string similar to Height.
/// </summary>
public static string Label_Height {
get {
return ResourceManager.GetString("Label_Height", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Import as Connected.
/// </summary>
@ -887,6 +968,15 @@ namespace StabilityMatrix.Avalonia.Languages {
}
}
/// <summary>
/// Looks up a localized string similar to Model.
/// </summary>
public static string Label_Model {
get {
return ResourceManager.GetString("Label_Model", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Model Description.
/// </summary>
@ -923,6 +1013,15 @@ namespace StabilityMatrix.Avalonia.Languages {
}
}
/// <summary>
/// Looks up a localized string similar to Networks (Lora / LyCORIS).
/// </summary>
public static string Label_NetworksLoraOrLycoris {
get {
return ResourceManager.GetString("Label_NetworksLoraOrLycoris", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to A new version of Stability Matrix is available!.
/// </summary>
@ -1076,6 +1175,15 @@ namespace StabilityMatrix.Avalonia.Languages {
}
}
/// <summary>
/// Looks up a localized string similar to Refiner.
/// </summary>
public static string Label_Refiner {
get {
return ResourceManager.GetString("Label_Refiner", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Relaunch Required.
/// </summary>
@ -1184,6 +1292,15 @@ namespace StabilityMatrix.Avalonia.Languages {
}
}
/// <summary>
/// Looks up a localized string similar to Show pixel grid at high zoom levels.
/// </summary>
public static string Label_ShowPixelGridAtHighZoomLevels {
get {
return ResourceManager.GetString("Label_ShowPixelGridAtHighZoomLevels", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Skip first-time setup.
/// </summary>
@ -1211,6 +1328,33 @@ namespace StabilityMatrix.Avalonia.Languages {
}
}
/// <summary>
/// Looks up a localized string similar to Steps.
/// </summary>
public static string Label_Steps {
get {
return ResourceManager.GetString("Label_Steps", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Steps - Base.
/// </summary>
public static string Label_StepsBase {
get {
return ResourceManager.GetString("Label_StepsBase", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Steps - Refiner.
/// </summary>
public static string Label_StepsRefiner {
get {
return ResourceManager.GetString("Label_StepsRefiner", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to System.
/// </summary>
@ -1265,6 +1409,15 @@ namespace StabilityMatrix.Avalonia.Languages {
}
}
/// <summary>
/// Looks up a localized string similar to VAE.
/// </summary>
public static string Label_VAE {
get {
return ResourceManager.GetString("Label_VAE", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Version.
/// </summary>
@ -1283,6 +1436,24 @@ namespace StabilityMatrix.Avalonia.Languages {
}
}
/// <summary>
/// Looks up a localized string similar to Waiting to connect....
/// </summary>
public static string Label_WaitingToConnectEllipsis {
get {
return ResourceManager.GetString("Label_WaitingToConnectEllipsis", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Width.
/// </summary>
public static string Label_Width {
get {
return ResourceManager.GetString("Label_Width", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Download complete.
/// </summary>

690
StabilityMatrix.Avalonia/Languages/Resources.ja-JP.resx

@ -1,56 +1,642 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>1.3</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<data name="Action_Save" xml:space="preserve">
<value>保存</value>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Action_Cancel" xml:space="preserve">
<value>戻る</value>
</data>
<data name="Label_Language" xml:space="preserve">
<value>言語</value>
</data>
<data name="Action_ExitApplication" xml:space="preserve">
<value>アプリケーションを終了する</value>
</data>
<data name="Action_Import" xml:space="preserve">
<value>インポート</value>
</data>
<data name="Action_Install" xml:space="preserve">
<value>インストール</value>
</data>
<data name="Action_Launch" xml:space="preserve">
<value>打ち上げる</value>
</data>
<data name="Action_Relaunch" xml:space="preserve">
<value>再起動する</value>
</data>
<data name="Action_Quit" xml:space="preserve">
<value>やめる</value>
</data>
<data name="Action_RelaunchLater" xml:space="preserve">
<value>後で再起動する</value>
</data>
<data name="Label_BecomeAPatron" xml:space="preserve">
<value>パトロンになる</value>
</data>
<data name="Label_Branches" xml:space="preserve">
<value>ブランチ</value>
</data>
<data name="Label_TimePeriod" xml:space="preserve">
<value>期間</value>
</data>
<data name="Label_Sort" xml:space="preserve">
<value>注文</value>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<data name="Action_Launch" xml:space="preserve">
<value>打ち上げ</value>
</data>
<data name="Action_Quit" xml:space="preserve">
<value>やめる</value>
</data>
<data name="Action_Save" xml:space="preserve">
<value>保存</value>
</data>
<data name="Action_Cancel" xml:space="preserve">
<value>戻る</value>
</data>
<data name="Label_Language" xml:space="preserve">
<value>言語</value>
</data>
<data name="Text_RelaunchRequiredToApplyLanguage" xml:space="preserve">
<value>新しい言語オプションを有効にするには、再起動が必要です。</value>
</data>
<data name="Action_Relaunch" xml:space="preserve">
<value>リローンチ</value>
</data>
<data name="Action_RelaunchLater" xml:space="preserve">
<value>後で再スタート</value>
</data>
<data name="Label_RelaunchRequired" xml:space="preserve">
<value>再起動が必要</value>
</data>
<data name="Label_UnknownPackage" xml:space="preserve">
<value>未知のパッケージ</value>
</data>
<data name="Action_Import" xml:space="preserve">
<value>輸入</value>
</data>
<data name="Label_PackageType" xml:space="preserve">
<value>パッケージタイプ</value>
</data>
<data name="Label_Version" xml:space="preserve">
<value>バージョン</value>
</data>
<data name="Label_VersionType" xml:space="preserve">
<value>バージョン・タイプ</value>
</data>
<data name="Label_Releases" xml:space="preserve">
<value>リリース</value>
</data>
<data name="Label_Branches" xml:space="preserve">
<value>枝</value>
</data>
<data name="Label_DragAndDropCheckpointsHereToImport" xml:space="preserve">
<value>チェックポイントをここにドラッグ&ドロップしてインポート</value>
</data>
<data name="Label_Emphasis" xml:space="preserve">
<value>強調</value>
</data>
<data name="Label_Deemphasis" xml:space="preserve">
<value>省略</value>
</data>
<data name="Label_EmbeddingsOrTextualInversion" xml:space="preserve">
<value>エメベデイング / テキストの反転</value>
</data>
<data name="Label_NetworksLoraOrLycoris" xml:space="preserve">
<value>ネットワーク(Lora / LyCORIS)</value>
</data>
<data name="Label_Comments" xml:space="preserve">
<value>コメント</value>
</data>
<data name="Label_ShowPixelGridAtHighZoomLevels" xml:space="preserve">
<value>高倍率でピクセルグリッドを表示</value>
</data>
<data name="Label_Steps" xml:space="preserve">
<value>ステップ</value>
</data>
<data name="Label_StepsBase" xml:space="preserve">
<value>ステップ - ベース</value>
</data>
<data name="Label_StepsRefiner" xml:space="preserve">
<value>ステップ - リファイナー</value>
</data>
<data name="Label_CFGScale" xml:space="preserve">
<value>CFGスケール</value>
</data>
<data name="Label_DenoisingStrength" xml:space="preserve">
<value>ノイズ除去の強さ</value>
</data>
<data name="Label_Width" xml:space="preserve">
<value>幅</value>
</data>
<data name="Label_Height" xml:space="preserve">
<value>高さ</value>
</data>
<data name="Label_Refiner" xml:space="preserve">
<value>リファイナー</value>
</data>
<data name="Label_VAE" xml:space="preserve">
<value>VAE</value>
</data>
<data name="Label_Model" xml:space="preserve">
<value>モデル</value>
</data>
<data name="Action_Connect" xml:space="preserve">
<value>接続</value>
</data>
<data name="Label_ConnectingEllipsis" xml:space="preserve">
<value>接続...</value>
</data>
<data name="Action_Close" xml:space="preserve">
<value>閉じる</value>
</data>
<data name="Label_WaitingToConnectEllipsis" xml:space="preserve">
<value>接続待ち...</value>
</data>
<data name="Label_UpdateAvailable" xml:space="preserve">
<value>更新あり</value>
</data>
<data name="Label_BecomeAPatron" xml:space="preserve">
<value>パトロンになる</value>
</data>
<data name="Label_JoinDiscord" xml:space="preserve">
<value>Discordサーバーに参加する</value>
</data>
<data name="Label_Downloads" xml:space="preserve">
<value>ダウンロード</value>
</data>
<data name="Action_Install" xml:space="preserve">
<value>インストール</value>
</data>
<data name="Label_SkipSetup" xml:space="preserve">
<value>初回セットアップをスキップする</value>
</data>
<data name="Label_UnexpectedErrorOccurred" xml:space="preserve">
<value>予期せぬエラーが発生しました</value>
</data>
<data name="Action_ExitApplication" xml:space="preserve">
<value>アプリケーションを終了する</value>
</data>
<data name="Label_DisplayName" xml:space="preserve">
<value>表示名</value>
</data>
<data name="Label_InstallationWithThisNameExists" xml:space="preserve">
<value>この名前のインストールはすでに存在する。</value>
</data>
<data name="Label_PleaseChooseDifferentName" xml:space="preserve">
<value>別の名前を選択するか、別のインストール場所を選択してください。</value>
</data>
<data name="Label_AdvancedOptions" xml:space="preserve">
<value>高度なオプション</value>
</data>
<data name="Label_Commit" xml:space="preserve">
<value>コミット</value>
</data>
<data name="Label_SharedModelFolderStrategy" xml:space="preserve">
<value>共有モデルフォルダー戦略</value>
</data>
<data name="Label_PyTorchVersion" xml:space="preserve">
<value>PyTorchバージョン</value>
</data>
<data name="Label_CloseDialogWhenFinished" xml:space="preserve">
<value>終了したらダイアログを閉じる</value>
</data>
<data name="Label_DataDirectory" xml:space="preserve">
<value>データディレクトリ</value>
</data>
<data name="Label_DataDirectoryExplanation" xml:space="preserve">
<value>ここにモデルのチェックポイント、LORA、ウェブUI、設定などがインストールされる。</value>
</data>
<data name="Label_FatWarning" xml:space="preserve">
<value>FAT32またはexFATドライブを使用するとエラーが発生する場合があります。他のドライブを選択することで、よりスムーズにご利用いただけます。</value>
</data>
<data name="Label_PortableMode" xml:space="preserve">
<value>携帯モード</value>
</data>
<data name="Label_PortableModeExplanation" xml:space="preserve">
<value>ポータブルモードでは、すべてのデータと設定はアプリケーションと同じディレクトリに保存されます。Data」フォルダを持つアプリケーションを別の場所やコンピュータに移動することができます。</value>
</data>
<data name="Action_Continue" xml:space="preserve">
<value>続ける</value>
</data>
<data name="Label_PreviousImage" xml:space="preserve">
<value>前の画像</value>
</data>
<data name="Label_NextImage" xml:space="preserve">
<value>次の画像</value>
</data>
<data name="Label_ModelDescription" xml:space="preserve">
<value>モデル説明</value>
</data>
<data name="Label_NewVersionAvailable" xml:space="preserve">
<value>安定性マトリックスの新バージョンが登場!</value>
</data>
<data name="Label_ImportLatest" xml:space="preserve">
<value>最新のインポート</value>
</data>
<data name="Label_AllVersions" xml:space="preserve">
<value>すべてのバージョン</value>
</data>
<data name="Label_ModelSearchWatermark" xml:space="preserve">
<value>検索モデル、#タグ、または@ユーザー</value>
</data>
<data name="Action_Search" xml:space="preserve">
<value>検索</value>
</data>
<data name="Label_Sort" xml:space="preserve">
<value>注文</value>
</data>
<data name="Label_TimePeriod" xml:space="preserve">
<value>期間</value>
</data>
<data name="Label_ModelType" xml:space="preserve">
<value>モデルタイプ</value>
</data>
<data name="Label_BaseModel" xml:space="preserve">
<value>ベースモデル</value>
</data>
<data name="Label_ShowNsfwContent" xml:space="preserve">
<value>NSFWコンテンツを表示する</value>
</data>
<data name="Label_DataProvidedByCivitAi" xml:space="preserve">
<value>データ提供:CivitAI</value>
</data>
<data name="Label_Page" xml:space="preserve">
<value>ページ</value>
</data>
<data name="Label_FirstPage" xml:space="preserve">
<value>最初のページ</value>
</data>
<data name="Label_PreviousPage" xml:space="preserve">
<value>前のページ</value>
</data>
<data name="Label_NextPage" xml:space="preserve">
<value>次のページ</value>
</data>
<data name="Label_LastPage" xml:space="preserve">
<value>最終ページ</value>
</data>
<data name="Action_Rename" xml:space="preserve">
<value>名前変更</value>
</data>
<data name="Action_Delete" xml:space="preserve">
<value>削除</value>
</data>
<data name="Action_OpenOnCivitAi" xml:space="preserve">
<value>CivitAIで開く</value>
</data>
<data name="Label_ConnectedModel" xml:space="preserve">
<value>接続モデル</value>
</data>
<data name="Label_LocalModel" xml:space="preserve">
<value>ローカルモデル</value>
</data>
<data name="Action_ShowInExplorer" xml:space="preserve">
<value>エクスプローラーで表示</value>
</data>
<data name="Action_New" xml:space="preserve">
<value>新しい</value>
</data>
<data name="Label_Folder" xml:space="preserve">
<value>フォルダ</value>
</data>
<data name="Label_DropFileToImport" xml:space="preserve">
<value>ここにファイルをドロップしてインポートする</value>
</data>
<data name="Label_ImportAsConnected" xml:space="preserve">
<value>接続済みとしてインポートする</value>
</data>
<data name="Label_ImportAsConnectedExplanation" xml:space="preserve">
<value>新しいローカル・インポートで接続されたメタデータを検索する</value>
</data>
<data name="Label_Indexing" xml:space="preserve">
<value>インデックス...</value>
</data>
<data name="Label_ModelsFolder" xml:space="preserve">
<value>モデルフォルダー</value>
</data>
<data name="Label_Categories" xml:space="preserve">
<value>カテゴリー</value>
</data>
<data name="Label_LetsGetStarted" xml:space="preserve">
<value>始めよう</value>
</data>
<data name="Label_ReadAndAgree" xml:space="preserve">
<value>を読み、同意します。</value>
</data>
<data name="Label_LicenseAgreement" xml:space="preserve">
<value>ライセンス契約。</value>
</data>
<data name="Label_FindConnectedMetadata" xml:space="preserve">
<value>接続メタデータの検索</value>
</data>
<data name="Label_ShowModelImages" xml:space="preserve">
<value>モデル画像を表示</value>
</data>
<data name="Label_Appearance" xml:space="preserve">
<value>外観</value>
</data>
<data name="Label_Theme" xml:space="preserve">
<value>テーマ</value>
</data>
<data name="Label_CheckpointManager" xml:space="preserve">
<value>チェックポイント・マネージャー</value>
</data>
<data name="Label_RemoveSymlinksOnShutdown" xml:space="preserve">
<value>シャットダウン時の共有チェックポイント・ディレクトリのシンボリックリンクの削除</value>
</data>
<data name="Label_RemoveSymlinksOnShutdown_Details" xml:space="preserve">
<value>安定性マトリックスを別のドライブに移動する際に問題がある場合は、このオプションを選択します。</value>
</data>
<data name="Label_ResetCheckpointsCache" xml:space="preserve">
<value>チェックポイント・キャッシュのリセット</value>
</data>
<data name="Label_ResetCheckpointsCache_Details" xml:space="preserve">
<value>インストールされているチェックポイントキャッシュを再構築します。モデルブラウザでチェックポイントのラベルが正しくない場合に使用します。</value>
</data>
<data name="Label_PackageEnvironment" xml:space="preserve">
<value>パッケージ環境</value>
</data>
<data name="Action_Edit" xml:space="preserve">
<value>編集</value>
</data>
<data name="Label_EnvironmentVariables" xml:space="preserve">
<value>環境変数</value>
</data>
<data name="Label_EmbeddedPython" xml:space="preserve">
<value>組み込みPython</value>
</data>
<data name="Action_CheckVersion" xml:space="preserve">
<value>チェック・バージョン</value>
</data>
<data name="Label_Integrations" xml:space="preserve">
<value>統合</value>
</data>
<data name="Label_DiscordRichPresence" xml:space="preserve">
<value>不協和音の豊かな存在感</value>
</data>
<data name="Label_System" xml:space="preserve">
<value>システム</value>
</data>
<data name="Label_AddToStartMenu" xml:space="preserve">
<value>スタートメニューに安定性マトリックスを追加</value>
</data>
<data name="Label_AddToStartMenu_Details" xml:space="preserve">
<value>現在のアプリのロケーションを使用します。</value>
</data>
<data name="Label_OnlyAvailableOnWindows" xml:space="preserve">
<value>Windowsのみ</value>
</data>
<data name="Action_AddForCurrentUser" xml:space="preserve">
<value>現在のユーザーに追加</value>
</data>
<data name="Action_AddForAllUsers" xml:space="preserve">
<value>全ユーザーに追加</value>
</data>
<data name="Label_SelectNewDataDirectory" xml:space="preserve">
<value>新しいデータディレクトリを選択</value>
</data>
<data name="Label_SelectNewDataDirectory_Details" xml:space="preserve">
<value>既存のデータは移動しない</value>
</data>
<data name="Action_SelectDirectory" xml:space="preserve">
<value>ディレクトリを選択</value>
</data>
<data name="Label_About" xml:space="preserve">
<value>について</value>
</data>
<data name="Label_StabilityMatrix" xml:space="preserve">
<value>安定性マトリックス</value>
</data>
<data name="Label_LicenseAndOpenSourceNotices" xml:space="preserve">
<value>ライセンスとオープンソースに関する注意事項</value>
</data>
<data name="TeachingTip_ClickLaunchToGetStarted" xml:space="preserve">
<value>Launchをクリックして開始する!</value>
</data>
<data name="Action_Stop" xml:space="preserve">
<value>ストップ</value>
</data>
<data name="Action_SendInput" xml:space="preserve">
<value>送信入力</value>
</data>
<data name="Label_Input" xml:space="preserve">
<value>インプット</value>
</data>
<data name="Action_Send" xml:space="preserve">
<value>送信</value>
</data>
<data name="Label_InputRequired" xml:space="preserve">
<value>入力が必要</value>
</data>
<data name="Label_ConfirmQuestion" xml:space="preserve">
<value>確認は?</value>
</data>
<data name="Action_Yes" xml:space="preserve">
<value>はい</value>
</data>
<data name="Label_No" xml:space="preserve">
<value>いいえ</value>
</data>
<data name="Action_OpenWebUI" xml:space="preserve">
<value>オープンWeb UI</value>
</data>
<data name="Text_WelcomeToStabilityMatrix" xml:space="preserve">
<value>スタビリティ・マトリックスへようこそ!</value>
</data>
<data name="Text_OneClickInstaller_SubHeader" xml:space="preserve">
<value>お好みのインターフェイスを選択し、インストールをクリックして開始します。</value>
</data>
<data name="Label_Installing" xml:space="preserve">
<value>インストール</value>
</data>
<data name="Text_ProceedingToLaunchPage" xml:space="preserve">
<value>打ち上げページに進む</value>
</data>
<data name="Progress_DownloadingPackage" xml:space="preserve">
<value>パッケージのダウンロード...</value>
</data>
<data name="Progress_DownloadComplete" xml:space="preserve">
<value>ダウンロード完了</value>
</data>
<data name="Progress_InstallationComplete" xml:space="preserve">
<value>設置完了</value>
</data>
<data name="Progress_InstallingPrerequisites" xml:space="preserve">
<value>前提条件のインストール...</value>
</data>
<data name="Progress_InstallingPackageRequirements" xml:space="preserve">
<value>パッケージ要件のインストール...</value>
</data>
<data name="Action_OpenInExplorer" xml:space="preserve">
<value>エクスプローラで開く</value>
</data>
<data name="Action_OpenInFinder" xml:space="preserve">
<value>ファインダーで開く</value>
</data>
<data name="Action_Uninstall" xml:space="preserve">
<value>アンインストール</value>
</data>
<data name="Action_CheckForUpdates" xml:space="preserve">
<value>アップデートの確認</value>
</data>
<data name="Action_Update" xml:space="preserve">
<value>更新</value>
</data>
<data name="Action_AddPackage" xml:space="preserve">
<value>パッケージの追加</value>
</data>
<data name="TeachingTip_AddPackageToGetStarted" xml:space="preserve">
<value>パッケージを追加して始めましょう!</value>
</data>
<data name="Label_EnvVarsTable_Name" xml:space="preserve">
<value>名称</value>
</data>
<data name="Label_EnvVarsTable_Value" xml:space="preserve">
<value>価値</value>
</data>
<data name="Action_Remove" xml:space="preserve">
<value>削除</value>
</data>
<data name="Label_Details" xml:space="preserve">
<value>詳細</value>
</data>
<data name="Label_Callstack" xml:space="preserve">
<value>コールスタック</value>
</data>
<data name="Label_InnerException" xml:space="preserve">
<value>内部例外</value>
</data>
<data name="Label_SearchEllipsis" xml:space="preserve">
<value>検索...</value>
</data>
<data name="Action_OK" xml:space="preserve">
<value>OK</value>
</data>
<data name="Action_Retry" xml:space="preserve">
<value>リトライ</value>
</data>
<data name="Label_PythonVersionInfo" xml:space="preserve">
<value>Pythonバージョン情報</value>
</data>
<data name="Action_Restart" xml:space="preserve">
<value>リスタート</value>
</data>
<data name="Label_ConfirmDelete" xml:space="preserve">
<value>削除の確認</value>
</data>
<data name="Text_PackageUninstall_Details" xml:space="preserve">
<value>これにより、生成された画像や追加したファイルを含め、パッケージフォルダとそのすべてのコンテンツが削除されます。</value>
</data>
<data name="Progress_UninstallingPackage" xml:space="preserve">
<value>パッケージのアンインストール...</value>
</data>
<data name="Label_PackageUninstalled" xml:space="preserve">
<value>パッケージのアンインストール</value>
</data>
<data name="Text_SomeFilesCouldNotBeDeleted" xml:space="preserve">
<value>一部のファイルを削除できませんでした。パッケージディレクトリで開いているファイルをすべて閉じてから、もう一度やり直してください。</value>
</data>
<data name="Label_InvalidPackageType" xml:space="preserve">
<value>無効なパッケージタイプ</value>
</data>
<data name="TextTemplate_UpdatingPackage" xml:space="preserve">
<value>{0}の更新</value>
</data>
<data name="Progress_UpdateComplete" xml:space="preserve">
<value>更新完了</value>
</data>
<data name="TextTemplate_PackageUpdatedToLatest" xml:space="preserve">
<value>{0}が最新バージョンに更新されました</value>
</data>
<data name="TextTemplate_ErrorUpdatingPackage" xml:space="preserve">
<value>{0}の更新エラー</value>
</data>
<data name="Progress_UpdateFailed" xml:space="preserve">
<value>更新失敗</value>
</data>
<data name="Action_OpenInBrowser" xml:space="preserve">
<value>ブラウザで開く</value>
</data>
<data name="Label_ErrorInstallingPackage" xml:space="preserve">
<value>パッケージのインストールエラー</value>
</data>
<data name="Label_Branch" xml:space="preserve">
<value>支店</value>
</data>
</root>

1120
StabilityMatrix.Avalonia/Languages/Resources.resx

File diff suppressed because it is too large Load Diff

4
StabilityMatrix.Avalonia/StabilityMatrix.Avalonia.csproj

@ -76,6 +76,10 @@
<AvaloniaResource Include="Assets\sitecustomize.py" />
</ItemGroup>
<ItemGroup>
<AvaloniaResource Include="Assets\Fonts\**" />
</ItemGroup>
<ItemGroup>
<!-- Only for win-64 -->
<AvaloniaResource Include="Assets\win-x64\**" Condition="'$(RuntimeIdentifier)' == 'win-x64'" />

49
StabilityMatrix.Avalonia/Views/MainWindow.axaml.cs

@ -1,4 +1,5 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Diagnostics.CodeAnalysis;
using System.IO;
@ -14,14 +15,17 @@ using Avalonia.Media;
using Avalonia.Media.Immutable;
using Avalonia.Styling;
using Avalonia.Threading;
using FluentAvalonia.Interop;
using FluentAvalonia.Styling;
using FluentAvalonia.UI.Controls;
using FluentAvalonia.UI.Media;
using FluentAvalonia.UI.Media.Animation;
using FluentAvalonia.UI.Windowing;
using Microsoft.Extensions.DependencyInjection;
using NLog;
using StabilityMatrix.Avalonia.Animations;
using StabilityMatrix.Avalonia.Controls;
using StabilityMatrix.Avalonia.Languages;
using StabilityMatrix.Avalonia.Services;
using StabilityMatrix.Avalonia.ViewModels;
using StabilityMatrix.Avalonia.ViewModels.Base;
@ -67,6 +71,8 @@ public partial class MainWindow : AppWindowBase
TitleBar.TitleBarHitTestType = TitleBarHitTestType.Complex;
EventManager.Instance.ToggleProgressFlyout += (_, _) => progressFlyout?.Hide();
EventManager.Instance.CultureChanged += (_, _) => SetDefaultFonts();
}
/// <inheritdoc />
@ -135,6 +141,49 @@ public partial class MainWindow : AppWindowBase
}
}
public void SetDefaultFonts()
{
var fonts = new List<string>();
try
{
if (Cultures.Current?.Name == "ja-JP")
{
fonts.Add(Assets.RegionalFontJapanese.UriPath.ToString());
}
else if (Compat.IsWindows)
{
if (OSVersionHelper.IsWindows11())
{
fonts.Add("Segoe UI Variable Text");
}
else
{
fonts.Add("Segoe UI");
}
}
else if (Compat.IsMacOS)
{
fonts.Add("San Francisco");
fonts.Add("Helvetica Neue");
fonts.Add("Helvetica");
}
else
{
Resources["ContentControlThemeFontFamily"] = FontFamily.Default;
return;
}
Resources["ContentControlThemeFontFamily"] = new FontFamily(string.Join(",", fonts));
}
catch (Exception e)
{
LogManager.GetCurrentClassLogger().Error(e);
Resources["ContentControlThemeFontFamily"] = FontFamily.Default;
}
}
private void NavigationView_OnItemInvoked(object sender, NavigationViewItemInvokedEventArgs e)
{
if (e.InvokedItemContainer is NavigationViewItem nvi)

7
StabilityMatrix.Core/Helper/EventManager.cs

@ -1,4 +1,5 @@
using StabilityMatrix.Core.Models;
using System.Globalization;
using StabilityMatrix.Core.Models;
using StabilityMatrix.Core.Models.PackageModification;
using StabilityMatrix.Core.Models.Progress;
using StabilityMatrix.Core.Models.Update;
@ -27,6 +28,8 @@ public class EventManager
public event EventHandler<IPackageModificationRunner>? PackageInstallProgressAdded;
public event EventHandler? ToggleProgressFlyout;
public event EventHandler<CultureInfo>? CultureChanged;
public void OnGlobalProgressChanged(int progress) =>
GlobalProgressChanged?.Invoke(this, progress);
@ -60,4 +63,6 @@ public class EventManager
PackageInstallProgressAdded?.Invoke(this, runner);
public void OnToggleProgressFlyout() => ToggleProgressFlyout?.Invoke(this, EventArgs.Empty);
public void OnCultureChanged(CultureInfo culture) => CultureChanged?.Invoke(this, culture);
}

10
StabilityMatrix.Core/Python/PyVenvRunner.cs

@ -309,8 +309,8 @@ public class PyVenvRunner : IDisposable, IAsyncDisposable
SetPyvenvCfg(PyRunner.PythonDir);
Logger.Info(
"Launching venv process [{PythonPath}] " +
"in working directory [{WorkingDirectory}] with args {arguments.ToRepr()}",
"Launching venv process [{PythonPath}] "
+ "in working directory [{WorkingDirectory}] with args {arguments.ToRepr()}",
PythonPath,
WorkingDirectory,
arguments.ToRepr()
@ -424,10 +424,12 @@ public class PyVenvRunner : IDisposable, IAsyncDisposable
/// </summary>
public async ValueTask DisposeAsync()
{
if (Process is not null)
if (Process is { HasExited: false })
{
Process.Kill();
await Process.WaitForExitAsync().ConfigureAwait(false);
await Process
.WaitForExitAsync(new CancellationTokenSource(1000).Token)
.ConfigureAwait(false);
}
Process = null;

Loading…
Cancel
Save