Skip to content

Commit 730d1c2

Browse files
authored
Merge pull request LykosAI#1238 from ionite34/backport/main/pr-1237
2 parents 891cc67 + fe1b275 commit 730d1c2

File tree

8 files changed

+195
-25
lines changed

8 files changed

+195
-25
lines changed

StabilityMatrix.Avalonia/Languages/Resources.Designer.cs

Lines changed: 48 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

StabilityMatrix.Avalonia/Languages/Resources.de.resx

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1124,4 +1124,28 @@ Konto-Tokens sind nach dem Speichern nicht mehr einsehbar. Bitte notiere sie, we
11241124
<data name="Label_Community" xml:space="preserve">
11251125
<value>Community</value>
11261126
</data>
1127+
<data name="Label_PromptAmplifierRateLimitTitle" xml:space="preserve">
1128+
<value>Nutzungslimit erreicht</value>
1129+
</data>
1130+
<data name="Label_PromptAmplifierRateLimitMessage" xml:space="preserve">
1131+
<value>Du hast diesen Monat keine Prompt-Amplifier-Nutzung mehr übrig. Die Nutzung wird am 1. jedes Monats zurückgesetzt. (noch {0} Tage)</value>
1132+
</data>
1133+
<data name="Label_PromptAmplifierError" xml:space="preserve">
1134+
<value>Prompt-Amplifier-Fehler</value>
1135+
</data>
1136+
<data name="Label_ModerationError" xml:space="preserve">
1137+
<value>Moderationsfehler</value>
1138+
</data>
1139+
<data name="Label_PromptFlaggedMessage" xml:space="preserve">
1140+
<value>Dein Prompt wurde vom Moderationssystem markiert. Bitte versuche es mit einem anderen Prompt erneut.</value>
1141+
</data>
1142+
<data name="Label_LoginRequiredMessage" xml:space="preserve">
1143+
<value>Du musst angemeldet sein, um diese Funktion zu verwenden.</value>
1144+
</data>
1145+
<data name="Label_RequestErrorMessage" xml:space="preserve">
1146+
<value>Bei der Verarbeitung deiner Anfrage ist ein Fehler aufgetreten.</value>
1147+
</data>
1148+
<data name="Label_BecomeSupporterDescription" xml:space="preserve">
1149+
<value>Unterstütze das Stability Matrix-Team und erhalte Zugang zu frühen Entwicklungs-Builds, um neue Funktionen als Erster zu testen.</value>
1150+
</data>
11271151
</root>

