fix(app-selector): remove direct use of strings (#944)

This commit is contained in:
Aabed Khan 2023-06-23 19:24:12 +05:45 committed by GitHub
parent 716a30bf7b
commit 941f618153
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
39 changed files with 62 additions and 85 deletions

View File

@ -55,8 +55,7 @@
"widgetSubtitle": "لم يتم اختيار أي تطبيق",
"noAppsLabel": "لم يتم العثور على تطبيقات",
"currentVersion": "الحالي",
"recommendedVersion": "موصى به",
"anyVersion": "أي"
"recommendedVersion": "موصى به"
},
"patchSelectorCard": {
"widgetTitle": "اختر التعديلات",

View File

@ -54,8 +54,7 @@
"widgetSubtitle": "Heç bir tətbiq seçilməyib",
"noAppsLabel": "Heç bir tətbiq tapılmadı",
"currentVersion": "Hazırkı",
"recommendedVersion": "Tövsiyyə edilən",
"anyVersion": "istənilən"
"recommendedVersion": "Tövsiyyə edilən"
},
"patchSelectorCard": {
"widgetTitle": "Yamaqları seçin",

View File

@ -55,8 +55,7 @@
"widgetSubtitle": "Няма избрано приложение",
"noAppsLabel": "Няма намерени приложения",
"currentVersion": "Текуща",
"recommendedVersion": "Препоръчана",
"anyVersion": "всяка"
"recommendedVersion": "Препоръчана"
},
"patchSelectorCard": {
"widgetTitle": "Изберете модификации",

View File

@ -54,8 +54,7 @@
"widgetSubtitle": "কোনো অ্যাপ্লিকেশন নির্বাচন করা হয়নি",
"noAppsLabel": "কোন অ্যাপ্লিকেশন পাওয়া যায়নি",
"currentVersion": "বর্তমান",
"recommendedVersion": "প্রস্তাবিত",
"anyVersion": "যেকোনো সংস্করণ"
"recommendedVersion": "প্রস্তাবিত"
},
"patchSelectorCard": {
"widgetTitle": "প্যাচ নির্বাচন করুন",

View File

@ -54,8 +54,7 @@
"widgetSubtitle": "Nebyla vybrána žádná aplikace",
"noAppsLabel": "Nebyly nalezeny žádné aplikace",
"currentVersion": "Aktuální",
"recommendedVersion": "Doporučeno",
"anyVersion": "jakákoliv"
"recommendedVersion": "Doporučeno"
},
"patchSelectorCard": {
"widgetTitle": "Vybrat záplaty",

View File

@ -55,8 +55,7 @@
"widgetSubtitle": "Ingen applikation valgt",
"noAppsLabel": "Ingen applikationer fundet",
"currentVersion": "Nuværende",
"recommendedVersion": "Anbefalet",
"anyVersion": "enhver"
"recommendedVersion": "Anbefalet"
},
"patchSelectorCard": {
"widgetTitle": "Vælg patches",

View File

@ -55,8 +55,7 @@
"widgetSubtitle": "Keine App ausgewählt",
"noAppsLabel": "Keine Apps gefunden",
"currentVersion": "Aktuell",
"recommendedVersion": "Empfohlen",
"anyVersion": "beliebig"
"recommendedVersion": "Empfohlen"
},
"patchSelectorCard": {
"widgetTitle": "Patches auswählen",

View File

@ -55,8 +55,7 @@
"widgetSubtitle": "Δεν έχει επιλεχθεί εφαρμογή",
"noAppsLabel": "Δεν βρέθηκαν εφαρμογές",
"currentVersion": "Τρέχουσα",
"recommendedVersion": "Προτεινόμενη",
"anyVersion": "οποιαδήποτε"
"recommendedVersion": "Προτεινόμενη"
},
"patchSelectorCard": {
"widgetTitle": "Επιλέξτε τροποποιήσεις",

View File

@ -60,9 +60,10 @@
"widgetTitleSelected": "Selected application",
"widgetSubtitle": "No application selected",
"noAppsLabel": "No applications found",
"notInstalled":"App not installed",
"currentVersion": "Current",
"suggestedVersion": "Suggested",
"anyVersion": "any"
"allVersions": "All versions"
},
"patchSelectorCard": {
"widgetTitle": "Select patches",

View File

@ -55,8 +55,7 @@
"widgetSubtitle": "Ninguna aplicación seleccionada",
"noAppsLabel": "No se encontraron aplicaciones",
"currentVersion": "Versión actual",
"recommendedVersion": "Versión recomendada",
"anyVersion": "cualquiera"
"recommendedVersion": "Versión recomendada"
},
"patchSelectorCard": {
"widgetTitle": "Seleccionar parches",

View File

@ -54,8 +54,7 @@
"widgetSubtitle": "Ninguna aplicación seleccionada",
"noAppsLabel": "No se encontraron aplicaciones",
"currentVersion": "Versión actual",
"recommendedVersion": "Versión recomendada",
"anyVersion": "Cualquier versión"
"recommendedVersion": "Versión recomendada"
},
"patchSelectorCard": {
"widgetTitle": "Seleccionar parches",

View File

@ -54,8 +54,7 @@
"widgetSubtitle": "Sovellusta ei ole valittu",
"noAppsLabel": "Sovelluksia ei löytynyt",
"currentVersion": "Nykyinen",
"recommendedVersion": "Suositeltu",
"anyVersion": "mikä tahansa"
"recommendedVersion": "Suositeltu"
},
"patchSelectorCard": {
"widgetTitle": "Valitse paikkaukset",

View File

@ -55,8 +55,7 @@
"widgetSubtitle": "Aucune application sélectionnée",
"noAppsLabel": "Aucune application trouvée",
"currentVersion": "Version actuelle",
"recommendedVersion": "Version recommandée",
"anyVersion": "n'importe laquelle"
"recommendedVersion": "Version recommandée"
},
"patchSelectorCard": {
"widgetTitle": "Sélectionner les patchs",

View File

@ -54,8 +54,7 @@
"widgetSubtitle": "कोई ऐप्लकैशन चुना हुआ नहीं",
"noAppsLabel": "कोई एप्लिकेशन नहीं मिला।",
"currentVersion": "वर्तमान",
"recommendedVersion": "अनुशंसित",
"anyVersion": "कोई"
"recommendedVersion": "अनुशंसित"
},
"patchSelectorCard": {
"widgetTitle": "पैच चुने",

View File

@ -54,8 +54,7 @@
"widgetSubtitle": "Nincs kiválasztott alkalmazás",
"noAppsLabel": "Nem találhatóak alkalmazások",
"currentVersion": "Jelenlegi",
"recommendedVersion": "Ajánlott",
"anyVersion": "bármely"
"recommendedVersion": "Ajánlott"
},
"patchSelectorCard": {
"widgetTitle": "Patchek kiválasztása",

View File

@ -55,8 +55,7 @@
"widgetSubtitle": "Tidak ada aplikasi yang dipilih",
"noAppsLabel": "Aplikasi tidak ditemukan",
"currentVersion": "Saat ini",
"recommendedVersion": "Rekomendasi",
"anyVersion": "semua"
"recommendedVersion": "Rekomendasi"
},
"patchSelectorCard": {
"widgetTitle": "Pilih Modifikasi",

View File

@ -55,8 +55,7 @@
"widgetSubtitle": "Nessuna applicazione selezionata",
"noAppsLabel": "Nessuna applicazione trovata",
"currentVersion": "Attuale",
"recommendedVersion": "Consigliata",
"anyVersion": "qualsiasi"
"recommendedVersion": "Consigliata"
},
"patchSelectorCard": {
"widgetTitle": "Seleziona patch",

View File

@ -54,8 +54,7 @@
"widgetSubtitle": "선택된 앱 없음",
"noAppsLabel": "앱이 발견되지 않음",
"currentVersion": "현재 버전",
"recommendedVersion": "권장 버전",
"anyVersion": "모든 버전"
"recommendedVersion": "권장 버전"
},
"patchSelectorCard": {
"widgetTitle": "패치를 선택하세요",

View File

@ -55,8 +55,7 @@
"widgetSubtitle": "Nepasirinkta programa",
"noAppsLabel": "Nerastos jokios programos",
"currentVersion": "Dabartinė",
"recommendedVersion": "Rekomenduojama",
"anyVersion": "bet kokia"
"recommendedVersion": "Rekomenduojama"
},
"patchSelectorCard": {
"widgetTitle": "Pasirinkite modifikacijas",

View File

@ -54,8 +54,7 @@
"widgetSubtitle": "Tiada aplikasi dipilih",
"noAppsLabel": "Tiada aplikasi ditemui",
"currentVersion": "Semasa",
"recommendedVersion": "Disyorkan",
"anyVersion": "mana-mana"
"recommendedVersion": "Disyorkan"
},
"patchSelectorCard": {
"widgetTitle": "Pilih modifikasi",

View File

@ -55,8 +55,7 @@
"widgetSubtitle": "Nie wybrano aplikacji",
"noAppsLabel": "Nie znaleziono aplikacji",
"currentVersion": "Aktualna",
"recommendedVersion": "Zalecana",
"anyVersion": "dowolna"
"recommendedVersion": "Zalecana"
},
"patchSelectorCard": {
"widgetTitle": "Wybierz łatki",

View File

@ -54,8 +54,7 @@
"widgetSubtitle": "Nenhum aplicativo selecionado",
"noAppsLabel": "Nenhum app foi encontrado",
"currentVersion": "Atual",
"recommendedVersion": "Recomendado",
"anyVersion": "todos"
"recommendedVersion": "Recomendado"
},
"patchSelectorCard": {
"widgetTitle": "Selecionar patches",

View File

@ -55,8 +55,7 @@
"widgetSubtitle": "Nenhuma aplicação selecionada",
"noAppsLabel": "Não foram encontradas aplicações",
"currentVersion": "Atual",
"recommendedVersion": "Recomendada",
"anyVersion": "qualquer"
"recommendedVersion": "Recomendada"
},
"patchSelectorCard": {
"widgetTitle": "Selecionar modificações",

View File

@ -55,8 +55,7 @@
"widgetSubtitle": "Nicio aplicație selectată",
"noAppsLabel": "Nu s-au găsit aplicații",
"currentVersion": "Actual",
"recommendedVersion": "Recomandat",
"anyVersion": "oricare"
"recommendedVersion": "Recomandat"
},
"patchSelectorCard": {
"widgetTitle": "Selectați patch-urile",

View File

@ -55,8 +55,7 @@
"widgetSubtitle": "Не выбрано приложение",
"noAppsLabel": "Приложения не найдены",
"currentVersion": "Текущая",
"recommendedVersion": "Рекомендуемая",
"anyVersion": "любая"
"recommendedVersion": "Рекомендуемая"
},
"patchSelectorCard": {
"widgetTitle": "Выберите патчи",

View File

@ -55,8 +55,7 @@
"widgetSubtitle": "Nie je vybraná žiadna aplikácia",
"noAppsLabel": "Nebola nájdená žiadna aplikácia",
"currentVersion": "Aktuálne",
"recommendedVersion": "Odporúčané",
"anyVersion": "akákoľvek"
"recommendedVersion": "Odporúčané"
},
"patchSelectorCard": {
"widgetTitle": "Vyberte záplaty",

View File

@ -54,8 +54,7 @@
"widgetSubtitle": "Nijedna aplikacija nije izabrana",
"noAppsLabel": "Nijedna aplikacija nije pronađena",
"currentVersion": "Trenutna",
"recommendedVersion": "Preporučena",
"anyVersion": "bilo koja"
"recommendedVersion": "Preporučena"
},
"patchSelectorCard": {
"widgetTitle": "Izaberite pečeve",

View File

@ -54,8 +54,7 @@
"widgetSubtitle": "Ниједна апликација није изабрана",
"noAppsLabel": "Ниједна апликација није пронађена",
"currentVersion": "Тренутна",
"recommendedVersion": "Препоручена",
"anyVersion": "било која"
"recommendedVersion": "Препоручена"
},
"patchSelectorCard": {
"widgetTitle": "Изаберите печеве",

View File

@ -54,8 +54,7 @@
"widgetSubtitle": "Ingen app vald",
"noAppsLabel": "Inga applikationer hittades",
"currentVersion": "Nuvarande",
"recommendedVersion": "Rekommenderad",
"anyVersion": "alla"
"recommendedVersion": "Rekommenderad"
},
"patchSelectorCard": {
"widgetTitle": "Välj patchar",

View File

@ -55,8 +55,7 @@
"widgetSubtitle": "Hakuna programu iliyochaguliwa",
"noAppsLabel": "Hakuna programu zilizopatikana",
"currentVersion": "Sasa",
"recommendedVersion": "Imependekezwa",
"anyVersion": "yoyote"
"recommendedVersion": "Imependekezwa"
},
"patchSelectorCard": {
"widgetTitle": "Chagua viraka",

View File

@ -55,8 +55,7 @@
"widgetSubtitle": "Hiçbir uygulama seçilmedi",
"noAppsLabel": "Hiçbir uygulama bulunamadı",
"currentVersion": "Şu anki",
"recommendedVersion": "Önerilen",
"anyVersion": "herhangi"
"recommendedVersion": "Önerilen"
},
"patchSelectorCard": {
"widgetTitle": "Yamaları Seçin",

View File

@ -54,8 +54,7 @@
"widgetSubtitle": "کوئی ایپلیکیشن منتخب نہیں",
"noAppsLabel": "کوئی ایپلیکیشن نہیں ملی",
"currentVersion": "موجودہ",
"recommendedVersion": "تجویز کردہ",
"anyVersion": "کوئی بھی"
"recommendedVersion": "تجویز کردہ"
},
"patchSelectorCard": {
"widgetTitle": "پیچز منتخب کریں",

View File

@ -55,8 +55,7 @@
"widgetSubtitle": "Chưa chọn ứng dụng nào",
"noAppsLabel": "Không tìm thấy ứng dụng nào",
"currentVersion": "Hiện tại",
"recommendedVersion": "Đề xuất",
"anyVersion": "bất kỳ"
"recommendedVersion": "Đề xuất"
},
"patchSelectorCard": {
"widgetTitle": "Chọn bản vá",

View File

@ -54,8 +54,7 @@
"widgetSubtitle": "未选择应用程序",
"noAppsLabel": "未发现应用程序。",
"currentVersion": "当前",
"recommendedVersion": "推荐",
"anyVersion": "任意"
"recommendedVersion": "推荐"
},
"patchSelectorCard": {
"widgetTitle": "选择补丁",

View File

@ -54,8 +54,7 @@
"widgetSubtitle": "沒有選擇應用程式",
"noAppsLabel": "找不到應用程式",
"currentVersion": "目前版本",
"recommendedVersion": "推薦版本",
"anyVersion": "任何版本"
"recommendedVersion": "推薦版本"
},
"patchSelectorCard": {
"widgetTitle": "選擇補丁",

View File

@ -55,8 +55,7 @@
"widgetSubtitle": "未選取應用程式",
"noAppsLabel": "找不到應用程式",
"currentVersion": "目前",
"recommendedVersion": "建議",
"anyVersion": "任何"
"recommendedVersion": "建議"
},
"patchSelectorCard": {
"widgetTitle": "選取修補檔",

View File

@ -133,7 +133,7 @@ class PatcherViewModel extends BaseViewModel {
if (suggestedVersion.isEmpty) {
suggestedVersion = FlutterI18n.translate(
context,
'appSelectorCard.anyVersion',
'appSelectorCard.allVersions',
);
} else {
suggestedVersion = 'v$suggestedVersion';

View File

@ -73,16 +73,13 @@ class _InstalledAppItemState extends State<InstalledAppItem> {
Row(
children: [
I18nText(
FlutterI18n.translate(
context,
'suggested',
translationParams: {
'version' : widget.suggestedVersion.isEmpty
? 'All versions'
: 'v${widget.suggestedVersion}'
? FlutterI18n.translate(context, 'appSelectorCard.allVersions')
: 'v${widget.suggestedVersion}',
},
),
),
const SizedBox(width: 4),
Text(
widget.patchesCount == 1

View File

@ -1,4 +1,5 @@
import 'package:flutter/material.dart';
import 'package:flutter_i18n/flutter_i18n.dart';
import 'package:revanced_manager/ui/widgets/shared/custom_card.dart';
class NotInstalledAppItem extends StatefulWidget {
@ -54,12 +55,25 @@ class _NotInstalledAppItem extends State<NotInstalledAppItem> {
),
),
const SizedBox(height: 4),
const Text('App not installed.'),
const SizedBox(height: 4),
I18nText(
'appSelectorCard.notInstalled',
child: Text(
'',
style: TextStyle(
color:
Theme.of(context).textTheme.titleLarge!.color,
),
),
),
Row(
children: [
Text(
'Suggested: ${widget.suggestedVersion.isEmpty ? 'All versions' : 'v${widget.suggestedVersion}'}',
I18nText(
'suggested',
translationParams: {
'version' : widget.suggestedVersion.isEmpty
? FlutterI18n.translate(context, 'appSelectorCard.allVersions')
: 'v${widget.suggestedVersion}',
},
),
const SizedBox(width: 4),
Text(