lifterlms
lifterlms copied to clipboard
Fix i18n dashboard language strings and allow customizing of permalink slugs
Description
Various i18n fixes:
- Menu options in the WordPress admin should now show in the user's language
- Loads the text domain later to allow Loco Translate to change where translations are loaded from
- Set the slugs for courses, memberships and other core taxonomies to the current site language, and provide options to change them from Settings > Permalinks. This avoids slugs inadvertently changing if a user with access to flush the permalinks has a different language set than the site language.
- LifterLMS blocks in the Course editor and elsewhere now load translations, and are translatable via Loco Translate
Fixes #2324 Fixes #2429 Fixes #2525
How has this been tested?
Manually. The current E2E doesn't permit tests before LifterLMS has been loaded, and switching languages was flaky.
Screenshots
Checklist:
- [x] This PR requires and contains at least one changelog file. <!-- To create a changelog yml file:
npm run dev changelog add -- -i
and follow the prompt. See also: https://github.com/gocodebox/lifterlms/blob/trunk/packages/dev/README.md#changelog-add --> - [x] My code has been tested.
- [x] My code passes all existing automated tests.
- [x] My code follows the LifterLMS Coding & Documentation Standards.
Coverage report
[!CAUTION] An unexpected error occurred. For more details, check console
Error: The process '/usr/bin/git' failed with exit code 128
St.:grey_question: |
Category | Percentage | Covered / Total |
---|---|---|---|
🟡 | Statements | 77.18% | 328/425 |
🟡 | Branches | 68.45% | 141/206 |
🟢 | Functions | 82.93% | 68/82 |
🟡 | Lines | 76.68% | 319/416 |
Test suite run success
169 tests passing in 22 suites.
Report generated by 🧪jest coverage report action from e023c83083389983ba85455295baa5c9857cdaea