Skip to content

Commit

Permalink
chore: Move lang folder to the root (#294)
Browse files Browse the repository at this point in the history

---------

Co-authored-by: leaftail1880 <[email protected]>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
  • Loading branch information
3 people authored Oct 4, 2024
1 parent 9ed737a commit b15125f
Show file tree
Hide file tree
Showing 15 changed files with 1,168 additions and 3,922 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/i18n.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ jobs:
# pull only from main branch so it will not fetch all tags
git pull origin main
git add apps/postybirb-ui/src/lang/*
git add lang/*
# ignore when nothing to commit
yarn exitzero "git commit -m 'ci: extract i18n messages'"
Expand Down
3 changes: 1 addition & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,5 @@ testem.log
Thumbs.db

# Public UI dependencies
apps/postybirb-ui/public/uppy-i18n/*.js
.nx/cache
.nx/workspace-data
.nx/workspace-data
2 changes: 1 addition & 1 deletion apps/postybirb-ui/src/app/app-i18n-provider.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ export function AppI18nProvider({ children }: AppI18nProviderProps) {
// because browser's import call does it automatically
// eslint-disable-next-line no-param-reassign
lang = lang ?? 'en';
const { messages } = await import(`../lang/${lang}.po`);
const { messages } = await import(`../../../../lang/${lang}.po`);
i18n.loadAndActivate({ locale: lang, messages });
if (!loaded) setLoaded(true);
},
Expand Down
8 changes: 0 additions & 8 deletions apps/postybirb-ui/src/app/languages.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,3 @@ export const languages = [
[msg`Russian`, 'ru'],
[msg`Spanish`, 'es'],
] as const;

// Map of the language codes for the file picker
// https://uppy.io/docs/locales/#list-of-locales
export const uppyLocales = {
en: 'en_US',
ru: 'ru_RU',
es: 'es_ES',
} as Record<string, string>;
Loading

0 comments on commit b15125f

Please sign in to comment.