From d6918920b661f76773a44072c34ee973b39edee4 Mon Sep 17 00:00:00 2001 From: Aunali321 Date: Thu, 20 Apr 2023 23:53:24 +0530 Subject: [PATCH] chore: add missing translations --- assets/i18n/en_US.json | 5 +++- .../app_selector/app_selector_viewmodel.dart | 30 +++++++++++-------- 2 files changed, 22 insertions(+), 13 deletions(-) diff --git a/assets/i18n/en_US.json b/assets/i18n/en_US.json index c8037c41..fafec3ad 100644 --- a/assets/i18n/en_US.json +++ b/assets/i18n/en_US.json @@ -73,9 +73,12 @@ "appSelectorView": { "viewTitle": "Select an application", "searchBarHint": "Search applications", + "selectFromStorageButton": "Select from storage", "storageButton": "Storage", "errorMessage": "Unable to use selected application", - "downloadToast": "Download function is not available yet" + "downloadToast": "Download function is not available yet", + "featureNotAvailable": "Feature not implemented", + "featureNotAvailableText": "This feature has not been added yet for non-root. You'll need to select APK files from storage for now." }, "patchesSelectorView": { "viewTitle": "Select patches", diff --git a/lib/ui/views/app_selector/app_selector_viewmodel.dart b/lib/ui/views/app_selector/app_selector_viewmodel.dart index b0dbbb01..5e9a8de1 100644 --- a/lib/ui/views/app_selector/app_selector_viewmodel.dart +++ b/lib/ui/views/app_selector/app_selector_viewmodel.dart @@ -93,20 +93,26 @@ class AppSelectorViewModel extends BaseViewModel { color: Theme.of(context).colorScheme.primary, ), const SizedBox(height: 20), - const Text( - 'Feature not yet implented', - textAlign: TextAlign.center, - style: TextStyle( - fontSize: 20, - fontWeight: FontWeight.w600, - wordSpacing: 1.5, + I18nText( + 'appSelectorView.featureNotAvailable', + child: const Text( + '', + textAlign: TextAlign.center, + style: TextStyle( + fontSize: 20, + fontWeight: FontWeight.w600, + wordSpacing: 1.5, + ), ), ), const SizedBox(height: 20), - const Text( - "This feature has not been added yet for non-root. You'll need to select APK files from storage for now.", - style: TextStyle( - fontSize: 14, + I18nText( + 'appSelectorView.featureNotAvailableText', + child: const Text( + '', + style: TextStyle( + fontSize: 14, + ), ), ), const SizedBox(height: 30), @@ -122,7 +128,7 @@ class AppSelectorViewModel extends BaseViewModel { children: [ const Icon(Icons.sd_card), const SizedBox(width: 10), - I18nText('Select from storage'), + I18nText('appSelectorView.selectFromStorageButton'), ], ), ),