feat(app): library, jobs, settings, server, welcome and about screens
Local-mode composition root (SQLite index, one JobEngine fed by a single handler registration list), keyset-paged library with thumbnail cache and hover scrub, live job list with throttled updates and the shell job bar, settings with live template validation and encoder self-test, server connection with trust-on-first-use and DPAPI token, first-run welcome, About with update check, and --capture screenshots with synthetic data. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012iLMBNwBE2GnphAsu4cjaC
This commit is contained in:
94 files changed
+10130
-374
No files matched your search
@@ -0,0 +1,33 @@
|
||||
using System.Globalization;
|
||||
using System.Windows;
|
||||
using Titano.Core.Localization;
|
||||
|
||||
namespace Titano.App.Infrastructure;
|
||||
|
||||
/// <summary>Switches the UI language at run time without restart (BRIEF §16), mirroring right-to-left languages.</summary>
|
||||
public static class UiLanguage
|
||||
{
|
||||
/// <summary>Applies <paramref name="code"/> (or the OS language when null) and returns the culture in use.</summary>
|
||||
public static CultureInfo Apply(string? code)
|
||||
{
|
||||
CultureInfo requested;
|
||||
try
|
||||
{
|
||||
requested = code is null ? CultureInfo.CurrentUICulture : CultureInfo.GetCultureInfo(code);
|
||||
}
|
||||
catch (CultureNotFoundException)
|
||||
{
|
||||
requested = CultureInfo.CurrentUICulture;
|
||||
}
|
||||
var culture = Languages.BestMatch(requested);
|
||||
CultureInfo.DefaultThreadCurrentUICulture = culture;
|
||||
CultureInfo.CurrentUICulture = culture;
|
||||
Loc.SetCulture(culture);
|
||||
if (Application.Current is { } app)
|
||||
{
|
||||
foreach (Window window in app.Windows)
|
||||
window.FlowDirection = Loc.IsRightToLeft ? FlowDirection.RightToLeft : FlowDirection.LeftToRight;
|
||||
}
|
||||
return culture;
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user