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.

i18n(pt-PT): clarify clip limits and review new editors

Blackspirits6e655c570ca8
diff --git a/src/Filee.App/Assets/i18n/pt-PT.json b/src/Filee.App/Assets/i18n/pt-PT.json
index e7e16bd2..bf2fdff8 100644
--- a/src/Filee.App/Assets/i18n/pt-PT.json
+++ b/src/Filee.App/Assets/i18n/pt-PT.json
@@ -289,7 +289,7 @@
"clip.fade_out": "Saída gradual",
"clip.fade_out_hint": "Desvanecer gradualmente para o preto e o silêncio durante 1 segundo",
"clip.cannot_cut": "Coloca o cursor dentro do excerto, e não exatamente num corte",
- "clip.last_piece": "O último segmento reproduzido não pode ser removido",
+ "clip.last_piece": "Tens de manter pelo menos um segmento no excerto",
"clip.silence_removed": "Silêncio removido: {0}",
"clip.no_silence": "Não foi encontrado silêncio",
"clip.cannot_play": "Não é possível reproduzir o excerto",
diff --git a/tests/Filee.App.Tests/ClipWindowTests.cs b/tests/Filee.App.Tests/ClipWindowTests.cs
index 36b74245..6e9161e3 100644
--- a/tests/Filee.App.Tests/ClipWindowTests.cs
+++ b/tests/Filee.App.Tests/ClipWindowTests.cs
@@ -352,10 +352,12 @@ public class ClipWindowTests
});
}
- [AvaloniaFact]
- public void A_cut_needs_the_playhead_inside_the_clip()
+ [AvaloniaTheory]
+ [InlineData("en")]
+ [InlineData("pt-PT")]
+ public void A_cut_needs_the_playhead_inside_the_clip(string language)
{
- WithClipWindow("en", false, ["match.mp4"], (window, vm, _, _) =>
+ WithClipWindow(language, false, ["match.mp4"], (window, vm, _, _) =>
{
vm.MovePlayhead(100);
Press(window, Key.C);
diff --git a/tests/Filee.App.Tests/PdfPageEditorTests.cs b/tests/Filee.App.Tests/PdfPageEditorTests.cs
index 3931a8fb..689b1a62 100644
--- a/tests/Filee.App.Tests/PdfPageEditorTests.cs
+++ b/tests/Filee.App.Tests/PdfPageEditorTests.cs
@@ -78,10 +78,13 @@ public class PdfPageEditorTests
}
}
- [AvaloniaFact]
- public async Task Editor_window_renders_previews_and_all_actions_without_clipping()
+ [AvaloniaTheory]
+ [InlineData("en")]
+ [InlineData("pt-PT")]
+ [InlineData("pt-BR")]
+ public async Task Editor_window_renders_previews_and_all_actions_without_clipping(string language)
{
- TestServices.EnsureInitialized("en");
+ TestServices.EnsureInitialized(language);
var folder = Directory.CreateTempSubdirectory("filee-pdf-pages-ui-").FullName;
try
{
@@ -106,7 +109,7 @@ public class PdfPageEditorTests
}
RenderTests.Pump();
- RenderTests.Save(window, "pdf-page-editor-en.png");
+ RenderTests.Save(window, $"pdf-page-editor-{language}.png");
Assert.True(window.PageOrder.Bounds.Width > 220);
Assert.Equal(4, window.PageOrder.ItemsView.Count);
diff --git a/tests/Filee.App.Tests/RenderTests.cs b/tests/Filee.App.Tests/RenderTests.cs
index 38da37b5..c9388726 100644
--- a/tests/Filee.App.Tests/RenderTests.cs
+++ b/tests/Filee.App.Tests/RenderTests.cs
@@ -2396,6 +2396,7 @@ public class RenderTests
public static TheoryData<string, bool> ClipLooks => new()
{
{ "en", false }, { "en", true }, { "ru", false }, { "ru", true }, { "ar", false }, { "ar", true }, { "ja", false }, { "hi", true },
+ { "pt-PT", false }, { "pt-PT", true }, { "pt-BR", false }, { "pt-BR", true },
};
/// <summary>