-
-
Notifications
You must be signed in to change notification settings - Fork 5.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Display owner of a runner as a tooltip instead of static text (#24377)
Before: ![image](https://user-images.githubusercontent.com/18380374/234779250-8bbd325c-190e-4a30-ac3e-766498d17df5.png) After: ![image](https://user-images.githubusercontent.com/18380374/234779094-e232ecba-d9f4-4d62-a702-6d5e4a522782.png) ![image](https://user-images.githubusercontent.com/18380374/234779120-0293af17-a566-4b69-b454-af4e95844e3b.png) --------- Co-authored-by: silverwind <[email protected]> Co-authored-by: Giteabot <[email protected]> Co-authored-by: wxiaoguang <[email protected]> Co-authored-by: Lunny Xiao <[email protected]>
- Loading branch information
1 parent
4aec1f8
commit 4980813
Showing
5 changed files
with
57 additions
and
11 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,29 @@ | ||
// Copyright 2023 The Gitea Authors. All rights reserved. | ||
// SPDX-License-Identifier: MIT | ||
|
||
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_user_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