kiwix/kiwix-android

The Lint is failing due to the `StringFormatCount` error.

MohitMaliFtechiz opened this issue · 6 comments

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.

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

@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

Then I'm sorry to be blind!

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

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