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

Some texts are not translated #6351

Closed
amroland opened this issue Jan 5, 2023 · 14 comments · Fixed by #7643
Closed

Some texts are not translated #6351

amroland opened this issue Jan 5, 2023 · 14 comments · Fixed by #7643
Assignees
Labels
Customer Report Issues or PRs that were reported via Happiness. Previously known as "Happiness Request". i18n [Pri] High Ship ASAP [Type] Bug
Milestone

Comments

@amroland
Copy link

amroland commented Jan 5, 2023

Note: A solution for this issue has already been documented here.

Some text does not translate even after running the CLI.
Texts are the following:

"Contact Teacher" on Learning mode screen:
Képernyőfotó 2023-01-05 - 15 40 21

"Interactive Video - Timeline"
"Interactive Video"
"Interactive Video Block."
Képernyőfotó 2023-01-05 - 15 50 41

Képernyőfotó 2023-01-05 - 15 51 28

Képernyőfotó 2023-01-05 - 15 51 51

"Course Actions" icon name
Képernyőfotó 2023-01-05 - 15 57 35

"Quiz"
"Evaluate progress and strengthen understanding of course concepts."
"Answers"
"Question Answers."
Képernyőfotó 2023-01-05 - 15 53 55

"Point"
"Points"
Képernyőfotó 2023-01-05 - 16 06 08

"Break Point"
"Break Point for the Interactive Video Block."
Képernyőfotó 2023-01-06 - 11 23 41

"Accordion"
Képernyőfotó 2023-07-11 - 23 23 53

PHP / WordPress / Sensei LMS version

PHP 7.4.26
WordPress 6.1.1
Sensei LMS Version: 4.9.1 | Sensei Pro Version: 1.9.1 - Sensei LMS Version: 4.15.1 | Sensei Pro Version: 1.15.1

@amroland amroland added [Status] Needs Triage Issue needs to be triaged [Type] Bug labels Jan 5, 2023
@amroland
Copy link
Author

amroland commented Jan 6, 2023

I added another one: texts of "break point"

@donnapep
Copy link
Collaborator

Note that some of these strings are in Sensei Pro, not Sensei LMS.

@donnapep donnapep added i18n [Pri] Normal Can wait for the next release and removed [Status] Needs Triage Issue needs to be triaged labels May 19, 2023
@merkushin merkushin self-assigned this Jun 15, 2023
@merkushin
Copy link
Member

As for the "Contact Teacher" button, it is a normal block with a title. The title on it is translatable. But is translated at the moment of adding the block. So if the user switches language after adding the block, the title remains in the original language.

I see two ways to fix the button: 1) remove the old button and add a new one immediately; 2) just update the text on the button in the Editor.

--

At the moment, I'm looking at Interactive Block. And it looks tricky. There is a translation for the text, but is not used for some reason. So I'm looking for that reason.

@merkushin
Copy link
Member

I was trying to find a clue why title and description are not translated in some cases, but didn't make progress.
Then I noticed that core blocks are translated in the same conditions.
I took a look at core blocks and found they don't use block.json at all... Here is the Video block, for example.
Even though they promise that fields like title and description are localized, it doesn't work in some cases.

@merkushin
Copy link
Member

As we could notice in that Video block, they already call the __() function.

Here is the block type switcher (Transform to), no translation function here: https://github.com/WordPress/gutenberg/blob/1d9288443b38d254092f38d0d818f96be22346ad/packages/editor/src/components/block-switcher/index.js#LL109C1-L109C1

And also no call to the translation function later in the block type list: https://github.com/WordPress/gutenberg/blob/1d9288443b38d254092f38d0d818f96be22346ad/packages/editor/src/components/block-types-list/index.js#LL74C1-L74C1

@merkushin
Copy link
Member

Here are PR that fix title and description translations in Sensei LMS and Sensei Pro.
#6994
https://github.com/Automattic/sensei-pro/pull/2338

As for Points, I couldn't reproduce the issue. I set Russian translation for corresponding strings for "sensei-lms" and "sensei-pro" domains via Loco Translate:
CleanShot 2023-06-30 at 02 00 40@2x

@amroland
Copy link
Author

@merkushin Only "Point" and "Points" were fixed.
Every other translation are still missing.
Plus now I added "Accordion", too!
(Sensei LMS Version: 4.15.1 | Sensei Pro Version: 1.15.1)
Képernyőfotó 2023-07-11 - 23 23 53

@merkushin
Copy link
Member

@amroland Glad to hear the problem with points was solved for you.
As for other translations, the work is still in progress yet. Hopefully, we release them soon-ish.

@amroland
Copy link
Author

The following texts are still not translated. (Even after running CLI):

  1. Quiz block and its texts:
    Képernyőfotó 2023-11-11 - 16 08 00

  2. Course Actions block and its texts:
    Képernyőfotó 2023-11-11 - 16 09 04

  3. Accordion block and its texts (Sensei PRO):
    Képernyőfotó 2023-11-11 - 16 03 07

@joashrajin
Copy link

+1 in 8157220-zd-a8c

image

Copy link

github-actions bot commented May 9, 2024

Support References

This comment is automatically generated. Please do not edit it.

  • 8157220-zen

@github-actions github-actions bot added the Customer Report Issues or PRs that were reported via Happiness. Previously known as "Happiness Request". label May 9, 2024
@donnapep
Copy link
Collaborator

Solution for this issue is documented here.

@donnapep donnapep added this to the 4.24.2 milestone Jul 19, 2024
@donnapep donnapep added [Pri] High Ship ASAP and removed [Pri] Normal Can wait for the next release labels Jul 19, 2024
@merkushin merkushin self-assigned this Jul 24, 2024
@merkushin merkushin linked a pull request Jul 28, 2024 that will close this issue
15 tasks
@donnapep
Copy link
Collaborator

Reopening this issue as we're going to have to revert the fix that we made in #7643 as it introduced a regression.

@donnapep donnapep reopened this Aug 16, 2024
@donnapep
Copy link
Collaborator

Closing as we no longer need to revert this as the regression was fixed in #7669 without affecting translations.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Customer Report Issues or PRs that were reported via Happiness. Previously known as "Happiness Request". i18n [Pri] High Ship ASAP [Type] Bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants