diff options
author | Andrey Nering <andrey.nering@gmail.com> | 2016-06-27 13:22:30 -0300 |
---|---|---|
committer | 无闻 <u@gogs.io> | 2016-06-28 00:22:30 +0800 |
commit | 6efb1e5626b8ef5578d56f81ca898fb666bbbe89 (patch) | |
tree | 873112b30f06a077269d649f5c70dd6739bd17b0 /models/repo_collaboration.go | |
parent | 73b4acbb639e6564f2a47e995f21ee50d78b283a (diff) | |
download | gitea-6efb1e5626b8ef5578d56f81ca898fb666bbbe89.tar.gz gitea-6efb1e5626b8ef5578d56f81ca898fb666bbbe89.zip |
Localize collaboration settings. (#3100)
Closes #2764
Diffstat (limited to 'models/repo_collaboration.go')
-rw-r--r-- | models/repo_collaboration.go | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/models/repo_collaboration.go b/models/repo_collaboration.go index b1c5f925af..3da5cf5a02 100644 --- a/models/repo_collaboration.go +++ b/models/repo_collaboration.go @@ -16,16 +16,17 @@ type Collaboration struct { Mode AccessMode `xorm:"DEFAULT 2 NOT NULL"` } -func (c *Collaboration) ModeName() string { +func (c *Collaboration) ModeI18nKey() string { switch c.Mode { case ACCESS_MODE_READ: - return "Read" + return "repo.settings.collaboration.read" case ACCESS_MODE_WRITE: - return "Write" + return "repo.settings.collaboration.write" case ACCESS_MODE_ADMIN: - return "Admin" + return "repo.settings.collaboration.admin" + default: + return "repo.settings.collaboration.undefined" } - return "Undefined" } // AddCollaborator adds new collaboration relation between an individual and a repository. |