MuckRock / documentcloud-frontend

DocumentCloud's front end source code - Please report bugs, issues and feature requests to info@documentcloud.org
https://www.documentcloud.org
GNU Affero General Public License v3.0
18 stars 5 forks source link

Standardize on 'en', not 'en-US' as a language code, but register both #868

Closed eyeseast closed 15 hours ago

eyeseast commented 16 hours ago

Trying to solve #818

My browser sets the accept-language header and window.navigator.language to en-US, but we weren't registering that as a locale, only en. So this adds that registration and also standardizes our own setting to en.

github-actions[bot] commented 16 hours ago

Coverage Report

Status Category Percentage Covered / Total
🔵 Lines 30.9% 6727 / 21766
🔵 Statements 30.9% 6727 / 21766
🔵 Functions 49.72% 274 / 551
🔵 Branches 75.65% 1013 / 1339
File Coverage
File Stmts Branches Functions Lines Uncovered Lines
Changed Files
src/lib/components/documents/Access.svelte 100% 100% 100% 100%
src/lib/components/documents/BulkActions.svelte 0% 0% 0% 0% 1-113
src/lib/i18n/index.js 100% 66.66% 100% 100%
src/lib/utils/language.ts 100% 100% 100% 100%
src/lib/utils/tests/language.test.ts 100% 100% 100% 100%
src/routes/+layout.ts 0% 0% 0% 0% 1
Generated in workflow #770 for commit dd5672e by the Vitest Coverage Report Action
netlify[bot] commented 16 hours ago

Deploy Preview for documentcloud-frontend ready!

Name Link
Latest commit dd5672ee1176d0b039748dfe41721da1bc786a50
Latest deploy log https://app.netlify.com/sites/documentcloud-frontend/deploys/673fa934fd7b830008ea0814
Deploy Preview https://deploy-preview-868.muckcloud.com
Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

Lighthouse
1 paths audited
Performance: 31
Accessibility: 85
Best Practices: 92
SEO: 91
PWA: -
View the detailed breakdown and full score reports

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