openedx / openedx-app-android

The mobile app for Android for the Open EdX Platform.
Apache License 2.0
17 stars 23 forks source link

chore: validate plurals in strings.xml | FC-55 #348

Closed OmarIthawi closed 3 months ago

OmarIthawi commented 3 months ago

Plurals are failing the transifex import. I've fixed them manually in #341, but more are coming. Therefore a GitHub Actions is needed.

Testing

Example failure:

core/src/main/res/values/strings.xml:        <item quantity="zero">Due %1$d days ago</item>
core/src/main/res/values/strings.xml:        <item quantity="two">Due %1$d days ago</item>
make: *** [Makefile:15: validate_english_plurals] Error 1
core/src/main/res/values/strings.xml:        <item quantity="few">Due %1$d days ago</item>
core/src/main/res/values/strings.xml:        <item quantity="many">Due %1$d days ago</item>
core/src/main/res/values/strings.xml:        <item quantity="zero">Due in %1$d days</item>
core/src/main/res/values/strings.xml:        <item quantity="two">Due in %1$d days</item>
core/src/main/res/values/strings.xml:        <item quantity="few">Due in %1$d days</item>
core/src/main/res/values/strings.xml:        <item quantity="many">Due in %1$d days</item>
course/src/main/res/values/strings.xml:        <item quantity="zero">%1$s of %2$s  assignments complete</item>
course/src/main/res/values/strings.xml:        <item quantity="two">%1$s of %2$s  assignments complete</item>
course/src/main/res/values/strings.xml:        <item quantity="few">%1$s of %2$s  assignments complete</item>
course/src/main/res/values/strings.xml:        <item quantity="many">%1$s of %2$s  assignments complete</item>
dashboard/src/main/res/values/strings.xml:        <item quantity="zero">%1$d Past Due Assignments</item>
dashboard/src/main/res/values/strings.xml:        <item quantity="two">%1$d Past Due Assignments</item>
dashboard/src/main/res/values/strings.xml:        <item quantity="few">%1$d Past Due Assignments</item>
dashboard/src/main/res/values/strings.xml:        <item quantity="many">%1$d Past Due Assignments</item>

Error: Found invalid plurals in the files listed above.
       Please only use 'one' and 'other' in English strings.xml files,
       otherwise Transifex fails to parse them.

The second commit fixes those failures and the CI passes correctly.

openedx-webhooks commented 3 months ago

Thanks for the pull request, @OmarIthawi! Please note that it may take us up to several weeks or months to complete a review and merge your PR.

Feel free to add as much of the following information to the ticket as you can:

All technical communication about the code itself will be done via the GitHub pull request interface. As a reminder, our process documentation is here.

Please let us know once your PR is ready for our review and all tests are green.

OmarIthawi commented 3 months ago

Thanks @volodymyr-chekyrta for the quick review. Kindly merge that the new fix commit has been pushed.

openedx-webhooks commented 3 months ago

@OmarIthawi 🎉 Your pull request was merged! Please take a moment to answer a two question survey so we can improve your experience in the future.