Skip to content

Conversation

@ac-mmi
Copy link
Contributor

@ac-mmi ac-mmi commented Oct 7, 2025

Added a .po file to provide Japanese-kanji localization support for Music Blocks, enabling the interface to be displayed in Japanese-kanji. This enhances accessibility for speakers of Japanese-kanji and contributes to internationalization efforts.

@github-actions
Copy link
Contributor

github-actions bot commented Oct 7, 2025

✅ All Jest tests passed! This PR is ready to merge.

@omsuneri
Copy link
Member

omsuneri commented Oct 7, 2025

@pikurasa can you please review these changes !!

@pikurasa
Copy link
Collaborator

There are regressions in this PR.

See images below. When there are two windows, left is this PR and right is the main branch.

"Scale Degree" and 長さ instead of 値 (existing translations should not be overwritten)
Screenshot from 2025-10-12 08-03-56
Untranslated text (existing translations should not be overwritten)
Screenshot from 2025-10-12 07-58-30
Screenshot from 2025-10-12 07-58-15
Screenshot from 2025-10-12 07-56-22
Missing string from the language tab
Screenshot from 2025-10-12 07-55-37

@ac-mmi
Copy link
Contributor Author

ac-mmi commented Oct 12, 2025

@pikurasa Output from my branch I am not able to see it

Screenshot (3041) Screenshot (3039) Screenshot (3040) Screenshot (3038)

@walterbender
Copy link
Member

Screenshot From 2025-10-12 09-16-22 Screenshot From 2025-10-12 09-16-53

^^ Chromium on Fedora seems to be working. I'll test FF next.

@pikurasa
Copy link
Collaborator

By using a private tab, I was able to get different results.

However, now I'm not seeing where the actually improvements are.

Comparing to https://sugarlabs.github.io/musicblocks/, I see strings that are untranslated there are also untranslated on this branch.

I'm on commit 626dfb3 (HEAD, aman-c/Japanese-kanji-po)

Screenshot from 2025-10-14 10-01-51 Screenshot from 2025-10-14 10-00-59

I would take clues from the diff, but the diff has too many changes to help me meaningfully navigate it.

@walterbender
Copy link
Member

I can regenerate the help artwork with new strings. That is a separate process. But I don't know about the help messages... they should have been translated.

@github-actions
Copy link
Contributor

✅ All Jest tests passed! This PR is ready to merge.

@ac-mmi
Copy link
Contributor Author

ac-mmi commented Oct 14, 2025

The JSON file for Japanese wasn’t updated before(Don't know why), but now it is.

@walterbender
Copy link
Member

walterbender commented Oct 14, 2025

I think there is a bug in the parsing of the JS files for extracting strings for i18n.

            this.setHelpString([
                _("Each Start block is a separate voice.") +
                    " " +
                    _(
                        "All of the Start blocks run at the same time when the Play button is pressed."
                    ),
                "documentation",
                ""
            ]);
Screenshot From 2025-10-14 14-35-55

@ac-mmi
Copy link
Contributor Author

ac-mmi commented Oct 14, 2025

@walterbender #~ msgid "All of the Start blocks run at the same time when the Play button is pressed." entry is obsolete in ja.po file(line-8572)

@walterbender
Copy link
Member

I suspect that what happened was it originally was _("...") so it was in the PO and then someone ran a format tool in an IDE that changed it to _(
",,,"
)
that prevented the string from being picked up. Hence it was delegated to obsolete.

@pikurasa
Copy link
Collaborator

In my latest test, I'm just now starting to see some evidence of updates to Japanese in the PR.

Screenshot from 2025-10-15 07-35-27 Screenshot from 2025-10-15 07-29-37

It would take me a while to review all these from the interface. Is there a better way to review the diff??

@pikurasa
Copy link
Collaborator

I think one thing that we're going to need with the machine translations is some sort of marker in the code, perhaps just a comment, that they are machine translations.

The translations I've reviewed are better than not having them, but they do miss the overarching context and will need to be replaced.

@pikurasa
Copy link
Collaborator

To give more insight into what I'm experiencing with the new translations (as I mention in #4774 (comment)):

New version says: マウス間のビート数を同期させるブロックです。

If I were to just read that and translate it back to English, I would translate it as:

Me: This block runs simultaneously the Beat Number between the "Mouse"/"Mice"

..or more generously as: This block synchronizes the Beat Number between mice.

New version says: 指定されたマウスに実行するブロックのスタックを贈ります。

Me: This sends the (code) for a running stack of blocks to the specified mouse.

I think this will be good enough for the time being, but I would still like the machine generated translations to be marked. A human translator could give those translations additional scrutiny for consistency and style (without needing to guess which are machine translated and which are human translated).

@walterbender
Copy link
Member

At a minimum, we could add a TRANS note.

@github-actions
Copy link
Contributor

✅ All Jest tests passed! This PR is ready to merge.

1 similar comment
@github-actions
Copy link
Contributor

✅ All Jest tests passed! This PR is ready to merge.

@pikurasa
Copy link
Collaborator

@walterbender please confirm that Aman's method of marking machine translations works for you.

Sample:
Screenshot from 2025-10-15 20-56-45

I think it works for me, as it's consistent.

@walterbender
Copy link
Member

I think it is fine. In theory, these labels will show up in the translation portal as well.
@Aman1919 Is it ok that the TRANS note is in between the msgid and msgstr? I am guessing the order doesn't matter, but we should confirm.

@pikurasa
Copy link
Collaborator

@ac-mmi It was very helpful for me, as a reviewer, that you marked the machine translations.

The git diff is still impossible for me to parse, but perhaps that can be ignored.

@walterbender I think I can finally sign off on this.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants