oppia / oppia-android

A free, online & offline learning platform to make quality education accessible for all.
https://www.oppia.org
Apache License 2.0
311 stars 512 forks source link

[BUG]: Multiple substitutions specified in non-positional format of string resource #5484

Open MohitGupta121 opened 1 month ago

MohitGupta121 commented 1 month ago

Describe the bug

> Task :app:mergeDebugResources
/opensource/oppia-android/app/src/main/res/values-ar/strings.xml:95:2: Multiple substitutions specified in non-positional format of string resource string/chapter_completed. Did you mean to add the formatted="false" attribute?

/opensource/oppia-android/app/src/main/res/values-ar/strings.xml:93:2: Multiple substitutions specified in non-positional format of string resource string/chapter_in_progress. Did you mean to add the formatted="false" attribute?

/opensource/oppia-android/app/src/main/res/values-ar/strings.xml:96:2: Multiple substitutions specified in non-positional format of string resource string/chapter_name. Did you mean to add the formatted="false" attribute?

/opensource/oppia-android/app/src/main/res/values-ar/strings.xml:97:2: Multiple substitutions specified in non-positional format of string resource string/chapter_prerequisite_title_label. Did you mean to add the formatted="false" attribute?

/opensource/oppia-android/app/src/main/res/values-ar/strings.xml:110:2: Multiple substitutions specified in non-positional format of string resource string/math_expression_error_number_after_var_term. Did you mean to add the formatted="false" attribute?

/opensource/oppia-android/app/src/main/res/values-ar/strings.xml:447:2: Multiple substitutions specified in non-positional format of string resource string/onboarding_slide_dots_content_description. Did you mean to add the formatted="false" attribute?

/opensource/oppia-android/app/src/main/res/values-ar/strings.xml:329:2: Multiple substitutions specified in non-positional format of string resource string/profile_last_visited. Did you mean to add the formatted="false" attribute?

/opensource/oppia-android/app/src/main/res/values-ar/strings.xml:152:2: Multiple substitutions specified in non-positional format of string resource string/question_training_session_progress. Did you mean to add the formatted="false" attribute?

/opensource/oppia-android/app/src/main/res/values-sw/strings.xml:80:2: Multiple substitutions specified in non-positional format of string resource string/chapter_completed. Did you mean to add the formatted="false" attribute?

/opensource/oppia-android/app/src/main/res/values-sw/strings.xml:78:2: Multiple substitutions specified in non-positional format of string resource string/chapter_in_progress. Did you mean to add the formatted="false" attribute?

/opensource/oppia-android/app/src/main/res/values-sw/strings.xml:81:2: Multiple substitutions specified in non-positional format of string resource string/chapter_name. Did you mean to add the formatted="false" attribute?

/Users/mohitgupta/.gradle/caches/transforms-3/a3ac098c2f10fa536abc6ff8a77d1852/transformed/material-1.6.0-alpha01/res/values-sw/values-sw.xml:7:4: Multiple substitutions specified in non-positional format of string resource string/chapter_prerequisite_title_label. Did you mean to add the formatted="false" attribute?

/opensource/oppia-android/app/src/main/res/values-sw/strings.xml:98:2: Multiple substitutions specified in non-positional format of string resource string/math_expression_error_consecutive_binary_operators. Did you mean to add the formatted="false" attribute?

/opensource/oppia-android/app/src/main/res/values-sw/strings.xml:101:2: Multiple substitutions specified in non-positional format of string resource string/math_expression_error_missing_lhs_for_addition_operator. Did you mean to add the formatted="false" attribute?

/opensource/oppia-android/app/src/main/res/values-sw/strings.xml:102:2: Multiple substitutions specified in non-positional format of string resource string/math_expression_error_missing_lhs_for_division_operator. Did you mean to add the formatted="false" attribute?

/opensource/oppia-android/app/src/main/res/values-sw/strings.xml:103:2: Multiple substitutions specified in non-positional format of string resource string/math_expression_error_missing_lhs_for_multiplication_operator. Did you mean to add the formatted="false" attribute?

