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.

Engine install guidance for macOS and Linux in the app's language

KnifeLemon94462c0a673a
diff --git a/src/Filee.App/Assets/i18n/en.json b/src/Filee.App/Assets/i18n/en.json
index 8a979539..f6b30dfd 100644
--- a/src/Filee.App/Assets/i18n/en.json
+++ b/src/Filee.App/Assets/i18n/en.json
@@ -389,6 +389,13 @@
"engines.package.calibre.description": "Saves as MOBI and AZW3 for Kindle, and converts rare e-book formats: LIT, LRF, PDB, PML, RB, SNB and TCR, plus CHM and OEB input. EPUB, MOBI, AZW3, FB2 and comics (CBZ, CBR) are read without it.",
"engines.package.size": "Download {0} · {1} on disk",
"engines.package.system_required": "Use a copy installed on this computer.",
+ "engines.guidance.macos": "Install {0} for this Mac, then choose “Use my copy…” and select its program or .app folder.",
+ "engines.guidance.macos.ffmpeg": "Install it with Homebrew (brew install ffmpeg), then choose “Check again”, or “Use my copy…” and select its bin folder.",
+ "engines.guidance.macos.ghostscript": "Install it with Homebrew (brew install ghostscript), then choose “Check again”, or “Use my copy…” and select its bin folder.",
+ "engines.guidance.linux": "Install {0} with your distribution’s package manager, then choose “Use my copy…” and select its program folder.",
+ "engines.guidance.linux.libreoffice": "Install LibreOffice with your distribution’s package manager (Ubuntu/Debian: sudo apt install libreoffice), then choose “Check again”. Opening HWP through LibreOffice also needs Java and the H2Orestart extension.",
+ "engines.guidance.linux.ghostscript": "Install Ghostscript with your distribution’s package manager (Ubuntu/Debian: sudo apt install ghostscript), then choose “Check again”.",
+ "engines.guidance.windows": "Filee has no download of {0} for this PC. Choose “Use my copy…” and select an installed copy.",
"engines.use_own_app_folder": "Choose the folder containing {0}.app",
"engines.progress_detail": "{0} of {1} · {2}/s · {3}",
"engines.eta.estimating": "estimating time left…",
diff --git a/src/Filee.App/Assets/i18n/ko.json b/src/Filee.App/Assets/i18n/ko.json
index 251d48a1..8e47a004 100644
--- a/src/Filee.App/Assets/i18n/ko.json
+++ b/src/Filee.App/Assets/i18n/ko.json
@@ -389,6 +389,13 @@
"engines.package.calibre.description": "킨들용 MOBI·AZW3로 저장하고, 드문 전자책 형식(LIT·LRF·PDB·PML·RB·SNB·TCR, CHM·OEB 읽기)을 변환해요. EPUB·MOBI·AZW3·FB2와 만화책(CBZ·CBR)은 없어도 읽을 수 있어요.",
"engines.package.size": "다운로드 {0} · 설치 후 {1}",
"engines.package.system_required": "이 컴퓨터에 설치된 엔진을 연결해 주세요.",
+ "engines.guidance.macos": "이 Mac에 {0}을(를) 설치한 뒤 “내 프로그램 쓰기…”로 프로그램이나 .app 폴더를 선택해 주세요.",
+ "engines.guidance.macos.ffmpeg": "Homebrew로 설치(brew install ffmpeg)한 뒤 “다시 확인”을 누르거나, “내 프로그램 쓰기…”로 bin 폴더를 선택해 주세요.",
+ "engines.guidance.macos.ghostscript": "Homebrew로 설치(brew install ghostscript)한 뒤 “다시 확인”을 누르거나, “내 프로그램 쓰기…”로 bin 폴더를 선택해 주세요.",
+ "engines.guidance.linux": "배포판의 패키지 관리자로 {0}을(를) 설치한 뒤 “내 프로그램 쓰기…”로 프로그램 폴더를 선택해 주세요.",
+ "engines.guidance.linux.libreoffice": "배포판의 패키지 관리자로 LibreOffice를 설치(Ubuntu/Debian: sudo apt install libreoffice)한 뒤 “다시 확인”을 눌러 주세요. LibreOffice로 HWP를 열려면 Java와 H2Orestart 확장도 필요해요.",
+ "engines.guidance.linux.ghostscript": "배포판의 패키지 관리자로 Ghostscript를 설치(Ubuntu/Debian: sudo apt install ghostscript)한 뒤 “다시 확인”을 눌러 주세요.",
+ "engines.guidance.windows": "이 PC용 {0} 다운로드는 없어요. “내 프로그램 쓰기…”로 설치된 프로그램을 선택해 주세요.",
"engines.use_own_app_folder": "{0}.app이 들어 있는 폴더 선택",
"engines.progress_detail": "{0} / {1} · {2}/s · {3}",
"engines.eta.estimating": "남은 시간 계산 중…",
diff --git a/src/Filee.App/Assets/i18n/zh-CN.json b/src/Filee.App/Assets/i18n/zh-CN.json
index 92dc0c89..96781436 100644
--- a/src/Filee.App/Assets/i18n/zh-CN.json
+++ b/src/Filee.App/Assets/i18n/zh-CN.json
@@ -389,6 +389,13 @@
"engines.package.calibre.description": "可保存为 Kindle 使用的 MOBI 和 AZW3,并转换少见的电子书格式:LIT、LRF、PDB、PML、RB、SNB、TCR,以及读取 CHM 和 OEB。EPUB、MOBI、AZW3、FB2 和漫画(CBZ、CBR)无需它即可读取。",
"engines.package.size": "下载 {0} · 占用 {1}",
"engines.package.system_required": "请使用此电脑上已安装的引擎。",
+ "engines.guidance.macos": "先在这台 Mac 上安装 {0},再点“使用我的程序…”选择它的程序或 .app 文件夹。",
+ "engines.guidance.macos.ffmpeg": "用 Homebrew 安装(brew install ffmpeg)后点“重新检查”,或点“使用我的程序…”选择它的 bin 文件夹。",
+ "engines.guidance.macos.ghostscript": "用 Homebrew 安装(brew install ghostscript)后点“重新检查”,或点“使用我的程序…”选择它的 bin 文件夹。",
+ "engines.guidance.linux": "用发行版的软件包管理器安装 {0},再点“使用我的程序…”选择它的程序文件夹。",
+ "engines.guidance.linux.libreoffice": "用发行版的软件包管理器安装 LibreOffice(Ubuntu/Debian:sudo apt install libreoffice)后点“重新检查”。通过 LibreOffice 打开 HWP 还需要 Java 和 H2Orestart 扩展。",
+ "engines.guidance.linux.ghostscript": "用发行版的软件包管理器安装 Ghostscript(Ubuntu/Debian:sudo apt install ghostscript)后点“重新检查”。",
+ "engines.guidance.windows": "没有适用于这台电脑的 {0} 下载。点“使用我的程序…”选择已安装的程序。",
"engines.use_own_app_folder": "选择包含 {0}.app 的文件夹",
"engines.progress_detail": "{0} / {1} · {2}/s · {3}",
"engines.eta.estimating": "正在估算剩余时间…",
diff --git a/src/Filee.App/Services/EngineDownloadService.cs b/src/Filee.App/Services/EngineDownloadService.cs
index c094abd0..1e5ba3d6 100644
--- a/src/Filee.App/Services/EngineDownloadService.cs
+++ b/src/Filee.App/Services/EngineDownloadService.cs
@@ -43,7 +43,22 @@ public sealed partial class EnginePackageState : ObservableObject
? _loc.Format("engines.package.size", FormatBytes(EngineDownloads.DownloadSize(Package)), FormatBytes(Package.InstalledSize))
: _loc["engines.package.system_required"];
- public string? InstallGuidance => EngineDownloads.UnavailableReason(Package);
+ /// <summary>
+ /// How to get an engine Filee doesn't download on this system (FFmpeg and Ghostscript from Homebrew on macOS,
+ /// the distribution's packages on Linux), in the app's language; null when Filee can download it.
+ /// </summary>
+ public string? InstallGuidance
+ {
+ get
+ {
+ if (EngineDownloads.CanDownload(Package))
+ return null;
+ var system = OperatingSystem.IsMacOS() ? "macos" : OperatingSystem.IsLinux() ? "linux" : "windows";
+ var key = $"engines.guidance.{system}.{Package.Id}";
+ var text = _loc[key];
+ return text != key ? text : _loc.Format($"engines.guidance.{system}", Name);
+ }
+ }
[ObservableProperty]
[NotifyPropertyChangedFor(nameof(StatusText), nameof(IsInstalled), nameof(IsBusy), nameof(CanInstall), nameof(CanRemove),