Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 2 commits into from
Jun 21, 2024

Conversation

OmarIthawi
Copy link
Member

@OmarIthawi OmarIthawi commented Jun 21, 2024

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 openedx-webhooks added the open-source-contribution PR author is not from Axim or 2U label Jun 21, 2024
@openedx-webhooks
Copy link

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:

  • supporting documentation
  • Open edX discussion forum threads
  • timeline information ("this must be merged by XX date", and why that is)
  • partner information ("this is a course on edx.org")
  • any other information that can help Product understand the context for the PR

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 OmarIthawi changed the title chore: validate plurals in strings.xml chore: validate plurals in strings.xml | FC-55 Jun 21, 2024
Copy link
Contributor

@volodymyr-chekyrta volodymyr-chekyrta left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@OmarIthawi
Copy link
Member Author

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

@volodymyr-chekyrta volodymyr-chekyrta merged commit 7ff0ff4 into openedx:develop Jun 21, 2024
4 checks passed
@openedx-webhooks
Copy link

@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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
open-source-contribution PR author is not from Axim or 2U
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

3 participants