JS: Converted/updated translation code to TS, fixed some comment counts
Some checks failed
lint-js / build (push) Has been cancelled
test-js / build (push) Has been cancelled

- Migrated translation service to TS, stripping a lot of now unused code
  along the way.
- Added test to cover translation service.
- Fixed some comment count issues, where it was not showing correct
  value. or updating, on comment create or delete.
This commit is contained in:
Dan Brown
2024-10-07 22:55:10 +01:00
parent 8b9bcc1768
commit d22413b931
8 changed files with 152 additions and 146 deletions

View File

@ -137,8 +137,8 @@ window.$events.showValidationErrors(error);
// Translator
// Take the given plural text and count to decide on what plural option
// to use, Similar to laravel's trans_choice function but instead
// takes the direction directly instead of a translation key.
window.trans_plural(translationString, count, replacements);
// takes the translation text directly instead of a translation key.
window.$trans.choice(translationString, count, replacements);
// Component System
// Parse and initialise any components from the given root el down.