Option to use a different language for commit messages than UI #11615

Closed
opened 2025-11-02 09:42:30 -06:00 by GiteaMirror · 12 comments
Owner

Originally created by @Andre601 on GitHub (Sep 8, 2023).

Originally assigned to: @Paul-Stern on GitHub.

Feature Description

When performing actions through the web UI (Adding files, editing them or deleting them) without defining a commit message will Gitea default to a default message, which is used for the commit.
Said message is using the language you're viewing the UI in, so updating a file while using german would display <filename> aktualisiert as the commit message.

This at first may not be a big problem, but it can start to confuse people if you have your content in english, but prefer to use a different language for the UI.
This situation could confuse people who visit your repository and then see commit messages in a foreigin language they don't understand. And using a translator just to figure out that a commit means <filename> updated seems a bit much to ask for.

So, an option to set a different language than what the UI is set to should be introduced here.
By default should it be set to (Use UI language) meaning if you switch the language, the commit message language will then change too for future commits.

I would apreciate if this could be considered.

(Also, yes I am well aware that I could just put a commit message myself, but what is the purpose of these default messages then if not to safe time?)

Screenshots

No response

Originally created by @Andre601 on GitHub (Sep 8, 2023). Originally assigned to: @Paul-Stern on GitHub. ### Feature Description When performing actions through the web UI (Adding files, editing them or deleting them) without defining a commit message will Gitea default to a default message, which is used for the commit. Said message is using the language you're viewing the UI in, so updating a file while using german would display `<filename> aktualisiert` as the commit message. This at first may not be a big problem, but it can start to confuse people if you have your content in english, but prefer to use a different language for the UI. This situation could confuse people who visit your repository and then see commit messages in a foreigin language they don't understand. And using a translator just to figure out that a commit means `<filename> updated` seems a bit much to ask for. So, an option to set a different language than what the UI is set to should be introduced here. By default should it be set to `(Use UI language)` meaning if you switch the language, the commit message language will then change too for future commits. I would apreciate if this could be considered. (Also, yes I am well aware that I could just put a commit message myself, but what is the purpose of these default messages then if not to safe time?) ### Screenshots _No response_
GiteaMirror added the type/proposalproposal/rejected labels 2025-11-02 09:42:30 -06:00
Author
Owner

@silverwind commented on GitHub (Sep 9, 2023):

Seems useful. Could add a app.ini setting for it:

ui.COMMIT_LANGUAGE = auto | en_US

Should also apply to commits created by file uploads which currently also are in user's language.

@silverwind commented on GitHub (Sep 9, 2023): Seems useful. Could add a `app.ini` setting for it: ``` ui.COMMIT_LANGUAGE = auto | en_US ``` Should also apply to commits created by file uploads which currently also are in user's language.
Author
Owner

@Luisgustavom1 commented on GitHub (Oct 3, 2023):

Hi,
I was very interested in adding this enhancement, I have already taken the code and started the changes. But before finalizing the implementation I wanted to confirm a few things:

  1. If no one has solved this issue yet and if I can.
  2. If the solution will be the same, a new config in app.init. I think it's a simple and efficient solution.
  3. Would it make sense for this new config to have a default value? Or if the user doesn't provide the config, does it continue using the language you're viewing the Ui?
@Luisgustavom1 commented on GitHub (Oct 3, 2023): Hi, I was very interested in adding this enhancement, I have already taken the code and started the changes. But before finalizing the implementation I wanted to confirm a few things: 1. If no one has solved this issue yet and if I can. 2. If the solution will be the same, a new config in `app.init`. I think it's a simple and efficient solution. 3. Would it make sense for this new config to have a default value? Or if the user doesn't provide the config, does it continue using the language you're viewing the Ui?
Author
Owner

@silverwind commented on GitHub (Oct 3, 2023):

  1. Pretty sure no one has taken this yet.
  2. I guess a argument could be made for this to be a per-user setting, but it'll be much harder to implement and I think it's at least initially enough to have it per-server in the ini.
  3. I'd actually disagree with @Andre601 and lean towards having en_US as the default. I think it's generally the consensus among developers that commit messages should be written in english, so we should encourage the good practice. Of course, still accept the auto value to restore previous behaviour.
