luoluoyuyu commented on code in PR #17721:
URL: https://github.com/apache/iotdb/pull/17721#discussion_r3309374171


##########
iotdb-core/datanode/src/main/i18n/zh/org/apache/iotdb/db/i18n/DataNodeSchemaMessages.java:
##########
@@ -30,7 +30,7 @@ public final class DataNodeSchemaMessages {
       "更新模板 {} 在 schemaRegion {} 中的子树测点计数失败";
   public static final String RECOVER_SPEND = "恢复 [{}] 耗时:{} ms";
   public static final String SCHEMA_REGION_FAILED_TO_RECOVER =
-      "StorageGroup [%s] 中的 SchemaRegion [%d] 恢复失败。";
+      "SchemaRegion [%d] 在 StorageGroup [%s] 中恢复失败。";

Review Comment:
   SCHEMA_REGION_FAILED_TO_RECOVER now uses [regionId] then [storageGroup], 
matching String.format usage. Ensure all call sites in this PR use the same 
argument order.



##########
iotdb-core/datanode/src/test/java/org/apache/iotdb/db/i18n/DataNodeSchemaMessagesZhFormatTest.java:
##########
@@ -0,0 +1,99 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.iotdb.db.i18n;
+
+import org.junit.Assert;
+import org.junit.Test;
+import org.slf4j.helpers.MessageFormatter;
+
+import java.io.IOException;
+import java.net.URISyntaxException;
+import java.nio.charset.StandardCharsets;
+import java.nio.file.Files;
+import java.nio.file.Path;
+import java.nio.file.Paths;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+
+public class DataNodeSchemaMessagesZhFormatTest {
+
+  private static final String ZH_MESSAGES_RELATIVE_PATH =
+      "src/main/i18n/zh/org/apache/iotdb/db/i18n/DataNodeSchemaMessages.java";
+
+  @Test
+  public void testZhSlf4jTemplatesPreserveLoggerArgumentOrder() throws 
IOException {
+    Assert.assertEquals(

Review Comment:
   Good coverage: asserts formatted output via MessageFormatter and 
String.format for the changed constants.



-- 
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