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

Strings in libraries/lifterlms-blocks/assets/js/llms-blocks.js do not translate. #2525

Open
3 of 4 tasks
dominiquemariano opened this issue Sep 25, 2023 · 2 comments
Open
3 of 4 tasks
Assignees
Labels
Severity: Normal Status: Needs Code This issue needs code to be fixed Type: Bug Bugs and errors

Comments

@dominiquemariano
Copy link

Reproduction Steps

  1. Install and activate Loco Translate.
  2. Go to WordPress Dashboard > Loco Translate > Plugins > LifterLMS > New Language. Set Choose a language: > WordPress language: to English (United States). And set Choose a location: to Custom.
  3. Translate "Courses" (Admin menu name), to "My Courses". This works as you can see in this video.
  4. Now, translate ""Course Information Options" to "My Course Information Options Test". This does not work, as you can see in this video.

Expected Behavior

""Course Information Options" must be translatable, as well as other strings in libraries/lifterlms-blocks/assets/js/llms-blocks.js (e.g., Display Estimated Time, Display Difficulty, Display Tracks, etc)..

Actual Behavior

""Course Information Options" did not translate. Other strings in libraries/lifterlms-blocks/assets/js/llms-blocks.js also did not translate (e.g., Display Estimated Time, Display Difficulty, Display Tracks, etc).

This issue has be recreated:

  • Locally
  • On a staging site
  • On a production website
  • With only LifterLMS and a default theme
@dominiquemariano dominiquemariano changed the title Strings in libraries/lifterlms-blocks/assets/js/llms-blocks.js does not translate. Strings in libraries/lifterlms-blocks/assets/js/llms-blocks.js do not translate. Sep 25, 2023
@eri-trabiccolo eri-trabiccolo self-assigned this Sep 27, 2023
@eri-trabiccolo
Copy link
Collaborator

@dominiquemariano thanks for reporting.
I can reproduce, gonna look into this when looking into the other language issues!

@eri-trabiccolo eri-trabiccolo added Severity: Normal Type: Bug Bugs and errors Status: Needs Code This issue needs code to be fixed labels Sep 27, 2023
@brianhogg
Copy link
Contributor

brianhogg commented Feb 16, 2024

Removing the check for file existence seems to fix the translation string loading: c35516e

In Loco Translate, the existing translation doesn't seem to be showing for me (ie. es_ES), but if I put a translation in and save, it now shows in the editor along with already translated strings:

Captura de pantalla 2024-02-16 a las 5 00 16 p  m Captura de pantalla 2024-02-16 a las 4 59 57 p  m

As a note to self, the Course Information Options block is disabled when trying to add it to an existing course.

We also may not need to try loading in all the directory options. From the Block Editor documentation, it seems loading the plugin directory should be enough.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Severity: Normal Status: Needs Code This issue needs code to be fixed Type: Bug Bugs and errors
Projects
Status: To do
Development

No branches or pull requests

3 participants