/opensource/oppia-android/app/src/main/res/values-sw/strings.xml:110:2: Multiple substitutions specified in non-positional format of string resource string/math_expression_error_multiple_redundant_parentheses. Did you mean to add the formatted="false" attribute?

/opensource/oppia-android/app/src/main/res/values-sw/strings.xml:94:2: Multiple substitutions specified in non-positional format of string resource string/math_expression_error_number_after_var_term. Did you mean to add the formatted="false" attribute?

/opensource/oppia-android/app/src/main/res/values-sw/strings.xml:92:2: Multiple substitutions specified in non-positional format of string resource string/math_expression_error_redundant_parentheses_individual_term. Did you mean to add the formatted="false" attribute?

/opensource/oppia-android/app/src/main/res/values-sw/strings.xml:378:2: Multiple substitutions specified in non-positional format of string resource string/onboarding_slide_dots_content_description. Did you mean to add the formatted="false" attribute?

/opensource/oppia-android/app/src/main/res/values-sw/strings.xml:273:2: Multiple substitutions specified in non-positional format of string resource string/profile_last_visited. Did you mean to add the formatted="false" attribute?

/opensource/oppia-android/app/src/main/res/values-sw/strings.xml:136:2: Multiple substitutions specified in non-positional format of string resource string/question_training_session_progress. Did you mean to add the formatted="false" attribute?

/opensource/oppia-android/app/src/main/res/values-pt-rBR/strings.xml:98:2: Multiple substitutions specified in non-positional format of string resource string/chapter_completed. Did you mean to add the formatted="false" attribute?

/opensource/oppia-android/app/src/main/res/values-pt-rBR/strings.xml:100:2: Multiple substitutions specified in non-positional format of string resource string/chapter_in_progress. Did you mean to add the formatted="false" attribute?

/opensource/oppia-android/app/src/main/res/values-pt-rBR/strings.xml:96:2: Multiple substitutions specified in non-positional format of string resource string/chapter_locked_prerequisite_title_label. Did you mean to add the formatted="false" attribute?

/opensource/oppia-android/app/src/main/res/values-pt-rBR/strings.xml:99:2: Multiple substitutions specified in non-positional format of string resource string/chapter_name. Did you mean to add the formatted="false" attribute?

/opensource/oppia-android/app/src/main/res/values-pt-rBR/strings.xml:101:2: Multiple substitutions specified in non-positional format of string resource string/chapter_prerequisite_title_label. Did you mean to add the formatted="false" attribute?

/opensource/oppia-android/app/src/main/res/values/strings.xml:96:2: Multiple substitutions specified in non-positional format of string resource string/chapter_completed. Did you mean to add the formatted="false" attribute?

/opensource/oppia-android/app/src/main/res/values/strings.xml:98:2: Multiple substitutions specified in non-positional format of string resource string/chapter_in_progress. Did you mean to add the formatted="false" attribute?

/opensource/oppia-android/app/src/main/res/values/strings.xml:94:2: Multiple substitutions specified in non-positional format of string resource string/chapter_locked_prerequisite_title_label. Did you mean to add the formatted="false" attribute?

/opensource/oppia-android/app/src/main/res/values/strings.xml:97:2: Multiple substitutions specified in non-positional format of string resource string/chapter_name. Did you mean to add the formatted="false" attribute?

/opensource/oppia-android/app/src/main/res/values-pt-rBR/strings.xml:427:2: Multiple substitutions specified in non-positional format of string resource string/onboarding_slide_dots_content_description. Did you mean to add the formatted="false" attribute?

/opensource/oppia-android/app/src/main/res/values-pt-rBR/strings.xml:309:2: Multiple substitutions specified in non-positional format of string resource string/profile_last_visited. Did you mean to add the formatted="false" attribute?

/opensource/oppia-android/app/src/main/res/values-pt-rBR/strings.xml:156:2: Multiple substitutions specified in non-positional format of string resource string/question_training_session_progress. Did you mean to add the formatted="false" attribute?