@silverwind commented on GitHub (Oct 3, 2023): 1. Pretty sure no one has taken this yet. 2. I guess a argument could be made for this to be a per-user setting, but it'll be much harder to implement and I think it's at least initially enough to have it per-server in the ini. 3. I'd actually disagree with @Andre601 and lean towards having `en_US` as the default. I think it's generally the consensus among developers that commit messages should be written in english, so we should encourage the good practice. Of course, still accept the `auto` value to restore previous behaviour.
Author
Owner

@delvh commented on GitHub (Oct 3, 2023):

I absolutely agree with @silverwind on 3.
I've been annoyed for years by Gitea's behavior of localizing self-created commits.

I don't even think it should be a user-setting.
Simply accept that Gitea will always create "correct" English commits, and don't worry about anything else…

@delvh commented on GitHub (Oct 3, 2023): I absolutely agree with @silverwind on `3`. I've been annoyed for years by Gitea's behavior of localizing self-created commits. I don't even think it should be a user-setting. Simply accept that Gitea will always create "correct" English commits, and don't worry about anything else…
Author
Owner

@Andre601 commented on GitHub (Oct 3, 2023):

I feel like allowing the user to set the language used for commit messages when none is defined would be the better option here to have. Would allow them more freedom without having to type out every commit message themself.

@Andre601 commented on GitHub (Oct 3, 2023): I feel like allowing the user to set the language used for commit messages when none is defined would be the better option here to have. Would allow them more freedom without having to type out every commit message themself.
Author
Owner

@Luisgustavom1 commented on GitHub (Oct 5, 2023):

Cool!!
I agree with @Andre601 this config gives more freedom and embraces different people.
During this week I'll keep working on it

@Luisgustavom1 commented on GitHub (Oct 5, 2023): Cool!! I agree with @Andre601 this config gives more freedom and embraces different people. During this week I'll keep working on it
Author
Owner

@silverwind commented on GitHub (Oct 5, 2023):

Yes, per-user setting would be nice but we don't really have infrastructure for per-user settings yet except some backend functions. We should define a way that allows easy additions of such user settings.

I can accept this as a server-only setting until then as well.

@silverwind commented on GitHub (Oct 5, 2023): Yes, per-user setting would be nice but we don't really have infrastructure for per-user settings yet except some backend functions. We should define a way that allows easy additions of such user settings. I can accept this as a server-only setting until then as well.
Author
Owner

@Paul-Stern commented on GitHub (Nov 2, 2023):

Hello everyone! My name is Paul and I am looking for some 'good first ' issue to start my GitHub activity. If it is suitable for beginners can I be assigned for it?

@Paul-Stern commented on GitHub (Nov 2, 2023): Hello everyone! My name is Paul and I am looking for some 'good first ' issue to start my GitHub activity. If it is suitable for beginners can I be assigned for it?
Author
Owner

@lunny commented on GitHub (Dec 4, 2023):

It's better to enforce the system's commit messages in English but not have an option on app.ini.

@lunny commented on GitHub (Dec 4, 2023): It's better to enforce the system's commit messages in English but not have an option on `app.ini`.
Author
Owner

@lunny commented on GitHub (Dec 11, 2023):

per https://github.com/go-gitea/gitea/pull/27980#issuecomment-1849188456

@lunny commented on GitHub (Dec 11, 2023): per https://github.com/go-gitea/gitea/pull/27980#issuecomment-1849188456
Author
Owner

@Andre601 commented on GitHub (Dec 11, 2023):

And what exactly is the state now?
Are commit messages now english by default (if no own is set) or is it still the default which is using whatever UI language the user has set?

@Andre601 commented on GitHub (Dec 11, 2023): And what exactly is the state now? Are commit messages now english by default (if no own is set) or is it still the default which is using whatever UI language the user has set?
Author
Owner

@lunny commented on GitHub (Dec 11, 2023):

I think currently it will follow UI langauge if you submit commits from UI. But maybe it should be changed to English-only.

@lunny commented on GitHub (Dec 11, 2023): I think currently it will follow UI langauge if you submit commits from UI. But maybe it should be changed to English-only.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#11615