-
Notifications
You must be signed in to change notification settings - Fork 15.2k
i18n: Move translations to ui/public
and enable dynamic loading to reduce bundle size
#51735
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
Conversation
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.
Looks good for me (except one sanity question)
(as wel as CI needs to turn green :-D) |
1105721
to
f82036d
Compare
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.
You have a lot of unrelated changes which makes the diff hard to review
airflow-core/src/airflow/ui/openapi-gen/requests/core/CancelablePromise.ts
Outdated
Show resolved
Hide resolved
airflow-core/src/airflow/ui/openapi-gen/requests/core/OpenAPI.ts
Outdated
Show resolved
Hide resolved
cf338f9
to
e09be62
Compare
f7e3bba
to
6376d32
Compare
I don't understand why this Tests AMD / Airflow CTL tests / airflow-ctl:P3.9 tests (pull_request) CI suddenly started failing. |
|
@pierrejeambrun , Thank you for reviewing my PR ;) I’ve resolved all the conflicts, and as previously discussed, The CI checks for these changes have also just passed. |
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.
Fantastic !
Wooohooo ! |
Finally! |
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.
Good job! #protm
…reduce bundle size (apache#51735) * Feat(i18n): Move translation files to public, use i18next-http-backend * Adopted i18next-http-backend * Fix(i18n): Update locales directory path to public for translation files * Fix(i18n): Update static file path for translation locales * Fix(i18n): Update translation config file path * Fix(i18n): Update ESLint configuration to include jsonc-parser * Fix(i18n): Update ESLint file patterns and add 'components' to namespaces * Fix(i18n): Initialize i18n(en) in DagCard tests * chore: enforce consistent array type syntax per @typescript-eslint rule * Revert "chore: enforce consistent array type syntax per @typescript-eslint rule" This reverts commit d218738. * Fix(i18n): Ignore i18n locale files in ESLint TypeScript rules * Fix(tests): Remove unused imports and clean up test setup * Apply pre-commit formatting to openapi-gen/ files as per apache#51755 * Fix(eslint): Update i18n and TypeScript rules configuration * Apply ESLint and i18nRule * Mov Arabic and French translations to public * Fix: Update translation file paths to public directory * Moved i18n doc and completeness checker script from public to dev/i18n * fix(i18n): i18n policy document translation completeness check command
Summary
ui/src/i18n/locales
toui/public/i18n/locales
.i18next-http-backend
to load translation files via HTTP dynamically.loadPath
to/static/i18n/locales/{{lng}}/{{ns}}.json
for both environments.Details
/static/i18n
, ensuring translation files are served correctly during development.dist
directory.config.ts
) was updated to use a unified HTTP path for translation files, simplifying the frontend logic.Before
After
Breaking Changes
src
, please update them to use the new location inpublic/i18n/locales
.closes: #51123
Opened a new PR to avoid potential issues with translation file conflicts in the previous one.
Sorry for the inconvenience.
^ Add meaningful description above
Read the Pull Request Guidelines for more information.
In case of fundamental code changes, an Airflow Improvement Proposal (AIP) is needed.
In case of a new dependency, check compliance with the ASF 3rd Party License Policy.
In case of backwards incompatible changes please leave a note in a newsfragment file, named
{pr_number}.significant.rst
or{issue_number}.significant.rst
, in airflow-core/newsfragments.