dengliming commented on code in PR #665:
URL: https://github.com/apache/shenyu-dashboard/pull/665#discussion_r4102707776
##########
src/locales/en-US.json:
##########
@@ -376,10 +377,17 @@
"SHENYU.INSTANCE.SELECT.TYPE.CLIENT": "Client",
"SHENYU.REGISTRY.NAMESPACE": "Namespace",
"SHENYU.REGISTRY.REGISTRY_ID": "RegistryId",
+ "SHENYU.REGISTRY.REGISTRY_ID.INPUT": "Please enter the registry ID",
+ "SHENYU.REGISTRY.REGISTRY_ID.LENGTH": "The registry ID must be no more than
20 characters",
"SHENYU.REGISTRY.ADDRESS": "Address",
+ "SHENYU.REGISTRY.ADDRESS.INPUT": "Please enter the address",
"SHENYU.REGISTRY.PROTOCOL": "Protocol",
+ "SHENYU.REGISTRY.PROTOCOL.INPUT": "Please enter the protocol",
"SHENYU.REGISTRY.USERNAME": "UserName",
+ "SHENYU.REGISTRY.USERNAME.INPUT": "Please enter the username",
"SHENYU.REGISTRY.GROUP": "Group",
+ "SHENYU.REGISTRY.DESCRIPTION.INPUT": "Please enter the description",
Review Comment:
[P3] Translate the namespace and group inputs according to their actual
fields
`SHENYU.REGISTRY.DESCRIPTION.INPUT` is used as the placeholder for both
`namespace` and `group` in `Registry/AddModal.js`, and `DESCRIPTION.LENGTH` is
used for namespace validation. There is no description input in that form:
these values are submitted as `namespace` and `group`, and Admin persists them
as registry connection settings. Adding "Please enter the description" /
"请输入描述" therefore gives the wrong instructions in both fields. Please use
separate namespace/group translation keys and update the form references in
both locales; the namespace length message should also identify the namespace
rather than a description.
##########
src/locales/en-US.json:
##########
@@ -376,10 +377,17 @@
"SHENYU.INSTANCE.SELECT.TYPE.CLIENT": "Client",
"SHENYU.REGISTRY.NAMESPACE": "Namespace",
"SHENYU.REGISTRY.REGISTRY_ID": "RegistryId",
+ "SHENYU.REGISTRY.REGISTRY_ID.INPUT": "Please enter the registry ID",
+ "SHENYU.REGISTRY.REGISTRY_ID.LENGTH": "The registry ID must be no more than
20 characters",
Review Comment:
[P3] Give the address validator its own length message
This key is also used by the `address` field's `max: 256` rule in
`src/routes/System/Registry/AddModal.js` (line 145). With this new translation,
entering a 257-character address displays "The registry ID must be no more than
20 characters" underneath the address input, even when the registry ID is
valid. Admin's `RegistryDTO.address` likewise uses `@Length(max = 256)`. Please
add an address-specific length key in both locales and point that validator to
it, retaining this key for the registry ID. The shared-key wiring predates this
PR, but the new explicit text must match all callers.
##########
src/locales/en-US.json:
##########
@@ -376,10 +377,17 @@
"SHENYU.INSTANCE.SELECT.TYPE.CLIENT": "Client",
"SHENYU.REGISTRY.NAMESPACE": "Namespace",
"SHENYU.REGISTRY.REGISTRY_ID": "RegistryId",
+ "SHENYU.REGISTRY.REGISTRY_ID.INPUT": "Please enter the registry ID",
+ "SHENYU.REGISTRY.REGISTRY_ID.LENGTH": "The registry ID must be no more than
20 characters",
"SHENYU.REGISTRY.ADDRESS": "Address",
+ "SHENYU.REGISTRY.ADDRESS.INPUT": "Please enter the address",
"SHENYU.REGISTRY.PROTOCOL": "Protocol",
+ "SHENYU.REGISTRY.PROTOCOL.INPUT": "Please enter the protocol",
"SHENYU.REGISTRY.USERNAME": "UserName",
+ "SHENYU.REGISTRY.USERNAME.INPUT": "Please enter the username",
Review Comment:
[P3] Include the password placeholder listed in #651
The Registry password input calls
`getIntlContent("SHENYU.REGISTRY.PASSPORT.INPUT")`, but this key is still
absent from both locale files in the PR. A scan of all `getIntlContent`
references in `Registry/AddModal.js` against the updated locales leaves this as
the remaining missing key, so that placeholder will still be empty. Please add
the English and Chinese password prompts to complete the issue's requested
coverage.
--
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]