browsertrix/backend/btrixcloud
Emma Segal-Grossman b650762a45
Allow configuring available languages from helm chart (#2230)
Closes #2223 

- [x] Adds `localesAvailable` to `/api/settings` endpoint, and uses that
list if available, rather than the full list of translated locales, to
determine which options to display to users
- [x] ~~Uses the user's browser locales, filtered to the current
language setting, for formatting numbers, dates, and durations~~
- [x] Adds & persists checkbox for "use same language for formatting
dates and numbers" in user settings
- [x] Replaces uses of `sl-format-bytes` with `localize.bytes(...)`, and
`sl-format-date` with replacement `btrix-format-date` that properly
handles fallback locales
- [x] Caches all number/duration/datetime formatters by a combined key
consisting of app language, browser language, browser setting, and
formatter options so that all formatters can be reused if needed
(previously any formatter with non-default options would be recreated
every render)
- [x] Splits out ordinal formatting from number formatter, as it didn't
make much sense in some non-English locales
- [x] Adds a little demo of date/time/duration/number formatting so you
can see what effect your language settings have
  


https://github.com/user-attachments/assets/724858cb-b140-4d72-a38d-83f602c71bc7

---------

Signed-off-by: emma <hi@emma.cafe>
Co-authored-by: Ilya Kreymer <ikreymer@gmail.com>
Co-authored-by: Ilya Kreymer <ikreymer@users.noreply.github.com>
2024-12-13 22:31:26 -05:00
..
migrations fix resetting of invalid logins: (#2002) 2024-08-07 12:36:06 -07:00
operator Configure browsertrix proxies (#1847) 2024-10-02 18:35:45 -07:00
__init__.py
auth.py Include user and user org info in login response (#2014) 2024-08-12 18:51:42 -07:00
background_jobs.py Move org storage recalculation into background job (#2138) 2024-11-19 17:32:57 -05:00
basecrawls.py switch to simpler streaming download + multiwacz metadata improvements: (#1982) 2024-10-03 16:13:31 -07:00
colls.py switch to simpler streaming download + multiwacz metadata improvements: (#1982) 2024-10-03 16:13:31 -07:00
crawlconfigs.py Fix nightly tests: modify kubectl exec syntax for creating new minio bucket (#2097) 2024-10-21 17:41:19 -07:00
crawlmanager.py Move org storage recalculation into background job (#2138) 2024-11-19 17:32:57 -05:00
crawls.py switch to simpler streaming download + multiwacz metadata improvements: (#1982) 2024-10-03 16:13:31 -07:00
db.py Serialize datetimes with Z suffix (#2058) 2024-09-12 16:16:13 -07:00
emailsender.py Send subscription cancelation email (#2234) 2024-12-12 11:52:38 -08:00
invites.py fix: firstOrgAdmin being set to true even if invite was not for an admin (#2110) 2024-10-08 16:42:30 -07:00
k8sapi.py Configure browsertrix proxies (#1847) 2024-10-02 18:35:45 -07:00
main_bg.py Move org storage recalculation into background job (#2138) 2024-11-19 17:32:57 -05:00
main_op.py Consolidate ops class initialization (#2117) 2024-10-30 15:33:22 -04:00
main.py Allow configuring available languages from helm chart (#2230) 2024-12-13 22:31:26 -05:00
models.py Add superuser endpoint to get user emails with org info (#2211) 2024-12-09 16:38:01 -08:00
ops.py Consolidate ops class initialization (#2117) 2024-10-30 15:33:22 -04:00
orgs.py Send subscription cancelation email (#2234) 2024-12-12 11:52:38 -08:00
pages.py Serialize datetimes with Z suffix (#2058) 2024-09-12 16:16:13 -07:00
pagination.py
profiles.py Configure browsertrix proxies (#1847) 2024-10-02 18:35:45 -07:00
storages.py 1.12.2 release -> main (#2181) 2024-11-26 11:17:07 -08:00
subs.py Send subscription cancelation email (#2234) 2024-12-12 11:52:38 -08:00
uploads.py optimize org quota lookups (#1973) 2024-07-25 14:00:16 -07:00
users.py Add superuser endpoint to get user emails with org info (#2211) 2024-12-09 16:38:01 -08:00
utils.py Serialize datetimes with Z suffix (#2058) 2024-09-12 16:16:13 -07:00
version.py version: bump to 1.13.0-beta.0 2024-10-10 11:38:13 -07:00
webhooks.py Add webhooks for qaAnalysisStarted, qaAnalysisFinished, and crawlReviewed (#1974) 2024-07-25 16:53:49 -07:00