Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

multi languages support for buildin cli cmd's descriptions #22761

Closed
yp05327 opened this issue Feb 5, 2023 · 9 comments
Closed

multi languages support for buildin cli cmd's descriptions #22761

yp05327 opened this issue Feb 5, 2023 · 9 comments
Labels
type/feature Completely new functionality. Can only be merged if feature freeze is not active. type/proposal The new feature has not been accepted yet but needs to be discussed first.

Comments

@yp05327
Copy link
Contributor

yp05327 commented Feb 5, 2023

Feature Description

Gitea website support multi languages, but the build in cli cmd's descriptions only support English.
I think we can add multi languages support to gitea cli's descriptions.

The language will based on system setting or env variable such as GITEA_CLI_LANG.
I will work on this

Screenshots

No response

@yp05327 yp05327 added type/feature Completely new functionality. Can only be merged if feature freeze is not active. type/proposal The new feature has not been accepted yet but needs to be discussed first. labels Feb 5, 2023
@yp05327
Copy link
Contributor Author

yp05327 commented Feb 5, 2023

Gitea uses urfave/cli to build a cli app, but it has no buildin translation support :(
urfave/cli#980

@wxiaoguang
Copy link
Contributor

The idea is good, but it's not worth to spend time on it.

@lunny
Copy link
Member

lunny commented Feb 5, 2023

Sorry, I don't think we have enough resources to do that. I proposal to close this.

@delvh
Copy link
Member

delvh commented Feb 5, 2023

I also don't know of any localized CLI.
Do you have an example for one?

I missed something while reading:
I thought you wanted to localize the commands themselves, not their descriptions.

@yp05327 yp05327 changed the title buildin cli cmd multi languages support multi languages support for buildin cli cmd's descriptions Feb 7, 2023
@yp05327
Copy link
Contributor Author

yp05327 commented Feb 7, 2023

@delvh @wxiaoguang @lunny
Im sorry for my bad English.
I means to localize the command descriptions, not the commands themselves.

If it's no necessary to do this, I will close this later.

@wxiaoguang
Copy link
Contributor

wxiaoguang commented Feb 7, 2023

I understood your description before. That's why I said "The idea is good, but it's not worth to spend time on it.". If you meant "commands themselves", I would say "that's impossible" at that time.

The CLI is mainly for site admin, they should have the basic English ability. I ever saw some GNU tools do i18n for their CLI, in the end few people (site admin) use or like them.

@yp05327 yp05327 closed this as completed Feb 8, 2023
@zeripath
Copy link
Contributor

zeripath commented Feb 8, 2023

@yp05327 I think it would be possible to do this with some fairly basic changes and a little magic related to looking at locale environment variables, so I'm gonna reopen this feature request.

However I'm not going to take any action to make it happen myself - at least not right now.

If you're interested in making this happen reach out to me on discord and we can chat.

@zeripath zeripath reopened this Feb 8, 2023
@wxiaoguang
Copy link
Contributor

At the moment, I think we shouldn't spend time on CLI i18n. The reasons are:

  1. There are a lot of bugs in CLI now.
  2. Some CLI texts are just from error messages.
  3. We do not have a proper ICU message system.
  4. The CLI i18n/l10n doesn't help end users too much, because they only use the web UI.
  5. The localized texts may not work well in many systems without a proper environment.
  6. If only the "description" is translated, the CLI is still mixed with different languages ......

So, I have objection for this change at the moment .....

@lunny
Copy link
Member

lunny commented Apr 28, 2023

I think so.

@lunny lunny closed this as completed Apr 28, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jun 14, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
type/feature Completely new functionality. Can only be merged if feature freeze is not active. type/proposal The new feature has not been accepted yet but needs to be discussed first.
Projects
None yet
Development

No branches or pull requests

5 participants