StabilityMatrix.Avalonia/Languages/Resources.fr-FR.resx

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1216,4 +1216,28 @@ Les jetons de compte ne seront plus visibles après l'enregistrement. Veuillez e
12161216
<data name="Label_Community" xml:space="preserve">
12171217
<value>Communauté</value>
12181218
</data>
1219+
<data name="Label_PromptAmplifierRateLimitTitle" xml:space="preserve">
1220+
<value>Limite d'utilisation atteinte</value>
1221+
</data>
1222+
<data name="Label_PromptAmplifierRateLimitMessage" xml:space="preserve">
1223+
<value>Vous n'avez plus d'utilisation Prompt Amplifier ce mois-ci. L'utilisation est réinitialisée le 1er de chaque mois. ({0} jours restants)</value>
1224+
</data>
1225+
<data name="Label_PromptAmplifierError" xml:space="preserve">
1226+
<value>Erreur Prompt Amplifier</value>
1227+
</data>
1228+
<data name="Label_ModerationError" xml:space="preserve">
1229+
<value>Erreur de modération</value>
1230+
</data>
1231+
<data name="Label_PromptFlaggedMessage" xml:space="preserve">
1232+
<value>Votre prompt a été signalé par le système de modération. Veuillez réessayer avec un autre prompt.</value>
1233+
</data>
1234+
<data name="Label_LoginRequiredMessage" xml:space="preserve">
1235+
<value>Vous devez être connecté pour utiliser cette fonctionnalité.</value>
1236+
</data>
1237+
<data name="Label_RequestErrorMessage" xml:space="preserve">
1238+
<value>Une erreur s'est produite lors du traitement de votre demande.</value>
1239+
</data>
1240+
<data name="Label_BecomeSupporterDescription" xml:space="preserve">
1241+
<value>Soutenez l'équipe Stability Matrix et accédez aux builds de développement précoces pour tester les nouvelles fonctionnalités en avant-première.</value>
1242+
</data>
12191243
</root>

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

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1537,4 +1537,28 @@ Sparkは兆レベルのパラメータを持つ基盤モデルで、膨大なパ
15371537
<data name="Label_Community" xml:space="preserve">
15381538
<value>コミュニティ</value>
15391539
</data>
1540+
<data name="Label_PromptAmplifierRateLimitTitle" xml:space="preserve">
1541+
<value>利用上限に達しました</value>
1542+
</data>
1543+
<data name="Label_PromptAmplifierRateLimitMessage" xml:space="preserve">
1544+
<value>今月のプロンプトアンプリファイアの利用回数がなくなりました。利用回数は毎月1日にリセットされます。(残り{0}日)</value>
1545+
</data>
1546+
<data name="Label_PromptAmplifierError" xml:space="preserve">
1547+
<value>プロンプトアンプリファイアエラー</value>
1548+
</data>
1549+
<data name="Label_ModerationError" xml:space="preserve">
1550+
<value>モデレーションエラー</value>
1551+
</data>
1552+
<data name="Label_PromptFlaggedMessage" xml:space="preserve">
1553+
<value>プロンプトがモデレーションシステムによってフラグされました。別のプロンプトでもう一度お試しください。</value>
1554+
</data>
1555+
<data name="Label_LoginRequiredMessage" xml:space="preserve">
1556+
<value>この機能を使用するにはログインが必要です。</value>
1557+
</data>
1558+
<data name="Label_RequestErrorMessage" xml:space="preserve">
1559+
<value>リクエストの処理中にエラーが発生しました。</value>
1560+
</data>
1561+
<data name="Label_BecomeSupporterDescription" xml:space="preserve">
1562+
<value>Stability Matrixチームを支援して、開発初期ビルドへのアクセスや新機能を最初に試す権利を獲得しましょう。</value>
1563+
</data>
15401564
</root>

StabilityMatrix.Avalonia/Languages/Resources.ko-KR.resx

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1363,4 +1363,28 @@
13631363
<data name="Label_Community" xml:space="preserve">
13641364
<value>커뮤니티</value>
13651365
</data>
1366+
<data name="Label_PromptAmplifierRateLimitTitle" xml:space="preserve">
1367+
<value>사용 한도 도달</value>
1368+
</data>
1369+
<data name="Label_PromptAmplifierRateLimitMessage" xml:space="preserve">
1370+
<value>이번 달 프롬프트 증폭기 사용량이 모두 소진되었습니다. 사용량은 매월 1일에 초기화됩니다. ({0}일 남음)</value>
1371+
</data>
1372+
<data name="Label_PromptAmplifierError" xml:space="preserve">
1373+
<value>프롬프트 증폭기 오류</value>
1374+
</data>
1375+
<data name="Label_ModerationError" xml:space="preserve">
1376+
<value>검수 오류</value>
1377+
</data>
1378+
<data name="Label_PromptFlaggedMessage" xml:space="preserve">
1379+
<value>프롬프트가 검수 시스템에 의해 차단되었습니다. 다른 프롬프트로 다시 시도해 주세요.</value>
1380+
</data>
1381+
<data name="Label_LoginRequiredMessage" xml:space="preserve">
1382+
<value>이 기능을 사용하려면 로그인이 필요합니다.</value>
1383+
</data>
1384+
<data name="Label_RequestErrorMessage" xml:space="preserve">
1385+
<value>요청을 처리하는 중 오류가 발생했습니다.</value>
1386+
</data>
1387+
<data name="Label_BecomeSupporterDescription" xml:space="preserve">
1388+
<value>Stability Matrix 팀을 후원하고 개발 초기 빌드에 액세스하여 새로운 기능을 가장 먼저 사용해 보세요.</value>
1389+
</data>
13661390
</root>

