From e060e2ff265ce35c92f1b969f6d7ad002d1a62ad Mon Sep 17 00:00:00 2001 From: RD Rama Devi <122200035+Rd4dev@users.noreply.github.com> Date: Sat, 14 Oct 2023 20:33:15 +0530 Subject: [PATCH] Fixed #5182 - All warnings in "Internationalization" (#5183) ## Explanation Fix #5182 [part of #5169] Fixes All warnings in "Internationalization" caused by - hardcoded text : Fixed by assigning `string resource` values - padding/margins : Fixed by setting `padding end` values ## ScreenShot: ![Lint Issues Internationalization Before After](https://github.com/oppia/oppia-android/assets/122200035/a2f04893-b670-499b-980b-5151097b47c0) ## Essential Checklist - [x] The PR title and explanation each start with "Fix #bugnum: " (If this PR fixes part of an issue, prefix the title with "Fix part of #bugnum: ...".) - [x] Any changes to [scripts/assets](https://github.com/oppia/oppia-android/tree/develop/scripts/assets) files have their rationale included in the PR explanation. - [x] The PR follows the [style guide](https://github.com/oppia/oppia-android/wiki/Coding-style-guide). - [x] The PR does not contain any unnecessary code changes from Android Studio ([reference](https://github.com/oppia/oppia-android/wiki/Guidance-on-submitting-a-PR#undo-unnecessary-changes)). - [x] The PR is made from a branch that's **not** called "develop" and is up-to-date with "develop". - [x] The PR is **assigned** to the appropriate reviewers ([reference](https://github.com/oppia/oppia-android/wiki/Guidance-on-submitting-a-PR#clarification-regarding-assignees-and-reviewers-section)).
--------- Co-authored-by: Adhiambo Peres <59600948+adhiamboperes@users.noreply.github.com> --- .../main/res/layout-land/profile_progress_header.xml | 1 + .../administrator_controls_learner_analytics_view.xml | 2 +- .../res/layout-sw600dp/profile_progress_header.xml | 1 + .../layout/activity_input_interaction_view_test.xml | 6 +++--- app/src/main/res/layout/add_profile_activity.xml | 1 + .../administrator_controls_learner_analytics_view.xml | 2 +- .../res/layout/concept_card_fragment_test_activity.xml | 4 ++-- app/src/main/res/layout/exploration_test_activity.xml | 2 +- app/src/main/res/layout/font_scale_test_activity.xml | 2 +- app/src/main/res/layout/profile_progress_header.xml | 1 + .../res/layout/spotlight_fragment_test_activity.xml | 2 +- .../main/res/layout/state_fragment_test_activity.xml | 2 +- app/src/main/res/values/strings.xml | 10 ++++++++++ 13 files changed, 25 insertions(+), 11 deletions(-) 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 dda7af7e0ef..994327f7beb 100644 --- a/app/src/main/res/layout-land/profile_progress_header.xml +++ b/app/src/main/res/layout-land/profile_progress_header.xml @@ -42,6 +42,7 @@ android:contentDescription="@string/edit_profile_picture_content_description" android:onClick="@{() -> viewModel.clickOnProfilePicture()}" android:paddingStart="12dp" + android:paddingEnd="0dp" android:paddingTop="12dp" android:elevation="4dp" app:layout_constraintBottom_toBottomOf="@+id/profile_edit_image" diff --git a/app/src/main/res/layout-sw600dp/administrator_controls_learner_analytics_view.xml b/app/src/main/res/layout-sw600dp/administrator_controls_learner_analytics_view.xml index a2f180b75b1..a9ba3c2c885 100644 --- a/app/src/main/res/layout-sw600dp/administrator_controls_learner_analytics_view.xml +++ b/app/src/main/res/layout-sw600dp/administrator_controls_learner_analytics_view.xml @@ -26,7 +26,7 @@ android:paddingTop="28dp" android:paddingEnd="16dp" android:paddingBottom="20dp" - android:text="Learner Study Analytics" + android:text="@string/learner_analytics_label_text" android:textColor="@color/component_color_shared_active_text_color" app:layout_constraintBottom_toTopOf="@id/profile_and_device_id_text_view" app:layout_constraintEnd_toEndOf="parent" diff --git a/app/src/main/res/layout-sw600dp/profile_progress_header.xml b/app/src/main/res/layout-sw600dp/profile_progress_header.xml index eaf9b8db55c..9ca97de20d1 100644 --- a/app/src/main/res/layout-sw600dp/profile_progress_header.xml +++ b/app/src/main/res/layout-sw600dp/profile_progress_header.xml @@ -42,6 +42,7 @@ android:elevation="4dp" android:onClick="@{() -> viewModel.clickOnProfilePicture()}" android:paddingStart="12dp" + android:paddingEnd="0dp" android:paddingTop="12dp" app:layout_constraintBottom_toBottomOf="@+id/profile_edit_image" app:layout_constraintEnd_toEndOf="@+id/profile_edit_image" diff --git a/app/src/main/res/layout/activity_input_interaction_view_test.xml b/app/src/main/res/layout/activity_input_interaction_view_test.xml index 94fabcd6f7e..dba00bfb1e8 100644 --- a/app/src/main/res/layout/activity_input_interaction_view_test.xml +++ b/app/src/main/res/layout/activity_input_interaction_view_test.xml @@ -122,7 +122,7 @@ android:layout_margin="8dp" android:background="@drawable/edit_text_background" android:focusable="true" - android:hint="Write the digit here." + android:hint="@string/test_number_input_interaction_hint" android:textColor="@color/component_color_shared_primary_text_color" android:textColorHint="@color/component_color_shared_edit_text_hint_color" android:longClickable="false" @@ -154,7 +154,7 @@ android:layout_margin="8dp" android:background="@drawable/edit_text_background" android:focusable="true" - android:hint="Write here." + android:hint="@string/test_text_input_interaction_hint" android:inputType="text" android:longClickable="false" android:maxLength="200" @@ -181,7 +181,7 @@ android:layout_height="wrap_content" android:layout_margin="8dp" android:onClick="getPendingAnswerErrorOnSubmitClick" - android:text="Submit" + android:text="@string/submit_button_text" android:textColor="@color/component_color_shared_secondary_4_text_color" /> diff --git a/app/src/main/res/layout/add_profile_activity.xml b/app/src/main/res/layout/add_profile_activity.xml index 417092d77a1..a3c2adc51e9 100644 --- a/app/src/main/res/layout/add_profile_activity.xml +++ b/app/src/main/res/layout/add_profile_activity.xml @@ -67,6 +67,7 @@ android:contentDescription="@string/edit_profile_picture_content_description" android:elevation="4dp" android:paddingStart="12dp" + android:paddingEnd="0dp" android:paddingTop="12dp" app:layout_constraintBottom_toBottomOf="@+id/add_profile_activity_user_image_view" app:layout_constraintEnd_toEndOf="@+id/add_profile_activity_user_image_view" diff --git a/app/src/main/res/layout/administrator_controls_learner_analytics_view.xml b/app/src/main/res/layout/administrator_controls_learner_analytics_view.xml index cef8061d1cc..2a761c6b17a 100644 --- a/app/src/main/res/layout/administrator_controls_learner_analytics_view.xml +++ b/app/src/main/res/layout/administrator_controls_learner_analytics_view.xml @@ -22,7 +22,7 @@ android:paddingTop="28dp" android:paddingEnd="16dp" android:paddingBottom="20dp" - android:text="Learner Study Analytics" + android:text="@string/learner_analytics_label_text" android:textColor="@color/component_color_shared_active_text_color" app:layout_constraintBottom_toTopOf="@id/profile_and_device_id_text_view" app:layout_constraintEnd_toEndOf="parent" diff --git a/app/src/main/res/layout/concept_card_fragment_test_activity.xml b/app/src/main/res/layout/concept_card_fragment_test_activity.xml index 4894aac319d..9f8586d5570 100644 --- a/app/src/main/res/layout/concept_card_fragment_test_activity.xml +++ b/app/src/main/res/layout/concept_card_fragment_test_activity.xml @@ -7,13 +7,13 @@ android:id="@+id/open_dialog_0" android:layout_width="wrap_content" android:layout_height="wrap_content" - android:text="Concept Card 1" + android:text="@string/concept_card_one_button_text" android:textAllCaps="false"/>