Skip to content

armgit / Filee

Public Imported from GitHub
0

Free, open-source file converter. Convert 263 formats offline by drag & drop — images, PDF, Word, Excel, PowerPoint, HWP/HWPX, video, audio, e-books and archives. No upload, no Office needed.

fix(i18n): wrap engine setup names and status badges

Blackspiritsff739c18ce99
diff --git a/docs/PORTUGUESE-LOCALIZATION.md b/docs/PORTUGUESE-LOCALIZATION.md
index a11cfdfc..7f820fca 100644
--- a/docs/PORTUGUESE-LOCALIZATION.md
+++ b/docs/PORTUGUESE-LOCALIZATION.md
@@ -77,6 +77,8 @@ macOS Finder regional-culture initialization still needs a native check; it is n
## Interface and native resources
+The first-run engine chooser wraps long package names and status badges after a native pt-PT Calibre cut-off
+was reproduced; English and both Portuguese variants cover the card geometry and small-screen behavior.
Preset choices and field captions wrap at 440/560 px; close-dialog actions stay inside their window. Toolbar,
Theme, Presets and Engines keep usable columns with local scrolling at the existing 820 px main-window minimum.
The toolbar content minimum is 786 px, fitting the default 1080 px window after navigation and margins. Its new
diff --git a/docs/PORTUGUESE-NATIVE-VALIDATION.md b/docs/PORTUGUESE-NATIVE-VALIDATION.md
index 59cb9d13..2281a4d1 100644
--- a/docs/PORTUGUESE-NATIVE-VALIDATION.md
+++ b/docs/PORTUGUESE-NATIVE-VALIDATION.md
@@ -8,6 +8,27 @@ CI completed on 22 October 2026; report consolidated on 23 October. Only Blacksp
all nine jobs passed. This closes the previously pending automated CI and full-formatter checks. It does not
certify an interactive installation, OS-language session, permission dialog or screen reader.
+## Native engine-setup follow-up - 24 October 2026
+
+A fresh isolated Windows launch after submission exposed a real pt-PT cut-off in the first-run engine chooser:
+the long Calibre name placed `Encontrado neste computador` beyond its card. A deterministic geometry regression
+reproduced it (579 px inside a 508 px card); English and pt-BR passed the same baseline case. Package names and
+status badges now wrap onto another line without shortening translations or changing window sizes. The three
+regression cases, seven first-run render cases, three short-screen/button/escape cases and two UI-scale cases
+all pass: **15 / 0 failed / 0 skipped**, 14 seconds. Changed-test whitespace formatting passes. The solution was
+rebuilt after the XAML change: zero errors, five existing warnings. Existing demo scenes do not show this chooser,
+so their media are unaffected. The 292 App and 176 Setup results below precede this narrow follow-up and are
+not added to these fifteen as a unique-test count.
+
+The installed Computer Use skill operated the submitted development app with a new temporary FILEE_DATA_DIR:
+automatic language opened in pt-PT, `Página inicial` / `Apoiar` were present, and the Theme page exposed the new
+`Escala da interface` controls. Real Ctrl+numpad-plus changed 100% to 110%; Ctrl+0 restored 100% and disabled Repor.
+After the fix, a second fresh native profile showed the complete Calibre name and system-copy badge on separate
+lines, matching the corrected geometry. Both isolated --quit commands completed with exit code 0. This is native
+input evidence, separate from headless captures.
+No engine was installed, and no screen-reader, OS-language reversal, UAC or permission result is inferred.
+Current source-head/CI status remains in the PR body, with native limitations below still explicit.
+
## Submission validation - 24 October 2026
The submission integrates upstream `984475954a139fa8beee0ca3e7b6b4c8375ef0f2` in merge `7bdbb3d1`.
diff --git a/docs/PORTUGUESE-REVIEW-FOLLOWUP.md b/docs/PORTUGUESE-REVIEW-FOLLOWUP.md
index 43b1d175..d5e4f918 100644
--- a/docs/PORTUGUESE-REVIEW-FOLLOWUP.md
+++ b/docs/PORTUGUESE-REVIEW-FOLLOWUP.md
@@ -5,6 +5,14 @@ a121a3c9e3254918f8b171bb7f675b0bdc532244 on 22 October. The current integration
984475954a139fa8beee0ca3e7b6b4c8375ef0f2, verified on 24 October 2026. Code is pushed only to Blackspirits/Filee;
the contributor has authorized submitting the pull request to KnifeLemon/Filee.
+## Native chooser correction - 24 October 2026
+
+An isolated native launch exposed the long pt-PT Calibre name pushing its system-copy badge outside the first-run
+card. A deterministic regression fails before the fix (579 px within a 508 px card) and passes after names/badges
+wrap. All fifteen affected render, geometry, short-screen and zoom cases pass, including both Portuguese variants.
+The actual application also responds to Ctrl+plus (110%) and Ctrl+0 (100%). This is additional native evidence;
+installation, OS-language reversal, permissions and screen readers remain unvalidated.
+
## Submission integration: FITS, CAD and Turkish - 24 October 2026
The submission includes upstream `98447595`, retaining its FITS/CAD/GNOME features and Turkish translation.
diff --git a/src/Filee.App/Views/EngineSetupWindow.axaml b/src/Filee.App/Views/EngineSetupWindow.axaml
index 903011c5..f879a551 100644
--- a/src/Filee.App/Views/EngineSetupWindow.axaml
+++ b/src/Filee.App/Views/EngineSetupWindow.axaml
@@ -34,12 +34,12 @@
<PathIcon DockPanel.Dock="Left" VerticalAlignment="Top" Margin="2,3,14,0" Width="14" Height="14"
Data="{StaticResource Icon.Check}" Foreground="{DynamicResource SuccessBrush}" IsVisible="{Binding IsInstalled}" />
<StackPanel Spacing="4">
- <StackPanel Orientation="Horizontal" Spacing="10">
- <TextBlock FontWeight="SemiBold" Text="{Binding Name}" />
- <Border Classes="badge">
- <TextBlock Classes="caption" Text="{Binding StatusText}" />
+ <WrapPanel Orientation="Horizontal">
+ <TextBlock FontWeight="SemiBold" TextWrapping="Wrap" Text="{Binding Name}" Margin="0,0,10,2" />
+ <Border Classes="badge" Margin="0,0,0,2">
+ <TextBlock Classes="caption" TextWrapping="Wrap" Text="{Binding StatusText}" />
</Border>
- </StackPanel>
+ </WrapPanel>
<TextBlock Classes="caption" TextWrapping="Wrap" Text="{Binding Description}" />
<TextBlock Classes="caption" Text="{Binding Sizes}" />
<TextBlock Classes="caption" TextWrapping="Wrap" Text="{Binding InstallGuidance}"
diff --git a/tests/Filee.App.Tests/PortugueseRenderTests.cs b/tests/Filee.App.Tests/PortugueseRenderTests.cs
index 2c42b85a..677cee06 100644
--- a/tests/Filee.App.Tests/PortugueseRenderTests.cs
+++ b/tests/Filee.App.Tests/PortugueseRenderTests.cs
@@ -17,6 +17,51 @@ namespace Filee.App.Tests;
public class PortugueseRenderTests
{
+ [AvaloniaTheory]
+ [InlineData("en")]
+ [InlineData("pt-PT")]
+ [InlineData("pt-BR")]
+ public void First_run_engine_names_and_statuses_fit_their_cards(string language)
+ {
+ TestServices.EnsureInitialized(language);
+ var vm = new EngineSetupViewModel(AppHost.Get<EngineDownloadService>(), AppHost.Get<ILocalizer>());
+ var calibre = vm.Packages.Single(p => p.Package.Id == "calibre");
+ var beforeStatus = calibre.Status;
+ var beforeSystem = calibre.FromSystem;
+ var window = new EngineSetupWindow { DataContext = vm };
+ try
+ {
+ // The long translated package name and system-copy status reproduced a native pt-PT cut-off.
+ // Make the state deterministic even when Calibre is absent from the test host.
+ calibre.FromSystem = true;
+ calibre.Status = EnginePackageStatus.OwnCopy;
+ window.Show();
+ RenderTests.Pump();
+ Capture(window, $"portuguese-engine-setup-{language}.png");
+ var card = window.GetVisualDescendants().OfType<Border>()
+ .Single(b => b.Classes.Contains("card") && ReferenceEquals(b.DataContext, calibre));
+ var headings = card.GetVisualDescendants().OfType<TextBlock>()
+ .Where(t => t.Text == calibre.Name || t.Text == calibre.StatusText).ToList();
+ Assert.Equal(2, headings.Count);
+ foreach (var text in headings)
+ {
+ var right = text.TranslatePoint(new Point(text.Bounds.Width, 0), card)!.Value.X;
+ Assert.True(right <= card.Bounds.Width - card.Padding.Right + 1,
+ $"{language}: engine heading '{text.Text}' extends beyond its card ({right} in {card.Bounds.Width})");
+ Assert.True(text.TextLayout.Width <= text.Bounds.Width + 1 &&
+ text.TextLayout.Height <= text.Bounds.Height + 1,
+ $"{language}: engine heading '{text.Text}' is cut off");
+ }
+ }
+ finally
+ {
+ window.Close();
+ vm.CloseCommand.Execute(null);
+ calibre.Status = beforeStatus;
+ calibre.FromSystem = beforeSystem;
+ }
+ }
+
[AvaloniaTheory]
[InlineData("pt-PT", 440, "mp4-720")]
[InlineData("pt-BR", 440, "mp4-720")]
diff --git a/tests/Filee.App.Tests/RenderTests.cs b/tests/Filee.App.Tests/RenderTests.cs
index 1ab6a3d3..6ce51c0b 100644
--- a/tests/Filee.App.Tests/RenderTests.cs
+++ b/tests/Filee.App.Tests/RenderTests.cs
@@ -948,6 +948,8 @@ public class RenderTests
[InlineData("ko")]
[InlineData("ru")]
[InlineData("ar")]
+ [InlineData("pt-PT")]
+ [InlineData("pt-BR")]
public void First_run_engine_setup_renders(string language)
{
TestServices.EnsureInitialized(language);
@@ -967,10 +969,13 @@ public class RenderTests
window.Close();
}
- [AvaloniaFact]
- public void Engine_setup_on_a_short_screen_scrolls_the_list_and_keeps_its_buttons()
+ [AvaloniaTheory]
+ [InlineData("en")]
+ [InlineData("pt-PT")]
+ [InlineData("pt-BR")]
+ public void Engine_setup_on_a_short_screen_scrolls_the_list_and_keeps_its_buttons(string language)
{
- TestServices.EnsureInitialized("en");
+ TestServices.EnsureInitialized(language);
var vm = new EngineSetupViewModel(AppHost.Get<EngineDownloadService>(), AppHost.Get<Filee.Core.Localization.ILocalizer>());
var window = new EngineSetupWindow { DataContext = vm };
var closed = false;
@@ -998,7 +1003,7 @@ public class RenderTests
var bottom = Avalonia.VisualExtensions.TranslatePoint(button, new Avalonia.Point(0, button.Bounds.Height), window)!.Value.Y;
Assert.InRange(bottom, 0, window.ClientSize.Height);
}
- Save(window, "engine-setup-short-screen.png");
+ Save(window, $"engine-setup-short-screen-{language}.png");
// Esc closes it like Cancel / Close in the other dialogs.
window.KeyPress(Key.Escape, RawInputModifiers.None, PhysicalKey.Escape, null);