lifterlms icon indicating copy to clipboard operation
lifterlms copied to clipboard

Fix i18n dashboard language strings and allow customizing of permalink slugs

Open brianhogg opened this issue 6 months ago • 1 comments

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

Captura de pantalla 2024-02-16 a las 5 11 35 p  m Block translations showing Captura de pantalla 2024-02-16 a las 5 12 56 p  m Menu options and notices showing in the user language rather than the site language (French in this case) Captura de pantalla 2024-02-16 a las 5 21 54 p  m Settings > Permalink options to modify LifterLMS permalink slugs. Shows field added via `lifterlms-assignments` add-on.

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.

brianhogg avatar Feb 08 '24 17:02 brianhogg

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

github-actions[bot] avatar Feb 09 '24 17:02 github-actions[bot]