Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: use current locale for new documents #1574

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
chore: comment
  • Loading branch information
ephraimduncan committed Jan 8, 2025
commit 00da73047a5c9f6f8dd8baf789bd4a8599c672ee
2 changes: 2 additions & 0 deletions packages/ui/primitives/document-flow/add-settings.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,8 @@ export const AddSettingsFormPartial = ({
DATE_FORMATS.find((format) => format.value === document.documentMeta?.dateFormat)
?.value ?? DEFAULT_DOCUMENT_DATE_FORMAT,
redirectUrl: document.documentMeta?.redirectUrl ?? '',
// The database defaults document language to 'en'
// If a user's preferred language is different (e.g., French), we want their new documents to automatically use their language instead of defaulting to English
language: i18n.locale ?? i18n.locales?.[0] ?? document.documentMeta?.language ?? 'en',
},
},
Expand Down
Loading