mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2025-09-12 22:07:17 +00:00
feat(build): improve lint-locale-usage further (#8736)
Print out a list of all unused msgids Handle Go files that make calls to translation. Handle `models/unit/unit.go`, which stores msgids in `$Unit.NameKey` Handle .locale.Tr in templates Handle simple dynamically constructed `Tr("msgid-prefix." + SomeFunctionCall())`. Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/8736 Reviewed-by: Gusted <gusted@noreply.codeberg.org> Co-authored-by: Ellen Εμιλία Άννα Zscheile <fogti+devel@ytrizja.de> Co-committed-by: Ellen Εμιλία Άννα Zscheile <fogti+devel@ytrizja.de>
This commit is contained in:
parent
e101a8e2dd
commit
f447661345
18 changed files with 720 additions and 320 deletions
|
@ -271,7 +271,6 @@ type Unit struct {
|
|||
Name string
|
||||
NameKey string
|
||||
URI string
|
||||
DescKey string
|
||||
Idx int
|
||||
MaxAccessMode perm.AccessMode // The max access mode of the unit. i.e. Read means this unit can only be read.
|
||||
}
|
||||
|
@ -299,7 +298,6 @@ var (
|
|||
"code",
|
||||
"repo.code",
|
||||
"/",
|
||||
"repo.code.desc",
|
||||
0,
|
||||
perm.AccessModeOwner,
|
||||
}
|
||||
|
@ -309,7 +307,6 @@ var (
|
|||
"issues",
|
||||
"repo.issues",
|
||||
"/issues",
|
||||
"repo.issues.desc",
|
||||
1,
|
||||
perm.AccessModeOwner,
|
||||
}
|
||||
|
@ -319,7 +316,6 @@ var (
|
|||
"ext_issues",
|
||||
"repo.ext_issues",
|
||||
"/issues",
|
||||
"repo.ext_issues.desc",
|
||||
1,
|
||||
perm.AccessModeRead,
|
||||
}
|
||||
|
@ -329,7 +325,6 @@ var (
|
|||
"pulls",
|
||||
"repo.pulls",
|
||||
"/pulls",
|
||||
"repo.pulls.desc",
|
||||
2,
|
||||
perm.AccessModeOwner,
|
||||
}
|
||||
|
@ -339,7 +334,6 @@ var (
|
|||
"releases",
|
||||
"repo.releases",
|
||||
"/releases",
|
||||
"repo.releases.desc",
|
||||
3,
|
||||
perm.AccessModeOwner,
|
||||
}
|
||||
|
@ -349,7 +343,6 @@ var (
|
|||
"wiki",
|
||||
"repo.wiki",
|
||||
"/wiki",
|
||||
"repo.wiki.desc",
|
||||
4,
|
||||
perm.AccessModeOwner,
|
||||
}
|
||||
|
@ -359,7 +352,6 @@ var (
|
|||
"ext_wiki",
|
||||
"repo.ext_wiki",
|
||||
"/wiki",
|
||||
"repo.ext_wiki.desc",
|
||||
4,
|
||||
perm.AccessModeRead,
|
||||
}
|
||||
|
@ -369,7 +361,6 @@ var (
|
|||
"projects",
|
||||
"repo.projects",
|
||||
"/projects",
|
||||
"repo.projects.desc",
|
||||
5,
|
||||
perm.AccessModeOwner,
|
||||
}
|
||||
|
@ -379,7 +370,6 @@ var (
|
|||
"packages",
|
||||
"repo.packages",
|
||||
"/packages",
|
||||
"packages.desc",
|
||||
6,
|
||||
perm.AccessModeRead,
|
||||
}
|
||||
|
@ -389,7 +379,6 @@ var (
|
|||
"actions",
|
||||
"repo.actions",
|
||||
"/actions",
|
||||
"actions.unit.desc",
|
||||
7,
|
||||
perm.AccessModeOwner,
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue