User language setting capitalization #1768

Closed
opened 2025-11-02 04:12:43 -06:00 by GiteaMirror · 5 comments
Owner

Originally created by @bugreport0 on GitHub (May 8, 2018).

  • Gitea version (or commit ref): 1.1.0+1205-gbb801488
  • Git version:
  • Operating system:
  • Database (use [x]):
    • PostgreSQL
    • MySQL
    • MSSQL
    • SQLite
  • Can you reproduce the bug at https://try.gitea.io:
    • Yes (provide example URL)
    • No
    • Not relevant
  • Log gist:

Description

The list of language names in the user settings panel has mixed capitalization. It would be better to capitalize the first letter of each language where possible.

Screenshots

language-selection

Originally created by @bugreport0 on GitHub (May 8, 2018). - Gitea version (or commit ref): 1.1.0+1205-gbb801488 - Git version: - Operating system: - Database (use `[x]`): - [ ] PostgreSQL - [ ] MySQL - [ ] MSSQL - [x] SQLite - Can you reproduce the bug at https://try.gitea.io: - [ ] Yes (provide example URL) - [ ] No - [x] Not relevant - Log gist: ## Description The list of language names in the user settings panel has mixed capitalization. It would be better to capitalize the first letter of each language where possible. ## Screenshots ![language-selection](https://user-images.githubusercontent.com/32939607/39752607-7fdd3e22-52ab-11e8-9181-69f6fdc0695d.png)
GiteaMirror added the issue/stale label 2025-11-02 04:12:43 -06:00
Author
Owner

@lafriks commented on GitHub (May 8, 2018):

We had this changed some time ago to conform to each language grammar rules as in some languages language names are not capitalized like in English

@lafriks commented on GitHub (May 8, 2018): We had this changed some time ago to conform to each language grammar rules as in some languages language names are not capitalized like in English
Author
Owner

@bugreport0 commented on GitHub (May 9, 2018):

OK, I understand, but in this case the language name is not part of a proper sentence. It's a user interface control label/option. Most (all?) Gitea UI controls/labels have uppercase initials.

The list doesn't look like part of Gitea now, more like a grab bag of inconsistent external strings (it also doesn't appear to be sorted).

Maybe we can use strings.Title() to not change the strings in the translations, while still being able to present them in a correct format for the user interface?

@bugreport0 commented on GitHub (May 9, 2018): OK, I understand, but in this case the language name is not part of a proper sentence. It's a user interface control label/option. Most (all?) Gitea UI controls/labels have uppercase initials. The list doesn't look like part of Gitea now, more like a grab bag of inconsistent external strings (it also doesn't appear to be sorted). Maybe we can use `strings.Title()` to not change the strings in the translations, while still being able to present them in a correct format for the user interface?
Author
Owner

@bugreport0 commented on GitHub (May 9, 2018):

A call to strings.Title() could be patched in on lines 204 and 206 in vendor/github.com/go-macaron/i18n/i18n.go or in templates/user/settings/profile.tmpl on lines 48 and 51 (but I don't know how to add code in a template).

Sorting could be added in Add() in vendor/github.com/Unknwon/i18n/i18n.go at line 62 but language information is spread over multiple data structures (two slices and a dictionary) and I'm not sure how to do a sort.Sort() implementation for this.

@bugreport0 commented on GitHub (May 9, 2018): A call to `strings.Title()` could be patched in on lines `204` and `206` in `vendor/github.com/go-macaron/i18n/i18n.go` or in `templates/user/settings/profile.tmpl` on lines `48` and `51` (but I don't know how to add code in a template). Sorting could be added in `Add()` in `vendor/github.com/Unknwon/i18n/i18n.go` at line `62` but language information is spread over multiple data structures (two slices and a dictionary) and I'm not sure how to do a `sort.Sort()` implementation for this.
Author
Owner

@stale[bot] commented on GitHub (Jan 27, 2019):

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs during the next 2 weeks. Thank you for your contributions.

@stale[bot] commented on GitHub (Jan 27, 2019): This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs during the next 2 weeks. Thank you for your contributions.
Author
Owner

@lunny commented on GitHub (Feb 7, 2019):

Closed as @lafriks said.

@lunny commented on GitHub (Feb 7, 2019): Closed as @lafriks said.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#1768