Skip to content

web: the return of pseudolocalization#7190

Merged
kensternberg-authentik merged 2 commits intomainfrom
web/lit-pseudolocalize
Oct 16, 2023
Merged

web: the return of pseudolocalization#7190
kensternberg-authentik merged 2 commits intomainfrom
web/lit-pseudolocalize

Conversation

@kensternberg-authentik
Copy link
Contributor

@kensternberg-authentik kensternberg-authentik commented Oct 16, 2023

Details

The move to lit-locale lost the ability to automagically pseudolocalize the UI, a useful utility for checking that additions to the UI have been properly cataloged as translation targets. This short script (barely 40 lines) digs deep into the lit-localize toolkit and produces a pre-translated translation bundle in the target format folder.

Checklist

  • Local tests pass (ak test authentik/)
  • The code has been formatted (make lint-fix)

If an API change has been made

  • The API schema has been updated (make gen-build)

If changes to the frontend have been made

  • The code has been formatted (make web). [Almost by definition!]
  • The translation files have been updated (make i18n-extract)

If applicable

  • The documentation has been updated
  • The documentation has been formatted (make website)

The move to lit-locale lost the ability to automagically pseudolocalize the UI, a useful
utility for checking that additions to the UI have been properly cataloged as
translation targets.  This short script (barely 40 lines) digs deep into the lit-localize
toolkit and produces a pretranslated translation bundle in the target format folder.
@netlify
Copy link

netlify bot commented Oct 16, 2023

Deploy Preview for authentik-storybook ready!

Name Link
🔨 Latest commit 79300b2
🔍 Latest deploy log https://app.netlify.com/sites/authentik-storybook/deploys/652d83bccc6d7f0008e949fc
😎 Deploy Preview https://deploy-preview-7190--authentik-storybook.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@netlify
Copy link

netlify bot commented Oct 16, 2023

Deploy Preview for authentik ready!

Name Link
🔨 Latest commit 79300b2
🔍 Latest deploy log https://app.netlify.com/sites/authentik/deploys/652d83bc3c725e000844ab7c
😎 Deploy Preview https://deploy-preview-7190--authentik.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
Lighthouse
Lighthouse
1 paths audited
Performance: 96 (no change from production)
Accessibility: 90 (no change from production)
Best Practices: 100 (no change from production)
SEO: 80 (no change from production)
PWA: -
View the detailed breakdown and full score reports

To edit notification comments on pull requests, go to your Netlify site configuration.

"precommit": "run-s tsc lit-analyse lint:precommit lint:spelling prettier",
"prettier-check": "prettier --check .",
"prettier": "prettier --write .",
"pseudolocalize:build-extract-script": "cd scripts && tsc --esModuleInterop --module es2020 --moduleResolution 'node' pseudolocalize.ts && mv pseudolocalize.js pseudolocalize.mjs",
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Running scripts in this format requires ES Module format, which Node requires be suffixed as .mjs.

It's a crime that package.json doesn't support comments.

@kensternberg-authentik kensternberg-authentik marked this pull request as ready for review October 16, 2023 18:43
@kensternberg-authentik kensternberg-authentik requested a review from a team as a code owner October 16, 2023 18:43
@codecov
Copy link

codecov bot commented Oct 16, 2023

Codecov Report

All modified lines are covered by tests ✅

Comparison is base (41bb1ca) 92.64% compared to head (79300b2) 91.16%.
Report is 16 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #7190      +/-   ##
==========================================
- Coverage   92.64%   91.16%   -1.48%     
==========================================
  Files         568      584      +16     
  Lines       28049    28680     +631     
==========================================
+ Hits        25986    26147     +161     
- Misses       2063     2533     +470     
Flag Coverage Δ
e2e 51.17% <ø> (+0.05%) ⬆️
integration ?
unit 89.62% <ø> (+0.06%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

see 70 files with indirect coverage changes

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@kensternberg-authentik kensternberg-authentik merged commit 9e568e1 into main Oct 16, 2023
@kensternberg-authentik kensternberg-authentik deleted the web/lit-pseudolocalize branch October 16, 2023 20:54
kensternberg-authentik added a commit that referenced this pull request Oct 16, 2023
* main:
  web: the return of pseudolocalization (#7190)
  rbac: revisions (#7188)
  website: bump @babel/traverse from 7.21.4 to 7.23.2 in /website (#7187)
  web: bump API Client version (#7186)
  core: Initial RBAC (#6806)
  lifecycle: re-fix system migrations (#7185)
  outposts: use channel groups instead of saving channel names (#7183)
  sources/ldap: made ldap_sync_single calls from ldap_sync_all asynchronous (#6862)
  website/docs: fix API OAuth token usage (#7159)
  web: bump rollup from 4.1.3 to 4.1.4 in /web (#7181)
  web: bump @formatjs/intl-listformat from 7.4.2 to 7.5.0 in /web (#7182)
  web: bump @rollup/plugin-replace from 5.0.3 to 5.0.4 in /web (#7177)
  web: bump the sentry group in /web with 2 updates (#7175)
  web: bump @rollup/plugin-commonjs from 25.0.5 to 25.0.7 in /web (#7178)
  web: bump yaml from 2.3.2 to 2.3.3 in /web (#7176)
  web: bump rollup from 4.0.2 to 4.1.3 in /web (#7179)
  web: bump the wdio group in /tests/wdio with 3 updates (#7180)
kensternberg-authentik added a commit that referenced this pull request Oct 17, 2023
* main: (23 commits)
  ci: test with postgres 16
  translate: Updates for file web/xliff/en.xlf in fr (#7189)
  web: bump the esbuild group in /web with 2 updates (#7195)
  web: bump the eslint group in /tests/wdio with 2 updates (#7192)
  core: bump ruff from 0.0.292 to 0.1.0 (#7194)
  web: bump the eslint group in /web with 2 updates (#7193)
  web: the return of pseudolocalization (#7190)
  rbac: revisions (#7188)
  website: bump @babel/traverse from 7.21.4 to 7.23.2 in /website (#7187)
  web: bump API Client version (#7186)
  core: Initial RBAC (#6806)
  lifecycle: re-fix system migrations (#7185)
  outposts: use channel groups instead of saving channel names (#7183)
  sources/ldap: made ldap_sync_single calls from ldap_sync_all asynchronous (#6862)
  website/docs: fix API OAuth token usage (#7159)
  web: bump rollup from 4.1.3 to 4.1.4 in /web (#7181)
  web: bump @formatjs/intl-listformat from 7.4.2 to 7.5.0 in /web (#7182)
  web: bump @rollup/plugin-replace from 5.0.3 to 5.0.4 in /web (#7177)
  web: bump the sentry group in /web with 2 updates (#7175)
  web: bump @rollup/plugin-commonjs from 25.0.5 to 25.0.7 in /web (#7178)
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants