-
Notifications
You must be signed in to change notification settings - Fork 17
ECHO-620 add Italian language support in the app #399
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -50,19 +50,20 @@ const FormSchema = z.object({ | |
| is_get_reply_enabled: z.boolean(), | ||
| is_project_notification_subscription_allowed: z.boolean(), | ||
| is_verify_enabled: z.boolean(), | ||
| language: z.enum(["en", "nl", "de", "fr", "es"]), | ||
| language: z.enum(["en", "nl", "de", "fr", "es", "it"]), | ||
| verification_topics: z.array(z.string()), | ||
| }); | ||
|
|
||
| type ProjectPortalFormValues = z.infer<typeof FormSchema>; | ||
|
|
||
| type LanguageCode = "de" | "en" | "es" | "fr" | "nl"; | ||
| type LanguageCode = "de" | "en" | "es" | "fr" | "nl" | "it"; | ||
|
|
||
| const LANGUAGE_TO_LOCALE: Record<LanguageCode, string> = { | ||
| de: "de-DE", | ||
| en: "en-US", | ||
| es: "es-ES", | ||
| fr: "fr-FR", | ||
| it: "it-IT", | ||
| nl: "nl-NL", | ||
| }; | ||
|
|
||
|
Comment on lines
+53
to
69
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🧹 Nitpick | 🔵 Trivial Unify You’ve extended the schema, - const projectLanguageCode = (project.language ?? "en") as
- | "en"
- | "nl"
- | "de"
- | "fr"
- | "es";
+ const projectLanguageCode = (project.language ?? "en") as LanguageCode;Keeps runtime behavior the same, but keeps the type system honest when more languages get added. Also applies to: 197-203 |
||
|
|
@@ -465,6 +466,7 @@ const ProjectPortalEditorComponent: React.FC<ProjectPortalEditorProps> = ({ | |
| { label: t`German`, value: "de" }, | ||
| { label: t`Spanish`, value: "es" }, | ||
| { label: t`French`, value: "fr" }, | ||
| { label: t`Italian`, value: "it" }, | ||
| ]} | ||
| {...field} | ||
| /> | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧹 Nitpick | 🔵 Trivial
Harden external menu links with
rel="noreferrer noopener".The new “Help us translate” link (and the existing Documentation link) open a new tab without
rel, which leaveswindow.openerwired up. Easy win to lock this down:Also applies to: 175-185, 188-195
🤖 Prompt for AI Agents