StabilityMatrix.Avalonia/Languages/Resources.resx

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1614,4 +1614,29 @@ Account tokens will not be viewable after saving, please make a note of them if
16141614
<data name="Label_Community" xml:space="preserve">
16151615
<value>Community</value>
16161616
</data>
1617+
<data name="Label_PromptAmplifierRateLimitTitle" xml:space="preserve">
1618+
<value>Rate Limit Reached</value>
1619+
</data>
1620+
<data name="Label_PromptAmplifierRateLimitMessage" xml:space="preserve">
1621+
<value>You have no Prompt Amplifier usage left this month. Usage resets on the 1st of each month. ({0} days left)</value>
1622+
<comment>{0} = days remaining until next month</comment>
1623+
</data>
1624+
<data name="Label_PromptAmplifierError" xml:space="preserve">
1625+
<value>Prompt Amplifier Error</value>
1626+
</data>
1627+
<data name="Label_ModerationError" xml:space="preserve">
1628+
<value>Moderation Error</value>
1629+
</data>
1630+
<data name="Label_PromptFlaggedMessage" xml:space="preserve">
1631+
<value>Your prompt was flagged by the moderation system. Please try again with a different prompt.</value>
1632+
</data>
1633+
<data name="Label_LoginRequiredMessage" xml:space="preserve">
1634+
<value>You need to be logged in to use this feature.</value>
1635+
</data>
1636+
<data name="Label_RequestErrorMessage" xml:space="preserve">
1637+
<value>There was an error processing your request.</value>
1638+
</data>
1639+
<data name="Label_BecomeSupporterDescription" xml:space="preserve">
1640+
<value>Support the Stability Matrix Team and get access to early development builds and be the first to test new features.</value>
1641+
</data>
16171642
</root>

StabilityMatrix.Avalonia/ViewModels/Inference/PromptCardViewModel.cs

Lines changed: 14 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -659,12 +659,15 @@ private async Task AmplifyPrompt()
659659
case HttpStatusCode.PaymentRequired:
660660
{
661661
var dialog = DialogHelper.CreateMarkdownDialog(
662-
$"You have no Prompt Amplifier usage left this month. Usage resets on the 1st of each month. ({Utilities.GetNumDaysTilBeginningOfNextMonth()} days left)",
663-
"Rate Limit Reached"
662+
string.Format(
663+
Resources.Label_PromptAmplifierRateLimitMessage,
664+
Utilities.GetNumDaysTilBeginningOfNextMonth()
665+
),
666+
Resources.Label_PromptAmplifierRateLimitTitle
664667
);
665-
dialog.PrimaryButtonText = "Upgrade";
668+
dialog.PrimaryButtonText = Resources.Action_Upgrade;
666669
dialog.PrimaryButtonCommand = new RelayCommand(() =>
667-
ProcessRunner.OpenUrl("https://patreon.com/join/StabilityMatrix")
670+
ProcessRunner.OpenUrl(Assets.MembershipUrl)
668671
);
669672
dialog.IsPrimaryButtonEnabled = true;
670673
dialog.DefaultButton = ContentDialogButton.Primary;
@@ -674,8 +677,8 @@ private async Task AmplifyPrompt()
674677
}
675678
case HttpStatusCode.BadRequest:
676679
notificationService.Show(
677-
"Moderation Error",
678-
"Your prompt was flagged by the moderation system. Please try again with a different prompt.",
680+
Resources.Label_ModerationError,
681+
Resources.Label_PromptFlaggedMessage,
679682
NotificationType.Error
680683
);
681684
break;
@@ -687,16 +690,16 @@ private async Task AmplifyPrompt()
687690
else
688691
{
689692
notificationService.Show(
690-
"Prompt Amplifier Error",
691-
"You need to be logged in to use this feature.",
693+
Resources.Label_PromptAmplifierError,
694+
Resources.Label_LoginRequiredMessage,
692695
NotificationType.Error
693696
);
694697
}
695698
break;
696699
default:
697700
notificationService.Show(
698-
"Prompt Amplifier Error",
699-
"There was an error processing your request.",
701+
Resources.Label_PromptAmplifierError,
702+
Resources.Label_RequestErrorMessage,
700703
NotificationType.Error
701704
);
702705
break;
@@ -705,7 +708,7 @@ private async Task AmplifyPrompt()
705708
catch (Exception e)
706709
{
707710
logger.LogError(e, "Error amplifying prompt");
708-
notificationService.Show("Prompt Amplifier Error", e.Message, NotificationType.Error);
711+
notificationService.Show(Resources.Label_PromptAmplifierError, e.Message, NotificationType.Error);
709712
}
710713
}
711714

StabilityMatrix.Avalonia/ViewModels/Settings/UpdateSettingsViewModel.cs

Lines changed: 12 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -74,14 +74,14 @@ public UpdateChannelCard? SelectedUpdateChannelCard
7474
new()
7575
{
7676
UpdateChannel = UpdateChannel.Development,
77-
Description = Resources.Label_UpdatesDevChannelDescription
77+
Description = Resources.Label_UpdatesDevChannelDescription,
7878
},
7979
new()
8080
{
8181
UpdateChannel = UpdateChannel.Preview,
82-
Description = Resources.Label_UpdatesPreviewChannelDescription
82+
Description = Resources.Label_UpdatesPreviewChannelDescription,
8383
},
84-
new() { UpdateChannel = UpdateChannel.Stable }
84+
new() { UpdateChannel = UpdateChannel.Stable },
8585
};
8686

8787
public UpdateSettingsViewModel(
@@ -178,28 +178,27 @@ public void ShowLoginRequiredDialog()
178178
.UIThread.InvokeAsync(async () =>
179179
{
180180
var dialog = DialogHelper.CreateTaskDialog(
181-
"Become a Supporter",
182-
""
183-
+ "Support the Stability Matrix Team and get access to early development builds and be the first to test new features. "
181+
Resources.Action_BecomeSupporter,
182+
Resources.Label_BecomeSupporterDescription
184183
);
185184

186185
dialog.Buttons = new[]
187186
{
188187
new(Resources.Label_Accounts, TaskDialogStandardResult.OK),
189-
TaskDialogButton.CloseButton
188+
TaskDialogButton.CloseButton,
190189
};
191190

192191
dialog.Commands = new[]
193192
{
194193
new TaskDialogCommand
195194
{
196-
Text = "Patreon",
197-
Description = "https://patreon.com/StabilityMatrix",
195+
Text = Resources.Label_Membership,
196+
Description = Assets.MembershipUrl.ToString(),
198197
Command = new RelayCommand(() =>
199198
{
200-
ProcessRunner.OpenUrl("https://patreon.com/StabilityMatrix");
201-
})
202-
}
199+
ProcessRunner.OpenUrl(Assets.MembershipUrl);
200+
}),
201+
},
203202
};
204203

205204
if (await dialog.ShowAsync(true) is TaskDialogStandardResult.OK)
@@ -220,8 +219,7 @@ partial void OnUpdateStatusChanged(UpdateStatusChangedEventArgs? value)
220219
foreach (var card in AvailableUpdateChannelCards)
221220
{
222221
card.LatestVersion = value
223-
?.UpdateChannels
224-
.Where(kv => kv.Key <= card.UpdateChannel)
222+
?.UpdateChannels.Where(kv => kv.Key <= card.UpdateChannel)
225223
.Select(kv => kv.Value)
226224
.MaxBy(info => info.Version, SemVersion.PrecedenceComparer)
227225
?.Version;

0 commit comments

Comments
 (0)