diff --git a/assets/translations/de.json b/assets/translations/de.json index e20a601..7e0f16e 100644 --- a/assets/translations/de.json +++ b/assets/translations/de.json @@ -188,6 +188,17 @@ "steam": "Steam", "steamMobile": "Steam Mobile", "steamChat": "Steam Chat", + "install": "Install", + "markInstalled": "Mark Installed", + "update": "Update", + "markUpdated": "Mark Updated", + "additionalOptions": "Additional Options", + "disableVersionDetection": "Disable Version Detection", + "noVersionDetectionExplanation": "This option should only be used for Apps where version detection does not work correctly.", + "downloadingX": "Downloading {}", + "downloadNotifDescription": "Notifies the user of the progress in downloading an App", + "noAPKFound": "No APK found", + "noVersionDetection": "No version detection", "tooManyRequestsTryAgainInMinutes": { "one": "Zu viele Anfragen (Rate begrenzt) - versuchen Sie es in {} Minute erneut", "other": "Zu viele Anfragen (Rate begrenzt) - versuchen Sie es in {} Minuten erneut" diff --git a/assets/translations/en.json b/assets/translations/en.json index 8aa0a06..215fd2b 100644 --- a/assets/translations/en.json +++ b/assets/translations/en.json @@ -188,6 +188,17 @@ "steam": "Steam", "steamMobile": "Steam Mobile", "steamChat": "Steam Chat", + "install": "Install", + "markInstalled": "Mark Installed", + "update": "Update", + "markUpdated": "Mark Updated", + "additionalOptions": "Additional Options", + "disableVersionDetection": "Disable Version Detection", + "noVersionDetectionExplanation": "This option should only be used for Apps where version detection does not work correctly.", + "downloadingX": "Downloading {}", + "downloadNotifDescription": "Notifies the user of the progress in downloading an App", + "noAPKFound": "No APK found", + "noVersionDetection": "No version detection", "tooManyRequestsTryAgainInMinutes": { "one": "Too many requests (rate limited) - try again in {} minute", "other": "Too many requests (rate limited) - try again in {} minutes" diff --git a/assets/translations/hu.json b/assets/translations/hu.json index 0866789..985646c 100644 --- a/assets/translations/hu.json +++ b/assets/translations/hu.json @@ -188,6 +188,17 @@ "steam": "Steam", "steamMobile": "Steam Mobile", "steamChat": "Steam Chat", + "install": "Install", + "markInstalled": "Mark Installed", + "update": "Update", + "markUpdated": "Mark Updated", + "additionalOptions": "Additional Options", + "disableVersionDetection": "Disable Version Detection", + "noVersionDetectionExplanation": "This option should only be used for Apps where version detection does not work correctly.", + "downloadingX": "Downloading {}", + "downloadNotifDescription": "Notifies the user of the progress in downloading an App", + "noAPKFound": "No APK found", + "noVersionDetection": "No version detection", "tooManyRequestsTryAgainInMinutes": { "one": "Túl sok kérés (korlátozott arány) – próbálja újra {} perc múlva", "other": "Túl sok kérés (korlátozott arány) – próbálja újra {} perc múlva" @@ -232,4 +243,4 @@ "one": "A(z) {} és 1 további alkalmazás frissítve.", "other": "{} és további {} alkalmazás frissítve." } -} +} \ No newline at end of file diff --git a/assets/translations/it.json b/assets/translations/it.json index 46d2824..79086e8 100644 --- a/assets/translations/it.json +++ b/assets/translations/it.json @@ -188,6 +188,17 @@ "steam": "Steam", "steamMobile": "Steam Mobile", "steamChat": "Steam Chat", + "install": "Install", + "markInstalled": "Mark Installed", + "update": "Update", + "markUpdated": "Mark Updated", + "additionalOptions": "Additional Options", + "disableVersionDetection": "Disable Version Detection", + "noVersionDetectionExplanation": "This option should only be used for Apps where version detection does not work correctly.", + "downloadingX": "Downloading {}", + "downloadNotifDescription": "Notifies the user of the progress in downloading an App", + "noAPKFound": "No APK found", + "noVersionDetection": "No version detection", "tooManyRequestsTryAgainInMinutes": { "one": "Troppe richieste (traffico limitato) - riprova tra {} minuto", "other": "Troppe richieste (traffico limitato) - riprova tra {} minuti" @@ -232,4 +243,4 @@ "one": "{} e un'altra App sono state aggiornate.", "other": "{} e altre {} App sono state aggiornate." } -} +} \ No newline at end of file diff --git a/assets/translations/ja.json b/assets/translations/ja.json index 11e87da..278a962 100644 --- a/assets/translations/ja.json +++ b/assets/translations/ja.json @@ -188,6 +188,17 @@ "steam": "Steam", "steamMobile": "Steam Mobile", "steamChat": "Steam Chat", + "install": "Install", + "markInstalled": "Mark Installed", + "update": "Update", + "markUpdated": "Mark Updated", + "additionalOptions": "Additional Options", + "disableVersionDetection": "Disable Version Detection", + "noVersionDetectionExplanation": "This option should only be used for Apps where version detection does not work correctly.", + "downloadingX": "Downloading {}", + "downloadNotifDescription": "Notifies the user of the progress in downloading an App", + "noAPKFound": "No APK found", + "noVersionDetection": "No version detection", "tooManyRequestsTryAgainInMinutes": { "one": "リクエストが多すぎます(レート制限)- {}分後に再試行してください", "other": "リクエストが多すぎます(レート制限)- {}分後に再試行してください" @@ -232,4 +243,4 @@ "one": "{}とさらに{}個のアプリがアップデートされました。", "other": "{}とさらに{}個のアプリがアップデートされました。" } -} +} \ No newline at end of file diff --git a/assets/translations/zh.json b/assets/translations/zh.json index 50e8040..e88a99f 100644 --- a/assets/translations/zh.json +++ b/assets/translations/zh.json @@ -188,6 +188,17 @@ "steam": "Steam", "steamMobile": "Steam Mobile", "steamChat": "Steam Chat", + "install": "Install", + "markInstalled": "Mark Installed", + "update": "Update", + "markUpdated": "Mark Updated", + "additionalOptions": "Additional Options", + "disableVersionDetection": "Disable Version Detection", + "noVersionDetectionExplanation": "This option should only be used for Apps where version detection does not work correctly.", + "downloadingX": "Downloading {}", + "downloadNotifDescription": "Notifies the user of the progress in downloading an App", + "noAPKFound": "No APK found", + "noVersionDetection": "No version detection", "tooManyRequestsTryAgainInMinutes": { "one": "请求过多 (API 限制) - 在 {} 分钟后重试", "other": "请求过多 (API 限制) - 在 {} 分钟后重试" diff --git a/lib/pages/add_app.dart b/lib/pages/add_app.dart index 71c92f9..4408a3c 100644 --- a/lib/pages/add_app.dart +++ b/lib/pages/add_app.dart @@ -92,10 +92,10 @@ class _AddAppPageState extends State { await showDialog( context: context, builder: (BuildContext ctx) { - return const GeneratedFormModal( - title: 'Disable Version Detection', // TODO - items: [], - message: 'TODO', + return GeneratedFormModal( + title: tr('disableVersionDetection'), + items: const [], + message: tr('noVersionDetectionExplanation'), ); }) == null) { diff --git a/lib/pages/app.dart b/lib/pages/app.dart index ba131fc..0326a3a 100644 --- a/lib/pages/app.dart +++ b/lib/pages/app.dart @@ -73,7 +73,9 @@ class _AppPageState extends State { height: 25, ), Text( - app?.installedInfo?.name ?? app?.app.name ?? 'App', + app?.installedInfo?.name ?? + app?.app.name ?? + tr('app'), textAlign: TextAlign.center, style: Theme.of(context).textTheme.displayLarge, ), @@ -200,7 +202,7 @@ class _AppPageState extends State { ); }); }, - tooltip: 'Mark as Updated', + tooltip: tr('markUpdated'), icon: const Icon(Icons.done)), if (source != null && source @@ -228,7 +230,7 @@ class _AppPageState extends State { return row; }).toList(); return GeneratedFormModal( - title: 'Additional Options', + title: tr('additionalOptions'), items: items); }).then((values) { if (app != null && values != null) { @@ -249,7 +251,7 @@ class _AppPageState extends State { } }); }, - tooltip: 'Additional Options', + tooltip: tr('additionalOptions'), icon: const Icon(Icons.settings)), const SizedBox(width: 16.0), Expanded( @@ -286,11 +288,11 @@ class _AppPageState extends State { : null, child: Text(app?.app.installedVersion == null ? !trackOnly - ? 'Install' - : 'Mark Installed' + ? tr('install') + : tr('markInstalled') : !trackOnly - ? 'Update' - : 'Mark Updated'))), + ? tr('update') + : tr('markUpdated')))), const SizedBox(width: 16.0), ElevatedButton( onPressed: app?.downloadProgress != null diff --git a/lib/providers/notifications_provider.dart b/lib/providers/notifications_provider.dart index 9e62c5a..b68a669 100644 --- a/lib/providers/notifications_provider.dart +++ b/lib/providers/notifications_provider.dart @@ -80,11 +80,11 @@ class DownloadNotification extends ObtainiumNotification { DownloadNotification(String appName, int progPercent) : super( appName.hashCode, - 'Downloading $appName', + tr('downloadingX', args: [appName]), '', 'APP_DOWNLOADING', - 'Downloading App', - 'Notifies the user of the progress in downloading an App', + tr('downloadingX', args: [tr('app')]), + tr('downloadNotifDescription'), Importance.low, onlyAlertOnce: true, progPercent: progPercent); diff --git a/lib/providers/source_provider.dart b/lib/providers/source_provider.dart index 3a51e50..5966456 100644 --- a/lib/providers/source_provider.dart +++ b/lib/providers/source_provider.dart @@ -142,7 +142,7 @@ preStandardizeUrl(String url) { return url; } -const String noAPKFound = 'No APK found'; +String noAPKFound = tr('noAPKFound'); List getLinksFromParsedHTML( Document dom, RegExp hrefPattern, String prependToLinks) => @@ -196,8 +196,7 @@ class AppSource { ], [ GeneratedFormItem('noVersionDetection', - label: 'Do not attempt version detection', // TODO - type: FormItemType.bool) + label: tr('noVersionDetection'), type: FormItemType.bool) ] ];