RoyLee1224 commented on code in PR #51558:
URL: https://github.com/apache/airflow/pull/51558#discussion_r2138268628


##########
airflow-core/src/airflow/ui/src/i18n/locales/en/admin.json:
##########
@@ -0,0 +1,146 @@
+{
+  "columns":{
+    "description": "Description",
+    "key": "Key",
+    "name": "Name",
+    "value": "Value"
+  },
+  "config":{
+    "columns":{
+      "section": "Section"
+    },
+    "title": "Airflow Configuration"
+  },
+  "connections":{
+    "add":"Add Connection",
+    "columns":{
+      "connectionId": "Connection ID",
+      "connectionType": "Connection Type",
+      "host": "Host",
+      "port": "Port"
+    },
+    "delete":{
+      "deleteConnection_one": "Delete {{count}} connection",
+      "deleteConnection_other": "Delete {{count}} connections",
+      "firstConfirmMessage_one": "You are about to delete the following 
connection:",
+      "firstConfirmMessage_other": "You are about to delete the following 
connections:",
+      "secondConfirmMessage": "This action is permanent and cannot be undone. 
<strong>Are you sure you want to proceed?</strong>",

Review Comment:
   I noticed that hardcoding a space in the JSX (e.g., {" "}) between the two 
sentences isn't ideal for internationalization, as some languages, like 
Chinese, don't use a leading space.
   
   To solve this, I've included the leading space within the 
`thirdConfirmMessage` key in the source English JSON file.



##########
airflow-core/src/airflow/ui/src/i18n/locales/en/admin.json:
##########
@@ -0,0 +1,146 @@
+{
+  "columns":{
+    "description": "Description",
+    "key": "Key",
+    "name": "Name",
+    "value": "Value"
+  },
+  "config":{
+    "columns":{
+      "section": "Section"
+    },
+    "title": "Airflow Configuration"
+  },
+  "connections":{
+    "add":"Add Connection",
+    "columns":{
+      "connectionId": "Connection ID",
+      "connectionType": "Connection Type",
+      "host": "Host",
+      "port": "Port"
+    },
+    "delete":{
+      "deleteConnection_one": "Delete {{count}} connection",
+      "deleteConnection_other": "Delete {{count}} connections",
+      "firstConfirmMessage_one": "You are about to delete the following 
connection:",
+      "firstConfirmMessage_other": "You are about to delete the following 
connections:",
+      "secondConfirmMessage": "This action is permanent and cannot be undone. 
<strong>Are you sure you want to proceed?</strong>",

Review Comment:
   This is the approach I came up with, but I'm very open to other suggestions 
if there's a more standard or preferred way to do this.



-- 
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: commits-unsubscr...@airflow.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to