gocodebox / lifterlms

LifterLMS, a WordPress LMS Solution: Easily create, sell, and protect engaging online courses.
https://lifterlms.com
GNU General Public License v3.0
181 stars 135 forks source link

Some js texts are missing from translation #1464

Closed alaa-alshamy closed 6 months ago

alaa-alshamy commented 3 years ago

Reproduction Steps

see this screenshot: Screenshot from 2020-12-21 10-57-00

Technical description

After some investigation i figured that those texts are not added to the POT file because they are not added to the "get_strings" function in this line: https://github.com/gocodebox/lifterlms/blob/trunk/includes/class.llms.l10n.js.php#L38

and this file actually compiled automatically via the gulp as described in the head

<?php
/**
 * Localize JS strings
 * This file should not be edited directly
 * It is compiled automatically via the gulp task `pot-js`
 * See the lifterlms-lib-tasks package for more information
 *
 * @package  LifterLMS/Classes/Localization
 * @since    3.17.8
 * @version  4.7.0
 */

And i think the gulp script not adding them because those texts used in double quote in this line: https://github.com/gocodebox/lifterlms/blob/trunk/assets/js/builder/Schemas/Lesson.js#L39

and the gulp script expect them to be in single quote in this line: https://github.com/gocodebox/lifterlms-lib-tasks/blob/master/tasks/pot-js.js#L28

So if you searched about LLMS.l10n.translate( " you will find all those texts i mean

Expected Behavior

Actual Behavior

Error Messages / Logs


### System and Environment Information

<details>
<summary>System Report</summary>

<!-- Paste your System Report between the three backticks below this line -->


</details>

This issue has be recreated:
+ [ ] Locally
+ [ ] On a staging site
+ [ ] On a production website
+ [ ] With only LifterLMS and a default theme

### Browser, Device, and Operating System Information

+ Browser name and version
+ Operating System name and version
+ Device name and version (if applicable)
alaa-alshamy commented 3 years ago

The possible solutions:

but i don't know what you prefer

thomasplevy commented 3 years ago

@alaa-alshamy

Thanks for reporting this, we'll work on getting this fixed in a future version

alaa-alshamy commented 3 years ago

@thomasplevy Any news here ?

thomasplevy commented 3 years ago

@alaa-alshamy I've prioritized this as a future update and haven't begun work on it yet. Once we start working on it it'll be moved out of the "Future" milestone and assigned to one of us.

Thanks for your patience.

kimcoleman commented 6 months ago

There were just three strings that used the double quotes, so we reworded them slightly to not need an apostrophe. This will be resolved when this feature branch is merged and released: https://github.com/gocodebox/lifterlms/commit/fa84d1bc36f4519bdb82378e65a3a7ea48829847