Commit graph

21 commits

Author SHA1 Message Date
Ken Sternberg fef7892821 web: localization
This package contains all the localization strings needed by all of the other packages in our
application, and provides tooling for making them available as JavaScript translation catalogs
suitable for `lit-localize`. It does this by scanning the source trees of all of the packages and
assembling the complete list of translatable (and already translated) strings into the `./xliff`
folder.

Commands provided:

- extract-locales: extracts any string tagged as translatable (i.e., with the `msg(...)` syntax) and
  integrates any newfound strings into the existing XLIFF files. Also: reprocesses the
  `sourceLocale` file to create a pseudolocale for testing purposes. (This must be done
  sequentially, as the `sourceLocale` file must be built before the conversion takes place.)
- build: Convert XLIFF to Typescript, compile, lint, and format. The `lint` pass is especially
  important as it enforces the "backquotes to doublequotes when no template in use" rule, and the
  `format` pass must always come last to ensure our committed code matches our standard.
- clean: Delete the `dist` and `src` folders, as well as the constructed `.mjs` file for
  pseudolocalization.

Due to the circular nature of translation's dependencies (*every* package must be scanned for new
strings, and if there are new strings, *every* package must then be rebuilt), extraction is not
performed automatically. This introduces the risk that a developer may not run the extraction and
test as needed. The reminder in the GitHub pull request template is there for a reason.

If you add a new package to the monorepo and it has strings that need translating, you must add it
to the list of `inputFiles` scanned in `lit-localize.json`.

---

(p.s.: The content you just read is also in the README file for this package.)
2024-01-09 14:14:25 -08:00
Ken Sternberg 5d3d2a2548 Added a 'clean' pass. 2024-01-09 13:06:10 -08:00
Ken Sternberg 3aae23e23f The user's URL options should (must!) override the brand-local request. 2024-01-09 11:12:23 -08:00
Ken Sternberg 058cdc5180 Pure build version of locales. No "src", no "dist"; just the locale files and instructions on building them. 2024-01-09 11:11:53 -08:00
Ken Sternberg a241ef03cb Still refining the build process. 2024-01-09 09:04:02 -08:00
Ken Sternberg 4eec37d4d1 raw moves toward isolating localization 2024-01-08 15:49:06 -08:00
Ken Sternberg b053c17fb0 Merge branch 'main' into web/monorepo-stage-1
* main:
  web: Replace  calls to `rootInterface()?.tenant?` with a contextual `this.tenant` object (#7778)
  web: abstract `rootInterface()?.config?.capabilities.includes()` into `.can()` (#7737)
2024-01-08 15:44:50 -08:00
Ken Sternberg 8a07541a32 Merge branch 'dev' into web/monorepo-stage-1
* dev:
  web: update some locale details (#8090)
2024-01-08 09:35:54 -08:00
Ken Sternberg f8f03f3fce Merge remote-tracking branch 'refs/remotes/origin/web/monorepo-stage-1' into web/monorepo-stage-1
* refs/remotes/origin/web/monorepo-stage-1:
  fix for broken lint pass.
  web: strengthened weak regex in import map.
  web: move the content of the application to a sub-folder and build it via lage
  Another stash to check something else...
  Stashing this to go back to harmonizing package.json
  web: first stab at monorepo.
  web: moved all of the authentik building materials into a package.
2024-01-08 09:34:00 -08:00
Ken Sternberg c4b34b2d5b fix for broken lint pass. 2024-01-08 08:42:16 -08:00
Ken Sternberg bdc2f68a4d web: strengthened weak regex in import map. 2024-01-08 08:42:16 -08:00
Ken Sternberg bc91221c4c web: move the content of the application to a sub-folder and build it via lage
**This commit**

- Moves the content of the authentik web-ui to a subfolder, `packages/authentik`
- Mirrors all of the commands from package.json in the root package, and
  mirrors them *again* in Lage, so that lage will run them all as-is.
- Changes paths for things like sonarJS, Codespell, and such to find the
  correct sources of their content.
- Update `glob` and `pseudolocale` versions; they were throwing exceptions.
- Update Storybook-Vite's CSS import map function to be a little more readable.
2024-01-08 08:42:16 -08:00
Ken Sternberg 3f3ab32502 Another stash to check something else... 2024-01-08 08:42:16 -08:00
Ken Sternberg 54aae94143 web: first stab at monorepo. 2024-01-08 08:42:16 -08:00
Ken Sternberg cb685c42bc web: moved all of the authentik building materials into a package. 2024-01-08 08:42:16 -08:00
Ken Sternberg 06f64ed068 fix for broken lint pass. 2024-01-05 16:17:20 -08:00
Ken Sternberg bf618ab790 web: strengthened weak regex in import map. 2024-01-05 16:09:35 -08:00
Ken Sternberg a8f0e0dd12 web: move the content of the application to a sub-folder and build it via lage
**This commit**

- Moves the content of the authentik web-ui to a subfolder, `packages/authentik`
- Mirrors all of the commands from package.json in the root package, and
  mirrors them *again* in Lage, so that lage will run them all as-is.
- Changes paths for things like sonarJS, Codespell, and such to find the
  correct sources of their content.
- Update `glob` and `pseudolocale` versions; they were throwing exceptions.
- Update Storybook-Vite's CSS import map function to be a little more readable.
2024-01-05 15:56:44 -08:00
Ken Sternberg a945d588a9 Another stash to check something else... 2024-01-05 13:13:23 -08:00
Ken Sternberg 4b66462925 web: first stab at monorepo. 2024-01-05 13:13:23 -08:00
Ken Sternberg a2ea248747 web: moved all of the authentik building materials into a package. 2024-01-05 13:13:23 -08:00