/opensource/oppia-android/app/src/main/res/values/strings.xml:99:2: Multiple substitutions specified in non-positional format of string resource string/chapter_prerequisite_title_label. Did you mean to add the formatted="false" attribute?

/opensource/oppia-android/app/src/main/res/values/strings.xml:683:2: Multiple substitutions specified in non-positional format of string resource string/onboarding_slide_dots_content_description. Did you mean to add the formatted="false" attribute?

/opensource/oppia-android/app/src/main/res/values/strings.xml:332:2: Multiple substitutions specified in non-positional format of string resource string/profile_last_visited. Did you mean to add the formatted="false" attribute?

/opensource/oppia-android/app/src/main/res/values/strings.xml:157:2: Multiple substitutions specified in non-positional format of string resource string/question_training_session_progress. Did you mean to add the formatted="false" attribute?

/opensource/oppia-android/app/src/main/res/values/strings.xml:425:2: Multiple substitutions specified in non-positional format of string resource string/welcome_profile_name. Did you mean to add the formatted="false" attribute?

/opensource/oppia-android/app/src/main/res/values-pcm-rNG/strings.xml:98:2: Multiple substitutions specified in non-positional format of string resource string/chapter_completed. Did you mean to add the formatted="false" attribute?

/opensource/oppia-android/app/src/main/res/values-pcm-rNG/strings.xml:100:2: Multiple substitutions specified in non-positional format of string resource string/chapter_in_progress. Did you mean to add the formatted="false" attribute?

/opensource/oppia-android/app/src/main/res/values-pcm-rNG/strings.xml:96:2: Multiple substitutions specified in non-positional format of string resource string/chapter_locked_prerequisite_title_label. Did you mean to add the formatted="false" attribute?

/opensource/oppia-android/app/src/main/res/values-pcm-rNG/strings.xml:99:2: Multiple substitutions specified in non-positional format of string resource string/chapter_name. Did you mean to add the formatted="false" attribute?

/opensource/oppia-android/app/src/main/res/values-pcm-rNG/strings.xml:101:2: Multiple substitutions specified in non-positional format of string resource string/chapter_prerequisite_title_label. Did you mean to add the formatted="false" attribute?

/opensource/oppia-android/app/src/main/res/values-pcm-rNG/strings.xml:443:2: Multiple substitutions specified in non-positional format of string resource string/onboarding_slide_dots_content_description. Did you mean to add the formatted="false" attribute?

/opensource/oppia-android/app/src/main/res/values-pcm-rNG/strings.xml:311:2: Multiple substitutions specified in non-positional format of string resource string/profile_last_visited. Did you mean to add the formatted="false" attribute?

/opensource/oppia-android/app/src/main/res/values-pcm-rNG/strings.xml:156:2: Multiple substitutions specified in non-positional format of string resource string/question_training_session_progress. Did you mean to add the formatted="false" attribute?

Steps To Reproduce

Build app and see build logs

Expected Behavior

There should be no multiple strings

Screenshots/Videos

No response

What device/emulator are you using?

No response

Which Android version is your device/emulator running?

No response

Which version of the Oppia Android app are you using?

No response

Additional Context

No response

Raghav1783 commented 1 month ago

Hi, I’m interested in working on this issue. Could you please assign it to me?

adhiamboperes commented 1 month ago

@Raghav1783, Could you please make sure that you are able to reproduce this issue, and then give a brief description of what's causing it an the suggested fix?

Raghav1783 commented 1 month ago

@adhiamboperes yes i am able to reproduce this error . String resource has multiple %s . To avoid this, we must identify each like this: %1$s

Raghav1783 commented 1 month ago

@adhiamboperes should i create a pr?

adhiamboperes commented 1 month ago

@Raghav1783, to reproduce means to perform the steps that caused the error to occur. For this specific issue, it would be great to see proof of this issue occuring on either your computer, or our GitHub CI. This way we can evaluate the before and after build isues and verify that your fix worked. If this is possible on your end, please feel free to create a PR.