Skip to content

Commit f825f16

Browse files
committed
Merge remote-tracking branch 'upstream/main'
* upstream/main: [skip ci] Updated translations via Crowdin Add username check to doctor (go-gitea#20140) Refactor `i18n` to `locale` (go-gitea#20153) Remove support for sr-SP (go-gitea#20155) Hide notify mail setting ui if not enabled (go-gitea#20138) Fix custom folder name in customization docs (go-gitea#20148) Add missing parameter for error in log message (go-gitea#20144) Show scrollbar when necessary (go-gitea#20142) # Conflicts: # templates/repo/issue/view_content/context_menu.tmpl
2 parents a6e2da9 + cdd6371 commit f825f16

File tree

305 files changed

+3720
-3675
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

305 files changed

+3720
-3675
lines changed

custom/conf/app.example.ini

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2113,7 +2113,7 @@ PATH =
21132113
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
21142114
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
21152115
;; The first locale will be used as the default if user browser's language doesn't match any locale in the list.
2116-
;LANGS = en-US,zh-CN,zh-HK,zh-TW,de-DE,fr-FR,nl-NL,lv-LV,ru-RU,uk-UA,ja-JP,es-ES,pt-BR,pt-PT,pl-PL,bg-BG,it-IT,fi-FI,tr-TR,cs-CZ,sr-SP,sv-SE,ko-KR,el-GR,fa-IR,hu-HU,id-ID,ml-IN
2116+
;LANGS = en-US,zh-CN,zh-HK,zh-TW,de-DE,fr-FR,nl-NL,lv-LV,ru-RU,uk-UA,ja-JP,es-ES,pt-BR,pt-PT,pl-PL,bg-BG,it-IT,fi-FI,tr-TR,cs-CZ,sv-SE,ko-KR,el-GR,fa-IR,hu-HU,id-ID,ml-IN
21172117
;NAMES = English,简体中文,繁體中文(香港),繁體中文(台灣),Deutsch,Français,Nederlands,Latviešu,Русский,Українська,日本語,Español,Português do Brasil,Português de Portugal,Polski,Български,Italiano,Suomi,Türkçe,Čeština,Српски,Svenska,한국어,Ελληνικά,فارسی,Magyar nyelv,Bahasa Indonesia,മലയാളം
21182118

21192119
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

docs/content/doc/advanced/config-cheat-sheet.en-us.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -999,7 +999,7 @@ Default templates for project boards:
999999

10001000
## i18n (`i18n`)
10011001

1002-
- `LANGS`: **en-US,zh-CN,zh-HK,zh-TW,de-DE,fr-FR,nl-NL,lv-LV,ru-RU,uk-UA,ja-JP,es-ES,pt-BR,pt-PT,pl-PL,bg-BG,it-IT,fi-FI,tr-TR,cs-CZ,sr-SP,sv-SE,ko-KR,el-GR,fa-IR,hu-HU,id-ID,ml-IN**:
1002+
- `LANGS`: **en-US,zh-CN,zh-HK,zh-TW,de-DE,fr-FR,nl-NL,lv-LV,ru-RU,uk-UA,ja-JP,es-ES,pt-BR,pt-PT,pl-PL,bg-BG,it-IT,fi-FI,tr-TR,cs-CZ,sv-SE,ko-KR,el-GR,fa-IR,hu-HU,id-ID,ml-IN**:
10031003
List of locales shown in language selector. The first locale will be used as the default if user browser's language doesn't match any locale in the list.
10041004
- `NAMES`: **English,简体中文,繁體中文(香港),繁體中文(台灣),Deutsch,Français,Nederlands,Latviešu,Русский,Українська,日本語,Español,Português do Brasil,Português de Portugal,Polski,Български,Italiano,Suomi,Türkçe,Čeština,Српски,Svenska,한국어,Ελληνικά,فارسی,Magyar nyelv,Bahasa Indonesia,മലയാളം**: Visible names corresponding to the locales
10051005

docs/content/doc/advanced/customizing-gitea.en-us.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -335,8 +335,8 @@ The list of themes a user can choose from can be configured with the `THEMES` va
335335

336336
To make a custom theme available to all users:
337337

338-
1. Add a CSS file to `$GITEA_PUBLIC/public/css/theme-<theme-name>.css`.
339-
The value of `$GITEA_PUBLIC` of your instance can be queried by calling `gitea help` and looking up the value of "CustomPath".
338+
1. Add a CSS file to `$GITEA_CUSTOM/public/css/theme-<theme-name>.css`.
339+
The value of `$GITEA_CUSTOM` of your instance can be queried by calling `gitea help` and looking up the value of "CustomPath".
340340
2. Add `<theme-name>` to the comma-separated list of setting `THEMES` in `app.ini`
341341

342342
Community themes are listed in [gitea/awesome-gitea#themes](https://gitea.com/gitea/awesome-gitea#themes).

modules/context/context.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -794,7 +794,7 @@ func Contexter() func(next http.Handler) http.Handler {
794794
ctx.Data["UnitPullsGlobalDisabled"] = unit.TypePullRequests.UnitGlobalDisabled()
795795
ctx.Data["UnitProjectsGlobalDisabled"] = unit.TypeProjects.UnitGlobalDisabled()
796796

797-
ctx.Data["i18n"] = locale
797+
ctx.Data["locale"] = locale
798798
ctx.Data["AllLangs"] = translation.AllLangs()
799799

800800
next.ServeHTTP(ctx.Resp, ctx.Req)

modules/doctor/breaking.go

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,29 @@ func checkUserEmail(ctx context.Context, logger log.Logger, _ bool) error {
5858
return nil
5959
}
6060

61+
// From time to time Gitea makes changes to the reserved usernames and which symbols
62+
// are allowed for various reasons. This check helps with detecting users that, according
63+
// to our reserved names, don't have a valid username.
64+
func checkUserName(ctx context.Context, logger log.Logger, _ bool) error {
65+
var invalidUserCount int64
66+
if err := iterateUserAccounts(ctx, func(u *user.User) error {
67+
if err := user.IsUsableUsername(u.Name); err != nil {
68+
invalidUserCount++
69+
logger.Warn("User[id=%d] does not have a valid username: %v", u.ID, err)
70+
}
71+
return nil
72+
}); err != nil {
73+
return fmt.Errorf("iterateUserAccounts: %v", err)
74+
}
75+
76+
if invalidUserCount == 0 {
77+
logger.Info("All users have a valid username.")
78+
} else {
79+
logger.Warn("%d user(s) have a non-valid username.", invalidUserCount)
80+
}
81+
return nil
82+
}
83+
6184
func init() {
6285
Register(&Check{
6386
Title: "Check if users has an valid email address",
@@ -66,4 +89,11 @@ func init() {
6689
Run: checkUserEmail,
6790
Priority: 9,
6891
})
92+
Register(&Check{
93+
Title: "Check if users have a valid username",
94+
Name: "check-user-names",
95+
IsDefault: false,
96+
Run: checkUserName,
97+
Priority: 9,
98+
})
6999
}

modules/setting/i18n.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@ var defaultI18nLangNames = []string{
2626
"fi-FI", "Suomi",
2727
"tr-TR", "Türkçe",
2828
"cs-CZ", "Čeština",
29-
"sr-SP", "Српски",
3029
"sv-SE", "Svenska",
3130
"ko-KR", "한국어",
3231
"el-GR", "Ελληνικά",

options/locale/locale_cs-CZ.ini

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ webauthn_error_unable_to_process=Server nemohl zpracovat váš požadavek.
4646
webauthn_error_duplicated=Zabezpečovací klíč není pro tento požadavek povolen. Prosím ujistěte se, zda klíč není již registrován.
4747
webauthn_error_empty=Musíte nastavit název tohoto klíče.
4848
webauthn_error_timeout=Požadavek vypršel dříve, než se podařilo přečíst váš klíč. Znovu načtěte tuto stránku a akci opakujte.
49+
webauthn_u2f_deprecated=Klíč: „%s“ autentifikuje pomocí zastaralého procesu U2F. Měli byste znovu zaregistrovat tento klíč a zrušit starou registraci.
4950
webauthn_reload=Znovu načíst
5051

5152
repository=Repozitář

options/locale/locale_de-DE.ini

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ webauthn_error_unable_to_process=Der Server konnte deine Anfrage nicht bearbeite
4747
webauthn_error_duplicated=Für diese Anfrage ist der Sicherheitsschlüssel nicht erlaubt. Bitte stell sicher, dass er nicht bereits registriert ist.
4848
webauthn_error_empty=Du musst einen Namen für diesen Schlüssel festlegen.
4949
webauthn_error_timeout=Das Zeitlimit wurde erreicht, bevor dein Schlüssel gelesen werden konnte. Bitte lade die Seite erneut.
50+
webauthn_u2f_deprecated=Der Schlüssel: '%s' authentifiziert sich über den veralteten U2F-Prozess. Bitte registriere den Schlüssel neu und lösche die alte Registrierung.
5051
webauthn_reload=Neu laden
5152

5253
repository=Repository

options/locale/locale_el-GR.ini

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ webauthn_error_unable_to_process=Ο διακομιστής δεν μπόρεσε
4747
webauthn_error_duplicated=Το κλειδί ασφαλείας δεν επιτρέπεται για αυτό το αίτημα. Βεβαιωθείτε ότι το κλειδί δεν έχει ήδη καταχωρηθεί.
4848
webauthn_error_empty=Πρέπει να ορίσετε ένα όνομα για αυτό το κλειδί.
4949
webauthn_error_timeout=Το χρονικό όριο έφτασε πριν το κλειδί να διαβαστεί. Παρακαλώ ανανεώστε τη σελίδα και προσπαθήστε ξανά.
50+
webauthn_u2f_deprecated=Το κλειδί: '%s' πιστοποιεί χρησιμοποιώντας το παρωχημένο πρωτόκολλο U2F. Θα πρέπει να καταχωρήσετε ξανά αυτό το κλειδί και να καταργήσετε την παλιά εγγραφή.
5051
webauthn_reload=Ανανέωση
5152

5253
repository=Αποθετήριο

options/locale/locale_es-ES.ini

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ webauthn_error_unable_to_process=El servidor no pudo procesar su solicitud.
4747
webauthn_error_duplicated=La clave de seguridad no está permitida para esta solicitud. Por favor, asegúrese de que la clave no está ya registrada.
4848
webauthn_error_empty=Debe establecer un nombre para esta clave.
4949
webauthn_error_timeout=Tiempo de espera máximo alcanzado antes de que su clave pudiese ser leída. Por favor, cargue la página y vuelva a intentarlo.
50+
webauthn_u2f_deprecated=La clave: '%s' se autentifica usando el proceso U2F obsoleto. Debe volver a registrar esta clave y eliminar el registro antiguo.
5051
webauthn_reload=Recargar
5152

5253
repository=Repositorio

0 commit comments

Comments
 (0)