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

Blocks: JS is not translated in the frontend #1096

Open
Soean opened this issue Oct 19, 2023 · 1 comment
Open

Blocks: JS is not translated in the frontend #1096

Soean opened this issue Oct 19, 2023 · 1 comment
Labels
[Component] Blocks All custom blocks (Speakers, CrowdCast, Live Schedule, etc) [Type] Internationalization Issues related to i18n or handling non-English languages or content

Comments

@Soean
Copy link
Member

Soean commented Oct 19, 2023

Describe the bug

We want to use the Live schedule block. We have a translation, but the string "View Full Schedule" is not translated in the frontend

Code: https://github.com/WordPress/wordcamp.org/blob/production/public_html/wp-content/mu-plugins/blocks/source/blocks/live-schedule/block.js#L69

German translation: https://translate.wordpress.org/projects/meta/wordcamp/de/default/?filters%5Bstatus%5D=either&filters%5Boriginal_id%5D=8790347&filters%5Btranslation_id%5D=71638046

To reproduce

Got to: https://germany.wordcamp.org/2023/

@timiwahalahti timiwahalahti added [Type] Good First Issue Straightforward, self-contained, doesn't require deep knowledge of codebase [Priority] 1 [Component] Blocks All custom blocks (Speakers, CrowdCast, Live Schedule, etc) labels Oct 19, 2023
@ryelle ryelle added the [Type] Internationalization Issues related to i18n or handling non-English languages or content label Jul 18, 2024
@ryelle ryelle changed the title Live Schedule block: JS is not translated in the frontend Jul 18, 2024
@ryelle ryelle removed the [Type] Good First Issue Straightforward, self-contained, doesn't require deep knowledge of codebase label Jul 18, 2024
@ryelle
Copy link
Contributor

ryelle commented Jul 18, 2024

I looked into this issue #1346 — and I think they're the same cause. The translations are hooked up correctly, but it's trying to load files that doesn't exist:

wp-content/languages/mu-plugins/wordcamporg-[locale]-763eba5ec6581bd80f00a75e2e1999aa.json
wp-content/languages/mu-plugins/wordcamporg-[locale]-700c0ec139240c0b015f4cfb987d7f31.json

I'm not sure if this is an issue in how the translation files are generated or some other issue due to these blocks being in mu-plugins. I think we need to add a maybeUpdateJSON step to wordcamp's bin/bash/lang-update.sh to match dotorg's (in website/bin/language-update/lang-update.sh). the wporg-translate export-json command will need to be updated to process mu-plugins too.

I've removed "Good First Issue" since this will require a dotorg sandbox.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Component] Blocks All custom blocks (Speakers, CrowdCast, Live Schedule, etc) [Type] Internationalization Issues related to i18n or handling non-English languages or content
4 participants