fix(i18n): texts kept by view models follow a language switch; right-to-left meta lines keep their fields
A language switch re-read computed properties only: the job bar of a running job,
the Jobs rows, the editor's chart legends and summaries, Auto chips, markers and
info line, the Archive figures and the Import session table kept the old language
until their next change. LocalizedViewModel gains OnLanguageChanged, where each of
them makes those texts again.
Meta lines joined their fields with a plain " · ": in Arabic or Hebrew a number
after a Latin field ("Canon EOS R5 · 2 h") joined the Latin run and split its own
field. Loc.Separator puts right-to-left marks around the dot in right-to-left
languages and is used for every such line. Desktop file sizes use the Common.Size
formats, as the Setup and the Uploader do.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012iLMBNwBE2GnphAsu4cjaC
This commit is contained in:
46 files changed
+191
-58
No files matched your search
@@ -814,6 +814,21 @@ public sealed class EditorViewModel : LocalizedViewModel, IAsyncDisposable
|
||||
RequestPreview(immediate: true);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// The UI language changed: what the tabs keep in objects (chart legends and summaries, the Auto chips of the
|
||||
/// settings), the timeline markers and the preview's info line are made again in the new language.
|
||||
/// </summary>
|
||||
protected override void OnLanguageChanged()
|
||||
{
|
||||
if (!_disposed)
|
||||
{
|
||||
foreach (var tab in Tabs) tab.OnContentChanged();
|
||||
UpdateMarkers();
|
||||
UpdateInfo();
|
||||
}
|
||||
base.OnLanguageChanged();
|
||||
}
|
||||
|
||||
/// <summary>The first failure of a run of failed saves (they are retried until one succeeds); Retry tries at once.</summary>
|
||||
private void OnSaveFailed(Exception ex) => Shell.ShowToast(new Toast
|
||||
{
|
||||
@@ -874,7 +889,7 @@ public sealed class EditorViewModel : LocalizedViewModel, IAsyncDisposable
|
||||
{
|
||||
var settings = plan.Setup.Encoder.Settings;
|
||||
var position = plan.Setup.Plan.DurationSeconds * CurrentIndex / double.Max(1, FrameCount - 1);
|
||||
InfoText = string.Join(" · ", EditorText.Position(CurrentIndex, FrameCount),
|
||||
InfoText = string.Join(Loc.Separator, EditorText.Position(CurrentIndex, FrameCount),
|
||||
Loc.L("Editor.Preview.OutputTime", EditorText.Clock(position), EditorText.Clock(plan.Setup.Plan.DurationSeconds)),
|
||||
Loc.L("Editor.Preview.OutputSize", EditorText.Size(settings.Width, settings.Height)));
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user