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

The Lint is failing due to the StringFormatCount error. #4052

Open
MohitMaliFtechiz opened this issue Nov 4, 2024 · 5 comments
Open

The Lint is failing due to the StringFormatCount error. #4052

MohitMaliFtechiz opened this issue Nov 4, 2024 · 5 comments
Assignees
Milestone

Comments

@MohitMaliFtechiz
Copy link
Collaborator

Describe the bug
The Lint is failing due to the StringFormatCount error. It is because we have merged the last TW PR 44fe711, and that has this error.

See these workflows:

  1. https://github.com/kiwix/kiwix-android/actions/runs/11664862886/job/32476285251
  2. https://github.com/kiwix/kiwix-android/actions/runs/11612248176/job/32335313907

Expected behavior
We should fix this on the upstream.

Screenshots

Environment

  • Version of Kiwix Android : 3.11.1

Logs

  /home/acerpc/Desktop/kiwix-android/core/src/main/res/values-dag/strings.xml:81: Error: Inconsistent number of arguments in formatting string no_email_application_installed; found both 1 here and 0 in values-ar/strings.xml [StringFormatCount]
    <string name="no_email_application_installed">Tafadhali sakinisha\n mtoa huduma wa barua pepe au tutumie barua pepe kwa %1s</string>
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      /home/acerpc/Desktop/kiwix-android/core/src/main/res/values-ar/strings.xml:90: Conflicting number of arguments (0) here
     Explanation for issues of type "StringFormatCount":
     When a formatted string takes arguments, it usually needs to reference the
     same arguments in all translations (or all arguments if there are no
     translations.
     There are cases where this is not the case, so this issue is a warning
     rather than an error by default. However, this usually happens when a
     language is not translated or updated correctly.
@kelson42
Copy link
Collaborator

kelson42 commented Nov 4, 2024

Why this linting is not part of the CI? PR CI was green!

@MohitMaliFtechiz
Copy link
Collaborator Author

@kelson42 It is part of CI, and the PR CI was not fully green, the lint job was failing. I think it was missed by you.

Image

@kelson42
Copy link
Collaborator

kelson42 commented Nov 6, 2024

Then I'm sorry to be blind!

@MohitMaliFtechiz
Copy link
Collaborator Author

@kelson42 I have placed a fix for all lint errors on upstream; the changes will be included in the latest TW PR.

@MohitMaliFtechiz
Copy link
Collaborator Author

Most of the translations have come in the latest TW PR #4050, only 2 translation are left to come.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants