forked from go-gitea/gitea
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
9c9716e
commit 20b6817
Showing
5 changed files
with
44 additions
and
39 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
package types | ||
|
||
import "code.gitea.io/gitea/modules/translation" | ||
|
||
type OwnerType string | ||
|
||
const ( | ||
OwnerTypeSystemGlobal = "system-global" | ||
OwnerTypeIndividual = "individual" | ||
OwnerTypeRepository = "repository" | ||
OwnerTypeOrganization = "organization" | ||
) | ||
|
||
func (o OwnerType) LocaleString(locale translation.Locale) string { | ||
switch o { | ||
case OwnerTypeSystemGlobal: | ||
return locale.Tr("concept_system_global") | ||
case OwnerTypeIndividual: | ||
return locale.Tr("concept_person_individual") | ||
case OwnerTypeRepository: | ||
return locale.Tr("concept_code_repository") | ||
case OwnerTypeOrganization: | ||
return locale.Tr("concept_user_organization") | ||
} | ||
return locale.Tr("unknown") | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters