Граф коммитов

12 Коммитов

Автор SHA1 Сообщение Дата
Ferdinand Thiessen 25a6855df3
tests: Fix cypress config to resolve Vue with runtime compiler
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
2024-06-13 17:22:55 +02:00
Ferdinand Thiessen 24f5d4b888
chore: Add SPDX license information and REUSE CI workflow
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
2024-06-13 12:39:32 +02:00
Ferdinand Thiessen 572a73d1cf
chore: Move to ESM package
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
2024-01-09 14:34:51 +01:00
Ferdinand Thiessen 9dd5762286
enh: Split translations by components to only include needed strings in app bundles
Translations are extracted, not translated strings are discarded (fallback to english) and compressed.
On build time the translations are then injected by a vite plugin depending on the importing files so only used translations are imported.

Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
2023-12-06 19:54:15 +01:00
Ferdinand Thiessen eafc329cff fix: Make sure the `translations` helper can be imported by vite, webpack and cypress
When imported in vite config it will be executed in ESM context where dynamic require of modules is not available.
But when converted to ES module it works in vite config + webpack config, but not in Cypress config.
Because our package type is `commonjs` so Typescript files are executed as CommonJS Typescript, so the Cypress config can not require "import" an ES module.

Solutions: Either set out package to `type: "module"` or as done here rewrite all require calls to dynamic import which is available on CommonJS *and* ES module.

Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
2023-07-11 18:02:48 +02:00
Ferdinand Thiessen 8a3037ad92 feat: Migrate module build to vite
* Webpack emitted invalid ES module code, as it still contained `require` calls which
  are undefined on ES modules
* Build time is much shorter
* Built assets are much smaller (570 kB vs 930 kB)
* Remove unneeded import

Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
2023-07-11 18:02:48 +02:00
Ferdinand Thiessen 4c614041d0 fix: Ensure `extract-l10n` extracts strings from properties like `:aria-label="t()"`
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
2023-06-26 15:42:28 +02:00
Jonas Rittershofer 50e88a1227
Fix translation extraction
Signed-off-by: Jonas Rittershofer <jotoeri@users.noreply.github.com>
2021-03-28 23:38:29 +02:00
John Molakvoæ (skjnldsv) 78e4a0d323
Do not check l10n comments
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
2020-11-24 09:41:11 +01:00
Julius Härtl d9b0fad19d
Use hex value for snapshots and extend test cases
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2020-10-14 18:19:59 +02:00
Julius Härtl 9a6e5afc22
Add json export script for usernameToColor snapshots
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2020-10-14 18:19:59 +02:00
Christoph Wurst bd268e3d0e
Add gettext-based translations
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-02-21 11:20:00 +01:00