This is an automated email from the ASF dual-hosted git repository.
nicholasjiang pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/incubator-paimon-webui.git
The following commit(s) were added to refs/heads/main by this push:
new f1c8fbb [Improvement] Align entries of i18n localization properties
files (#167)
f1c8fbb is described below
commit f1c8fbb4a1cfe06d871af3b99788f2874c6a87c4
Author: s7monk <[email protected]>
AuthorDate: Sun Feb 4 19:20:12 2024 +0800
[Improvement] Align entries of i18n localization properties files (#167)
---
.../src/main/resources/i18n/messages.properties | 26 +++++++++++-----------
.../main/resources/i18n/messages_en_US.properties | 25 +++++++++++++++------
.../main/resources/i18n/messages_zh_CN.properties | 19 ++++++++++++++--
.../web/server/controller/TableControllerTest.java | 7 ++++--
4 files changed, 53 insertions(+), 24 deletions(-)
diff --git a/paimon-web-server/src/main/resources/i18n/messages.properties
b/paimon-web-server/src/main/resources/i18n/messages.properties
index 0ca9822..8e74fbc 100644
--- a/paimon-web-server/src/main/resources/i18n/messages.properties
+++ b/paimon-web-server/src/main/resources/i18n/messages.properties
@@ -28,25 +28,25 @@ user.password.error=User Password Error
user.is.disabled=User Is Disabled
user.not.bing.tenant=User Not Bing Tenant
role.in.used=This role {0} is in used
-role.name.exist=This role name {0} is exist
-role.key.exist=This role key {0} is exist
+role.name.exist=This role name {0} exists.
+role.key.exist=This role key {0} exists.
menu.in.used=This menu is in used
menu.name.exist=This menu name is exist:{0}
menu.path.invalid=This menu path is invalid:{0}
-catalog.name.exist=This catalog name {0} is exist
-catalog.create.error=Exception calling Paimon Catalog API to create a Catalog.
-catalog.remove.error=Exception calling Paimon Catalog API to remove a Catalog.
-database.name.exist=This database name {0} is exist.
-database.create.error=Exception calling Paimon Catalog API to create a
Database.
-database.drop.error=Exception calling Paimon Catalog API to drop a Database.
-table.name.exist=This table name {0} is exist.
-table.create.error=Exception calling Paimon Catalog API to create a Table.
-table.add.column.error=Exception calling Paimon Catalog API to add a Column.
-table.drop.column.error=Exception calling Paimon Catalog API to drop a Column.
+catalog.name.exist=This catalog name {0} exists.
+catalog.create.error=Exception calling Paimon Catalog API to create a catalog.
+catalog.remove.error=Exception calling Paimon Catalog API to remove a catalog.
+database.name.exist=This database name {0} exists.
+database.create.error=Exception calling Paimon Catalog API to create a
database.
+database.drop.error=Exception calling Paimon Catalog API to drop a database.
+table.name.exist=This table name {0} exists.
+table.create.error=Exception calling Paimon Catalog API to create a table.
+table.add.column.error=Exception calling Paimon Catalog API to add a column.
+table.drop.column.error=Exception calling Paimon Catalog API to drop a column.
table.add.option.error=Exception calling Paimon Catalog API to add an option.
table.remove.option.error=Exception calling Paimon Catalog API to remove an
option.
table.alter.column.error=Exception calling Paimon Catalog API to alter a
column.
table.drop.error=Exception calling Paimon Catalog API to drop a table.
table.rename.error=Exception calling Paimon Catalog API to rename a table.
-cdc.job.exist.error=Paimon CDC job is exist.
+cdc.job.exist.error=Paimon CDC job exists.
cdc.job.not.exist.error=Paimon CDC job is not exist.
diff --git
a/paimon-web-server/src/main/resources/i18n/messages_en_US.properties
b/paimon-web-server/src/main/resources/i18n/messages_en_US.properties
index 6c247c1..8e74fbc 100644
--- a/paimon-web-server/src/main/resources/i18n/messages_en_US.properties
+++ b/paimon-web-server/src/main/resources/i18n/messages_en_US.properties
@@ -28,14 +28,25 @@ user.password.error=User Password Error
user.is.disabled=User Is Disabled
user.not.bing.tenant=User Not Bing Tenant
role.in.used=This role {0} is in used
-role.name.exist=This role name {0} is exist
-role.key.exist=This role key {0} is exist
+role.name.exist=This role name {0} exists.
+role.key.exist=This role key {0} exists.
menu.in.used=This menu is in used
menu.name.exist=This menu name is exist:{0}
menu.path.invalid=This menu path is invalid:{0}
-catalog.name.exist=This catalog name {0} is exist
-catalog.create.error=An exception is returned when calling the Paimon API to
create a Catalog.
-database.name.exist=This database name {0} is exist.
-database.create.error=An exception is returned when calling the Paimon API to
create a Database.
-cdc.job.exist.error=Paimon CDC job is exist.
+catalog.name.exist=This catalog name {0} exists.
+catalog.create.error=Exception calling Paimon Catalog API to create a catalog.
+catalog.remove.error=Exception calling Paimon Catalog API to remove a catalog.
+database.name.exist=This database name {0} exists.
+database.create.error=Exception calling Paimon Catalog API to create a
database.
+database.drop.error=Exception calling Paimon Catalog API to drop a database.
+table.name.exist=This table name {0} exists.
+table.create.error=Exception calling Paimon Catalog API to create a table.
+table.add.column.error=Exception calling Paimon Catalog API to add a column.
+table.drop.column.error=Exception calling Paimon Catalog API to drop a column.
+table.add.option.error=Exception calling Paimon Catalog API to add an option.
+table.remove.option.error=Exception calling Paimon Catalog API to remove an
option.
+table.alter.column.error=Exception calling Paimon Catalog API to alter a
column.
+table.drop.error=Exception calling Paimon Catalog API to drop a table.
+table.rename.error=Exception calling Paimon Catalog API to rename a table.
+cdc.job.exist.error=Paimon CDC job exists.
cdc.job.not.exist.error=Paimon CDC job is not exist.
diff --git
a/paimon-web-server/src/main/resources/i18n/messages_zh_CN.properties
b/paimon-web-server/src/main/resources/i18n/messages_zh_CN.properties
index b96a554..8cffa97 100644
--- a/paimon-web-server/src/main/resources/i18n/messages_zh_CN.properties
+++ b/paimon-web-server/src/main/resources/i18n/messages_zh_CN.properties
@@ -33,5 +33,20 @@
role.key.exist=\u6B64\u89D2\u8272\u5173\u952E\u5B57{0}\u5DF2\u4F7F\u7528
menu.in.used=\u6B64\u83DC\u5355\u6B63\u5728\u4F7F\u7528\u4E2D
menu.name.exist=\u6B64\u83DC\u5355\u540D\u79F0\u5DF2\u5B58\u5728:{0}
menu.path.invalid=\u6B64\u83DC\u5355\u8DEF\u5F84\u65E0\u6548:{0}
-cdc.job.exist.error=paimon cdc\u4f5c\u4e1a\u5df2\u5b58\u5728
-cdc.job.not.exist.error=paimon cdc\u4f5c\u4e1a\u4e0d\u5b58\u5728
+catalog.name.exist=\u6B64 Catalog {0} \u5DF2\u7ECF\u5B58\u5728
+catalog.create.error=\u8C03\u7528 Paimon API \u521B\u5EFA Catalog
\u65F6\u53D1\u751F\u5F02\u5E38
+catalog.remove.error=\u8C03\u7528 Paimon API \u79FB\u9664 Catalog
\u65F6\u53D1\u751F\u5F02\u5E38
+database.name.exist=\u6B64 Database {0} \u5DF2\u7ECF\u5B58\u5728
+database.create.error=\u8C03\u7528 Paimon API \u521B\u5EFA Database
\u65F6\u53D1\u751F\u5F02\u5E38
+database.drop.error=\u8C03\u7528 Paimon API \u5220\u9664 Database
\u65F6\u53D1\u751F\u5F02\u5E38
+table.name.exist=\u6B64 Table {0} \u5DF2\u7ECF\u5B58\u5728
+table.create.error=\u8C03\u7528 Paimon API \u521B\u5EFA Table
\u65F6\u53D1\u751F\u5F02\u5E38
+table.add.column.error=\u8C03\u7528 Paimon API \u6DFB\u52A0 Column
\u65F6\u53D1\u751F\u5F02\u5E38
+table.drop.column.error=\u8C03\u7528 Paimon API \u5220\u9664 Column
\u65F6\u53D1\u751F\u5F02\u5E38
+table.add.option.error=\u8C03\u7528 Paimon API \u6DFB\u52A0 Option
\u65F6\u53D1\u751F\u5F02\u5E38
+table.remove.option.error=\u8C03\u7528 Paimon API \u79FB\u9664 Option
\u65F6\u53D1\u751F\u5F02\u5E38
+table.alter.column.error=\u8C03\u7528 Paimon API \u4FEE\u6539 Column
\u65F6\u53D1\u751F\u5F02\u5E38
+table.drop.error=\u8C03\u7528 Paimon API \u5220\u9664 Table
\u65F6\u53D1\u751F\u5F02\u5E38
+table.rename.error=\u8C03\u7528 Paimon API \u91CD\u547D\u540D Table
\u65F6\u53D1\u751F\u5F02\u5E38
+cdc.job.exist.error=paimon cdc\u4F5C\u4E1A\u5DF2\u5B58\u5728
+cdc.job.not.exist.error=paimon cdc\u4F5C\u4E1A\u4E0D\u5B58\u5728
diff --git
a/paimon-web-server/src/test/java/org/apache/paimon/web/server/controller/TableControllerTest.java
b/paimon-web-server/src/test/java/org/apache/paimon/web/server/controller/TableControllerTest.java
index 7106f7d..0b7f81e 100644
---
a/paimon-web-server/src/test/java/org/apache/paimon/web/server/controller/TableControllerTest.java
+++
b/paimon-web-server/src/test/java/org/apache/paimon/web/server/controller/TableControllerTest.java
@@ -45,6 +45,7 @@ import java.util.ArrayList;
import java.util.Arrays;
import java.util.HashMap;
import java.util.List;
+import java.util.Locale;
import java.util.Map;
import java.util.stream.Collectors;
@@ -293,6 +294,7 @@ public class TableControllerTest extends ControllerTestBase
{
+ "id")
.cookie(cookie)
.contentType(MediaType.APPLICATION_JSON_VALUE)
+ .locale(Locale.US)
.accept(MediaType.APPLICATION_JSON_VALUE))
.andExpect(MockMvcResultMatchers.status().isOk())
.andDo(MockMvcResultHandlers.print())
@@ -301,7 +303,7 @@ public class TableControllerTest extends ControllerTestBase
{
.getContentAsString();
R<Void> pkRes = ObjectMapperUtils.fromJSON(responsePkStr, new
TypeReference<R<Void>>() {});
assertEquals(10506, pkRes.getCode());
- assertEquals("Exception calling Paimon Catalog API to drop a Column.",
pkRes.getMsg());
+ assertEquals("Exception calling Paimon Catalog API to drop a column.",
pkRes.getMsg());
// drop partition key.
String responsePartitionKeyStr =
@@ -318,6 +320,7 @@ public class TableControllerTest extends ControllerTestBase
{
+ "create_time")
.cookie(cookie)
.contentType(MediaType.APPLICATION_JSON_VALUE)
+ .locale(Locale.US)
.accept(MediaType.APPLICATION_JSON_VALUE))
.andExpect(MockMvcResultMatchers.status().isOk())
.andDo(MockMvcResultHandlers.print())
@@ -329,7 +332,7 @@ public class TableControllerTest extends ControllerTestBase
{
responsePartitionKeyStr, new TypeReference<R<Void>>()
{});
assertEquals(10506, partitionKeyRes.getCode());
assertEquals(
- "Exception calling Paimon Catalog API to drop a Column.",
partitionKeyRes.getMsg());
+ "Exception calling Paimon Catalog API to drop a column.",
partitionKeyRes.getMsg());
}
@Test