[
https://issues.apache.org/jira/browse/COMDEV-518?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Keguo Li updated COMDEV-518:
----------------------------
Description:
h2. Background
Shenyu is a native API gateway for service proxy, protocol translation and API
governance. It can manage and maintain the API through Shenyu-admin, and
support internationalization in Chinese and English. Unfortunately,
Shenyu-admin is only internationalized on the front end. The message prompt
returned by the back-end interface is still in English. Therefore, we need to
implement internationalization support for the back-end interface.This will lay
a good foundation for shenyu to move towards more language support.
h2. Relevant skills
* Related skills spring resources
* Spring Internationalization
* Front-end react framework
h2. API reference
{code:java}
java.util.Locale;
org.springframework.context.MessageSource;
org.springframework.context.support.ResourceBundleMessageSource; {code}
h2. Interface effect example
{code:java}
## zh request example
POST http://localhost:9095/plugin
Content-Type: application/json
Location: cn-zh
X-Access-Token: xxx
{
"name": "test-create-plugin",
"role": "test-create-plugin",
"enabled": true,
"sort": 100
}
Respone
{
"code": 600,
"message": "未登录"
}
### en request example
POST http://localhost:9095/plugin
Content-Type: application/json
Location: en
X-Access-Token: xxx
{
"name": "test-create-plugin",
"role": "test-create-plugin",
"enabled": true,
"sort": 100
}
Respone
{
"code": 600,
"message": "token is error"
} {code}
h2. Task List
* The task discussed with the tutor how to achieve the internationalization of
shenyu-admin background
* Some prompt message translation
* Get through the internationalization of front-end, obtain the client region
information through http protocol, support the language of the corresponding
region.
* Leave the extension of other multi-language internationalization support
interface, so as to facilitate the localization transformation of subsequent
users.
was:
h2. Background
Shenyu is a native API gateway for service proxy, protocol translation and API
governance. It can manage and maintain the API through Shenyu-admin, and
support internationalization in Chinese and English. Unfortunately,
Shenyu-admin is only internationalized on the front end. The message prompt
returned by the back-end interface is still in English. Therefore, we need to
implement internationalization support for the back-end interface.This will lay
a good foundation for shenyu to move towards more language support.
h2. Relevant skills
* Related skills spring resources
* Spring Internationalization
* Front-end react framework
h2. API reference
java.util.Localeorg.springframework.context.MessageSourceorg.springframework.context.support.ResourceBundleMessageSource;
h2. Interface effect example
{code:java}
## zh request example
POST http://localhost:9095/plugin
Content-Type: application/json
Location: cn-zh
X-Access-Token: xxx
{
"name": "test-create-plugin",
"role": "test-create-plugin",
"enabled": true,
"sort": 100
}
Respone
{
"code": 600,
"message": "未登录"
}
### en request example
POST http://localhost:9095/plugin
Content-Type: application/json
Location: en
X-Access-Token: xxx
{
"name": "test-create-plugin",
"role": "test-create-plugin",
"enabled": true,
"sort": 100
}
Respone
{
"code": 600,
"message": "token is error"
} {code}
h2. Task List
* The task discussed with the tutor how to achieve the internationalization of
shenyu-admin background
* Some prompt message translation
* Get through the internationalization of front-end, obtain the client region
information through http protocol, support the language of the corresponding
region.
* Leave the extension of other multi-language internationalization support
interface, so as to facilitate the localization transformation of subsequent
users.
> Apache ShenYu Gsoc 2023 - Shenyu-Admin Internationalization
> -------------------------------------------------------------
>
> Key: COMDEV-518
> URL: https://issues.apache.org/jira/browse/COMDEV-518
> Project: Community Development
> Issue Type: New Feature
> Components: Comdev, GSoC/Mentoring ideas
> Reporter: Keguo Li
> Priority: Major
> Labels: Shenyu, gsco
>
> h2. Background
> Shenyu is a native API gateway for service proxy, protocol translation and
> API governance. It can manage and maintain the API through Shenyu-admin, and
> support internationalization in Chinese and English. Unfortunately,
> Shenyu-admin is only internationalized on the front end. The message prompt
> returned by the back-end interface is still in English. Therefore, we need to
> implement internationalization support for the back-end interface.This will
> lay a good foundation for shenyu to move towards more language support.
> h2. Relevant skills
> * Related skills spring resources
> * Spring Internationalization
> * Front-end react framework
> h2. API reference
> {code:java}
> java.util.Locale;
> org.springframework.context.MessageSource;
> org.springframework.context.support.ResourceBundleMessageSource; {code}
> h2. Interface effect example
> {code:java}
> ## zh request example
> POST http://localhost:9095/plugin
> Content-Type: application/json
> Location: cn-zh
> X-Access-Token: xxx
> {
> "name": "test-create-plugin",
> "role": "test-create-plugin",
> "enabled": true,
> "sort": 100
> }
> Respone
> {
> "code": 600,
> "message": "未登录"
> }
> ### en request example
> POST http://localhost:9095/plugin
> Content-Type: application/json
> Location: en
> X-Access-Token: xxx
> {
> "name": "test-create-plugin",
> "role": "test-create-plugin",
> "enabled": true,
> "sort": 100
> }
> Respone
> {
> "code": 600,
> "message": "token is error"
> } {code}
> h2. Task List
> * The task discussed with the tutor how to achieve the internationalization
> of shenyu-admin background
> * Some prompt message translation
> * Get through the internationalization of front-end, obtain the client
> region information through http protocol, support the language of the
> corresponding region.
> * Leave the extension of other multi-language internationalization support
> interface, so as to facilitate the localization transformation of subsequent
> users.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]