diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml index c324a1a7119..14254a2e264 100644 --- a/app/src/main/AndroidManifest.xml +++ b/app/src/main/AndroidManifest.xml @@ -26,11 +26,11 @@ android:value="2020-09-01" /> @@ -257,7 +257,7 @@ { setExtraControlsTitle( - resourceHandler.getStringInLocale(R.string.administrator_controls_edit_profiles) + resourceHandler.getStringInLocale( + R.string.administrator_controls_fragment_edit_profiles_text + ) ) loadProfileList() } diff --git a/app/src/main/java/org/oppia/android/app/administratorcontrols/LogoutDialogFragment.kt b/app/src/main/java/org/oppia/android/app/administratorcontrols/LogoutDialogFragment.kt index f53e3244ee3..7182ae898a1 100644 --- a/app/src/main/java/org/oppia/android/app/administratorcontrols/LogoutDialogFragment.kt +++ b/app/src/main/java/org/oppia/android/app/administratorcontrols/LogoutDialogFragment.kt @@ -30,11 +30,11 @@ class LogoutDialogFragment : InjectableDialogFragment() { override fun onCreateDialog(savedInstanceState: Bundle?): Dialog { return AlertDialog.Builder(requireContext(), R.style.OppiaAlertDialogTheme) - .setMessage(R.string.log_out_dialog_message) - .setNegativeButton(R.string.log_out_dialog_cancel_button) { dialog, _ -> + .setMessage(R.string.log_out_dialog_message_text) + .setNegativeButton(R.string.log_out_dialog_cancel_button_text) { dialog, _ -> dialog.dismiss() } - .setPositiveButton(R.string.log_out_dialog_okay_button) { _, _ -> + .setPositiveButton(R.string.log_out_dialog_okay_button_text) { _, _ -> val intent = ProfileChooserActivity.createProfileChooserActivity(activity!!) startActivity(intent) }.create() diff --git a/app/src/main/java/org/oppia/android/app/administratorcontrols/appversion/AppVersionViewModel.kt b/app/src/main/java/org/oppia/android/app/administratorcontrols/appversion/AppVersionViewModel.kt index f67614fd3be..7595588d92c 100644 --- a/app/src/main/java/org/oppia/android/app/administratorcontrols/appversion/AppVersionViewModel.kt +++ b/app/src/main/java/org/oppia/android/app/administratorcontrols/appversion/AppVersionViewModel.kt @@ -22,12 +22,14 @@ class AppVersionViewModel @Inject constructor( /** Returns a localized, human-readable app version name. */ fun computeVersionNameText(): String = - resourceHandler.getStringInLocaleWithWrapping(R.string.app_version_name, versionName) + resourceHandler.getStringInLocaleWithWrapping( + R.string.app_version_fragment_version_name_text, versionName + ) /** Returns a localized, human-readable lastUpdateDateTime. */ fun computeLastUpdatedDateText(): String = resourceHandler.getStringInLocaleWithWrapping( - R.string.app_last_update_date, getDateTime(lastUpdateDateTime) + R.string.app_version_fragment_last_update_date_text, getDateTime(lastUpdateDateTime) ) private fun getDateTime(lastUpdateTime: Long): String = diff --git a/app/src/main/java/org/oppia/android/app/customview/ChapterNotStartedContainerConstraintLayout.kt b/app/src/main/java/org/oppia/android/app/customview/ChapterNotStartedContainerConstraintLayout.kt index b20920c763a..6d0b923ff0a 100644 --- a/app/src/main/java/org/oppia/android/app/customview/ChapterNotStartedContainerConstraintLayout.kt +++ b/app/src/main/java/org/oppia/android/app/customview/ChapterNotStartedContainerConstraintLayout.kt @@ -56,7 +56,7 @@ class ChapterNotStartedContainerConstraintLayout @JvmOverloads constructor( isSpotlit = true val spotlightTarget = SpotlightTarget( this, - resourceHandler.getStringInLocale(R.string.first_chapter_spotlight_hint), + resourceHandler.getStringInLocale(R.string.topic_fragment_first_chapter_spotlight_hint), feature = Spotlight.FeatureCase.FIRST_CHAPTER ) if (index == 0) { diff --git a/app/src/main/java/org/oppia/android/app/customview/PromotedStoryCardView.kt b/app/src/main/java/org/oppia/android/app/customview/PromotedStoryCardView.kt index ca104409df7..6b8c2e7ab07 100644 --- a/app/src/main/java/org/oppia/android/app/customview/PromotedStoryCardView.kt +++ b/app/src/main/java/org/oppia/android/app/customview/PromotedStoryCardView.kt @@ -37,7 +37,7 @@ class PromotedStoryCardView @JvmOverloads constructor( isSpotlit = true val spotlightTarget = SpotlightTarget( this, - resourceHandler.getStringInLocale(R.string.promoted_story_spotlight_hint), + resourceHandler.getStringInLocale(R.string.home_story_promoted_story_spotlight_hint), feature = Spotlight.FeatureCase.PROMOTED_STORIES ) checkNotNull(getSpotlightManager()).requestSpotlightViewWithDelayedLayout(spotlightTarget) diff --git a/app/src/main/java/org/oppia/android/app/databinding/TextViewBindingAdapters.java b/app/src/main/java/org/oppia/android/app/databinding/TextViewBindingAdapters.java index 591e8c88738..6aff3d8e5c1 100644 --- a/app/src/main/java/org/oppia/android/app/databinding/TextViewBindingAdapters.java +++ b/app/src/main/java/org/oppia/android/app/databinding/TextViewBindingAdapters.java @@ -25,7 +25,7 @@ public static void setProfileDataText(@NonNull TextView textView, long timestamp AppLanguageResourceHandler resourceHandler = getResourceHandler(textView); String time = resourceHandler.computeDateString(timestamp); textView.setText(resourceHandler.getStringInLocaleWithWrapping( - R.string.profile_edit_created, + R.string.profile_edit_activity_created_text, time )); } @@ -34,7 +34,9 @@ public static void setProfileDataText(@NonNull TextView textView, long timestamp @BindingAdapter("profile:lastVisited") public static void setProfileLastVisitedText(@NonNull TextView textView, long timestamp) { AppLanguageResourceHandler resourceHandler = getResourceHandler(textView); - String profileLastUsed = resourceHandler.getStringInLocale(R.string.profile_last_used); + String profileLastUsed = resourceHandler.getStringInLocale( + R.string.profile_edit_activity_last_used_text + ); String timeAgoTimeStamp = getTimeAgo(textView, timestamp); String profileLastVisited = resourceHandler.getStringInLocaleWithWrapping( R.string.profile_last_visited, diff --git a/app/src/main/java/org/oppia/android/app/drawer/ExitProfileDialogFragment.kt b/app/src/main/java/org/oppia/android/app/drawer/ExitProfileDialogFragment.kt index 7900163e9a5..4276230d6eb 100644 --- a/app/src/main/java/org/oppia/android/app/drawer/ExitProfileDialogFragment.kt +++ b/app/src/main/java/org/oppia/android/app/drawer/ExitProfileDialogFragment.kt @@ -66,10 +66,10 @@ class ExitProfileDialogFragment : InjectableDialogFragment() { val alertDialog = AlertDialog .Builder(ContextThemeWrapper(activity as Context, R.style.OppiaAlertDialogTheme)) .setMessage(R.string.home_activity_back_dialog_message) - .setNegativeButton(R.string.home_activity_back_dialog_cancel) { dialog, _ -> + .setNegativeButton(R.string.home_activity_back_dialog_cancel_button) { dialog, _ -> dialog.dismiss() } - .setPositiveButton(R.string.home_activity_back_dialog_exit) { _, _ -> + .setPositiveButton(R.string.home_activity_back_dialog_exit_button) { _, _ -> // TODO(#3641): Investigate on using finish instead of intent. val intent = ProfileChooserActivity.createProfileChooserActivity(activity!!) if (!restoreLastCheckedItem) { diff --git a/app/src/main/java/org/oppia/android/app/drawer/NavigationDrawerFragmentPresenter.kt b/app/src/main/java/org/oppia/android/app/drawer/NavigationDrawerFragmentPresenter.kt index 44fb2ec9945..36f176e73be 100644 --- a/app/src/main/java/org/oppia/android/app/drawer/NavigationDrawerFragmentPresenter.kt +++ b/app/src/main/java/org/oppia/android/app/drawer/NavigationDrawerFragmentPresenter.kt @@ -412,8 +412,8 @@ class NavigationDrawerFragmentPresenter @Inject constructor( fragment.activity, drawerLayout, toolbar, - R.string.drawer_open_content_description, - R.string.drawer_close_content_description + R.string.navigation_drawer_fragment_open_content_description, + R.string.navigation_drawer_fragment_close_content_description ) { override fun onDrawerOpened(drawerView: View) { super.onDrawerOpened(drawerView) @@ -451,8 +451,8 @@ class NavigationDrawerFragmentPresenter @Inject constructor( fragment.activity, drawerLayout, toolbar, - R.string.drawer_open_content_description, - R.string.drawer_close_content_description + R.string.navigation_drawer_fragment_open_content_description, + R.string.navigation_drawer_fragment_close_content_description ) { override fun onDrawerOpened(drawerView: View) { super.onDrawerOpened(drawerView) diff --git a/app/src/main/java/org/oppia/android/app/drawer/NavigationDrawerHeaderViewModel.kt b/app/src/main/java/org/oppia/android/app/drawer/NavigationDrawerHeaderViewModel.kt index d75c0d03287..6652defe7c2 100644 --- a/app/src/main/java/org/oppia/android/app/drawer/NavigationDrawerHeaderViewModel.kt +++ b/app/src/main/java/org/oppia/android/app/drawer/NavigationDrawerHeaderViewModel.kt @@ -49,7 +49,9 @@ class NavigationDrawerHeaderViewModel @Inject constructor( ) } - fun getBarSeparator() = resourceHandler.getStringInLocale(R.string.bar_separator) + fun getBarSeparator() = resourceHandler.getStringInLocale( + R.string.navigation_drawer_fragment_bar_separator_text + ) private fun computeProfileTopicProgressText(): String { return resourceHandler.getQuantityStringInLocaleWithWrapping( diff --git a/app/src/main/java/org/oppia/android/app/help/HelpActivity.kt b/app/src/main/java/org/oppia/android/app/help/HelpActivity.kt index 8d1182d5105..f92de92c60e 100644 --- a/app/src/main/java/org/oppia/android/app/help/HelpActivity.kt +++ b/app/src/main/java/org/oppia/android/app/help/HelpActivity.kt @@ -82,7 +82,7 @@ class HelpActivity : selectedLicenseIndex, policiesActivityParams ) - title = resourceHandler.getStringInLocale(R.string.menu_help) + title = resourceHandler.getStringInLocale(R.string.menu_help_text) } companion object { diff --git a/app/src/main/java/org/oppia/android/app/help/HelpActivityPresenter.kt b/app/src/main/java/org/oppia/android/app/help/HelpActivityPresenter.kt index 29f2aa8123b..690f6c39ec7 100644 --- a/app/src/main/java/org/oppia/android/app/help/HelpActivityPresenter.kt +++ b/app/src/main/java/org/oppia/android/app/help/HelpActivityPresenter.kt @@ -281,7 +281,7 @@ class HelpActivityPresenter @Inject constructor( when (fragmentTag) { LICENSE_LIST_FRAGMENT_TAG -> { val thirdPartyDependenciesList = resourceHandler.getStringInLocale( - R.string.help_activity_third_party_dependencies_list + R.string.help_activity_third_party_dependencies_text ) activity.findViewById(R.id.help_multipane_options_back_button) .contentDescription = resourceHandler.getStringInLocaleWithoutWrapping( @@ -291,7 +291,7 @@ class HelpActivityPresenter @Inject constructor( } LICENSE_TEXT_FRAGMENT_TAG -> { val copyrightLicensesList = resourceHandler.getStringInLocale( - R.string.help_activity_copyright_licenses_list + R.string.help_activity_copyright_licenses_text ) activity.findViewById(R.id.help_multipane_options_back_button) .contentDescription = resourceHandler.getStringInLocaleWithoutWrapping( @@ -337,10 +337,10 @@ class HelpActivityPresenter @Inject constructor( private fun selectPoliciesFragment(policyPage: PolicyPage) { when (policyPage) { PolicyPage.PRIVACY_POLICY -> setMultipaneContainerTitle( - resourceHandler.getStringInLocale(R.string.privacy_policy_title) + resourceHandler.getStringInLocale(R.string.policy_activity_privacy_policy_title) ) PolicyPage.TERMS_OF_SERVICE -> setMultipaneContainerTitle( - resourceHandler.getStringInLocale(R.string.terms_of_service_title) + resourceHandler.getStringInLocale(R.string.policy_activity_terms_of_service_title) ) else -> { } } diff --git a/app/src/main/java/org/oppia/android/app/help/HelpItemViewModel.kt b/app/src/main/java/org/oppia/android/app/help/HelpItemViewModel.kt index a2472a4e3e1..04375e62bda 100644 --- a/app/src/main/java/org/oppia/android/app/help/HelpItemViewModel.kt +++ b/app/src/main/java/org/oppia/android/app/help/HelpItemViewModel.kt @@ -16,7 +16,7 @@ class HelpItemViewModel( ) : ObservableViewModel() { fun onClick(title: String) { when (title) { - resourceHandler.getStringInLocale(R.string.frequently_asked_questions_FAQ) -> { + resourceHandler.getStringInLocale(R.string.help_activity_faq_text) -> { if (isMultipane) { val loadFaqListFragmentListener = activity as LoadFaqListFragmentListener loadFaqListFragmentListener.loadFaqListFragment() @@ -36,10 +36,10 @@ class HelpItemViewModel( routeToThirdPartyDependencyListListener.onRouteToThirdPartyDependencyList() } } - resourceHandler.getStringInLocale(R.string.privacy_policy_title) -> { + resourceHandler.getStringInLocale(R.string.policy_activity_privacy_policy_title) -> { loadPolicyPage(PolicyPage.PRIVACY_POLICY) } - resourceHandler.getStringInLocale(R.string.terms_of_service_title) -> { + resourceHandler.getStringInLocale(R.string.policy_activity_terms_of_service_title) -> { loadPolicyPage(PolicyPage.TERMS_OF_SERVICE) } } diff --git a/app/src/main/java/org/oppia/android/app/help/HelpListViewModel.kt b/app/src/main/java/org/oppia/android/app/help/HelpListViewModel.kt index 3684a6b4e29..833c9a42c84 100644 --- a/app/src/main/java/org/oppia/android/app/help/HelpListViewModel.kt +++ b/app/src/main/java/org/oppia/android/app/help/HelpListViewModel.kt @@ -19,15 +19,15 @@ class HelpListViewModel @Inject constructor( private fun getRecyclerViewItemList(): ArrayList { for (item in HelpItems.values()) { val category = when (item) { - HelpItems.FAQ -> resourceHandler.getStringInLocale(R.string.frequently_asked_questions_FAQ) + HelpItems.FAQ -> resourceHandler.getStringInLocale(R.string.help_activity_faq_text) HelpItems.THIRD_PARTY -> resourceHandler.getStringInLocale( R.string.third_party_dependency_list_activity_title ) HelpItems.PRIVACY_POLICY -> resourceHandler.getStringInLocale( - R.string.privacy_policy_title + R.string.policy_activity_privacy_policy_title ) HelpItems.TERMS_OF_SERVICE -> resourceHandler.getStringInLocale( - R.string.terms_of_service_title + R.string.policy_activity_terms_of_service_title ) } arrayList += HelpItemViewModel( diff --git a/app/src/main/java/org/oppia/android/app/help/faq/FAQListActivityPresenter.kt b/app/src/main/java/org/oppia/android/app/help/faq/FAQListActivityPresenter.kt index ed02ae5770d..f73ff2a45ab 100644 --- a/app/src/main/java/org/oppia/android/app/help/faq/FAQListActivityPresenter.kt +++ b/app/src/main/java/org/oppia/android/app/help/faq/FAQListActivityPresenter.kt @@ -26,7 +26,9 @@ class FAQListActivityPresenter @Inject constructor( faqListActivityToolbar = binding.faqListActivityToolbar activity.setSupportActionBar(faqListActivityToolbar) - activity.supportActionBar!!.title = resourceHandler.getStringInLocale(R.string.FAQs) + activity.supportActionBar!!.title = resourceHandler.getStringInLocale( + R.string.faq_list_activity_title + ) activity.supportActionBar!!.setDisplayShowHomeEnabled(true) activity.supportActionBar!!.setDisplayHomeAsUpEnabled(true) diff --git a/app/src/main/java/org/oppia/android/app/help/faq/faqsingle/FAQSingleActivityPresenter.kt b/app/src/main/java/org/oppia/android/app/help/faq/faqsingle/FAQSingleActivityPresenter.kt index 4802913476e..bd36f117c63 100644 --- a/app/src/main/java/org/oppia/android/app/help/faq/faqsingle/FAQSingleActivityPresenter.kt +++ b/app/src/main/java/org/oppia/android/app/help/faq/faqsingle/FAQSingleActivityPresenter.kt @@ -34,7 +34,9 @@ class FAQSingleActivityPresenter @Inject constructor( faqSingleActivityToolbar = binding.faqSingleActivityToolbar activity.setSupportActionBar(faqSingleActivityToolbar) - activity.supportActionBar!!.title = resourceHandler.getStringInLocale(R.string.FAQs) + activity.supportActionBar!!.title = resourceHandler.getStringInLocale( + R.string.faq_list_activity_title + ) activity.supportActionBar!!.setDisplayShowHomeEnabled(true) activity.supportActionBar!!.setDisplayHomeAsUpEnabled(true) diff --git a/app/src/main/java/org/oppia/android/app/hintsandsolution/HintsAndSolutionDialogFragmentPresenter.kt b/app/src/main/java/org/oppia/android/app/hintsandsolution/HintsAndSolutionDialogFragmentPresenter.kt index 670afb8c3c5..ea22690af8c 100644 --- a/app/src/main/java/org/oppia/android/app/hintsandsolution/HintsAndSolutionDialogFragmentPresenter.kt +++ b/app/src/main/java/org/oppia/android/app/hintsandsolution/HintsAndSolutionDialogFragmentPresenter.kt @@ -92,7 +92,7 @@ class HintsAndSolutionDialogFragmentPresenter @Inject constructor( HintsAndSolutionFragmentBinding.inflate(inflater, container, /* attachToRoot= */ false) binding.hintsAndSolutionToolbar.setNavigationIcon(R.drawable.ic_close_white_24dp) binding.hintsAndSolutionToolbar.setNavigationContentDescription( - R.string.hints_and_solution_close_icon_description + R.string.hint_solution_dialog_close_icon_description ) binding.hintsAndSolutionToolbar.setNavigationOnClickListener { (fragment.requireActivity() as? HintsAndSolutionListener)?.dismiss() diff --git a/app/src/main/java/org/oppia/android/app/hintsandsolution/HintsAndSolutionViewModel.kt b/app/src/main/java/org/oppia/android/app/hintsandsolution/HintsAndSolutionViewModel.kt index f604f7f6547..2e5f3faaf61 100644 --- a/app/src/main/java/org/oppia/android/app/hintsandsolution/HintsAndSolutionViewModel.kt +++ b/app/src/main/java/org/oppia/android/app/hintsandsolution/HintsAndSolutionViewModel.kt @@ -69,7 +69,7 @@ class HintsAndSolutionViewModel private constructor( ): HintViewModel { return HintViewModel( title = resourceHandler.getStringInLocaleWithWrapping( - R.string.hint_list_item_number, + R.string.hint_solution_dialog_hint_list_item_number, resourceHandler.toHumanReadableString(hintIndex + 1) ), hintSummary = translationController.extractString( diff --git a/app/src/main/java/org/oppia/android/app/hintsandsolution/RevealSolutionDialogFragment.kt b/app/src/main/java/org/oppia/android/app/hintsandsolution/RevealSolutionDialogFragment.kt index 384213caf6d..96f010184df 100755 --- a/app/src/main/java/org/oppia/android/app/hintsandsolution/RevealSolutionDialogFragment.kt +++ b/app/src/main/java/org/oppia/android/app/hintsandsolution/RevealSolutionDialogFragment.kt @@ -42,14 +42,22 @@ class RevealSolutionDialogFragment : InjectableDialogFragment() { return AlertDialog .Builder(ContextThemeWrapper(activity as Context, R.style.OppiaDialogFragmentTheme)) - .setTitle(R.string.reveal_solution) + .setTitle(R.string.hint_solution_dialog_reveal_solution_text) .setView(view) - .setMessage(resourceHandler.getStringInLocale(R.string.this_will_reveal_the_solution)) - .setPositiveButton(resourceHandler.getStringInLocale(R.string.reveal)) { _, _ -> + .setMessage( + resourceHandler.getStringInLocale( + R.string.hint_solution_dialog_reveal_dialog_solution_text + ) + ) + .setPositiveButton( + resourceHandler.getStringInLocale( + R.string.hint_solution_dialog_reveal_dialog_button_text + ) + ) { _, _ -> revealSolutionInterface.revealSolution() dismiss() } - .setNegativeButton(R.string.cellular_data_alert_dialog_cancel_button) { _, _ -> + .setNegativeButton(R.string.cellular_audio_dialog_cancel_button_text) { _, _ -> dismiss() } .create() diff --git a/app/src/main/java/org/oppia/android/app/hintsandsolution/SolutionViewModel.kt b/app/src/main/java/org/oppia/android/app/hintsandsolution/SolutionViewModel.kt index cd70ceaae8e..2059b14b3f7 100644 --- a/app/src/main/java/org/oppia/android/app/hintsandsolution/SolutionViewModel.kt +++ b/app/src/main/java/org/oppia/android/app/hintsandsolution/SolutionViewModel.kt @@ -78,8 +78,8 @@ class SolutionViewModel private constructor( val correctAnswerContentDescription: String by lazy { computeCorrectAnswerContentDescription() } private val correctAnswerTextStringResId = if (isSolutionExclusive) { - R.string.hints_list_exclusive_solution_text - } else R.string.hints_list_possible_solution_text + R.string.hint_solution_dialog_exclusive_solution_text + } else R.string.hint_solution_dialog_possible_solution_text private fun computeCorrectAnswerHtml(): String { val answerTextHtml = when (correctAnswer.objectTypeCase) { diff --git a/app/src/main/java/org/oppia/android/app/home/promotedlist/PromotedStoryListViewModel.kt b/app/src/main/java/org/oppia/android/app/home/promotedlist/PromotedStoryListViewModel.kt index 993212cdf41..906ef3b164d 100644 --- a/app/src/main/java/org/oppia/android/app/home/promotedlist/PromotedStoryListViewModel.kt +++ b/app/src/main/java/org/oppia/android/app/home/promotedlist/PromotedStoryListViewModel.kt @@ -41,10 +41,10 @@ class PromotedStoryListViewModel( resourceHandler.getStringInLocale(R.string.stories_for_you) } recentlyPlayedStoryList.isNotEmpty() -> { - resourceHandler.getStringInLocale(R.string.recently_played_stories) + resourceHandler.getStringInLocale(R.string.home_activity_recently_played_stories) } else -> { - resourceHandler.getStringInLocale(R.string.last_played_stories) + resourceHandler.getStringInLocale(R.string.home_activity_last_played_stories) } } } diff --git a/app/src/main/java/org/oppia/android/app/home/recentlyplayed/PromotedStoryViewModel.kt b/app/src/main/java/org/oppia/android/app/home/recentlyplayed/PromotedStoryViewModel.kt index f93fba2613c..06b60075c61 100755 --- a/app/src/main/java/org/oppia/android/app/home/recentlyplayed/PromotedStoryViewModel.kt +++ b/app/src/main/java/org/oppia/android/app/home/recentlyplayed/PromotedStoryViewModel.kt @@ -131,7 +131,7 @@ class PromotedStoryViewModel( */ fun computeLessonThumbnailContentDescription(): String { return resourceHandler.getStringInLocaleWithWrapping( - R.string.lesson_thumbnail_content_description, nextChapterTitle + R.string.home_activity_lesson_thumbnail_description, nextChapterTitle ) } } diff --git a/app/src/main/java/org/oppia/android/app/home/recentlyplayed/RecentlyPlayedActivityPresenter.kt b/app/src/main/java/org/oppia/android/app/home/recentlyplayed/RecentlyPlayedActivityPresenter.kt index 9eef029e29b..a7b3afb5192 100644 --- a/app/src/main/java/org/oppia/android/app/home/recentlyplayed/RecentlyPlayedActivityPresenter.kt +++ b/app/src/main/java/org/oppia/android/app/home/recentlyplayed/RecentlyPlayedActivityPresenter.kt @@ -50,13 +50,13 @@ class RecentlyPlayedActivityPresenter @Inject constructor( resourceHandler.getStringInLocale(R.string.stories_for_you) } RecentlyPlayedActivityTitle.LAST_PLAYED_STORIES -> { - resourceHandler.getStringInLocale(R.string.last_played_stories) + resourceHandler.getStringInLocale(R.string.home_activity_last_played_stories) } RecentlyPlayedActivityTitle.RECOMMENDED_STORIES -> { resourceHandler.getStringInLocale(R.string.recommended_stories) } else -> { - resourceHandler.getStringInLocale(R.string.recently_played_activity) + resourceHandler.getStringInLocale(R.string.recently_played_activity_title) } } } diff --git a/app/src/main/java/org/oppia/android/app/home/recentlyplayed/RecentlyPlayedViewModel.kt b/app/src/main/java/org/oppia/android/app/home/recentlyplayed/RecentlyPlayedViewModel.kt index 7716fdf11f5..c2bf98155ae 100644 --- a/app/src/main/java/org/oppia/android/app/home/recentlyplayed/RecentlyPlayedViewModel.kt +++ b/app/src/main/java/org/oppia/android/app/home/recentlyplayed/RecentlyPlayedViewModel.kt @@ -112,7 +112,7 @@ class RecentlyPlayedViewModel private constructor( ) { val recentSectionTitleViewModel = SectionTitleViewModel( - resourceHandler.getStringInLocale(R.string.ongoing_story_last_week), false + resourceHandler.getStringInLocale(R.string.home_activity_ongoing_story_last_week), false ) itemList.add(recentSectionTitleViewModel) recentlyPlayedStoryList.forEachIndexed { index, promotedStory -> @@ -128,7 +128,7 @@ class RecentlyPlayedViewModel private constructor( val showDivider = itemList.isNotEmpty() val olderSectionTitleViewModel = SectionTitleViewModel( - resourceHandler.getStringInLocale(R.string.ongoing_story_last_month), + resourceHandler.getStringInLocale(R.string.home_activity_ongoing_story_last_month), showDivider ) itemList.add(olderSectionTitleViewModel) diff --git a/app/src/main/java/org/oppia/android/app/mydownloads/MyDownloadsFragmentPresenter.kt b/app/src/main/java/org/oppia/android/app/mydownloads/MyDownloadsFragmentPresenter.kt index acad9aa15d5..831d9ec3478 100644 --- a/app/src/main/java/org/oppia/android/app/mydownloads/MyDownloadsFragmentPresenter.kt +++ b/app/src/main/java/org/oppia/android/app/mydownloads/MyDownloadsFragmentPresenter.kt @@ -46,8 +46,12 @@ class MyDownloadsFragmentPresenter @Inject constructor( TabLayoutMediator(tabLayout, viewPager2) { tab, position -> when (position) { - 0 -> tab.text = resourceHandler.getStringInLocale(R.string.tab_downloads) - 1 -> tab.text = resourceHandler.getStringInLocale(R.string.tab_updates) + 0 -> tab.text = resourceHandler.getStringInLocale( + R.string.my_downloads_fragment_tab_download_text + ) + 1 -> + tab.text = + resourceHandler.getStringInLocale(R.string.my_downloads_fragment_tab_updates_text) } }.attach() } diff --git a/app/src/main/java/org/oppia/android/app/onboarding/OnboadingSlideViewModel.kt b/app/src/main/java/org/oppia/android/app/onboarding/OnboadingSlideViewModel.kt index 83b02f89172..0d03cf11914 100644 --- a/app/src/main/java/org/oppia/android/app/onboarding/OnboadingSlideViewModel.kt +++ b/app/src/main/java/org/oppia/android/app/onboarding/OnboadingSlideViewModel.kt @@ -20,7 +20,11 @@ class OnboardingSlideViewModel( val title = ObservableField(getOnboardingSlide0Title()) val description = - ObservableField(resourceHandler.getStringInLocale(R.string.onboarding_slide_0_description)) + ObservableField( + resourceHandler.getStringInLocale( + R.string.onboarding_activity_slide_0_description + ) + ) private val orientation = Resources.getSystem().configuration.orientation init { @@ -40,7 +44,11 @@ class OnboardingSlideViewModel( slideImage.set(R.drawable.ic_portrait_onboarding_0) } title.set(getOnboardingSlide0Title()) - description.set(resourceHandler.getStringInLocale(R.string.onboarding_slide_0_description)) + description.set( + resourceHandler.getStringInLocale( + R.string.onboarding_activity_slide_0_description + ) + ) } ViewPagerSlide.SLIDE_1 -> { if (orientation == Configuration.ORIENTATION_LANDSCAPE) { @@ -52,8 +60,16 @@ class OnboardingSlideViewModel( } else if (orientation == Configuration.ORIENTATION_PORTRAIT) { slideImage.set(R.drawable.ic_portrait_onboarding_1) } - title.set(resourceHandler.getStringInLocale(R.string.onboarding_slide_1_title)) - description.set(resourceHandler.getStringInLocale(R.string.onboarding_slide_1_description)) + title.set( + resourceHandler.getStringInLocale( + R.string.onboarding_activity_slide_1_title + ) + ) + description.set( + resourceHandler.getStringInLocale( + R.string.onboarding_activity_slide_1_description + ) + ) } ViewPagerSlide.SLIDE_2 -> { if (orientation == Configuration.ORIENTATION_LANDSCAPE) { @@ -65,14 +81,25 @@ class OnboardingSlideViewModel( } else if (orientation == Configuration.ORIENTATION_PORTRAIT) { slideImage.set(R.drawable.ic_portrait_onboarding_2) } - title.set(resourceHandler.getStringInLocale(R.string.onboarding_slide_2_title)) - description.set(resourceHandler.getStringInLocale(R.string.onboarding_slide_2_description)) + title.set( + resourceHandler.getStringInLocale( + R.string.onboarding_activity_slide_2_title + ) + ) + description.set( + resourceHandler.getStringInLocale( + R.string.onboarding_activity_slide_2_description + ) + ) } } } private fun getOnboardingSlide0Title(): String { val appName = resourceHandler.getStringInLocale(R.string.app_name) - return resourceHandler.getStringInLocaleWithWrapping(R.string.onboarding_slide_0_title, appName) + return resourceHandler.getStringInLocaleWithWrapping( + R.string.onboarding_activity_slide_0_title, + appName + ) } } diff --git a/app/src/main/java/org/oppia/android/app/onboarding/OnboardingFragmentPresenter.kt b/app/src/main/java/org/oppia/android/app/onboarding/OnboardingFragmentPresenter.kt index 1551e6c4199..efe15a02638 100644 --- a/app/src/main/java/org/oppia/android/app/onboarding/OnboardingFragmentPresenter.kt +++ b/app/src/main/java/org/oppia/android/app/onboarding/OnboardingFragmentPresenter.kt @@ -131,7 +131,7 @@ class OnboardingFragmentPresenter @Inject constructor( val completeString: String = resourceHandler.getStringInLocaleWithWrapping( - R.string.agree_to_terms, + R.string.policy_activity_agree_to_terms_text, resourceHandler.getStringInLocale(R.string.app_name) ) binding.slideTermsOfServiceAndPrivacyPolicyLinksTextView.text = htmlParserFactory.create( diff --git a/app/src/main/java/org/oppia/android/app/onboarding/OnboardingViewModel.kt b/app/src/main/java/org/oppia/android/app/onboarding/OnboardingViewModel.kt index f7f80e412cb..f4d5bc5aa76 100644 --- a/app/src/main/java/org/oppia/android/app/onboarding/OnboardingViewModel.kt +++ b/app/src/main/java/org/oppia/android/app/onboarding/OnboardingViewModel.kt @@ -27,7 +27,7 @@ class OnboardingViewModel @Inject constructor( private fun computeSlideDotsContainerContentDescription(slideNumber: Int): String { return resourceHandler.getStringInLocaleWithWrapping( - R.string.onboarding_slide_dots_content_description, + R.string.onboarding_activity_slide_dots_content_description, (slideNumber + 1).toString(), totalNumberOfSlides.toString() ) diff --git a/app/src/main/java/org/oppia/android/app/options/OptionsActivity.kt b/app/src/main/java/org/oppia/android/app/options/OptionsActivity.kt index 50484e5ff1e..adac20e31c2 100644 --- a/app/src/main/java/org/oppia/android/app/options/OptionsActivity.kt +++ b/app/src/main/java/org/oppia/android/app/options/OptionsActivity.kt @@ -94,7 +94,7 @@ class OptionsActivity : selectedFragment, profileId!! ) - title = resourceHandler.getStringInLocale(R.string.menu_options) + title = resourceHandler.getStringInLocale(R.string.menu_options_text) } override fun onActivityResult(requestCode: Int, resultCode: Int, data: Intent?) { @@ -146,7 +146,7 @@ class OptionsActivity : override fun loadReadingTextSizeFragment(textSize: ReadingTextSize) { selectedFragment = READING_TEXT_SIZE_FRAGMENT optionActivityPresenter.setExtraOptionTitle( - resourceHandler.getStringInLocale(R.string.reading_text_size) + resourceHandler.getStringInLocale(R.string.option_activity_reading_text_size) ) optionActivityPresenter.loadReadingTextSizeFragment(textSize) } @@ -154,7 +154,7 @@ class OptionsActivity : override fun loadAppLanguageFragment(appLanguage: OppiaLanguage) { selectedFragment = APP_LANGUAGE_FRAGMENT optionActivityPresenter.setExtraOptionTitle( - resourceHandler.getStringInLocale(R.string.app_language) + resourceHandler.getStringInLocale(R.string.option_activity_app_language_text) ) optionActivityPresenter.loadAppLanguageFragment(appLanguage) } @@ -162,7 +162,7 @@ class OptionsActivity : override fun loadAudioLanguageFragment(audioLanguage: AudioLanguage) { selectedFragment = AUDIO_LANGUAGE_FRAGMENT optionActivityPresenter.setExtraOptionTitle( - resourceHandler.getStringInLocale(R.string.audio_language) + resourceHandler.getStringInLocale(R.string.option_activity_audio_language_text) ) optionActivityPresenter.loadAudioLanguageFragment(audioLanguage) } diff --git a/app/src/main/java/org/oppia/android/app/options/OptionsReadingTextSizeViewModel.kt b/app/src/main/java/org/oppia/android/app/options/OptionsReadingTextSizeViewModel.kt index 626069bec7f..442cfcd62c4 100644 --- a/app/src/main/java/org/oppia/android/app/options/OptionsReadingTextSizeViewModel.kt +++ b/app/src/main/java/org/oppia/android/app/options/OptionsReadingTextSizeViewModel.kt @@ -16,12 +16,20 @@ class OptionsReadingTextSizeViewModel( get() { return when (readingTextSize.get()!!) { ReadingTextSize.SMALL_TEXT_SIZE -> - resourceHandler.getStringInLocale(R.string.reading_text_size_small) + resourceHandler.getStringInLocale( + R.string.option_activity_reading_text_size_small + ) ReadingTextSize.MEDIUM_TEXT_SIZE -> - resourceHandler.getStringInLocale(R.string.reading_text_size_medium) + resourceHandler.getStringInLocale( + R.string.option_activity_reading_text_size_medium + ) ReadingTextSize.LARGE_TEXT_SIZE -> - resourceHandler.getStringInLocale(R.string.reading_text_size_large) - else -> resourceHandler.getStringInLocale(R.string.reading_text_size_extra_large) + resourceHandler.getStringInLocale( + R.string.option_activity_reading_text_size_large + ) + else -> resourceHandler.getStringInLocale( + R.string.option_activity_reading_text_size_extra_large + ) } } diff --git a/app/src/main/java/org/oppia/android/app/options/TextSizeItemViewModel.kt b/app/src/main/java/org/oppia/android/app/options/TextSizeItemViewModel.kt index 1b3fda584af..3f57aa2abde 100644 --- a/app/src/main/java/org/oppia/android/app/options/TextSizeItemViewModel.kt +++ b/app/src/main/java/org/oppia/android/app/options/TextSizeItemViewModel.kt @@ -27,12 +27,20 @@ class TextSizeItemViewModel( val textSizeName: String by lazy { when (readingTextSize) { ReadingTextSize.SMALL_TEXT_SIZE -> - resourceHandler.getStringInLocale(R.string.reading_text_size_small) + resourceHandler.getStringInLocale( + R.string.option_activity_reading_text_size_small + ) ReadingTextSize.MEDIUM_TEXT_SIZE -> - resourceHandler.getStringInLocale(R.string.reading_text_size_medium) + resourceHandler.getStringInLocale( + R.string.option_activity_reading_text_size_medium + ) ReadingTextSize.LARGE_TEXT_SIZE -> - resourceHandler.getStringInLocale(R.string.reading_text_size_large) - else -> resourceHandler.getStringInLocale(R.string.reading_text_size_extra_large) + resourceHandler.getStringInLocale( + R.string.option_activity_reading_text_size_large + ) + else -> resourceHandler.getStringInLocale( + R.string.option_activity_reading_text_size_extra_large + ) } } val textSize: Float by lazy { diff --git a/app/src/main/java/org/oppia/android/app/player/audio/AudioFragmentPresenter.kt b/app/src/main/java/org/oppia/android/app/player/audio/AudioFragmentPresenter.kt index 02bcc3deb32..b0483d66008 100644 --- a/app/src/main/java/org/oppia/android/app/player/audio/AudioFragmentPresenter.kt +++ b/app/src/main/java/org/oppia/android/app/player/audio/AudioFragmentPresenter.kt @@ -135,7 +135,9 @@ class AudioFragmentPresenter @Inject constructor( private fun startSpotlights() { val audioLanguageIconSpotlightTarget = SpotlightTarget( binding.audioLanguageIcon, - resourceHandler.getStringInLocale(R.string.voiceover_language_icon_spotlight_hint), + resourceHandler.getStringInLocale( + R.string.audio_fragment_voiceover_language_icon_spotlight_hint + ), SpotlightShape.Circle, Spotlight.FeatureCase.VOICEOVER_LANGUAGE_ICON ) @@ -335,10 +337,20 @@ class AudioFragmentPresenter @Inject constructor( private fun showOfflineDialog() { AlertDialog.Builder(activity, R.style.OppiaAlertDialogTheme) - .setTitle(resourceHandler.getStringInLocale(R.string.audio_dialog_offline_title)) - .setMessage(resourceHandler.getStringInLocale(R.string.audio_dialog_offline_message)) + .setTitle( + resourceHandler.getStringInLocale( + R.string.audio_fragment_offline_dialog_title + ) + ) + .setMessage( + resourceHandler.getStringInLocale( + R.string.audio_fragment_offline_dialog_message + ) + ) .setPositiveButton( - resourceHandler.getStringInLocale(R.string.audio_dialog_offline_positive) + resourceHandler.getStringInLocale( + R.string.audio_fragment_offline_dialog_positive_button_text + ) ) { dialog, _ -> dialog.dismiss() }.create().show() diff --git a/app/src/main/java/org/oppia/android/app/player/audio/AudioViewModel.kt b/app/src/main/java/org/oppia/android/app/player/audio/AudioViewModel.kt index 07037abd873..7ab82bbb427 100644 --- a/app/src/main/java/org/oppia/android/app/player/audio/AudioViewModel.kt +++ b/app/src/main/java/org/oppia/android/app/player/audio/AudioViewModel.kt @@ -147,7 +147,7 @@ class AudioViewModel @Inject constructor( fun computeAudioUnavailabilityString(languageName: String): String { return resourceHandler.getStringInLocaleWithWrapping( - R.string.audio_unavailable_in_selected_language, languageName + R.string.audio_fragment_audio_unavailable_text, languageName ) } diff --git a/app/src/main/java/org/oppia/android/app/player/audio/CellularAudioDialogFragment.kt b/app/src/main/java/org/oppia/android/app/player/audio/CellularAudioDialogFragment.kt index 50a0025a83a..549880c87a6 100755 --- a/app/src/main/java/org/oppia/android/app/player/audio/CellularAudioDialogFragment.kt +++ b/app/src/main/java/org/oppia/android/app/player/audio/CellularAudioDialogFragment.kt @@ -39,14 +39,14 @@ class CellularAudioDialogFragment : InjectableDialogFragment() { return AlertDialog .Builder(ContextThemeWrapper(activity as Context, R.style.OppiaDialogFragmentTheme)) - .setTitle(R.string.cellular_data_alert_dialog_title) + .setTitle(R.string.cellular_audio_dialog_title) .setView(view) - .setMessage(R.string.cellular_data_alert_dialog_description) - .setPositiveButton(R.string.cellular_data_alert_dialog_okay_button) { _, _ -> + .setMessage(R.string.cellular_audio_dialog_description) + .setPositiveButton(R.string.cellular_audio_dialog_okay_button_text) { _, _ -> cellularDataInterface.enableAudioWhileOnCellular(checkBox.isChecked) dismiss() } - .setNegativeButton(R.string.cellular_data_alert_dialog_cancel_button) { _, _ -> + .setNegativeButton(R.string.cellular_audio_dialog_cancel_button_text) { _, _ -> cellularDataInterface.disableAudioWhileOnCellular(checkBox.isChecked) dismiss() } diff --git a/app/src/main/java/org/oppia/android/app/player/audio/LanguageDialogFragment.kt b/app/src/main/java/org/oppia/android/app/player/audio/LanguageDialogFragment.kt index 275705a0ed9..4f1b0927333 100644 --- a/app/src/main/java/org/oppia/android/app/player/audio/LanguageDialogFragment.kt +++ b/app/src/main/java/org/oppia/android/app/player/audio/LanguageDialogFragment.kt @@ -85,17 +85,17 @@ class LanguageDialogFragment : InjectableDialogFragment() { return AlertDialog .Builder(ContextThemeWrapper(activity as Context, R.style.OppiaDialogFragmentTheme)) - .setTitle(R.string.audio_language_select_dialog_title) + .setTitle(R.string.audio_language_dialog_title) .setSingleChoiceItems(options, selectedIndex) { dialog, which -> selectedIndex = which } - .setPositiveButton(R.string.audio_language_select_dialog_okay_button) { _, _ -> + .setPositiveButton(R.string.audio_language_dialog_okay_button_text) { _, _ -> if (selectedIndex != -1) { languageInterface.onLanguageSelected(languageCodeArrayList[selectedIndex]) } dismiss() } - .setNegativeButton(R.string.audio_language_select_dialog_cancel_button) { _, _ -> + .setNegativeButton(R.string.audio_language_dialog_cancel_button_text) { _, _ -> dismiss() } .create() diff --git a/app/src/main/java/org/oppia/android/app/player/exploration/ExplorationActivityPresenter.kt b/app/src/main/java/org/oppia/android/app/player/exploration/ExplorationActivityPresenter.kt index 3efadb513de..58f49a4c0a7 100644 --- a/app/src/main/java/org/oppia/android/app/player/exploration/ExplorationActivityPresenter.kt +++ b/app/src/main/java/org/oppia/android/app/player/exploration/ExplorationActivityPresenter.kt @@ -164,7 +164,7 @@ class ExplorationActivityPresenter @Inject constructor( val audioPlayerSpotlightTarget = SpotlightTarget( it, resourceHandler.getStringInLocaleWithWrapping( - R.string.voiceover_icon_spotlight_hint, + R.string.exploration_activity_voiceover_icon_spotlight_hint, resourceHandler.getStringInLocale(R.string.app_name) ), SpotlightShape.Circle, diff --git a/app/src/main/java/org/oppia/android/app/player/exploration/ExplorationFragmentPresenter.kt b/app/src/main/java/org/oppia/android/app/player/exploration/ExplorationFragmentPresenter.kt index 8796b96b672..a77c09b0cdb 100755 --- a/app/src/main/java/org/oppia/android/app/player/exploration/ExplorationFragmentPresenter.kt +++ b/app/src/main/java/org/oppia/android/app/player/exploration/ExplorationFragmentPresenter.kt @@ -95,7 +95,9 @@ class ExplorationFragmentPresenter @Inject constructor( // This toolbar contains only one image button, which is the back navigation icon. val backButtonSpotlightTarget = SpotlightTarget( it, - resourceHandler.getStringInLocale(R.string.exploration_exit_button_spotlight_hint), + resourceHandler.getStringInLocale( + R.string.exploration_activity_exit_button_spotlight_hint + ), SpotlightShape.Circle, Spotlight.FeatureCase.LESSONS_BACK_BUTTON ) diff --git a/app/src/main/java/org/oppia/android/app/player/state/itemviewmodel/DragDropInteractionContentViewModel.kt b/app/src/main/java/org/oppia/android/app/player/state/itemviewmodel/DragDropInteractionContentViewModel.kt index f0bdcf3ef2f..96c8e986200 100644 --- a/app/src/main/java/org/oppia/android/app/player/state/itemviewmodel/DragDropInteractionContentViewModel.kt +++ b/app/src/main/java/org/oppia/android/app/player/state/itemviewmodel/DragDropInteractionContentViewModel.kt @@ -44,28 +44,34 @@ class DragDropInteractionContentViewModel( fun computeDragDropMoveUpItemContentDescription(): String { return if (itemIndex != 0) { resourceHandler.getStringInLocaleWithWrapping( - R.string.move_item_up_content_description, itemIndex.toString() + R.string.state_fragment_drag_drop_interaction_move_item_up_content_description, + itemIndex.toString() ) - } else resourceHandler.getStringInLocale(R.string.up_button_disabled) + } else resourceHandler.getStringInLocale( + R.string.state_fragment_drag_drop_interaction_up_button_disabled + ) } fun computeDragDropMoveDownItemContentDescription(): String { return if (itemIndex != listSize - 1) { resourceHandler.getStringInLocaleWithWrapping( - R.string.move_item_down_content_description, (itemIndex + 2).toString() + R.string.state_fragment_drag_drop_interaction_move_item_down_content_description, + (itemIndex + 2).toString() ) - } else resourceHandler.getStringInLocale(R.string.down_button_disabled) + } else resourceHandler.getStringInLocale( + R.string.state_fragment_drag_drop_interaction_down_button_disabled + ) } fun computeDragDropGroupItemContentDescription(): String { return resourceHandler.getStringInLocaleWithWrapping( - R.string.link_to_item_below, (itemIndex + 2).toString() + R.string.state_fragment_drag_drop_interaction_link_to_item_below, (itemIndex + 2).toString() ) } fun computeDragDropUnlinkItemContentDescription(): String { return resourceHandler.getStringInLocaleWithWrapping( - R.string.unlink_items, (itemIndex + 1).toString() + R.string.state_fragment_drag_drop_interaction_unlink_items, (itemIndex + 1).toString() ) } } diff --git a/app/src/main/java/org/oppia/android/app/player/state/itemviewmodel/FractionInteractionViewModel.kt b/app/src/main/java/org/oppia/android/app/player/state/itemviewmodel/FractionInteractionViewModel.kt index 22d42a74744..b1b089f5dd2 100644 --- a/app/src/main/java/org/oppia/android/app/player/state/itemviewmodel/FractionInteractionViewModel.kt +++ b/app/src/main/java/org/oppia/android/app/player/state/itemviewmodel/FractionInteractionViewModel.kt @@ -123,8 +123,12 @@ class FractionInteractionViewModel private constructor( customPlaceholder1.isNotEmpty() -> customPlaceholder1 customPlaceholder2.isNotEmpty() -> customPlaceholder2 !allowNonzeroIntegerPart -> - resourceHandler.getStringInLocale(R.string.fractions_default_hint_text_no_integer) - else -> resourceHandler.getStringInLocale(R.string.fractions_default_hint_text) + resourceHandler.getStringInLocale( + R.string.state_fragment_fraction_input_interaction_no_integer_hint + ) + else -> resourceHandler.getStringInLocale( + R.string.state_fragment_fraction_input_interaction_hint + ) } } diff --git a/app/src/main/java/org/oppia/android/app/player/state/itemviewmodel/ImageRegionSelectionInteractionViewModel.kt b/app/src/main/java/org/oppia/android/app/player/state/itemviewmodel/ImageRegionSelectionInteractionViewModel.kt index 0c4029e940e..f0bc8727896 100644 --- a/app/src/main/java/org/oppia/android/app/player/state/itemviewmodel/ImageRegionSelectionInteractionViewModel.kt +++ b/app/src/main/java/org/oppia/android/app/player/state/itemviewmodel/ImageRegionSelectionInteractionViewModel.kt @@ -76,7 +76,7 @@ class ImageRegionSelectionInteractionViewModel private constructor( clickOnImage = parseClickOnImage(answerTextString) }.build() plainAnswer = resourceHandler.getStringInLocaleWithWrapping( - R.string.image_interaction_answer_text, + R.string.state_fragment_image_interaction_answer_text, answerTextString ) this.writtenTranslationContext = diff --git a/app/src/main/java/org/oppia/android/app/player/state/itemviewmodel/MathExpressionInteractionsViewModel.kt b/app/src/main/java/org/oppia/android/app/player/state/itemviewmodel/MathExpressionInteractionsViewModel.kt index 5d0822fae6c..88123b8412b 100644 --- a/app/src/main/java/org/oppia/android/app/player/state/itemviewmodel/MathExpressionInteractionsViewModel.kt +++ b/app/src/main/java/org/oppia/android/app/player/state/itemviewmodel/MathExpressionInteractionsViewModel.kt @@ -293,7 +293,7 @@ class MathExpressionInteractionsViewModel private constructor( /** Defines the view model behaviors corresponding to numeric expressions. */ NUMERIC_EXPRESSION( ViewType.NUMERIC_EXPRESSION_INPUT_INTERACTION, - defaultHintTextStringId = R.string.numeric_expression_default_hint_text, + defaultHintTextStringId = R.string.state_fragment_numeric_input_interaction_default_hint, hasPlaceholder = true, hasCustomVariables = false ) { @@ -332,7 +332,7 @@ class MathExpressionInteractionsViewModel private constructor( /** Defines the view model behaviors corresponding to algebraic expressions. */ ALGEBRAIC_EXPRESSION( ViewType.ALGEBRAIC_EXPRESSION_INPUT_INTERACTION, - defaultHintTextStringId = R.string.algebraic_expression_default_hint_text, + defaultHintTextStringId = R.string.state_fragment_algebraic_input_interaction_default_hint, hasPlaceholder = false, hasCustomVariables = true ) { @@ -370,7 +370,7 @@ class MathExpressionInteractionsViewModel private constructor( /** Defines the view model behaviors corresponding to math equations. */ MATH_EQUATION( ViewType.MATH_EQUATION_INPUT_INTERACTION, - defaultHintTextStringId = R.string.math_equation_default_hint_text, + defaultHintTextStringId = R.string.state_fragment_math_equation_default_hint, hasPlaceholder = false, hasCustomVariables = true ) { @@ -418,106 +418,108 @@ class MathExpressionInteractionsViewModel private constructor( is MathParsingResult.Failure -> when (val error = parseResult.error) { is DisabledVariablesInUseError -> { appLanguageResourceHandler.getStringInLocaleWithWrapping( - R.string.math_expression_error_invalid_variable, + R.string.state_fragment_math_expression_invalid_variable_error, error.variables.joinToString(separator = ", ") ) } EquationIsMissingEqualsError -> { appLanguageResourceHandler.getStringInLocale( - R.string.math_expression_error_missing_equals + R.string.state_fragment_math_expression_missing_equals_error ) } EquationHasTooManyEqualsError -> { appLanguageResourceHandler.getStringInLocale( - R.string.math_expression_error_more_than_one_equals + R.string.state_fragment_math_expression_more_than_one_equals_error ) } EquationMissingLhsOrRhsError -> { appLanguageResourceHandler.getStringInLocale( - R.string.math_expression_error_hanging_equals + R.string.state_fragment_math_expression_hanging_equals_error ) } ExponentIsVariableExpressionError -> { appLanguageResourceHandler.getStringInLocale( - R.string.math_expression_error_exponent_has_variable + R.string.state_fragment_math_expression_exponent_has_variable_error ) } ExponentTooLargeError -> { appLanguageResourceHandler.getStringInLocale( - R.string.math_expression_error_exponent_too_large + R.string.state_fragment_math_expression_exponent_too_large_error ) } FunctionNameIncompleteError -> { appLanguageResourceHandler.getStringInLocale( - R.string.math_expression_error_incomplete_function_name + R.string.state_fragment_math_expression_incomplete_function_name_error ) } GenericError -> { appLanguageResourceHandler.getStringInLocale( - R.string.math_expression_error_generic + R.string.state_fragment_math_expression_generic_error ) } HangingSquareRootError -> { appLanguageResourceHandler.getStringInLocale( - R.string.math_expression_error_hanging_square_root + R.string.state_fragment_math_expression_hanging_square_root_error ) } is InvalidFunctionInUseError -> { appLanguageResourceHandler.getStringInLocaleWithWrapping( - R.string.math_expression_error_unsupported_function, error.functionName + R.string.state_fragment_math_expression_unsupported_function_error, + error.functionName ) } is MultipleRedundantParenthesesError -> { appLanguageResourceHandler.getStringInLocaleWithWrapping( - R.string.math_expression_error_multiple_redundant_parentheses, error.rawExpression + R.string.state_fragment_math_expression_multiple_redundant_parentheses_error, + error.rawExpression ) } NestedExponentsError -> { appLanguageResourceHandler.getStringInLocale( - R.string.math_expression_error_nested_exponent + R.string.state_fragment_math_expression_nested_exponent_error ) } is NoVariableOrNumberAfterBinaryOperatorError -> when (error.operator) { UnaryOperator.ADD -> { appLanguageResourceHandler.getStringInLocaleWithWrapping( - R.string.math_expression_error_missing_rhs_for_addition_operator, + R.string.state_fragment_math_expression_missing_rhs_for_addition_error, error.operatorSymbol ) } UnaryOperator.SUBTRACT -> { appLanguageResourceHandler.getStringInLocaleWithWrapping( - R.string.math_expression_error_missing_rhs_for_subtraction_operator, + R.string.state_fragment_math_expression_missing_rhs_for_subtraction_error, error.operatorSymbol ) } UnaryOperator.MULTIPLY -> { appLanguageResourceHandler.getStringInLocaleWithWrapping( - R.string.math_expression_error_missing_rhs_for_multiplication_operator, + R.string.state_fragment_math_expression_missing_rhs_for_multiplication_error, error.operatorSymbol ) } UnaryOperator.DIVIDE -> { appLanguageResourceHandler.getStringInLocaleWithWrapping( - R.string.math_expression_error_missing_rhs_for_division_operator, + R.string.state_fragment_math_expression_missing_rhs_for_division_error, error.operatorSymbol ) } UnaryOperator.EXPONENTIATE -> { appLanguageResourceHandler.getStringInLocaleWithWrapping( - R.string.math_expression_error_missing_rhs_for_exponentiation_operator, + R.string.state_fragment_math_expression_missing_rhs_for_exponentiation_error, error.operatorSymbol ) } UnaryOperator.OPERATOR_UNSPECIFIED, UnaryOperator.UNRECOGNIZED -> { appLanguageResourceHandler.getStringInLocale( - R.string.math_expression_error_generic + R.string.state_fragment_math_expression_generic_error ) } } is NoVariableOrNumberBeforeBinaryOperatorError -> when (error.operator) { UnaryOperator.ADD -> { appLanguageResourceHandler.getStringInLocaleWithWrapping( - R.string.math_expression_error_missing_lhs_for_addition_operator, + R.string.state_fragment_math_expression_missing_lhs_for_addition_error, error.operatorSymbol ) } @@ -525,81 +527,83 @@ class MathExpressionInteractionsViewModel private constructor( UnaryOperator.SUBTRACT -> error("This case should never happen.") UnaryOperator.MULTIPLY -> { appLanguageResourceHandler.getStringInLocaleWithWrapping( - R.string.math_expression_error_missing_lhs_for_multiplication_operator, + R.string.state_fragment_math_expression_missing_lhs_for_multiplication_error, error.operatorSymbol ) } UnaryOperator.DIVIDE -> { appLanguageResourceHandler.getStringInLocaleWithWrapping( - R.string.math_expression_error_missing_lhs_for_division_operator, + R.string.state_fragment_math_expression_missing_lhs_for_division_error, error.operatorSymbol ) } UnaryOperator.EXPONENTIATE -> { appLanguageResourceHandler.getStringInLocaleWithWrapping( - R.string.math_expression_error_missing_lhs_for_exponentiation_operator, + R.string.state_fragment_math_expression_missing_lhs_for_exponentiation_error, error.operatorSymbol ) } UnaryOperator.OPERATOR_UNSPECIFIED, UnaryOperator.UNRECOGNIZED -> { appLanguageResourceHandler.getStringInLocale( - R.string.math_expression_error_generic + R.string.state_fragment_math_expression_generic_error ) } } is NumberAfterVariableError -> { appLanguageResourceHandler.getStringInLocaleWithWrapping( - R.string.math_expression_error_number_after_var_term, + R.string.state_fragment_math_expression_number_after_var_error, error.variable, error.number.toPlainText() ) } is RedundantParenthesesForIndividualTermsError -> { appLanguageResourceHandler.getStringInLocaleWithWrapping( - R.string.math_expression_error_redundant_parentheses_individual_term, + R.string.state_fragment_math_expression_individual_redundant_parentheses_error, error.rawExpression ) } is SingleRedundantParenthesesError -> { appLanguageResourceHandler.getStringInLocaleWithWrapping( - R.string.math_expression_error_single_redundant_parentheses, error.rawExpression + R.string.state_fragment_math_expression_single_redundant_parentheses_error, + error.rawExpression ) } SpacesBetweenNumbersError -> { appLanguageResourceHandler.getStringInLocale( - R.string.math_expression_error_spaces_in_numerical_input + R.string.state_fragment_math_expression_space_error ) } is SubsequentBinaryOperatorsError -> { appLanguageResourceHandler.getStringInLocaleWithWrapping( - R.string.math_expression_error_consecutive_binary_operators, + R.string.state_fragment_math_expression_consecutive_binary_operators_error, error.operator1, error.operator2 ) } is SubsequentUnaryOperatorsError -> { appLanguageResourceHandler.getStringInLocale( - R.string.math_expression_error_consecutive_unary_operators + R.string.state_fragment_math_expression_consecutive_unary_operators_error ) } TermDividedByZeroError -> { appLanguageResourceHandler.getStringInLocale( - R.string.math_expression_error_term_divided_by_zero + R.string.state_fragment_math_expression_divided_by_zero_error ) } UnbalancedParenthesesError -> { appLanguageResourceHandler.getStringInLocale( - R.string.math_expression_error_unbalanced_parentheses + R.string.state_fragment_math_expression_unbalanced_parentheses_error ) } is UnnecessarySymbolsError -> { appLanguageResourceHandler.getStringInLocaleWithWrapping( - R.string.math_expression_error_unnecessary_symbols, error.invalidSymbol + R.string.state_fragment_math_expression_unnecessary_symbols_error, + error.invalidSymbol ) } VariableInNumericExpressionError -> { appLanguageResourceHandler.getStringInLocale( - R.string.math_expression_error_variable_in_numeric_expression + R.string.state_fragment_math_expression_variable_in_numeric_error ) } } diff --git a/app/src/main/java/org/oppia/android/app/player/state/itemviewmodel/PreviousResponsesHeaderViewModel.kt b/app/src/main/java/org/oppia/android/app/player/state/itemviewmodel/PreviousResponsesHeaderViewModel.kt index 2fbdb5d1d5e..0bf4707c196 100644 --- a/app/src/main/java/org/oppia/android/app/player/state/itemviewmodel/PreviousResponsesHeaderViewModel.kt +++ b/app/src/main/java/org/oppia/android/app/player/state/itemviewmodel/PreviousResponsesHeaderViewModel.kt @@ -20,7 +20,7 @@ class PreviousResponsesHeaderViewModel( /** Returns the user-readable header text for previous responses. */ fun computePreviousResponsesHeaderText(): String { return resourceHandler.getStringInLocaleWithWrapping( - R.string.previous_responses_header, previousAnswerCount.toString() + R.string.state_fragment_previous_responses_header, previousAnswerCount.toString() ) } } diff --git a/app/src/main/java/org/oppia/android/app/player/state/itemviewmodel/SubmittedAnswerViewModel.kt b/app/src/main/java/org/oppia/android/app/player/state/itemviewmodel/SubmittedAnswerViewModel.kt index 9e90beb624e..609acecdb59 100644 --- a/app/src/main/java/org/oppia/android/app/player/state/itemviewmodel/SubmittedAnswerViewModel.kt +++ b/app/src/main/java/org/oppia/android/app/player/state/itemviewmodel/SubmittedAnswerViewModel.kt @@ -54,11 +54,11 @@ class SubmittedAnswerViewModel( val answer = if (accessibleAnswer.isNullOrBlank()) submittedAnswer else accessibleAnswer return if (isCorrectAnswer) { resourceHandler.getStringInLocaleWithWrapping( - R.string.correct_submitted_answer_with_append, answer + R.string.state_fragment_correct_submitted_answer_with_append, answer ) } else { resourceHandler.getStringInLocaleWithWrapping( - R.string.incorrect_submitted_answer_with_append, answer + R.string.state_fragment_incorrect_submitted_answer_with_append, answer ) } } diff --git a/app/src/main/java/org/oppia/android/app/player/state/itemviewmodel/TextInputViewModel.kt b/app/src/main/java/org/oppia/android/app/player/state/itemviewmodel/TextInputViewModel.kt index b3bdbba2ac0..09d93b66beb 100644 --- a/app/src/main/java/org/oppia/android/app/player/state/itemviewmodel/TextInputViewModel.kt +++ b/app/src/main/java/org/oppia/android/app/player/state/itemviewmodel/TextInputViewModel.kt @@ -90,7 +90,9 @@ class TextInputViewModel private constructor( return when { placeholder1.isNotEmpty() -> placeholder1 placeholder2.isNotEmpty() -> placeholder2 - else -> resourceHandler.getStringInLocale(R.string.text_input_default_hint_text) + else -> resourceHandler.getStringInLocale( + R.string.state_fragment_text_input_default_hint_text + ) } } diff --git a/app/src/main/java/org/oppia/android/app/player/stopplaying/ProgressDatabaseFullDialogFragment.kt b/app/src/main/java/org/oppia/android/app/player/stopplaying/ProgressDatabaseFullDialogFragment.kt index 02e34e987eb..588ba2217b7 100644 --- a/app/src/main/java/org/oppia/android/app/player/stopplaying/ProgressDatabaseFullDialogFragment.kt +++ b/app/src/main/java/org/oppia/android/app/player/stopplaying/ProgressDatabaseFullDialogFragment.kt @@ -62,26 +62,26 @@ class ProgressDatabaseFullDialogFragment : InjectableDialogFragment() { return AlertDialog .Builder(ContextThemeWrapper(activity as Context, R.style.OppiaDialogFragmentTheme)) - .setTitle(R.string.progress_database_full_dialog_title) + .setTitle(R.string.stop_exploration_dialog_progress_full_title) .setMessage( resourceHandler.getStringInLocaleWithWrapping( - R.string.progress_database_full_dialog_description, oldestSavedExplorationTitle + R.string.stop_exploration_dialog_progress_full_description, oldestSavedExplorationTitle ) ) - .setPositiveButton(R.string.progress_database_full_dialog_continue_button) { _, _ -> + .setPositiveButton(R.string.stop_exploration_dialog_progress_full_continue_button) { _, _ -> stopStatePlayingSessionListenerWithSavedProgressListener .deleteOldestProgressAndStopSession() dismiss() } .setNeutralButton( - R.string.progress_database_full_dialog_leave_without_saving_progress_button + R.string.stop_exploration_dialog_progress_full_without_saving_button ) { _, _ -> stopStatePlayingSessionListenerWithSavedProgressListener .deleteCurrentProgressAndStopSession(isCompletion = false) dismiss() } .setNegativeButton( - R.string.progress_database_full_dialog_back_to_lesson_button + R.string.stop_exploration_dialog_progress_full_back_to_lesson_button ) { _, _ -> dismiss() } diff --git a/app/src/main/java/org/oppia/android/app/player/stopplaying/StopExplorationDialogFragment.kt b/app/src/main/java/org/oppia/android/app/player/stopplaying/StopExplorationDialogFragment.kt index 61e98b2cf59..3a5ec84b328 100644 --- a/app/src/main/java/org/oppia/android/app/player/stopplaying/StopExplorationDialogFragment.kt +++ b/app/src/main/java/org/oppia/android/app/player/stopplaying/StopExplorationDialogFragment.kt @@ -39,11 +39,11 @@ class StopExplorationDialogFragment : InjectableDialogFragment() { .Builder(ContextThemeWrapper(activity as Context, R.style.OppiaDialogFragmentTheme)) .setTitle(R.string.stop_exploration_dialog_title) .setMessage(R.string.stop_exploration_dialog_description) - .setPositiveButton(R.string.stop_exploration_dialog_leave_button) { _, _ -> + .setPositiveButton(R.string.stop_exploration_dialog_leave_button_text) { _, _ -> stopStatePlayingSessionListener.stopSession() dismiss() } - .setNegativeButton(R.string.stop_exploration_dialog_cancel_button) { _, _ -> + .setNegativeButton(R.string.stop_exploration_dialog_cancel_button_text) { _, _ -> dismiss() } .create() diff --git a/app/src/main/java/org/oppia/android/app/player/stopplaying/UnsavedExplorationDialogFragment.kt b/app/src/main/java/org/oppia/android/app/player/stopplaying/UnsavedExplorationDialogFragment.kt index 3e0c190c47e..0c7d44d73bb 100644 --- a/app/src/main/java/org/oppia/android/app/player/stopplaying/UnsavedExplorationDialogFragment.kt +++ b/app/src/main/java/org/oppia/android/app/player/stopplaying/UnsavedExplorationDialogFragment.kt @@ -39,12 +39,12 @@ class UnsavedExplorationDialogFragment : InjectableDialogFragment() { .Builder(ContextThemeWrapper(activity as Context, R.style.OppiaDialogFragmentTheme)) .setTitle(R.string.unsaved_exploration_dialog_title) .setMessage(R.string.unsaved_exploration_dialog_description) - .setPositiveButton(R.string.unsaved_exploration_dialog_leave_button) { _, _ -> + .setPositiveButton(R.string.unsaved_exploration_dialog_leave_button_text) { _, _ -> stopStatePlayingSessionWithSavedProgressListener .deleteCurrentProgressAndStopSession(isCompletion = false) dismiss() } - .setNegativeButton(R.string.unsaved_exploration_dialog_cancel_button) { _, _ -> + .setNegativeButton(R.string.unsaved_exploration_dialog_cancel_button_text) { _, _ -> dismiss() } .create() diff --git a/app/src/main/java/org/oppia/android/app/policies/PoliciesActivityPresenter.kt b/app/src/main/java/org/oppia/android/app/policies/PoliciesActivityPresenter.kt index 917fe24f75a..681355aed90 100644 --- a/app/src/main/java/org/oppia/android/app/policies/PoliciesActivityPresenter.kt +++ b/app/src/main/java/org/oppia/android/app/policies/PoliciesActivityPresenter.kt @@ -44,9 +44,9 @@ class PoliciesActivityPresenter @Inject constructor( toolbar.title = when (policyPage) { PolicyPage.PRIVACY_POLICY -> - resourceHandler.getStringInLocale(R.string.privacy_policy_title) + resourceHandler.getStringInLocale(R.string.policy_activity_privacy_policy_title) PolicyPage.TERMS_OF_SERVICE -> - resourceHandler.getStringInLocale(R.string.terms_of_service_title) + resourceHandler.getStringInLocale(R.string.policy_activity_terms_of_service_title) PolicyPage.POLICY_PAGE_UNSPECIFIED, PolicyPage.UNRECOGNIZED -> "" } diff --git a/app/src/main/java/org/oppia/android/app/policies/PoliciesFragmentPresenter.kt b/app/src/main/java/org/oppia/android/app/policies/PoliciesFragmentPresenter.kt index 4fad16c9462..639008bf0b9 100644 --- a/app/src/main/java/org/oppia/android/app/policies/PoliciesFragmentPresenter.kt +++ b/app/src/main/java/org/oppia/android/app/policies/PoliciesFragmentPresenter.kt @@ -48,11 +48,11 @@ class PoliciesFragmentPresenter @Inject constructor( if (policyPage == PolicyPage.PRIVACY_POLICY) { policyDescription = resourceHandler.getStringInLocale(R.string.privacy_policy_content) - policyWebLink = resourceHandler.getStringInLocale(R.string.privacy_policy_web_link) + policyWebLink = resourceHandler.getStringInLocale(R.string.policy_activity_privacy_web_link) } else if (policyPage == PolicyPage.TERMS_OF_SERVICE) { policyDescription = resourceHandler.getStringInLocale(R.string.terms_of_service_content) - policyWebLink = resourceHandler.getStringInLocale(R.string.terms_of_service_web_link) + policyWebLink = resourceHandler.getStringInLocale(R.string.policy_activity_terms_web_link) } binding.policyDescriptionTextView.text = htmlParserFactory.create( diff --git a/app/src/main/java/org/oppia/android/app/profile/AddProfileActivityPresenter.kt b/app/src/main/java/org/oppia/android/app/profile/AddProfileActivityPresenter.kt index 75c8cc2e014..316ecf0b2cb 100644 --- a/app/src/main/java/org/oppia/android/app/profile/AddProfileActivityPresenter.kt +++ b/app/src/main/java/org/oppia/android/app/profile/AddProfileActivityPresenter.kt @@ -79,10 +79,14 @@ class AddProfileActivityPresenter @Inject constructor( } val toolbar = activity.findViewById(R.id.add_profile_activity_toolbar) as Toolbar activity.setSupportActionBar(toolbar) - activity.supportActionBar?.title = resourceHandler.getStringInLocale(R.string.add_profile_title) + activity.supportActionBar?.title = resourceHandler.getStringInLocale( + R.string.add_profile_activity_title + ) activity.supportActionBar?.setDisplayHomeAsUpEnabled(true) activity.supportActionBar?.setHomeAsUpIndicator(R.drawable.ic_close_white_24dp) - activity.supportActionBar?.setHomeActionContentDescription(R.string.admin_auth_close) + activity.supportActionBar?.setHomeActionContentDescription( + R.string.admin_auth_activity_tool_bar_content_desc + ) uploadImageView = binding.addProfileActivityUserImageView Glide.with(activity) @@ -250,7 +254,7 @@ class AddProfileActivityPresenter @Inject constructor( if (name.isEmpty()) { profileViewModel.nameErrorMsg.set( resourceHandler.getStringInLocale( - R.string.add_profile_error_name_empty + R.string.add_profile_activity_name_empty_error_text ) ) failed = true @@ -258,7 +262,7 @@ class AddProfileActivityPresenter @Inject constructor( if (pin.isNotEmpty() && pin.length < 3) { profileViewModel.pinErrorMsg.set( resourceHandler.getStringInLocale( - R.string.add_profile_error_pin_length + R.string.add_profile_activity_pin_length_error_text ) ) failed = true @@ -266,7 +270,7 @@ class AddProfileActivityPresenter @Inject constructor( if (pin != confirmPin) { profileViewModel.confirmPinErrorMsg.set( resourceHandler.getStringInLocale( - R.string.add_profile_error_pin_confirm_wrong + R.string.add_profile_activity_wrong_confirm_pin_error_text ) ) failed = true @@ -289,13 +293,13 @@ class AddProfileActivityPresenter @Inject constructor( is ProfileManagementController.ProfileNameNotUniqueException -> profileViewModel.nameErrorMsg.set( resourceHandler.getStringInLocale( - R.string.add_profile_error_name_not_unique + R.string.add_profile_activity_name_not_unique_error_text ) ) is ProfileManagementController.ProfileNameOnlyLettersException -> profileViewModel.nameErrorMsg.set( resourceHandler.getStringInLocale( - R.string.add_profile_error_name_only_letters + R.string.add_profile_activity_name_only_letters_error_text ) ) } @@ -308,8 +312,8 @@ class AddProfileActivityPresenter @Inject constructor( private fun showInfoDialog() { profileViewModel.showInfoAlertPopup.set(true) alertDialog = AlertDialog.Builder(activity as Context, R.style.OppiaAlertDialogTheme) - .setMessage(R.string.add_profile_pin_info) - .setPositiveButton(R.string.add_profile_close) { dialog, _ -> + .setMessage(R.string.add_profile_activity_pin_info_dialog_text) + .setPositiveButton(R.string.add_profile_activity_close_dialog_text) { dialog, _ -> profileViewModel.showInfoAlertPopup.set(false) dialog.dismiss() } diff --git a/app/src/main/java/org/oppia/android/app/profile/AdminAuthActivityPresenter.kt b/app/src/main/java/org/oppia/android/app/profile/AdminAuthActivityPresenter.kt index 2651603478d..9c00ce5bda9 100644 --- a/app/src/main/java/org/oppia/android/app/profile/AdminAuthActivityPresenter.kt +++ b/app/src/main/java/org/oppia/android/app/profile/AdminAuthActivityPresenter.kt @@ -96,7 +96,7 @@ class AdminAuthActivityPresenter @Inject constructor( } } else if (inputPin.length == adminPin.length) { authViewModel.errorMessage.set( - resourceHandler.getStringInLocale(R.string.admin_auth_incorrect) + resourceHandler.getStringInLocale(R.string.admin_auth_activity_incorrect_pin_label) ) } } @@ -108,21 +108,21 @@ class AdminAuthActivityPresenter @Inject constructor( activity.title = resourceHandler.getStringInLocale(R.string.admin_auth_activity_access_controls_title) binding?.adminAuthToolbar?.title = - resourceHandler.getStringInLocale(R.string.administrator_controls) + resourceHandler.getStringInLocale(R.string.administrator_controls_activity_title) binding?.adminAuthHeadingTextview?.text = - resourceHandler.getStringInLocale(R.string.admin_auth_heading) + resourceHandler.getStringInLocale(R.string.admin_auth_activity_heading_text) binding?.adminAuthSubText?.text = - resourceHandler.getStringInLocale(R.string.admin_auth_admin_controls_sub) + resourceHandler.getStringInLocale(R.string.admin_auth_activity_controls_subheading_text) } AdminAuthEnum.PROFILE_ADD_PROFILE.value -> { activity.title = resourceHandler.getStringInLocale(R.string.admin_auth_activity_add_profiles_title) binding?.adminAuthToolbar?.title = - resourceHandler.getStringInLocale(R.string.add_profile_title) + resourceHandler.getStringInLocale(R.string.add_profile_activity_title) binding?.adminAuthHeadingTextview?.text = - resourceHandler.getStringInLocale(R.string.admin_auth_heading) + resourceHandler.getStringInLocale(R.string.admin_auth_activity_heading_text) binding?.adminAuthSubText?.text = - resourceHandler.getStringInLocale(R.string.admin_auth_sub) + resourceHandler.getStringInLocale(R.string.admin_auth_activity_subheading_text) } } } diff --git a/app/src/main/java/org/oppia/android/app/profile/AdminPinActivityPresenter.kt b/app/src/main/java/org/oppia/android/app/profile/AdminPinActivityPresenter.kt index 5ab5624b99f..1eca7c634e5 100644 --- a/app/src/main/java/org/oppia/android/app/profile/AdminPinActivityPresenter.kt +++ b/app/src/main/java/org/oppia/android/app/profile/AdminPinActivityPresenter.kt @@ -45,7 +45,9 @@ class AdminPinActivityPresenter @Inject constructor( activity.setSupportActionBar(binding.adminPinToolbar) activity.supportActionBar?.setDisplayHomeAsUpEnabled(true) activity.supportActionBar?.setHomeAsUpIndicator(R.drawable.ic_close_white_24dp) - activity.supportActionBar?.setHomeActionContentDescription(R.string.admin_auth_close) + activity.supportActionBar?.setHomeActionContentDescription( + R.string.admin_auth_activity_tool_bar_content_desc + ) binding.apply { lifecycleOwner = activity @@ -95,7 +97,7 @@ class AdminPinActivityPresenter @Inject constructor( if (inputPin.length < 5) { adminViewModel.pinErrorMsg.set( resourceHandler.getStringInLocale( - R.string.admin_pin_error_pin_length + R.string.admin_pin_activity_pin_length_error ) ) failed = true @@ -103,7 +105,7 @@ class AdminPinActivityPresenter @Inject constructor( if (inputPin != confirmPin) { adminViewModel.confirmPinErrorMsg.set( resourceHandler.getStringInLocale( - R.string.admin_pin_error_pin_confirm_wrong + R.string.admin_pin_activity_wrong_pin_text ) ) failed = true diff --git a/app/src/main/java/org/oppia/android/app/profile/AdminSettingsDialogFragmentPresenter.kt b/app/src/main/java/org/oppia/android/app/profile/AdminSettingsDialogFragmentPresenter.kt index c0faded0563..1072e2ccecb 100644 --- a/app/src/main/java/org/oppia/android/app/profile/AdminSettingsDialogFragmentPresenter.kt +++ b/app/src/main/java/org/oppia/android/app/profile/AdminSettingsDialogFragmentPresenter.kt @@ -58,11 +58,11 @@ class AdminSettingsDialogFragmentPresenter @Inject constructor( } val dialog = AlertDialog.Builder(activity, R.style.OppiaAlertDialogTheme) - .setTitle(R.string.admin_settings_heading) + .setTitle(R.string.admin_settings_dialog_heading) .setView(binding.root) - .setMessage(R.string.admin_settings_sub) - .setPositiveButton(R.string.admin_settings_submit, null) - .setNegativeButton(R.string.admin_settings_cancel) { dialog, _ -> + .setMessage(R.string.admin_settings_dialog_message_text) + .setPositiveButton(R.string.admin_settings_dialog_submit_button_text, null) + .setNegativeButton(R.string.admin_settings_dialog_cancel_button_text) { dialog, _ -> dialog.dismiss() } .create() @@ -82,7 +82,7 @@ class AdminSettingsDialogFragmentPresenter @Inject constructor( if (binding.adminSettingsInputPinEditText.text?.isEmpty()!!) { adminViewModel.errorMessage.set( resourceHandler.getStringInLocale( - R.string.admin_auth_null + R.string.admin_auth_activity_null_pin_input_label ) ) return@setOnClickListener @@ -92,7 +92,7 @@ class AdminSettingsDialogFragmentPresenter @Inject constructor( } else { adminViewModel.errorMessage.set( resourceHandler.getStringInLocale( - R.string.admin_settings_incorrect + R.string.admin_settings_dialog_incorrect_pin_error_text ) ) } diff --git a/app/src/main/java/org/oppia/android/app/profile/PinPasswordActivityPresenter.kt b/app/src/main/java/org/oppia/android/app/profile/PinPasswordActivityPresenter.kt index 57c999e2586..4f4593f8241 100644 --- a/app/src/main/java/org/oppia/android/app/profile/PinPasswordActivityPresenter.kt +++ b/app/src/main/java/org/oppia/android/app/profile/PinPasswordActivityPresenter.kt @@ -32,7 +32,8 @@ class PinPasswordActivityPresenter @Inject constructor( private val viewModelProvider: ViewModelProvider, private val resourceHandler: AppLanguageResourceHandler ) { - @Inject lateinit var accessibilityService: AccessibilityService + @Inject + lateinit var accessibilityService: AccessibilityService private val pinViewModel by lazy { getPinPasswordViewModel() } @@ -103,7 +104,7 @@ class PinPasswordActivityPresenter @Inject constructor( ) } else { pinViewModel.errorMessage.set( - resourceHandler.getStringInLocale(R.string.pin_password_incorrect_pin) + resourceHandler.getStringInLocale(R.string.pin_password_activity_incorrect_pin_error) ) binding.pinPasswordInputPinEditText.startAnimation( AnimationUtils.loadAnimation( @@ -177,14 +178,16 @@ class PinPasswordActivityPresenter @Inject constructor( pinViewModel.showAdminPinForgotPasswordPopUp.set(true) val resetDataButtonText = resourceHandler.getStringInLocaleWithWrapping( - R.string.admin_forgot_pin_reset_app_data_button_text, appName + R.string.pin_password_activity_reset_app_data_button_text, appName ) alertDialog = AlertDialog.Builder(activity, R.style.OppiaAlertDialogTheme) - .setTitle(R.string.pin_password_forgot_title) + .setTitle(R.string.pin_password_activity_dialog_forgot_title) .setMessage( - resourceHandler.getStringInLocaleWithWrapping(R.string.admin_forgot_pin_message, appName) + resourceHandler.getStringInLocaleWithWrapping( + R.string.pin_password_activity_dialog_forgot_message, appName + ) ) - .setNegativeButton(R.string.admin_settings_cancel) { dialog, _ -> + .setNegativeButton(R.string.admin_settings_dialog_cancel_button_text) { dialog, _ -> pinViewModel.showAdminPinForgotPasswordPopUp.set(false) dialog.dismiss() } @@ -202,19 +205,23 @@ class PinPasswordActivityPresenter @Inject constructor( alertDialog = AlertDialog.Builder(activity, R.style.OppiaAlertDialogTheme) .setTitle( resourceHandler.getStringInLocaleWithWrapping( - R.string.admin_confirm_app_wipe_title, appName + R.string.pin_password_activity_reset_dialog_title, appName ) ) .setMessage( resourceHandler.getStringInLocaleWithWrapping( - R.string.admin_confirm_app_wipe_message, appName + R.string.pin_password_activity_reset_dialog_message, appName ) ) - .setNegativeButton(R.string.admin_confirm_app_wipe_negative_button_text) { dialog, _ -> + .setNegativeButton( + R.string.pin_password_activity_reset_dialog_negative_button_text + ) { dialog, _ -> pinViewModel.showAdminPinForgotPasswordPopUp.set(false) dialog.dismiss() } - .setPositiveButton(R.string.admin_confirm_app_wipe_positive_button_text) { dialog, _ -> + .setPositiveButton( + R.string.pin_password_activity_reset_dialog_postive_button_text + ) { dialog, _ -> profileManagementController.deleteAllProfiles().toLiveData().observe( activity, { @@ -244,8 +251,8 @@ class PinPasswordActivityPresenter @Inject constructor( private fun showSuccessDialog() { AlertDialog.Builder(activity, R.style.OppiaAlertDialogTheme) - .setMessage(R.string.pin_password_success) - .setPositiveButton(R.string.pin_password_close) { dialog, _ -> + .setMessage(R.string.pin_password_activity_success_text) + .setPositiveButton(R.string.pin_password_activity_close_text) { dialog, _ -> dialog.dismiss() }.create().show() } diff --git a/app/src/main/java/org/oppia/android/app/profile/PinPasswordViewModel.kt b/app/src/main/java/org/oppia/android/app/profile/PinPasswordViewModel.kt index a448f9d67e8..3921b20a33b 100644 --- a/app/src/main/java/org/oppia/android/app/profile/PinPasswordViewModel.kt +++ b/app/src/main/java/org/oppia/android/app/profile/PinPasswordViewModel.kt @@ -39,7 +39,9 @@ class PinPasswordViewModel @Inject constructor( val helloText: LiveData by lazy { Transformations.map(profile) { profile -> - resourceHandler.getStringInLocaleWithWrapping(R.string.pin_password_hello, profile.name) + resourceHandler.getStringInLocaleWithWrapping( + R.string.pin_password_activity_hello_text, profile.name + ) } } diff --git a/app/src/main/java/org/oppia/android/app/profile/ResetPinDialogFragmentPresenter.kt b/app/src/main/java/org/oppia/android/app/profile/ResetPinDialogFragmentPresenter.kt index bf81773b519..875df3c3bc2 100644 --- a/app/src/main/java/org/oppia/android/app/profile/ResetPinDialogFragmentPresenter.kt +++ b/app/src/main/java/org/oppia/android/app/profile/ResetPinDialogFragmentPresenter.kt @@ -66,15 +66,15 @@ class ResetPinDialogFragmentPresenter @Inject constructor( } val dialog = AlertDialog.Builder(activity, R.style.OppiaAlertDialogTheme) - .setTitle(R.string.reset_pin_enter) + .setTitle(R.string.pin_password_activity_reset_pin_dialog_title) .setView(binding.root) .setMessage( resourceHandler.getStringInLocaleWithWrapping( - R.string.reset_pin_enter_dialog_message, name + R.string.pin_password_activity_reset_pin_dialog_message, name ) ) - .setPositiveButton(R.string.admin_settings_submit, null) - .setNegativeButton(R.string.admin_settings_cancel) { dialog, _ -> + .setPositiveButton(R.string.admin_settings_dialog_submit_button_text, null) + .setNegativeButton(R.string.admin_settings_dialog_cancel_button_text) { dialog, _ -> dialog.dismiss() } .create() @@ -108,7 +108,7 @@ class ResetPinDialogFragmentPresenter @Inject constructor( } else { resetViewModel.errorMessage.set( resourceHandler.getStringInLocale( - R.string.add_profile_error_pin_length + R.string.add_profile_activity_pin_length_error_text ) ) } diff --git a/app/src/main/java/org/oppia/android/app/profile/ResetPinViewModel.kt b/app/src/main/java/org/oppia/android/app/profile/ResetPinViewModel.kt index 234a30a9f3c..b59a63abc92 100644 --- a/app/src/main/java/org/oppia/android/app/profile/ResetPinViewModel.kt +++ b/app/src/main/java/org/oppia/android/app/profile/ResetPinViewModel.kt @@ -25,7 +25,7 @@ class ResetPinViewModel @Inject constructor( private fun computeResetPinInputPinHint(name: String): String { return resourceHandler.getStringInLocaleWithWrapping( - R.string.admin_settings_enter_user_new_pin, name + R.string.admin_settings_dialog_new_pin_text, name ) } } diff --git a/app/src/main/java/org/oppia/android/app/profileprogress/ProfilePictureEditDialogFragment.kt b/app/src/main/java/org/oppia/android/app/profileprogress/ProfilePictureEditDialogFragment.kt index f17a841929d..3b9331e94b0 100644 --- a/app/src/main/java/org/oppia/android/app/profileprogress/ProfilePictureEditDialogFragment.kt +++ b/app/src/main/java/org/oppia/android/app/profileprogress/ProfilePictureEditDialogFragment.kt @@ -54,9 +54,9 @@ class ProfilePictureEditDialogFragment : InjectableDialogFragment() { } return AlertDialog .Builder(ContextThemeWrapper(activity as Context, R.style.OppiaDialogFragmentTheme)) - .setTitle(R.string.profile_progress_edit_dialog_title) + .setTitle(R.string.profile_picture_edit_dialog_title) .setView(view) - .setNegativeButton(R.string.profile_picture_edit_alert_dialog_cancel_button) { _, _ -> + .setNegativeButton(R.string.profile_picture_edit_dialog_cancel_button_text) { _, _ -> dismiss() } .create() diff --git a/app/src/main/java/org/oppia/android/app/profileprogress/ProfileProgressActivityPresenter.kt b/app/src/main/java/org/oppia/android/app/profileprogress/ProfileProgressActivityPresenter.kt index 562e38f3d9f..dcb48a74ebc 100644 --- a/app/src/main/java/org/oppia/android/app/profileprogress/ProfileProgressActivityPresenter.kt +++ b/app/src/main/java/org/oppia/android/app/profileprogress/ProfileProgressActivityPresenter.kt @@ -36,7 +36,7 @@ class ProfileProgressActivityPresenter @Inject constructor( R.id.profile_progress_activity_toolbar ) as Toolbar activity.setSupportActionBar(toolbar) - (activity.supportActionBar ?: return).setTitle(R.string.profile) + (activity.supportActionBar ?: return).setTitle(R.string.profile_progress_activity_profile_title) (activity.supportActionBar ?: return).setDisplayShowHomeEnabled(true) (activity.supportActionBar ?: return).setDisplayHomeAsUpEnabled(true) toolbar.setNavigationOnClickListener { diff --git a/app/src/main/java/org/oppia/android/app/profileprogress/RecentlyPlayedStorySummaryViewModel.kt b/app/src/main/java/org/oppia/android/app/profileprogress/RecentlyPlayedStorySummaryViewModel.kt index fabe3eb83dc..940ba45f21a 100644 --- a/app/src/main/java/org/oppia/android/app/profileprogress/RecentlyPlayedStorySummaryViewModel.kt +++ b/app/src/main/java/org/oppia/android/app/profileprogress/RecentlyPlayedStorySummaryViewModel.kt @@ -40,7 +40,7 @@ class RecentlyPlayedStorySummaryViewModel( fun computeLessonThumbnailContentDescription(): String { return resourceHandler.getStringInLocaleWithWrapping( - R.string.lesson_thumbnail_content_description, nextChapterTitle + R.string.home_activity_lesson_thumbnail_description, nextChapterTitle ) } diff --git a/app/src/main/java/org/oppia/android/app/settings/profile/ProfileEditDeletionDialogFragment.kt b/app/src/main/java/org/oppia/android/app/settings/profile/ProfileEditDeletionDialogFragment.kt index 27b1914a650..23917136ef0 100644 --- a/app/src/main/java/org/oppia/android/app/settings/profile/ProfileEditDeletionDialogFragment.kt +++ b/app/src/main/java/org/oppia/android/app/settings/profile/ProfileEditDeletionDialogFragment.kt @@ -48,12 +48,12 @@ class ProfileEditDeletionDialogFragment : InjectableDialogFragment() { parentFragment as ProfileEditFragment val alertDialog = AlertDialog.Builder(activity as Context, R.style.OppiaAlertDialogTheme) - .setTitle(R.string.profile_edit_delete_dialog_title) - .setMessage(R.string.profile_edit_delete_dialog_message) - .setNegativeButton(R.string.profile_edit_delete_dialog_negative) { dialog, _ -> + .setTitle(R.string.profile_edit_activity_dialog_title) + .setMessage(R.string.profile_edit_activity_dialog_message) + .setNegativeButton(R.string.profile_edit_activity_dialog_negative_button) { dialog, _ -> dialog.dismiss() } - .setPositiveButton(R.string.profile_edit_delete_dialog_positive) { dialog, _ -> + .setPositiveButton(R.string.profile_edit_activity_dialog_positive_button) { dialog, _ -> profileEditDialogInterface.deleteProfileByInternalProfileId(internalProfileId) } .create() diff --git a/app/src/main/java/org/oppia/android/app/settings/profile/ProfileRenameFragmentPresenter.kt b/app/src/main/java/org/oppia/android/app/settings/profile/ProfileRenameFragmentPresenter.kt index 6350c2e4581..4ec0d2e7116 100644 --- a/app/src/main/java/org/oppia/android/app/settings/profile/ProfileRenameFragmentPresenter.kt +++ b/app/src/main/java/org/oppia/android/app/settings/profile/ProfileRenameFragmentPresenter.kt @@ -57,7 +57,7 @@ class ProfileRenameFragmentPresenter @Inject constructor( .nameErrorMsg .set( resourceHandler.getStringInLocale( - R.string.add_profile_error_name_empty + R.string.add_profile_activity_name_empty_error_text ) ) return@setOnClickListener @@ -110,13 +110,13 @@ class ProfileRenameFragmentPresenter @Inject constructor( is ProfileManagementController.ProfileNameNotUniqueException -> renameViewModel.nameErrorMsg.set( resourceHandler.getStringInLocale( - R.string.add_profile_error_name_not_unique + R.string.add_profile_activity_name_not_unique_error_text ) ) is ProfileManagementController.ProfileNameOnlyLettersException -> renameViewModel.nameErrorMsg.set( resourceHandler.getStringInLocale( - R.string.add_profile_error_name_only_letters + R.string.add_profile_activity_name_only_letters_error_text ) ) } diff --git a/app/src/main/java/org/oppia/android/app/settings/profile/ProfileResetPinFragmentPresenter.kt b/app/src/main/java/org/oppia/android/app/settings/profile/ProfileResetPinFragmentPresenter.kt index b4afe1d73e1..d2286eadd1a 100644 --- a/app/src/main/java/org/oppia/android/app/settings/profile/ProfileResetPinFragmentPresenter.kt +++ b/app/src/main/java/org/oppia/android/app/settings/profile/ProfileResetPinFragmentPresenter.kt @@ -103,7 +103,7 @@ class ProfileResetPinFragmentPresenter @Inject constructor( if (pin.length < 5) { viewModel.pinErrorMsg.set( resourceHandler.getStringInLocale( - R.string.profile_reset_pin_error_admin_pin_length + R.string.profile_reset_pin_fragment_error_admin_pin_length ) ) failed = true @@ -112,7 +112,7 @@ class ProfileResetPinFragmentPresenter @Inject constructor( if (pin.length < 3) { viewModel.pinErrorMsg.set( resourceHandler.getStringInLocale( - R.string.profile_reset_pin_error_user_pin_length + R.string.profile_reset_pin_fragment_error_user_pin_length ) ) failed = true @@ -121,7 +121,7 @@ class ProfileResetPinFragmentPresenter @Inject constructor( if (pin != confirmPin) { viewModel.confirmErrorMsg.set( resourceHandler.getStringInLocale( - R.string.add_profile_error_pin_confirm_wrong + R.string.add_profile_activity_wrong_confirm_pin_error_text ) ) failed = true diff --git a/app/src/main/java/org/oppia/android/app/story/StoryFragmentPresenter.kt b/app/src/main/java/org/oppia/android/app/story/StoryFragmentPresenter.kt index 2433999b826..86c2ddc76a6 100644 --- a/app/src/main/java/org/oppia/android/app/story/StoryFragmentPresenter.kt +++ b/app/src/main/java/org/oppia/android/app/story/StoryFragmentPresenter.kt @@ -183,7 +183,7 @@ class StoryFragmentPresenter @Inject constructor( == ChapterPlayState.NOT_PLAYABLE_MISSING_PREREQUISITES ) { val missingPrerequisiteSummary = resourceHandler.getStringInLocaleWithWrapping( - R.string.chapter_prerequisite_title_label, + R.string.topic_fragment_lessons_chapter_prerequisite_label, storyItemViewModel.index.toString(), storyItemViewModel.missingPrerequisiteChapterTitle ) diff --git a/app/src/main/java/org/oppia/android/app/story/storyitemviewmodel/StoryChapterSummaryViewModel.kt b/app/src/main/java/org/oppia/android/app/story/storyitemviewmodel/StoryChapterSummaryViewModel.kt index 746af71c90b..8971a1ea1ac 100644 --- a/app/src/main/java/org/oppia/android/app/story/storyitemviewmodel/StoryChapterSummaryViewModel.kt +++ b/app/src/main/java/org/oppia/android/app/story/storyitemviewmodel/StoryChapterSummaryViewModel.kt @@ -120,7 +120,7 @@ class StoryChapterSummaryViewModel( chapterSummary.title, ephemeralChapterSummary.writtenTranslationContext ) return resourceHandler.getStringInLocaleWithWrapping( - R.string.chapter_name, (index + 1).toString(), title + R.string.topic_fragment_lessons_chapter_play_name_text, (index + 1).toString(), title ) } } diff --git a/app/src/main/java/org/oppia/android/app/survey/SurveyOutroDialogFragmentPresenter.kt b/app/src/main/java/org/oppia/android/app/survey/SurveyOutroDialogFragmentPresenter.kt index 8399bb9a0e5..01b5a4d9721 100644 --- a/app/src/main/java/org/oppia/android/app/survey/SurveyOutroDialogFragmentPresenter.kt +++ b/app/src/main/java/org/oppia/android/app/survey/SurveyOutroDialogFragmentPresenter.kt @@ -38,7 +38,7 @@ class SurveyOutroDialogFragmentPresenter @Inject constructor( val appName = resourceHandler.getStringInLocale(R.string.app_name) binding.surveyOnboardingText.text = resourceHandler.getStringInLocaleWithWrapping( - R.string.survey_thank_you_message_text, appName + R.string.survey_activity_outer_dialog_thank_you_message, appName ) binding.finishSurveyButton.setOnClickListener { diff --git a/app/src/main/java/org/oppia/android/app/survey/SurveyViewModel.kt b/app/src/main/java/org/oppia/android/app/survey/SurveyViewModel.kt index 0979177affe..58e398774da 100644 --- a/app/src/main/java/org/oppia/android/app/survey/SurveyViewModel.kt +++ b/app/src/main/java/org/oppia/android/app/survey/SurveyViewModel.kt @@ -68,22 +68,22 @@ class SurveyViewModel @Inject constructor( val appName = resourceHandler.getStringInLocale(R.string.app_name) return when (questionName) { SurveyQuestionName.USER_TYPE -> resourceHandler.getStringInLocale( - R.string.user_type_question + R.string.survey_fragment_user_type_question ) SurveyQuestionName.MARKET_FIT -> resourceHandler.getStringInLocaleWithWrapping( - R.string.market_fit_question, appName + R.string.survey_fragment_market_fit_question, appName ) SurveyQuestionName.NPS -> resourceHandler.getStringInLocaleWithWrapping( - R.string.nps_score_question, appName + R.string.survey_fragment_nps_score_question, appName ) SurveyQuestionName.PROMOTER_FEEDBACK -> resourceHandler.getStringInLocaleWithWrapping( - R.string.nps_promoter_feedback_question, appName + R.string.survey_fragment_nps_promoter_feedback_question, appName ) SurveyQuestionName.PASSIVE_FEEDBACK -> resourceHandler.getStringInLocaleWithWrapping( - R.string.nps_passive_feedback_question + R.string.survey_fragment_nps_passive_feedback_question ) SurveyQuestionName.DETRACTOR_FEEDBACK -> resourceHandler.getStringInLocaleWithWrapping( - R.string.nps_detractor_feedback_question + R.string.survey_fragment_nps_detractor_feedback_question ) SurveyQuestionName.UNRECOGNIZED, SurveyQuestionName.QUESTION_NAME_UNSPECIFIED -> DEFAULT_QUESTION diff --git a/app/src/main/java/org/oppia/android/app/survey/surveyitemviewmodel/MarketFitItemsViewModel.kt b/app/src/main/java/org/oppia/android/app/survey/surveyitemviewmodel/MarketFitItemsViewModel.kt index e2b7fe43a5e..eb6a577f0e8 100644 --- a/app/src/main/java/org/oppia/android/app/survey/surveyitemviewmodel/MarketFitItemsViewModel.kt +++ b/app/src/main/java/org/oppia/android/app/survey/surveyitemviewmodel/MarketFitItemsViewModel.kt @@ -104,7 +104,7 @@ class MarketFitItemsViewModel @Inject constructor( when (marketFitAnswer) { MarketFitAnswer.VERY_DISAPPOINTED -> MultipleChoiceOptionContentViewModel( resourceHandler.getStringInLocale( - R.string.market_fit_answer_very_disappointed + R.string.survey_fragment_market_fit_answer_very_disappointed ), index, this @@ -112,7 +112,7 @@ class MarketFitItemsViewModel @Inject constructor( MarketFitAnswer.DISAPPOINTED -> MultipleChoiceOptionContentViewModel( resourceHandler.getStringInLocale( - R.string.market_fit_answer_somewhat_disappointed + R.string.survey_fragment_market_fit_answer_somewhat_disappointed ), index, this @@ -120,7 +120,7 @@ class MarketFitItemsViewModel @Inject constructor( MarketFitAnswer.NOT_DISAPPOINTED -> MultipleChoiceOptionContentViewModel( resourceHandler.getStringInLocale( - R.string.market_fit_answer_not_disappointed + R.string.survey_fragment_market_fit_answer_not_disappointed ), index, this @@ -129,7 +129,7 @@ class MarketFitItemsViewModel @Inject constructor( MarketFitAnswer.NOT_APPLICABLE_WONT_USE_OPPIA_ANYMORE -> MultipleChoiceOptionContentViewModel( resourceHandler.getStringInLocaleWithWrapping( - R.string.market_fit_answer_wont_use_oppia, + R.string.survey_fragment_market_fit_answer_wont_use_oppia, appName ), index, diff --git a/app/src/main/java/org/oppia/android/app/survey/surveyitemviewmodel/UserTypeItemsViewModel.kt b/app/src/main/java/org/oppia/android/app/survey/surveyitemviewmodel/UserTypeItemsViewModel.kt index 14482c2775e..76cb92c59a1 100644 --- a/app/src/main/java/org/oppia/android/app/survey/surveyitemviewmodel/UserTypeItemsViewModel.kt +++ b/app/src/main/java/org/oppia/android/app/survey/surveyitemviewmodel/UserTypeItemsViewModel.kt @@ -104,14 +104,14 @@ class UserTypeItemsViewModel @Inject constructor( UserTypeAnswer.LEARNER -> MultipleChoiceOptionContentViewModel( resourceHandler.getStringInLocale( - R.string.user_type_answer_learner + R.string.survey_fragment_user_type_answer_learner ), index, this ) UserTypeAnswer.TEACHER -> MultipleChoiceOptionContentViewModel( resourceHandler.getStringInLocale( - R.string.user_type_answer_teacher + R.string.survey_fragment_user_type_answer_teacher ), index, this @@ -120,7 +120,7 @@ class UserTypeItemsViewModel @Inject constructor( UserTypeAnswer.PARENT -> MultipleChoiceOptionContentViewModel( resourceHandler.getStringInLocale( - R.string.user_type_answer_parent + R.string.survey_fragment_user_type_answer_parent ), index, this @@ -129,7 +129,7 @@ class UserTypeItemsViewModel @Inject constructor( UserTypeAnswer.OTHER -> MultipleChoiceOptionContentViewModel( resourceHandler.getStringInLocale( - R.string.user_type_answer_other + R.string.survey_fragment_user_type_answer_other ), index, this diff --git a/app/src/main/java/org/oppia/android/app/topic/TopicFragmentPresenter.kt b/app/src/main/java/org/oppia/android/app/topic/TopicFragmentPresenter.kt index b7bb9548635..c423ded10f7 100644 --- a/app/src/main/java/org/oppia/android/app/topic/TopicFragmentPresenter.kt +++ b/app/src/main/java/org/oppia/android/app/topic/TopicFragmentPresenter.kt @@ -89,7 +89,7 @@ class TopicFragmentPresenter @Inject constructor( lessonsTabView?.let { lessonsTabView -> val lessonsTabSpotlightTarget = SpotlightTarget( lessonsTabView, - resourceHandler.getStringInLocale(R.string.topic_lessons_tab_spotlight_hint), + resourceHandler.getStringInLocale(R.string.topic_fragment_lessons_tab_spotlight_hint), SpotlightShape.RoundedRectangle, Spotlight.FeatureCase.TOPIC_LESSON_TAB ) @@ -99,7 +99,9 @@ class TopicFragmentPresenter @Inject constructor( val revisionTabView = tabLayout.getTabAt(computeTabPosition(TopicTab.REVISION))?.view val revisionTabSpotlightTarget = SpotlightTarget( revisionTabView!!, - resourceHandler.getStringInLocale(R.string.topic_revision_tab_spotlight_hint), + resourceHandler.getStringInLocale( + R.string.topic_fragment_revision_tab_spotlight_hint + ), SpotlightShape.RoundedRectangle, Spotlight.FeatureCase.TOPIC_REVISION_TAB ) diff --git a/app/src/main/java/org/oppia/android/app/topic/TopicTab.kt b/app/src/main/java/org/oppia/android/app/topic/TopicTab.kt index 3fbcead8bb6..117b868e322 100644 --- a/app/src/main/java/org/oppia/android/app/topic/TopicTab.kt +++ b/app/src/main/java/org/oppia/android/app/topic/TopicTab.kt @@ -15,30 +15,30 @@ enum class TopicTab( INFO( positionWithTwoTabs = -1, positionWithFourTabs = 0, - tabLabelResId = R.string.info, + tabLabelResId = R.string.topic_fragment_info, tabIconResId = R.drawable.ic_info_icon_24dp, - contentDescriptionResId = R.string.info_tab_content_description + contentDescriptionResId = R.string.topic_fragment_info_tab_content_description ), LESSONS( positionWithTwoTabs = 0, positionWithFourTabs = 1, - tabLabelResId = R.string.lessons, + tabLabelResId = R.string.topic_fragment_lessons, tabIconResId = R.drawable.ic_lessons_icon_24dp, - contentDescriptionResId = R.string.lessons_tab_content_description + contentDescriptionResId = R.string.topic_fragment_lessons_tab_content_description ), PRACTICE( positionWithTwoTabs = -1, positionWithFourTabs = 2, - tabLabelResId = R.string.practice, + tabLabelResId = R.string.topic_fragment_practice, tabIconResId = R.drawable.ic_practice_icon_24dp, - contentDescriptionResId = R.string.practice_tab_content_description + contentDescriptionResId = R.string.topic_fragment_practice_tab_content_description ), REVISION( positionWithTwoTabs = 1, positionWithFourTabs = 3, - tabLabelResId = R.string.revision, + tabLabelResId = R.string.topic_fragment_revision, tabIconResId = R.drawable.ic_revision_icon_24dp, - contentDescriptionResId = R.string.revision_tab_content_description + contentDescriptionResId = R.string.topic_fragment_revision_tab_content_description ); companion object { diff --git a/app/src/main/java/org/oppia/android/app/topic/TopicViewModel.kt b/app/src/main/java/org/oppia/android/app/topic/TopicViewModel.kt index 5febc7267c4..baf2c2ff9d3 100644 --- a/app/src/main/java/org/oppia/android/app/topic/TopicViewModel.kt +++ b/app/src/main/java/org/oppia/android/app/topic/TopicViewModel.kt @@ -79,7 +79,7 @@ class TopicViewModel @Inject constructor( translationController.extractString( ephemeralTopic.topic.title, ephemeralTopic.writtenTranslationContext ) - resourceHandler.getStringInLocaleWithWrapping(R.string.topic_name, topicTitle) + resourceHandler.getStringInLocaleWithWrapping(R.string.topic_fragment_name_text, topicTitle) } } diff --git a/app/src/main/java/org/oppia/android/app/topic/conceptcard/ConceptCardFragmentPresenter.kt b/app/src/main/java/org/oppia/android/app/topic/conceptcard/ConceptCardFragmentPresenter.kt index b33e85cba61..5660c2e082e 100644 --- a/app/src/main/java/org/oppia/android/app/topic/conceptcard/ConceptCardFragmentPresenter.kt +++ b/app/src/main/java/org/oppia/android/app/topic/conceptcard/ConceptCardFragmentPresenter.kt @@ -57,7 +57,7 @@ class ConceptCardFragmentPresenter @Inject constructor( binding.conceptCardToolbar.setNavigationIcon(R.drawable.ic_close_white_24dp) binding.conceptCardToolbar.setNavigationContentDescription( - R.string.navigate_up + R.string.navigate_up_text ) binding.conceptCardToolbar.setNavigationOnClickListener { (fragment.requireActivity() as? ConceptCardListener)?.dismissConceptCard() diff --git a/app/src/main/java/org/oppia/android/app/topic/info/TopicInfoViewModel.kt b/app/src/main/java/org/oppia/android/app/topic/info/TopicInfoViewModel.kt index edc1f4f38c2..7ef36615ca9 100644 --- a/app/src/main/java/org/oppia/android/app/topic/info/TopicInfoViewModel.kt +++ b/app/src/main/java/org/oppia/android/app/topic/info/TopicInfoViewModel.kt @@ -76,7 +76,9 @@ class TopicInfoViewModel @Inject constructor( } } ?: resourceHandler.getStringInLocale(R.string.unknown_size) topicSizeText.set( - resourceHandler.getStringInLocaleWithWrapping(R.string.topic_download_text, sizeWithUnit) + resourceHandler.getStringInLocaleWithWrapping( + R.string.topic_fragment_download_text, sizeWithUnit + ) ) } diff --git a/app/src/main/java/org/oppia/android/app/topic/lessons/ChapterSummaryViewModel.kt b/app/src/main/java/org/oppia/android/app/topic/lessons/ChapterSummaryViewModel.kt index 857bf87d91a..0d85cb8ffc9 100644 --- a/app/src/main/java/org/oppia/android/app/topic/lessons/ChapterSummaryViewModel.kt +++ b/app/src/main/java/org/oppia/android/app/topic/lessons/ChapterSummaryViewModel.kt @@ -27,13 +27,15 @@ class ChapterSummaryViewModel( return when (chapterPlayState) { ChapterPlayState.COMPLETED -> { resourceHandler.getStringInLocaleWithWrapping( - R.string.chapter_completed, (index + 1).toString(), chapterTitle + R.string.topic_fragment_lessons_chapter_completed_text, + (index + 1).toString(), + chapterTitle ) } ChapterPlayState.NOT_PLAYABLE_MISSING_PREREQUISITES -> { if (previousChapterTitle != null) { resourceHandler.getStringInLocaleWithWrapping( - R.string.chapter_locked_prerequisite_title_label, + R.string.topic_fragment_lessons_chapter_locked_prerequisite_label, (index + 1).toString(), chapterTitle, index.toString(), @@ -41,13 +43,15 @@ class ChapterSummaryViewModel( ) } else { resourceHandler.getStringInLocaleWithWrapping( - R.string.chapter_prerequisite_title_label_without_chapter_title + R.string.topic_fragment_lessons_without_chapter_prerequisite_label ) } } else -> { resourceHandler.getStringInLocaleWithWrapping( - R.string.chapter_in_progress, (index + 1).toString(), chapterTitle + R.string.topic_fragment_lessons_chapter_in_progress_text, + (index + 1).toString(), + chapterTitle ) } } @@ -55,7 +59,7 @@ class ChapterSummaryViewModel( fun computePlayChapterIndexText(): String { return resourceHandler.getStringInLocaleWithWrapping( - R.string.topic_play_chapter_index, (index + 1).toString() + R.string.topic_fragment_lessons_chapter_play_index, (index + 1).toString() ) } } diff --git a/app/src/main/java/org/oppia/android/app/topic/lessons/StorySummaryViewModel.kt b/app/src/main/java/org/oppia/android/app/topic/lessons/StorySummaryViewModel.kt index 6e0ef58019f..93cc3805a04 100644 --- a/app/src/main/java/org/oppia/android/app/topic/lessons/StorySummaryViewModel.kt +++ b/app/src/main/java/org/oppia/android/app/topic/lessons/StorySummaryViewModel.kt @@ -55,16 +55,16 @@ class StorySummaryViewModel( fun computeProgressContainerContentDescription(): String { return if (storyPercentage.get()!! < 100) { "${storyProgressPercentageText.get()} " + - resourceHandler.getStringInLocale(R.string.status_in_progress) + resourceHandler.getStringInLocale(R.string.topic_fragment_lessons_story_status_in_progress) } else { "${storyProgressPercentageText.get()} " + - resourceHandler.getStringInLocale(R.string.status_completed) + resourceHandler.getStringInLocale(R.string.topic_fragment_lessons_story_status_completed) } } private fun computeStoryProgressPercentageText(storyPercentage: Int): String { return resourceHandler.getStringInLocaleWithWrapping( - R.string.topic_story_progress_percentage, storyPercentage.toString() + R.string.topic_fragment_lessons_story_progress_percentage, storyPercentage.toString() ) } diff --git a/app/src/main/java/org/oppia/android/app/topic/questionplayer/QuestionPlayerViewModel.kt b/app/src/main/java/org/oppia/android/app/topic/questionplayer/QuestionPlayerViewModel.kt index ee470eb7b66..65549025c84 100644 --- a/app/src/main/java/org/oppia/android/app/topic/questionplayer/QuestionPlayerViewModel.kt +++ b/app/src/main/java/org/oppia/android/app/topic/questionplayer/QuestionPlayerViewModel.kt @@ -82,10 +82,12 @@ class QuestionPlayerViewModel @Inject constructor( isAtEndOfSession: Boolean ): String { return if (isAtEndOfSession) { - resourceHandler.getStringInLocale(R.string.question_training_session_progress_finished) + resourceHandler.getStringInLocale( + R.string.topic_fragment_question_training_session_progress_finished + ) } else { resourceHandler.getStringInLocaleWithWrapping( - R.string.question_training_session_progress, + R.string.topic_fragment_question_training_session_progress, currentQuestion.toString(), questionCount.toString() ) diff --git a/app/src/main/java/org/oppia/android/app/topic/revisioncard/RevisionCardViewModel.kt b/app/src/main/java/org/oppia/android/app/topic/revisioncard/RevisionCardViewModel.kt index 3f0ef5010d3..80789cc8dbd 100755 --- a/app/src/main/java/org/oppia/android/app/topic/revisioncard/RevisionCardViewModel.kt +++ b/app/src/main/java/org/oppia/android/app/topic/revisioncard/RevisionCardViewModel.kt @@ -107,11 +107,11 @@ class RevisionCardViewModel private constructor( fun computeContentDescriptionText(subtopicLiveData: LiveData): String { return when (subtopicLiveData) { previousSubtopicLiveData -> appLanguageResourceHandler.getStringInLocaleWithWrapping( - R.string.previous_subtopic_talkback_text, + R.string.topic_fragment_revision_previous_subtopic_talkback_text, computeTitleText(previousSubtopicLiveData.value) ) nextSubtopicLiveData -> appLanguageResourceHandler.getStringInLocaleWithWrapping( - R.string.next_subtopic_talkback_text, + R.string.topic_fragment_revision_next_subtopic_talkback_text, computeTitleText(nextSubtopicLiveData.value) ) else -> "" diff --git a/app/src/main/java/org/oppia/android/app/utility/datetime/DateTimeUtil.kt b/app/src/main/java/org/oppia/android/app/utility/datetime/DateTimeUtil.kt index 43fb02e01c0..b3b9338e1c5 100644 --- a/app/src/main/java/org/oppia/android/app/utility/datetime/DateTimeUtil.kt +++ b/app/src/main/java/org/oppia/android/app/utility/datetime/DateTimeUtil.kt @@ -18,13 +18,13 @@ class DateTimeUtil @Inject constructor( return when (machineLocale.getCurrentTimeOfDay()) { OppiaLocale.MachineLocale.TimeOfDay.MID_MORNING, OppiaLocale.MachineLocale.TimeOfDay.EARLY_MORNING -> - resourceHandler.getStringInLocale(R.string.home_screen_good_morning_greeting_fragment) + resourceHandler.getStringInLocale(R.string.home_activity_good_morning_greeting_text) OppiaLocale.MachineLocale.TimeOfDay.AFTERNOON -> - resourceHandler.getStringInLocale(R.string.home_screen_good_afternoon_greeting_fragment) + resourceHandler.getStringInLocale(R.string.home_activity_good_afternoon_greeting_text) OppiaLocale.MachineLocale.TimeOfDay.EVENING, OppiaLocale.MachineLocale.TimeOfDay.UNKNOWN, OppiaLocale.MachineLocale.TimeOfDay.LATE_NIGHT -> - resourceHandler.getStringInLocale(R.string.home_screen_good_evening_greeting_fragment) + resourceHandler.getStringInLocale(R.string.home_activity_good_evening_greeting_text) } } diff --git a/app/src/main/java/org/oppia/android/app/walkthrough/end/WalkthroughFinalFragmentPresenter.kt b/app/src/main/java/org/oppia/android/app/walkthrough/end/WalkthroughFinalFragmentPresenter.kt index 1b2658ba0ff..88e9bd7b9ee 100644 --- a/app/src/main/java/org/oppia/android/app/walkthrough/end/WalkthroughFinalFragmentPresenter.kt +++ b/app/src/main/java/org/oppia/android/app/walkthrough/end/WalkthroughFinalFragmentPresenter.kt @@ -79,7 +79,7 @@ class WalkthroughFinalFragmentPresenter @Inject constructor( if (::walkthroughFinalViewModel.isInitialized && ::topicName.isInitialized) { walkthroughFinalViewModel.topicTitle.set( resourceHandler.getStringInLocaleWithWrapping( - R.string.are_you_interested, + R.string.walkthrough_activity_are_you_interested_text, topicName ) ) diff --git a/app/src/main/java/org/oppia/android/app/walkthrough/welcome/WalkthroughWelcomeFragmentPresenter.kt b/app/src/main/java/org/oppia/android/app/walkthrough/welcome/WalkthroughWelcomeFragmentPresenter.kt index 3c49e08cbc1..25bd988b277 100644 --- a/app/src/main/java/org/oppia/android/app/walkthrough/welcome/WalkthroughWelcomeFragmentPresenter.kt +++ b/app/src/main/java/org/oppia/android/app/walkthrough/welcome/WalkthroughWelcomeFragmentPresenter.kt @@ -102,7 +102,9 @@ class WalkthroughWelcomeFragmentPresenter @Inject constructor( private fun setProfileName() { if (::walkthroughWelcomeViewModel.isInitialized && ::profileName.isInitialized) { walkthroughWelcomeViewModel.profileName.set( - resourceHandler.getStringInLocaleWithWrapping(R.string.welcome, profileName) + resourceHandler.getStringInLocaleWithWrapping( + R.string.walkthrough_activity_welcome_text, profileName + ) ) } } diff --git a/app/src/main/res/layout-land/onboarding_fragment.xml b/app/src/main/res/layout-land/onboarding_fragment.xml index 5b7c6f69e9b..55483cda7c6 100644 --- a/app/src/main/res/layout-land/onboarding_fragment.xml +++ b/app/src/main/res/layout-land/onboarding_fragment.xml @@ -41,7 +41,7 @@ android:minWidth="48dp" android:minHeight="48dp" android:onClick="@{(v) -> presenter.clickOnSkip()}" - android:text="@string/skip" + android:text="@string/onboarding_activity_skip_text" android:textAllCaps="true" android:textColor="@color/component_color_shared_primary_text_color" android:visibility="@{viewModel.slideNumber != 3 ? View.VISIBLE: View.GONE, default=visible}" @@ -66,7 +66,7 @@ android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginEnd="12dp" - android:contentDescription="@string/next_arrow" + android:contentDescription="@string/onboarding_activity_next_arrow_text" android:gravity="center" android:minWidth="48dp" android:minHeight="48dp" diff --git a/app/src/main/res/layout-land/onboarding_slide_final.xml b/app/src/main/res/layout-land/onboarding_slide_final.xml index a62021edc69..30450646095 100644 --- a/app/src/main/res/layout-land/onboarding_slide_final.xml +++ b/app/src/main/res/layout-land/onboarding_slide_final.xml @@ -44,7 +44,7 @@ android:layout_marginTop="80dp" android:layout_marginEnd="28dp" android:fontFamily="sans-serif-medium" - android:text="@string/onboarding_slide_3_title" + android:text="@string/onboarding_activity_slide_3_title" android:textColor="@color/component_color_shared_primary_text_color" app:layout_constraintEnd_toEndOf="parent" app:layout_constraintHorizontal_bias="1.0" @@ -58,7 +58,7 @@ android:layout_marginStart="20dp" android:layout_marginTop="16dp" android:layout_marginEnd="40dp" - android:text="@string/onboarding_slide_3_description" + android:text="@string/onboarding_activity_slide_3_description" android:textColor="@color/component_color_shared_secondary_1_text_color" app:layout_constraintEnd_toEndOf="parent" app:layout_constraintHorizontal_bias="0.0" @@ -76,7 +76,7 @@ android:fontFamily="sans-serif-medium" android:minHeight="48dp" android:onClick="@{(v) -> viewModel.clickOnGetStarted()}" - android:text="@string/get_started" + android:text="@string/onboarding_activity_get_started_text" android:textColor="@color/component_color_shared_secondary_4_text_color" android:textSize="14sp" android:textAllCaps="false" diff --git a/app/src/main/res/layout-land/profile_chooser_add_view.xml b/app/src/main/res/layout-land/profile_chooser_add_view.xml index c8921f28044..49ed37b23ad 100644 --- a/app/src/main/res/layout-land/profile_chooser_add_view.xml +++ b/app/src/main/res/layout-land/profile_chooser_add_view.xml @@ -45,7 +45,7 @@ android:id="@+id/add_profile_text" style="@style/Caption" android:layout_gravity="center" - android:text="@{hasProfileEverBeenAddedValue ? @string/profile_chooser_add : @string/set_up_multiple_profiles}" + android:text="@{hasProfileEverBeenAddedValue ? @string/profile_chooser_fragment_add_text : @string/profile_chooser_fragment_set_up_multiple_profiles}" android:textColor="@color/component_color_shared_secondary_4_text_color" /> + android:contentDescription="@string/profile_chooser_fragment_language_icon_description" /> @@ -103,7 +103,7 @@ style="@style/Subtitle1ViewCenter" android:layout_marginBottom="24dp" android:minHeight="48dp" - android:text="@string/profile_chooser_administrator_controls" + android:text="@string/profile_chooser_fragment_administrator_controls_text" android:textColor="@color/component_color_profile_chooser_activity_secondary_options_color" /> + android:contentDescription="@string/profile_chooser_fragment_setting_icon_description" /> diff --git a/app/src/main/res/layout-land/profile_chooser_profile_view.xml b/app/src/main/res/layout-land/profile_chooser_profile_view.xml index d150c4cfd0f..761f44d3f02 100644 --- a/app/src/main/res/layout-land/profile_chooser_profile_view.xml +++ b/app/src/main/res/layout-land/profile_chooser_profile_view.xml @@ -76,7 +76,7 @@ style="@style/SubtitleLight1Center" android:layout_width="wrap_content" android:layout_height="wrap_content" - android:text="@string/profile_chooser_admin" + android:text="@string/profile_chooser_fragment_admin_text" android:textColor="@color/component_color_shared_secondary_4_text_color" android:visibility="@{viewModel.profile.isAdmin ? View.VISIBLE : View.GONE}" /> diff --git a/app/src/main/res/layout-land/profile_edit_fragment.xml b/app/src/main/res/layout-land/profile_edit_fragment.xml index 352b3c2ce86..a2ab759da8e 100644 --- a/app/src/main/res/layout-land/profile_edit_fragment.xml +++ b/app/src/main/res/layout-land/profile_edit_fragment.xml @@ -84,7 +84,7 @@ android:minHeight="48dp" android:paddingStart="16dp" android:paddingEnd="16dp" - android:text="@string/profile_edit_rename" + android:text="@string/profile_edit_activity_rename_text" android:textAllCaps="false" android:textColor="@color/component_color_shared_primary_text_color" android:textSize="16sp" @@ -103,7 +103,7 @@ android:minHeight="48dp" android:paddingStart="16dp" android:paddingEnd="16dp" - android:text="@string/profile_edit_reset" + android:text="@string/profile_edit_activity_reset_text" android:textAllCaps="false" android:textColor="@color/component_color_shared_primary_text_color" android:textSize="16sp" @@ -123,7 +123,7 @@ android:minHeight="48dp" android:paddingStart="16dp" android:paddingEnd="16dp" - android:text="@string/profile_edit_mark_chapter_completion" + android:text="@string/profile_edit_activity_mark_chapters_for_completion_button_text" android:textAllCaps="false" android:textColor="@color/component_color_shared_primary_text_color" android:textSize="16sp" @@ -154,7 +154,7 @@ android:paddingStart="16dp" android:paddingTop="12dp" android:paddingEnd="24dp" - android:text="@string/profile_edit_enable_quick_lesson_language_switching_label" + android:text="@string/profile_edit_activity_switching_header_text" android:textColor="@color/component_color_shared_primary_text_color" android:textSize="16sp" app:layout_constraintEnd_toStartOf="@+id/profile_edit_enable_in_lesson_language_switching_switch" @@ -171,7 +171,7 @@ android:paddingStart="16dp" android:paddingEnd="24dp" android:paddingBottom="12dp" - android:text="@string/profile_edit_enable_quick_lesson_language_switching_explanation" + android:text="@string/profile_edit_activity_switching_label_text" android:textColor="@color/component_color_shared_secondary_3_text_color" android:textSize="14sp" app:layout_constraintEnd_toStartOf="@+id/profile_edit_enable_in_lesson_language_switching_switch" @@ -215,7 +215,7 @@ android:paddingStart="16dp" android:paddingTop="12dp" android:paddingEnd="24dp" - android:text="@string/profile_edit_allow_download_heading" + android:text="@string/profile_edit_activity_allow_download_heading" android:textColor="@color/component_color_shared_primary_text_color" android:textSize="16sp" app:layout_constraintBottom_toBottomOf="parent" @@ -232,7 +232,7 @@ android:paddingStart="16dp" android:paddingEnd="24dp" android:paddingBottom="12dp" - android:text="@string/profile_edit_allow_download_sub" + android:text="@string/profile_edit_activity_allow_download_sub" android:textColor="@color/component_color_shared_secondary_3_text_color" android:textSize="14sp" app:layout_constraintEnd_toStartOf="@+id/profile_edit_allow_download_switch" @@ -266,7 +266,7 @@ android:minHeight="48dp" android:paddingStart="16dp" android:paddingEnd="16dp" - android:text="@string/profile_edit_delete" + android:text="@string/profile_edit_activity_delete_button_text" android:textAllCaps="false" android:textColor="@color/component_color_profile_edit_activity_delete_button_text_color" android:textSize="16sp" diff --git a/app/src/main/res/layout-land/profile_progress_header.xml b/app/src/main/res/layout-land/profile_progress_header.xml index 994327f7beb..1b4224782d2 100644 --- a/app/src/main/res/layout-land/profile_progress_header.xml +++ b/app/src/main/res/layout-land/profile_progress_header.xml @@ -25,7 +25,7 @@ android:layout_width="160dp" android:layout_height="160dp" android:clickable="true" - android:contentDescription="@string/current_profile_picture_content_description" + android:contentDescription="@string/add_profile_activity_edit_image_content_description" android:focusable="true" android:onClick="@{() -> viewModel.clickOnProfilePicture()}" android:elevation="4dp" @@ -39,7 +39,7 @@ @@ -157,7 +157,7 @@ android:layout_width="60dp" android:layout_height="wrap_content" android:fontFamily="sans-serif" - android:text="@{viewModel.completedStoryCount != 1 ? @string/stories_completed : @string/story_completed}" + android:text="@{viewModel.completedStoryCount != 1 ? @string/profile_progress_activity_stories_completed_text : @string/profile_progress_activity_story_completed_text}" android:textColor="@color/component_color_shared_primary_text_color" android:textSize="12sp" /> @@ -171,7 +171,7 @@ android:layout_marginTop="64dp" android:fontFamily="sans-serif-medium" android:minHeight="48dp" - android:text="@string/recently_played_stories" + android:text="@string/home_activity_recently_played_stories" android:textColor="@color/component_color_shared_primary_text_color" android:textSize="18sp" android:visibility="@{viewModel.headerTextVisibility}" @@ -187,7 +187,7 @@ android:fontFamily="sans-serif-medium" android:minHeight="48dp" android:onClick="@{() -> viewModel.clickOnViewAll()}" - android:text="@string/view_all" + android:text="@string/home_activity_view_all_text" android:textAllCaps="true" android:textColor="@color/component_color_profile_progress_activity_view_all_text_color" android:textSize="14sp" diff --git a/app/src/main/res/layout-land/question_player_fragment.xml b/app/src/main/res/layout-land/question_player_fragment.xml index 569625bc270..ad785b8bcba 100644 --- a/app/src/main/res/layout-land/question_player_fragment.xml +++ b/app/src/main/res/layout-land/question_player_fragment.xml @@ -27,7 +27,7 @@ android:layout_marginTop="28dp" android:layout_marginEnd="28dp" android:fontFamily="sans-serif" - android:text="@string/question_training_session_finished_header" + android:text="@string/topic_fragment_question_end_session_header_text" android:textColor="@color/component_color_shared_primary_text_color" android:textSize="24sp" android:visibility="gone" @@ -42,7 +42,7 @@ android:layout_marginTop="8dp" android:layout_marginEnd="28dp" android:fontFamily="sans-serif" - android:text="@string/question_training_session_finished_message" + android:text="@string/topic_fragment_question_end_session_body_text" android:textColor="@color/component_color_shared_primary_text_color" android:textSize="16sp" android:visibility="gone" @@ -147,7 +147,7 @@ android:layout_height="6dp" android:layout_gravity="top|end" android:layout_margin="8dp" - android:contentDescription="@string/new_hint_available" + android:contentDescription="@string/question_player_activity_new_hint_available_text" android:visibility="@{viewModel.isHintOpenedAndUnRevealed() ? View.VISIBLE : View.GONE}" app:srcCompat="@drawable/ic_dot_yellow_24dp" /> @@ -156,7 +156,7 @@ android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_margin="12dp" - android:contentDescription="@string/show_hints_and_solution" + android:contentDescription="@string/state_fragment_open_hint_content_description" app:srcCompat="@drawable/ic_hint_bulb_white_24dp" /> diff --git a/app/src/main/res/layout-land/resume_lesson_fragment.xml b/app/src/main/res/layout-land/resume_lesson_fragment.xml index e317a2eff27..9b979deb475 100644 --- a/app/src/main/res/layout-land/resume_lesson_fragment.xml +++ b/app/src/main/res/layout-land/resume_lesson_fragment.xml @@ -80,7 +80,7 @@ android:gravity="center" android:minWidth="144dp" android:minHeight="@dimen/clickable_item_min_height" - android:text="@string/start_over_lesson_button" + android:text="@string/resume_lessons_fragment_start_over_button_text" android:textAllCaps="false" android:textColor="@color/component_color_shared_secondary_button_background_trim_color" android:textSize="14sp" @@ -99,7 +99,7 @@ android:gravity="center" android:minWidth="144dp" android:minHeight="@dimen/clickable_item_min_height" - android:text="@string/resume_lesson_button" + android:text="@string/resume_lessons_fragment_continue_button_text" android:textAllCaps="false" android:textColor="@color/component_color_shared_secondary_4_text_color" android:textSize="14sp" diff --git a/app/src/main/res/layout-land/story_chapter_view.xml b/app/src/main/res/layout-land/story_chapter_view.xml index 6c40a6758a7..fc1064c2b45 100644 --- a/app/src/main/res/layout-land/story_chapter_view.xml +++ b/app/src/main/res/layout-land/story_chapter_view.xml @@ -92,7 +92,7 @@ android:layout_height="wrap_content" android:layout_marginEnd="8dp" android:layout_marginBottom="4dp" - android:contentDescription="@{@string/chapter_completed}" + android:contentDescription="@{@string/topic_fragment_lessons_chapter_completed_text}" android:visibility="@{viewModel.chapterSummary.chapterPlayState == ChapterPlayState.COMPLETED ? View.VISIBLE : View.GONE}" app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintEnd_toEndOf="parent" diff --git a/app/src/main/res/layout-land/survey_fragment.xml b/app/src/main/res/layout-land/survey_fragment.xml index d1358390ce6..21d8ef487cc 100644 --- a/app/src/main/res/layout-land/survey_fragment.xml +++ b/app/src/main/res/layout-land/survey_fragment.xml @@ -29,7 +29,7 @@ android:layout_width="match_parent" android:layout_height="wrap_content" android:background="@color/component_color_shared_activity_toolbar_color" - android:contentDescription="@string/survey_exit_button_description" + android:contentDescription="@string/survey_activity_exit_dialog_exit_button_description" android:minHeight="?attr/actionBarSize" android:theme="@style/Widget.AppCompat.ActionBar" app:navigationIcon="@drawable/ic_close_white_24dp"> @@ -125,7 +125,7 @@ style="@style/SurveyPreviousButton" android:layout_width="wrap_content" android:layout_height="wrap_content" - android:text="@string/survey_previous_button" + android:text="@string/survey_fragment_previous_button" app:layout_constraintStart_toStartOf="parent" app:layout_constraintTop_toTopOf="parent" /> @@ -136,7 +136,7 @@ android:layout_height="wrap_content" android:background="@{viewModel.canMoveToNextQuestion ? @drawable/state_button_primary_background : @drawable/state_button_inactive_background}" android:enabled="@{viewModel.canMoveToNextQuestion}" - android:text="@string/next" + android:text="@string/next_text" android:textColor="@{viewModel.canMoveToNextQuestion ? @color/component_color_shared_secondary_4_text_color : @color/component_color_survey_disabled_button_text_color}" app:layout_constraintEnd_toEndOf="parent" app:layout_constraintTop_toTopOf="parent" /> diff --git a/app/src/main/res/layout-land/survey_welcome_dialog_fragment.xml b/app/src/main/res/layout-land/survey_welcome_dialog_fragment.xml index 9a41b4cf558..86943c2ade3 100644 --- a/app/src/main/res/layout-land/survey_welcome_dialog_fragment.xml +++ b/app/src/main/res/layout-land/survey_welcome_dialog_fragment.xml @@ -9,7 +9,7 @@