apache / shenyu

Apache ShenYu is a Java native API Gateway for service proxy, protocol conversion and API governance.
https://shenyu.apache.org/
Apache License 2.0
8.46k stars 2.94k forks source link

[Task] Shenyu-Admin Internationalization #4468

Open li-keguo opened 1 year ago

li-keguo commented 1 year ago

Description

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.

Relevant skills

API reference

java.util.Locale
org.springframework.context.MessageSource
org.springframework.context.support.ResourceBundleMessageSource;

Interface effect example

### 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"
}

Task List

zuobiao-zhou commented 1 year ago

I'd really like to try to take over this task. I am familiar with Java and front-end react framework, but I'm just getting into ShenYu. I'm trying to contribute to ShenYu community and I will complete a proposal in the near future!

wjsvec commented 1 year ago

I want to try this task. I have experience in participating in the OSPP and am very familiar with the communication methods of the open source community. In addition, I have very rich front-end experience and have participated in the construction of React projects.

Here is my project lists: https://github.com/taosdata/vscode-tdengine https://github.com/wjsvec/try_chatgpt_API_in_one_minute

If you need my resume, you can email with wjsvec@163.com