codeant-ai-for-open-source[bot] commented on code in PR #41984:
URL: https://github.com/apache/superset/pull/41984#discussion_r3567681071
##########
superset/translations/ja/LC_MESSAGES/messages.po:
##########
@@ -245,12 +254,13 @@ msgstr ""
msgid "%(rows)d rows returned"
msgstr "%(rows)d 行が返されました"
-#, fuzzy, python-format
+#, python-format
msgid "%(suggestion)s instead of \"%(undefinedParameter)s?\""
msgid_plural ""
"%(firstSuggestions)s or %(lastSuggestion)s instead of "
"\"%(undefinedParameter)s\"?"
msgstr[0] "「%(undefinedParameter)s」の代わりに「%(suggestion)s」を使用しますか?"
+msgstr[1]
"「%(undefinedParameter)s」の代わりに「%(firstSuggestions)s」または「%(lastSuggestion)s」を使用しますか?"
Review Comment:
**Suggestion:** Japanese is configured with `nplurals=1`, so adding
`msgstr[1]` creates an invalid plural-form mapping for this catalog. Keep only
`msgstr[0]` for this entry; otherwise gettext compilation/validation can fail
or ignore the extra translation index inconsistently. [api mismatch]
<details>
<summary><b>Severity Level:</b> Major ⚠️</summary>
```mdx
- ⚠️ Backend translation compile may warn or fail for ja catalog.
- ⚠️ Japanese plural suggestion string has unused/invalid extra form.
- ⚠️ i18n build pipeline may see inconsistent plural configuration.
```
</details>
<details>
<summary><b>Steps of Reproduction ✅ </b></summary>
```mdx
1. Open the Japanese catalog at
`superset/translations/ja/LC_MESSAGES/messages.po` and
inspect the header; at line 15 (verified via Read) the `Plural-Forms` entry
is
`Plural-Forms: nplurals=1; plural=0;`, meaning this locale is configured to
have exactly
one plural form.
2. In the same file, navigate to the pluralized suggestion string around
lines 8–14 in the
snippet shown by Read; there you can see the entry:
- `msgid "%(suggestion)s instead of \"%(undefinedParameter)s?\""`
- `msgid_plural "%(firstSuggestions)s or %(lastSuggestion)s instead of
\"%(undefinedParameter)s\"?"`
- `msgstr[0] "「%(undefinedParameter)s」の代わりに「%(suggestion)s」を使用しますか?"`
- `msgstr[1]
"「%(undefinedParameter)s」の代わりに「%(firstSuggestions)s」または「%(lastSuggestion)s」を使用しますか?"`
(line 263 in the PR diff).
3. Consult the translation workflow in
`docs/developer_docs/contributing/howtos.md` lines
31–37 (verified via Read), which instruct running `pybabel compile
--use-fuzzy -d
superset/translations` to compile all `.po` catalogs into `.mo` files for
backend
translations; this command will process `messages.po` for Japanese along
with other
locales.
4. When `pybabel compile` reads the Japanese catalog with `nplurals=1` but
finds two
plural translations (`msgstr[0]` and `msgstr[1]`) for the same
`msgid_plural`, the
plural-form mapping is inconsistent: only indices 0..(nplurals-1) are valid.
Depending on
the exact gettext/Babel behavior, this results in compilation warnings or
errors for the
`ja` catalog and the extra `msgstr[1]` being ignored, making that additional
Japanese
translation unused and potentially failing CI or local translation builds
that expect
clean catalogs.
```
</details>
[](https://app.codeant.ai/fix-in-ide?tool=cursor&prompt_id=27fb118013644c5387022d042d15f37b&service=github&base_url=https%3A%2F%2Fgithub.com&org=apache&repo=apache%2Fsuperset)
[](https://app.codeant.ai/fix-in-ide?tool=vscode-claude&prompt_id=27fb118013644c5387022d042d15f37b&service=github&base_url=https%3A%2F%2Fgithub.com&org=apache&repo=apache%2Fsuperset)
*(Use Cmd/Ctrl + Click for best experience)*
<details>
<summary><b>Prompt for AI Agent 🤖 </b></summary>
```mdx
This is a comment left during a code review.
**Path:** superset/translations/ja/LC_MESSAGES/messages.po
**Line:** 263:263
**Comment:**
*Api Mismatch: Japanese is configured with `nplurals=1`, so adding
`msgstr[1]` creates an invalid plural-form mapping for this catalog. Keep only
`msgstr[0]` for this entry; otherwise gettext compilation/validation can fail
or ignore the extra translation index inconsistently.
Validate the correctness of the flagged issue. If correct, How can I resolve
this? If you propose a fix, implement it and please make it concise.
Once fix is implemented, also check other comments on the same PR, and ask
user if the user wants to fix the rest of the comments as well. if said yes,
then fetch all the comments validate the correctness and implement a minimal fix
```
</details>
<a
href='https://app.codeant.ai/feedback?pr_url=https%3A%2F%2Fgithub.com%2Fapache%2Fsuperset%2Fpull%2F41984&comment_hash=0cb0ea9ecd79236f5e59b3d32a4735024d01754d8eda21b45463ccaba730cbaf&reaction=like'>👍</a>
| <a
href='https://app.codeant.ai/feedback?pr_url=https%3A%2F%2Fgithub.com%2Fapache%2Fsuperset%2Fpull%2F41984&comment_hash=0cb0ea9ecd79236f5e59b3d32a4735024d01754d8eda21b45463ccaba730cbaf&reaction=dislike'>👎</a>
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]