Skip to content

Commit 55ab73e

Browse files
Fixes oppia#5484: Multiple substitutions specified in non-positional format of st… (oppia#5560)
## Explanation Fixes : oppia#5484 Some string resources have multiple %s . To fix the error, we must identify each string position with a number : %1$s ## Essential Checklist <!-- Please tick the relevant boxes by putting an "x" in them. --> - [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 <[email protected]>
1 parent 2ba2cbc commit 55ab73e

File tree

1 file changed

+11
-11
lines changed

1 file changed

+11
-11
lines changed

app/src/main/res/values/strings.xml

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -92,11 +92,11 @@
9292
<string name="ongoing_topic_list_activity_title">Topics in Progress</string>
9393
<string name="topic_story_progress_percentage">%s\%%</string>
9494
<string name="topic_play_chapter_index">%s</string>
95-
<string name="chapter_name">Chapter %s: %s</string>
96-
<string name="chapter_completed">Chapter %s with title %s is completed</string>
97-
<string name="chapter_in_progress">Chapter %s with title %s is in progress</string>
98-
<string name="chapter_prerequisite_title_label">Complete Chapter %s: %s to unlock this chapter.</string>
99-
<string name="chapter_locked_prerequisite_title_label">Chapter %s: %s is currently locked. Please complete chapter %s: %s to unlock this chapter.</string>
95+
<string name="chapter_name">Chapter %1$s: %2$s</string>
96+
<string name="chapter_completed">Chapter %1$s with title %2$s is completed</string>
97+
<string name="chapter_in_progress">Chapter %1$s with title %2$s is in progress</string>
98+
<string name="chapter_prerequisite_title_label">Complete Chapter %1$s: %2$s to unlock this chapter.</string>
99+
<string name="chapter_locked_prerequisite_title_label">Chapter %1$s: %2$s is currently locked. Please complete chapter %3$s: %4$s to unlock this chapter.</string>
100100
<string name="chapter_prerequisite_title_label_without_chapter_title">Complete the previous chapter to unlock this chapter.</string>
101101
<string name="text_input_default_content_description">Enter text.</string>
102102
<string name="fractions_default_hint_text">Enter a fraction in the form x/x, or a mixed number in the form x x/x.</string>
@@ -154,7 +154,7 @@
154154
<string name="topic_downloaded">Topic Downloaded</string>
155155
<string name="downloaded">Downloaded</string>
156156
<string name="question_player_title">Practice Mode</string>
157-
<string name="question_training_session_progress">Question %s of %s</string>
157+
<string name="question_training_session_progress">Question %1$s of %2$s</string>
158158
<string name="question_training_session_progress_finished">Complete</string>
159159
<string name="question_training_session_finished_header">Finished</string>
160160
<string name="question_training_session_finished_message">You have finished all of the questions! You can choose to play another set of questions, or return to the topic.</string>
@@ -190,7 +190,7 @@
190190
<string name="size_gb">%s GB</string>
191191
<string name="correct">Correct!</string>
192192
<string name="topic_prefix">Topic: %s</string>
193-
<string name="welcome_profile_name">%s %s!</string>
193+
<string name="welcome_profile_name">%1$s %2$s!</string>
194194
<plurals name="chapter_count">
195195
<item quantity="one">1 Chapter</item>
196196
<item quantity="other">%s Chapters</item>
@@ -200,8 +200,8 @@
200200
<item quantity="other">%s Stories</item>
201201
</plurals>
202202
<plurals name="story_total_chapters">
203-
<item quantity="one">%s of %s Chapter Completed</item>
204-
<item quantity="other">%s of %s Chapters Completed</item>
203+
<item quantity="one">%1$s of %2$s Chapter Completed</item>
204+
<item quantity="other">%1$s of %2$s Chapters Completed</item>
205205
</plurals>
206206
<plurals name="lesson_count">
207207
<item quantity="one">1 Lesson</item>
@@ -280,7 +280,7 @@
280280
<string name="skip">Skip</string>
281281
<string name="next_arrow">Next</string>
282282
<string name="get_started">Get Started</string>
283-
<string name="onboarding_slide_dots_content_description">Slide %s of %s</string>
283+
<string name="onboarding_slide_dots_content_description">Slide %1$s of %2$s</string>
284284
<!-- PinPasswordActivity -->
285285
<string name="pin_password_hello">Hi, %s!</string>
286286
<string name="pin_password_admin_enter">Please enter your Administrator PIN.</string>
@@ -465,7 +465,7 @@
465465
<string name="move_item_up_content_description">Move item up to %s</string>
466466
<string name="up_button_disabled">Up</string>
467467
<string name="down_button_disabled">Down</string>
468-
<string name="profile_last_visited">%s %s</string>
468+
<string name="profile_last_visited">%1$s %2$s</string>
469469
<plurals name="minutes_ago">
470470
<item quantity="one">a minute ago</item>
471471
<item quantity="other">%s minutes ago</item>

0 commit comments

Comments
 (0)