pierrejeambrun commented on code in PR #51735:
URL: https://github.com/apache/airflow/pull/51735#discussion_r2152550869


##########
airflow-core/src/airflow/ui/public/i18n/check_translations_completeness.py:
##########


Review Comment:
   i18n policy `README.md` can be publictly exposes, I mean I understand why 
this could be helpful. On the other hand or dev script 
"check_translations_completeness" doesn't bring anything and probably shouldn't 
be in public.



##########
airflow-core/src/airflow/ui/public/i18n/README.md:
##########
@@ -177,7 +177,7 @@ Translation conflicts MUST be resolved according to the 
procedures outlined in s
 The following steps outline the process for approving a new locale to be added 
to the supported locales:
 
 - Creating a PR for adding the suggested locale to the codebase ([see 
example](https://github.com/apache/airflow/pull/51258/files)), which includes:
-    - The locale files (translated according to the guidelines) in the 
`airflow-core/src/airflow/ui/src/i18n/locales/<LOCALE_CODE>` directory, where 
`<LOCALE_CODE>` is the code of the language according to ISO 639-1 standard 
(e.g., `fr` for French). Languages with regional variants should be handled in 
separate directories, where the name is suffixed with `-<VARIANT>`, and 
`<VARIANT>` is the variant that follows ISO 3166-1 or UN M.49 codes in 
lowercase (e.g., `zh-tw` for Taiwanese Mandarin).
+    - The locale files (translated according to the guidelines) in the 
`airflow-core/src/airflow/ui/public/i18n/locales/<LOCALE_CODE>` directory, 
where `<LOCALE_CODE>` is the code of the language according to ISO 639-1 
standard (e.g., `fr` for French). Languages with regional variants should be 
handled in separate directories, where the name is suffixed with `-<VARIANT>`, 
and `<VARIANT>` is the variant that follows ISO 3166-1 or UN M.49 codes in 
lowercase (e.g., `zh-tw` for Taiwanese Mandarin).
     - Making the required modifications in 
`airflow-core/src/airflow/ui/src/i18n/config.ts` ([see 
example](https://github.com/apache/airflow/pull/51258/files#diff-bfb4d5fafd26d206fb4a545a41ba303f33d15a479d21e0a726fd743bdf9717ff)).

Review Comment:
   This line also keeps a referrence to `ui/src` and need to be updated



##########
airflow-core/src/airflow/ui/eslint.config.js:
##########
@@ -35,8 +35,9 @@ import { unicornRules } from "./rules/unicorn.js";
  * @see [ESLint configuration](https://eslint.org/docs/latest/use/configure/)
  */
 export default /** @type {const} @satisfies {ReadonlyArray<FlatConfig.Config>} 
*/ ([
+  i18nRules,
   // Global ignore of dist directory
-  { ignores: ["**/dist/", "**coverage/"] },
+  { ignores: ["**/dist/", "**coverage/", "public/i18n/locales/**/*.json"] },

Review Comment:
   I don't think they should be ignored, we actually want the `i18nRules` to be 
applied on the translation files.



##########
airflow-core/src/airflow/ui/package.json:
##########
@@ -85,6 +86,7 @@
     "eslint-plugin-unicorn": "^55.0.0",
     "globals": "^15.15.0",
     "happy-dom": "^17.4.6",
+    "jsonc-eslint-parser": "^2.4.0",

Review Comment:
   Why is that needed?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to