Skip to content

Commit

Permalink
feat(lang): remove french from supported languages (#84)
Browse files Browse the repository at this point in the history
  • Loading branch information
balzdur authored Aug 25, 2023
2 parents 8967405 + 1468d2a commit 5a915f5
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
5 changes: 5 additions & 0 deletions packages/app-builder/src/routes/ressources/user/language.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -54,10 +54,15 @@ export async function action({ request }: ActionArgs) {
}
}

/**
* The component is hidden when there is only one language available.
*/
export function LanguagePicker() {
const { i18n } = useTranslation<'common'>();
const fetcher = useFetcher<typeof action>();

if (supportedLngs.length === 1) return null;

return (
<Select.Default
value={i18n.language}
Expand Down
3 changes: 1 addition & 2 deletions packages/app-builder/src/services/i18n/i18n-config.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
import 'cronstrue/locales/fr';
import 'cronstrue/locales/en';

export const defaultNS = 'common';

// When adding a new supported lng, add corresponding construe locale above too
export const supportedLngs = ['en', 'fr'] as const;
export const supportedLngs = ['en'] as const;

export const i18nConfig = {
defaultNS,
Expand Down

0 comments on commit 5a915f5

Please sign in to comment.