From 9aac523fc43b02e8c07b97dd9c5cb9170ec296aa Mon Sep 17 00:00:00 2001 From: SuperDragonXD <70206496+SuperDragonXD@users.noreply.github.com> Date: Sat, 22 Jun 2024 18:30:45 +0800 Subject: [PATCH] Reorganize and refactor strings.xml This commit re-organizes `lawn/`'s `strings.xml` code files for clarity and also adds a simple naming scheme. The strings will probably be renamed soon, since I don't have the time to do all of that --- CONTRIBUTING.md | 14 +- build.gradle | 8 +- lawnchair/res/values/strings.xml | 715 ++++++++++-------- .../lawnchair/backup/ui/CreateBackupScreen.kt | 2 +- .../backup/ui/RestoreBackupScreen.kt | 2 +- .../smartspace/SmartspaceViewContainer.kt | 2 +- .../lawnchair/smartspace/SmartspacerView.kt | 4 +- .../app/lawnchair/theme/color/ColorMode.kt | 2 +- .../app/lawnchair/theme/color/ColorOption.kt | 2 +- .../lawnchair/ui/popup/LawnchairShortcut.kt | 2 +- .../HiddenAppsInSearchPreference.kt | 4 +- .../components/NotificationDotsPreference.kt | 4 +- .../ColorSelectionPreference.kt | 2 +- .../destinations/AppDrawerPreferences.kt | 6 +- .../destinations/CustomIconShapePreference.kt | 20 +- .../destinations/FolderPreferences.kt | 2 +- .../destinations/FontSelectionPreference.kt | 4 +- .../destinations/GeneralPreferences.kt | 4 +- .../destinations/HomeScreenGridPreferences.kt | 2 +- .../destinations/HomeScreenPreferences.kt | 4 +- .../destinations/IconPackPreferences.kt | 2 +- .../settings/NotificationDotsPreference.java | 2 +- 22 files changed, 465 insertions(+), 344 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index cc6d1dddb7..a6b41be7e9 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -23,7 +23,6 @@ Please make sure to be civil during discussion of your contribution (refer to th For translation, visit [Lawnchair on Crowdin](https://lawnchair.crowdin.com) and follow these tips: - When using quotation marks, insert the symbols specific to the target language, as listed in this [this summary table](https://en.wikipedia.org/wiki/Quotation_mark#Summary_table); -- Lawnchair uses title case for some English UI text while other languages do not use title case; opt for sentence case instead; - Some English terminology may have not have commonly-used equivalents in other languages. In such cases, use short descriptive phrases—for example, the equivalent of _bottom row_ for _dock_; - Some languages (e.g. French) have variations of words depending if it's masculine or feminine (gender-specific); we recommend opting for gender-neutral words instead. @@ -97,3 +96,16 @@ See the table below detailing the release type: | Beta | 02 | | Release Candidate | 03 | | Release | 04 | + +#### String naming +Strings `names` in `strings.xml` should follow this format: + +| Type | Format | Example usage | Actual string | Other information | +|--------------------------------------------------|-------------------|----------------------------|----------------------|---------------------------------------------------------------------------------------------------------------------| +| Generic word | $1 | `disagree_or_agree` | Disagree or agree | Should only be used if it doesn't fit the below categories | +| Action | $1_action | `apply_action` | Apply | Any generic action verb can fit here | +| Preference or popup label
Preference headers | $1_label | `folders_label` | Folders | | +| Preference or popup description | $1_description | `folders_description` | Row and column count | | +| Preference choice | $1_choice | `off_choice` | Off | | +| Feature string | (feature_name)_$1 | `colorpicker_hsb` | HSB | Feature strings are strings that are confined to a specific feature. Examples include the gesture and color picker. | +| Launcher string | $1_launcher | `device_contacts_launcher` | Contacts from device | Strings that are specific to the Launcher area | diff --git a/build.gradle b/build.gradle index d7b413769e..b1346a3ff4 100644 --- a/build.gradle +++ b/build.gradle @@ -66,7 +66,7 @@ allprojects { plugins.withType(JavaBasePlugin).configureEach { java { - toolchain.languageVersion = JavaLanguageVersion.of(21) + toolchain.languageVersion = JavaLanguageVersion.of(17) } } @@ -123,10 +123,10 @@ final def ciBuild = System.getenv("CI") == "true" final def ciRef = System.getenv("GITHUB_REF") ?: "" final def ciRunNumber = System.getenv("GITHUB_RUN_NUMBER") ?: "" final def isReleaseBuild = ciBuild && ciRef.contains("beta") -final def devReleaseName = ciBuild ? "Dev (#${ciRunNumber})" : "Dev (${buildCommit})" +final def devReleaseName = ciBuild ? "Dev.(#${ciRunNumber})" : "Dev.(${buildCommit})" final def version = "14" final def releaseName = "Beta 2" -final def versionDisplayName = "${version} ${isReleaseBuild ? releaseName : devReleaseName}" +final def versionDisplayName = "${version}.${isReleaseBuild ? releaseName : devReleaseName}" final def majorVersion = versionDisplayName.split("\\.")[0] final def quickstepMinSdk = "29" @@ -153,7 +153,7 @@ android { applicationVariants.configureEach { variant -> variant.outputs.configureEach { def channel = variant.productFlavors.last().name - outputFileName = "Lawnchair ${variant.versionName} $channel ${variant.buildType.name}.apk" + outputFileName = "Lawnchair.${variant.versionName}.$channel.${variant.buildType.name}.apk" } } diff --git a/lawnchair/res/values/strings.xml b/lawnchair/res/values/strings.xml index dd8edb4ec7..7149ccd335 100644 --- a/lawnchair/res/values/strings.xml +++ b/lawnchair/res/values/strings.xml @@ -16,75 +16,145 @@ --> + + + Preview + + Create + Backup + Restore + Delete + Reset + + Unlock + Lock + + Apply + Customize + + Always + Never + + Clipboard + Copy link + Copy + Paste + + Loading… + + Managed by Lawnchair + + + Preferences + Home settings + System settings + Change settings + + + + + Dynamic + Presets + Custom + Default + System + + + Columns + Rows + Label + Icons + Grid + Layout + + + Wallpaper + Background opacity + + + Copied to clipboard + Item removed + + + Google + What to show + + + To lock your phone when performing a gesture, Lawnchair requires accessibility access.\n\nLawnchair doesn\'t watch any user action, though the privilege to do so is required for all accessibility services. Lawnchair discards any event sent by the system.\n\nIn order to lock your phone, Lawnchair uses the performGlobalAction Accessibility service. + "" - - - Set Lawnchair as your default launcher to access shortcuts and more + + %1$d%% + %1$d x %2$d + %s & %s + Settings + General Colors, icon packs, notification dots + Home screen Feed, grid, icons - What to show + Dock Search bar, icon count + App drawer Hidden apps, column count, icons + Drawer search Web suggestions, global search + Folders Row and column count + Gestures Taps and swipes + Recents Clear All button, corner radius + About App info Restart Lawnchair Experimental features - - + Font customization Some text remains unchanged + At a Glance calendar customization Allow showing date in non-Gregorian calendar systems + Increase maximum grid size limit Increase maximum allowed home screen grid size from 10 x 10 to 20 x 20 + Always reload icons Avoid using cached icons from icon packs + Lock/unlock Prevent selected app from closing when pressing \"Clear all\" - - Icons - Icon size - Show labels - Label size + - Home screen rotation - Allow home screen rotation when device is rotated + Notifications - Font (experimental) - General - Headings - Headings (medium) - Body - Body (medium) + --> - Icon Style - Transparent themed icons - Use transparent background on themed icons - Icon shape - Auto-adaptive icons - For all non-adaptive icons - Background lightness - Use 100% background lightness for white - - Reset custom icons - All custom icons will be reset. Do you want to continue? + To access shortcuts and additional features, set Lawnchair as your default launcher Notification dots Show notification counter @@ -93,51 +163,44 @@ Warning: Notification dot and counter colors don\'t have enough contrast with each other Warning: Notification dot and counter colors might not always have enough contrast with each other - Notification access needed - Notification access needed - To show Notification Dots, turn on app notifications for %1$s - Change settings + To show Notification Dots, turn on app notifications for %1$s - Colors - Theme - Light - Dark - System - Match wallpaper - Accent color + - Custom icon shape - Create custom icon shape - Edit custom icon shape - Corner shape - Round - Smooth - Cut - Top left - Top right - Bottom left - Bottom right - Create + Icons - Clipboard - Export to clipboard - Import from clipboard - Clipboard doesn\'t contain a valid icon shape + --> + + Icon style + Icon shape + Icon size - - Icon pack - Themed icon source - System icons + Show labels + Label size + Use multiple lines - Themed icons - Off - Home screen - Home screen & app drawer - No supported icon packs + + Transparent themed icons + Use transparent background on themed icons - + Auto-adaptive icons + For all non-adaptive icons + + Background lightness + Use 100% background lightness for white + + Reset custom icons + All custom icons will be reset. Do you want to continue? + + + Icons + Reset to default + Open external picker + Pick icon from + Couldn\'t load more icons + + System Circle Cylinder @@ -152,11 +215,47 @@ Squircle Teardrop - + + Custom icon shape + Create custom icon shape + Edit custom icon shape + Corner shape + Round + Smooth + Cut + Top left + Top right + Bottom left + Bottom right + + Export to clipboard + Import from clipboard + Clipboard doesn\'t contain a valid icon shape + + + Icon pack + Themed icon source + System icons + + Themed icons + Off + Home screen + Home screen & app drawer + No supported icon packs + + Add fonts OTF and TTF fonts are supported Font not found + + Font (experimental) + General + Headings + Headings (medium) + Body + Body (medium) + Italic Thin Extra light @@ -168,50 +267,215 @@ Extra bold Black - Reset + + + + Theme + Light + Dark + System + Match wallpaper + + + Colors + Accent color - - Dynamic Swatches - Presets - Custom + RGB Red Green Blue + HSB Hue Saturation Brightness - Hex - Sliders - Copy - Paste - Copied to clipboard - Invalid color - Managed by Lawnchair - + Hex + + Sliders + Invalid color + + + + Gregorian + Persian + + %1$s, %2$s + EEEMMMd + HH:mm + hh:mm aa + dd MMMM + l، j F + H:i + g:i a + "j F، " + + + Charging + Charged + Battery low + "%1$d%% — Full in %2$s" + + At a Glance + What to show + + + Calendar + Date & time + Date + Time + Time format + Follow system + 12-hour format + 24-hour format + + + Weather + Battery status + Now Playing + + + Tap to set up + To use %1$s, enable Notification Dots. + + + Show on home screen + At a Glance can be manually added to the home screen by placing the Lawnchair widget + + + At a Glance provider + Lawnchair + Google + Google Search + Smartspacer + + + " — " + Page %1$d of %2$d + Fri, Mar 3 + + + News + Support + X + GitHub + Discord + + Product + Design & development + Development + QuickSwitch maintenance + DevOps + Support & PR + + Acknowledgements + Translate + + + Create backup + What to back up + Layout and settings + Wallpaper + Backup created + Failed to create backup + Restore backup + What to restore + Backup restored + Failed to restore backup + Invalid backup file + + + Double tap + Swipe up + Swipe down + Home button + Back button + + Do nothing + Sleep + Open notification panel + Open app + Open %1$s + Open app drawer + Open app search + Open search + + Pick app + + Admin permissions required + To use Double-Tap to Sleep, set Lawnchair as a device admin app. Tap \"Open settings\", then tap \"Activate this device admin app.\" + Double-Tap to Sleep will be turned off. + + Turn on accessibility service + To use Double-Tap to Sleep, turn on the Lawnchair accessibility service. Tap \"Open settings\", select \"Lawnchair\" and turn on \"Use Lawnchair.\" + Open settings + + + Lawnchair bug report + %1$s crashed + Upload crash log + + Upload failed + Uploading… + + Bug reports + Upload status + + %d new reports + Multiple new reports + + + + Home screen rotation + Allow home screen rotation when device is rotated + Add new apps to home screen Show feed No feed apps installed Feed Feed provider - Default - Wallpaper Scroll wallpaper Wallpaper depth effect Zoom in and out of the wallpaper when transitioning between areas of the launcher Top shadow - Layout Home screen grid Lock home screen - Prevent changes to the home screen layout Unlock home screen Home screen is locked + Prevent changes to the home screen layout Show dot pagination Use dots instead of lines to show page number @@ -233,67 +497,14 @@ Rounded corners Allow overlap + Enforce widget resizing Allow resizing of widgets that are constrained to a specific size + Remove size constraints Remove the minimum and maximum size restrictions of widgets - - Columns - Rows - Apply - - - %1$s, %2$s - EEEMMMd - HH:mm - hh:mm aa - dd MMMM - l، j F - H:i - g:i a - "j F، " - Charging - Charged - Battery low - "%1$d%% — Full in %2$s" - Page %1$d of %2$d - At a Glance - What to show - Fri, Mar 3 - - Preview - Calendar - Date & time - Date - Time - Time format - Follow system - 12-hour format - 24-hour format - Weather - Battery status - Now Playing - Tap to set up - To use %1$s, enable Notification Dots. - " — " - - Gregorian - Persian - - Preferences - - Show on home screen - At a Glance can be manually added to the home screen by placing the Lawnchair widget - - At a Glance provider - Lawnchair - Google - Google Search - Smartspacer - - - + Show dock Search bar @@ -306,11 +517,10 @@ Apply accent color Search provider - Grid Dock icons Bottom padding - + App search Startpage Google @@ -324,72 +534,54 @@ GitHub YouTube Pixel Search + %1$s and Lawnchair have a revenue share agreement.\n\nSearching with %1$s helps support Lawnchair. + App Website App required - - - Background opacity + + Search + Google Lens + Voice Search + Hidden apps - Show when full name is typed - Hide in search results Load apps in bulk Load and display icons in bulk instead of individually Remember position Remember app drawer position after leaving drawer + Show scrollbar - Search - Show search bar - Automatically show keyboard - Fuzzy search - Approximate matching for app searches - Clear search history - - App drawer columns - Row height - Horizontal padding + App drawer columns + Row height + Horizontal padding + Hide from app drawer Hidden apps (%1$d) %1$d app %1$d apps - + Icon background opacity Icon background color Maximum folder columns Maximum folder rows - - Double tap - Swipe up - Swipe down - Home button - Back button - - Do nothing - Sleep - Open notification panel - Open app - Open %1$s - Open app drawer - Open app search - Open search - - Pick app - - + These settings will be ignored as Lawnchair isn\'t set as the Recents provider + Incompatible system integration + Your device is configured to have system gestures (known as Quickstep) provided by %1$s, but this version of %1$s isn\'t compatible with your Android version. To continue using your device, please uninstall %1$s updates or disable %1$s as a system gesture provider. + Translucent background Background opacity @@ -406,75 +598,52 @@ Taskbar Show taskbar (experimental) - - News - Support - X - GitHub - Discord + - Icons - Reset to default - Open external picker - Pick icon from - Couldn\'t load more icons - - + --> + + Search Search apps - Home settings - - Item removed No apps found matching \"%1$s\" - Admin permissions required - To use Double-Tap to Sleep, set Lawnchair as a device admin app. Tap \"Open settings\", then tap \"Activate this device admin app.\" - Double-Tap to Sleep will be turned off. - Turn on accessibility service - To use Double-Tap to Sleep, turn on the Lawnchair accessibility service. Tap \"Open settings\", select \"Lawnchair\" and turn on \"Use Lawnchair.\" - Open settings + From the web + Contacts from device + Files from device + Settings from device - Loading… - System + Search for more apps + Search on Startpage + No app store or browser installed - Customize - Label - Hide from app drawer + Clear search history + Clear search box + + + Search + + Show search bar + Automatically show keyboard + + Fuzzy search + Approximate matching for app searches Suggestions Show suggested apps at the top of the drawer - %1$d%% + Device search + Search your phone contacts, files, and settings - - Lawnchair bug report - %1$s crashed - Upload crash log + Show hidden apps in search results + If full name is typed - Copy link + Search algorithm + App Search + Global search (on-device) + Global search (via ASI) - Upload failed - Uploading… - - Bug reports - Upload status - - %d new reports - Multiple new reports - - - Apply + Show in search results Apps & Shortcuts @@ -484,34 +653,15 @@ Android settings Files Web suggestions - Search History + Search history + Calculator + Media, files, and more Contacts and more Via Startpage - - To search for contacts, grant Contacts and Phone permissions to Lawnchair - To search your files, grant Storage permissions to Lawnchair - Grant permissions - - Suggestions - Search - Clear search box - - From the web - Contacts from device - Files from device - Settings from device - - Search - Google Lens - Voice Search - - Advanced search - - Device search - Search your phone contacts, files, and settings + Maximum number of apps in search results Maximum number of people in search results Maximum number of files in search results @@ -520,50 +670,9 @@ Maximum number of suggestions in search results Maximum web suggestion delay - Search for more apps - Search on Startpage - No app store or browser installed + + To search for contacts, grant contacts and phone permissions to Lawnchair + To search your files, grant storage permissions to Lawnchair + Grant permissions - Incompatible system integration - Your device is configured to have system gestures (known as Quickstep) provided by %1$s, but this version of %1$s isn\'t compatible with your Android version. To continue using your device, please uninstall %1$s updates or disable %1$s as a system gesture provider. - - Delete - - - Create backup - Create - What to back up - Layout and settings - Wallpaper - Backup created - Failed to create backup - Restore backup - Restore - What to restore - Backup restored - Failed to restore backup - Invalid backup file - - - Google - - %1$d x %2$d - %s & %s - - System settings - - Unlock - Lock - - Use Multiple Lines - Always - If Full Name is Typed - Never - Show Hidden Apps in Search Results - App Search - Global Search (on-device) - Global Search (via ASI) - Search Algorithm - Calculator - To lock your phone when performing a gesture, Lawnchair requires accessibility access.\n\nLawnchair doesn\'t watch any user action, though the privilege to do so is required for all accessibility services. Lawnchair discards any event sent by the system.\n\nIn order to lock your phone, Lawnchair uses the performGlobalAction Accessibility service. diff --git a/lawnchair/src/app/lawnchair/backup/ui/CreateBackupScreen.kt b/lawnchair/src/app/lawnchair/backup/ui/CreateBackupScreen.kt index ecbc62e860..add91a3177 100644 --- a/lawnchair/src/app/lawnchair/backup/ui/CreateBackupScreen.kt +++ b/lawnchair/src/app/lawnchair/backup/ui/CreateBackupScreen.kt @@ -185,7 +185,7 @@ fun CreateBackupScreen( .fillMaxWidth(), enabled = contents != 0 && screenshotDone && !creatingBackup, ) { - Text(text = stringResource(id = R.string.create_backup_action)) + Text(text = stringResource(id = R.string.action_create)) } } } diff --git a/lawnchair/src/app/lawnchair/backup/ui/RestoreBackupScreen.kt b/lawnchair/src/app/lawnchair/backup/ui/RestoreBackupScreen.kt index 7bbdd0e023..0c40fe3538 100644 --- a/lawnchair/src/app/lawnchair/backup/ui/RestoreBackupScreen.kt +++ b/lawnchair/src/app/lawnchair/backup/ui/RestoreBackupScreen.kt @@ -209,7 +209,7 @@ fun ColumnScope.RestoreBackupOptions( .fillMaxWidth(), enabled = contents != 0 && !restoringBackup, ) { - Text(text = stringResource(id = R.string.restore_backup_action)) + Text(text = stringResource(id = R.string.action_restore)) } } } diff --git a/lawnchair/src/app/lawnchair/smartspace/SmartspaceViewContainer.kt b/lawnchair/src/app/lawnchair/smartspace/SmartspaceViewContainer.kt index 2a25a4e6a4..491b6a50a2 100644 --- a/lawnchair/src/app/lawnchair/smartspace/SmartspaceViewContainer.kt +++ b/lawnchair/src/app/lawnchair/smartspace/SmartspaceViewContainer.kt @@ -48,7 +48,7 @@ class SmartspaceViewContainer @JvmOverloads constructor( private fun getCustomizeOption() = OptionsPopupView.OptionItem( context, - R.string.customize_button_text, + R.string.action_customize, R.drawable.ic_setting, StatsLogManager.LauncherEvent.IGNORE, ) { diff --git a/lawnchair/src/app/lawnchair/smartspace/SmartspacerView.kt b/lawnchair/src/app/lawnchair/smartspace/SmartspacerView.kt index ecc367a81f..abfd79ed30 100644 --- a/lawnchair/src/app/lawnchair/smartspace/SmartspacerView.kt +++ b/lawnchair/src/app/lawnchair/smartspace/SmartspacerView.kt @@ -109,7 +109,7 @@ class SmartspacerView(context: Context, attrs: AttributeSet?) : BcSmartspaceView if (settingsIntent == null) return null return OptionsPopupView.OptionItem( context, - R.string.customize_button_text, + R.string.action_customize, R.drawable.ic_setting, StatsLogManager.LauncherEvent.IGNORE, ) { @@ -120,7 +120,7 @@ class SmartspacerView(context: Context, attrs: AttributeSet?) : BcSmartspaceView private fun getCustomizeOptionFallback() = OptionsPopupView.OptionItem( context, - R.string.customize_button_text, + R.string.action_customize, R.drawable.ic_setting, StatsLogManager.LauncherEvent.IGNORE, ) { diff --git a/lawnchair/src/app/lawnchair/theme/color/ColorMode.kt b/lawnchair/src/app/lawnchair/theme/color/ColorMode.kt index 6628f6d75c..597dedefcc 100644 --- a/lawnchair/src/app/lawnchair/theme/color/ColorMode.kt +++ b/lawnchair/src/app/lawnchair/theme/color/ColorMode.kt @@ -11,7 +11,7 @@ enum class ColorMode( @StringRes val labelResourceId: Int, ) { AUTO( - labelResourceId = R.string.launcher_default_color, + labelResourceId = R.string.managed_by_lawnchair, ), LIGHT( labelResourceId = R.string.color_light, diff --git a/lawnchair/src/app/lawnchair/theme/color/ColorOption.kt b/lawnchair/src/app/lawnchair/theme/color/ColorOption.kt index f0c923b3ef..89caf2ed3a 100644 --- a/lawnchair/src/app/lawnchair/theme/color/ColorOption.kt +++ b/lawnchair/src/app/lawnchair/theme/color/ColorOption.kt @@ -65,7 +65,7 @@ sealed class ColorOption { override val colorPreferenceEntry = ColorPreferenceEntry( this, - { stringResource(id = R.string.launcher_default_color) }, + { stringResource(id = R.string.managed_by_lawnchair) }, { 0 }, ) diff --git a/lawnchair/src/app/lawnchair/ui/popup/LawnchairShortcut.kt b/lawnchair/src/app/lawnchair/ui/popup/LawnchairShortcut.kt index 6f4c5dede8..ac3fe064f3 100644 --- a/lawnchair/src/app/lawnchair/ui/popup/LawnchairShortcut.kt +++ b/lawnchair/src/app/lawnchair/ui/popup/LawnchairShortcut.kt @@ -72,7 +72,7 @@ class LawnchairShortcut { private val appInfo: ModelAppInfo, itemInfo: ItemInfo, originalView: View, - ) : SystemShortcut(R.drawable.ic_edit, R.string.customize_button_text, launcher, itemInfo, originalView) { + ) : SystemShortcut(R.drawable.ic_edit, R.string.action_customize, launcher, itemInfo, originalView) { override fun onClick(v: View) { val outObj = Array(1) { null } diff --git a/lawnchair/src/app/lawnchair/ui/preferences/components/HiddenAppsInSearchPreference.kt b/lawnchair/src/app/lawnchair/ui/preferences/components/HiddenAppsInSearchPreference.kt index d5f957092b..ccb61e1d2b 100644 --- a/lawnchair/src/app/lawnchair/ui/preferences/components/HiddenAppsInSearchPreference.kt +++ b/lawnchair/src/app/lawnchair/ui/preferences/components/HiddenAppsInSearchPreference.kt @@ -16,9 +16,9 @@ object HiddenAppsInSearch { } val hiddenAppsInSearchEntries = sequenceOf( - ListPreferenceEntry(HiddenAppsInSearch.NEVER) { stringResource(R.string.hidden_apps_show_never) }, + ListPreferenceEntry(HiddenAppsInSearch.NEVER) { stringResource(R.string.never_choice) }, ListPreferenceEntry(HiddenAppsInSearch.IF_NAME_TYPED) { stringResource(R.string.hidden_apps_show_name_typed) }, - ListPreferenceEntry(HiddenAppsInSearch.ALWAYS) { stringResource(R.string.hidden_apps_show_always) }, + ListPreferenceEntry(HiddenAppsInSearch.ALWAYS) { stringResource(R.string.always_choice) }, ) .toPersistentList() diff --git a/lawnchair/src/app/lawnchair/ui/preferences/components/NotificationDotsPreference.kt b/lawnchair/src/app/lawnchair/ui/preferences/components/NotificationDotsPreference.kt index 492862947a..7bb273dbd5 100644 --- a/lawnchair/src/app/lawnchair/ui/preferences/components/NotificationDotsPreference.kt +++ b/lawnchair/src/app/lawnchair/ui/preferences/components/NotificationDotsPreference.kt @@ -65,7 +65,7 @@ fun NotificationDotsPreference( val context = LocalContext.current val showWarning = enabled && !serviceEnabled val summary = when { - showWarning -> R.string.missing_notification_access_description + showWarning -> R.string.missing_notification_access_label enabled -> R.string.notification_dots_desc_on else -> R.string.notification_dots_desc_off } @@ -117,7 +117,7 @@ fun NotificationAccessConfirmation( title = { Text(text = stringResource(id = R.string.missing_notification_access_label)) }, text = { val appName = stringResource(id = R.string.derived_app_name) - Text(text = stringResource(id = R.string.msg_missing_notification_access, appName)) + Text(text = stringResource(id = R.string.missing_notification_access_desc, appName)) }, buttons = { OutlinedButton( diff --git a/lawnchair/src/app/lawnchair/ui/preferences/components/colorpreference/ColorSelectionPreference.kt b/lawnchair/src/app/lawnchair/ui/preferences/components/colorpreference/ColorSelectionPreference.kt index 61febb07d6..bcc6e31674 100644 --- a/lawnchair/src/app/lawnchair/ui/preferences/components/colorpreference/ColorSelectionPreference.kt +++ b/lawnchair/src/app/lawnchair/ui/preferences/components/colorpreference/ColorSelectionPreference.kt @@ -86,7 +86,7 @@ fun ColorSelection( .fillMaxWidth() .padding(all = 16.dp), ) { - Text(text = stringResource(id = R.string.apply_grid)) + Text(text = stringResource(id = R.string.action_apply)) } BottomSpacer() } diff --git a/lawnchair/src/app/lawnchair/ui/preferences/destinations/AppDrawerPreferences.kt b/lawnchair/src/app/lawnchair/ui/preferences/destinations/AppDrawerPreferences.kt index f57b5bbe48..b0bf789cce 100644 --- a/lawnchair/src/app/lawnchair/ui/preferences/destinations/AppDrawerPreferences.kt +++ b/lawnchair/src/app/lawnchair/ui/preferences/destinations/AppDrawerPreferences.kt @@ -108,7 +108,7 @@ fun AppDrawerPreferences( } PreferenceGroup(heading = stringResource(id = R.string.icons)) { SliderPreference( - label = stringResource(id = R.string.icon_size), + label = stringResource(id = R.string.icon_sizes), adapter = prefs2.drawerIconSizeFactor.getAdapter(), step = 0.1f, valueRange = 0.5F..1.5F, @@ -117,7 +117,7 @@ fun AppDrawerPreferences( val showDrawerLabels = prefs2.showIconLabelsInDrawer.getAdapter() SwitchPreference( adapter = showDrawerLabels, - label = stringResource(id = R.string.show_home_labels), + label = stringResource(id = R.string.show_labels), ) ExpandAndShrink(visible = showDrawerLabels.state.value) { DividerColumn { @@ -130,7 +130,7 @@ fun AppDrawerPreferences( ) SwitchPreference( adapter = prefs2.twoLineAllApps.getAdapter(), - label = stringResource(R.string.allapps_twoline_label), + label = stringResource(R.string.twoline_label), ) } } diff --git a/lawnchair/src/app/lawnchair/ui/preferences/destinations/CustomIconShapePreference.kt b/lawnchair/src/app/lawnchair/ui/preferences/destinations/CustomIconShapePreference.kt index 922480b1ed..202a29c350 100644 --- a/lawnchair/src/app/lawnchair/ui/preferences/destinations/CustomIconShapePreference.kt +++ b/lawnchair/src/app/lawnchair/ui/preferences/destinations/CustomIconShapePreference.kt @@ -92,9 +92,9 @@ fun CustomIconShapePreference( ) { Text( text = if (appliedIconShape != null) { - stringResource(id = R.string.apply_grid) + stringResource(id = R.string.action_apply) } else { - stringResource(id = R.string.create) + stringResource(id = R.string.action_create) }, ) } @@ -134,7 +134,7 @@ private fun IconShapeCornerPreferenceGroup( heading = stringResource(id = R.string.color_sliders), ) { IconShapeCornerPreference( - title = stringResource(id = R.string.icon_shape_top_left), + title = stringResource(id = R.string.custom_icon_shape_top_left), scale = selectedIconShape.topLeft.scale.x, onScaleChange = { onSelectedIconShapeChange(selectedIconShape.copy(topLeftScale = it)) @@ -145,7 +145,7 @@ private fun IconShapeCornerPreferenceGroup( }, ) IconShapeCornerPreference( - title = stringResource(id = R.string.icon_shape_top_right), + title = stringResource(id = R.string.custom_icon_shape_top_right), scale = selectedIconShape.topRight.scale.x, onScaleChange = { onSelectedIconShapeChange(selectedIconShape.copy(topRightScale = it)) @@ -156,7 +156,7 @@ private fun IconShapeCornerPreferenceGroup( }, ) IconShapeCornerPreference( - title = stringResource(id = R.string.icon_shape_bottom_left), + title = stringResource(id = R.string.custom_icon_shape_bottom_left), scale = selectedIconShape.bottomLeft.scale.x, onScaleChange = { onSelectedIconShapeChange(selectedIconShape.copy(bottomLeftScale = it)) @@ -167,7 +167,7 @@ private fun IconShapeCornerPreferenceGroup( }, ) IconShapeCornerPreference( - title = stringResource(id = R.string.icon_shape_bottom_right), + title = stringResource(id = R.string.custom_icon_shape_bottom_right), scale = selectedIconShape.bottomRight.scale.x, onScaleChange = { onSelectedIconShapeChange(selectedIconShape.copy(bottomRightScale = it)) @@ -335,7 +335,7 @@ private fun CornerSlider( .clickable { bottomSheetHandler.show { ModalBottomSheetContent( - title = { Text(stringResource(id = R.string.icon_shape_corner)) }, + title = { Text(stringResource(id = R.string.custom_icon_shape_corner)) }, buttons = { OutlinedButton(onClick = { bottomSheetHandler.hide() }) { Text(text = stringResource(id = android.R.string.cancel)) @@ -394,7 +394,7 @@ private fun CornerSlider( @Composable private fun IconCornerShape.getLabel() = when (this) { - IconCornerShape.Squircle -> stringResource(id = R.string.icon_shape_corner_squircle) - IconCornerShape.Cut -> stringResource(id = R.string.icon_shape_corner_cut) - else -> stringResource(id = R.string.icon_shape_corner_round) + IconCornerShape.Squircle -> stringResource(id = R.string.custom_icon_shape_corner_squircle) + IconCornerShape.Cut -> stringResource(id = R.string.custom_icon_shape_corner_cut) + else -> stringResource(id = R.string.custom_icon_shape_corner_round) } diff --git a/lawnchair/src/app/lawnchair/ui/preferences/destinations/FolderPreferences.kt b/lawnchair/src/app/lawnchair/ui/preferences/destinations/FolderPreferences.kt index c4e5a38416..061c200b3e 100644 --- a/lawnchair/src/app/lawnchair/ui/preferences/destinations/FolderPreferences.kt +++ b/lawnchair/src/app/lawnchair/ui/preferences/destinations/FolderPreferences.kt @@ -71,7 +71,7 @@ fun FolderPreferences( val homeScreenLabelsAdapter = prefs2.showIconLabelsOnHomeScreenFolder.getAdapter() SwitchPreference( adapter = homeScreenLabelsAdapter, - label = stringResource(id = R.string.show_home_labels), + label = stringResource(id = R.string.show_labels), ) ExpandAndShrink(visible = homeScreenLabelsAdapter.state.value) { SliderPreference( diff --git a/lawnchair/src/app/lawnchair/ui/preferences/destinations/FontSelectionPreference.kt b/lawnchair/src/app/lawnchair/ui/preferences/destinations/FontSelectionPreference.kt index 3141ee56f0..921a0b0931 100644 --- a/lawnchair/src/app/lawnchair/ui/preferences/destinations/FontSelectionPreference.kt +++ b/lawnchair/src/app/lawnchair/ui/preferences/destinations/FontSelectionPreference.kt @@ -128,7 +128,7 @@ fun FontSelection( hideMenu() }, text = { - Text(text = stringResource(id = R.string.reset_font)) + Text(text = stringResource(id = R.string.action_reset)) }, ) } @@ -240,7 +240,7 @@ private fun FontSelectionItem( ) { Icon( imageVector = Icons.Rounded.Delete, - contentDescription = stringResource(id = R.string.delete), + contentDescription = stringResource(id = R.string.action_delete), tint = MaterialTheme.colorScheme.onSurfaceVariant, ) } diff --git a/lawnchair/src/app/lawnchair/ui/preferences/destinations/GeneralPreferences.kt b/lawnchair/src/app/lawnchair/ui/preferences/destinations/GeneralPreferences.kt index c7c0a4f4d4..666686365e 100644 --- a/lawnchair/src/app/lawnchair/ui/preferences/destinations/GeneralPreferences.kt +++ b/lawnchair/src/app/lawnchair/ui/preferences/destinations/GeneralPreferences.kt @@ -126,14 +126,14 @@ fun GeneralPreferences() { showDescription = wrapAdaptiveIcons.state.value, ) { NavigationActionPreference( - label = stringResource(id = R.string.icon_style), + label = stringResource(id = R.string.icon_style_label), destination = GeneralRoutes.ICON_PACK, subtitle = iconStyleSubtitle, ) ExpandAndShrink(visible = themedIconsEnabled) { SwitchPreference( adapter = prefs.transparentIconBackground.getAdapter(), - label = stringResource(id = R.string.transparent_background_icons), + label = stringResource(id = R.string.transparent_background_icons_label), description = stringResource(id = R.string.transparent_background_icons_description), ) } diff --git a/lawnchair/src/app/lawnchair/ui/preferences/destinations/HomeScreenGridPreferences.kt b/lawnchair/src/app/lawnchair/ui/preferences/destinations/HomeScreenGridPreferences.kt index 02e401d6d7..21f15a9036 100644 --- a/lawnchair/src/app/lawnchair/ui/preferences/destinations/HomeScreenGridPreferences.kt +++ b/lawnchair/src/app/lawnchair/ui/preferences/destinations/HomeScreenGridPreferences.kt @@ -105,7 +105,7 @@ fun HomeScreenGridPreferences( .fillMaxWidth(), enabled = columns.intValue != originalColumns || rows.intValue != originalRows, ) { - Text(text = stringResource(id = R.string.apply_grid)) + Text(text = stringResource(id = R.string.action_apply)) } } } diff --git a/lawnchair/src/app/lawnchair/ui/preferences/destinations/HomeScreenPreferences.kt b/lawnchair/src/app/lawnchair/ui/preferences/destinations/HomeScreenPreferences.kt index d3a855e27e..9c7b3a6802 100644 --- a/lawnchair/src/app/lawnchair/ui/preferences/destinations/HomeScreenPreferences.kt +++ b/lawnchair/src/app/lawnchair/ui/preferences/destinations/HomeScreenPreferences.kt @@ -164,7 +164,7 @@ fun HomeScreenPreferences( } PreferenceGroup(heading = stringResource(id = R.string.icons)) { SliderPreference( - label = stringResource(id = R.string.icon_size), + label = stringResource(id = R.string.icon_sizes), adapter = prefs2.homeIconSizeFactor.getAdapter(), step = 0.1f, valueRange = 0.5F..1.5F, @@ -173,7 +173,7 @@ fun HomeScreenPreferences( val homeScreenLabelsAdapter = prefs2.showIconLabelsOnHomeScreen.getAdapter() SwitchPreference( adapter = homeScreenLabelsAdapter, - label = stringResource(id = R.string.show_home_labels), + label = stringResource(id = R.string.show_labels), ) ExpandAndShrink(visible = homeScreenLabelsAdapter.state.value) { SliderPreference( diff --git a/lawnchair/src/app/lawnchair/ui/preferences/destinations/IconPackPreferences.kt b/lawnchair/src/app/lawnchair/ui/preferences/destinations/IconPackPreferences.kt index 36941df5ee..a286abbf38 100644 --- a/lawnchair/src/app/lawnchair/ui/preferences/destinations/IconPackPreferences.kt +++ b/lawnchair/src/app/lawnchair/ui/preferences/destinations/IconPackPreferences.kt @@ -115,7 +115,7 @@ fun IconPackPreferences( val drawerThemedIconsEnabled = drawerThemedIconsAdapter.state.value PreferenceLayout( - label = stringResource(id = R.string.icon_style), + label = stringResource(id = R.string.icon_style_label), modifier = modifier, isExpandedScreen = true, scrollState = if (isPortrait) null else scrollState, diff --git a/src/com/android/launcher3/settings/NotificationDotsPreference.java b/src/com/android/launcher3/settings/NotificationDotsPreference.java index 1816e7be38..2796bb06b2 100644 --- a/src/com/android/launcher3/settings/NotificationDotsPreference.java +++ b/src/com/android/launcher3/settings/NotificationDotsPreference.java @@ -155,7 +155,7 @@ public class NotificationDotsPreference extends Preference @Override public Dialog onCreateDialog(Bundle savedInstanceState) { final Context context = getActivity(); - String msg = context.getString(R.string.msg_missing_notification_access, + String msg = context.getString(R.string.missing_notification_access_desc, context.getString(R.string.derived_app_name)); return new AlertDialog.Builder(context) .setTitle(R.string.title_missing_notification_access)