Fix spelling errors in comments.

This commit is contained in:
Joseph Crail 2014-12-06 20:22:48 -05:00
parent 47e7175b80
commit 39c068400e
17 changed files with 24 additions and 24 deletions

View file

@ -349,7 +349,7 @@ func NewRepoAction(u *User, repo *Repository) (err error) {
return err
}
// TransferRepoAction adds new action for transfering repository.
// TransferRepoAction adds new action for transferring repository.
func TransferRepoAction(u, newUser *User, repo *Repository) (err error) {
action := &Action{
ActUserId: u.Id,

View file

@ -41,7 +41,7 @@ var LoginTypes = map[LoginType]string{
SMTP: "SMTP",
}
// Ensure structs implmented interface.
// Ensure structs implemented interface.
var (
_ core.Conversion = &LDAPConfig{}
_ core.Conversion = &SMTPConfig{}
@ -226,7 +226,7 @@ func UserSignIn(uname, passwd string) (*User, error) {
}
}
// Query if name/passwd can login against the LDAP direcotry pool
// Query if name/passwd can login against the LDAP directory pool
// Create a local user if success
// Return the same LoginUserPlain semantic
// FIXME: https://github.com/gogits/gogs/issues/672
@ -318,7 +318,7 @@ func SmtpAuth(host string, port int, a smtp.Auth, useTls bool) error {
return ErrUnsupportedLoginType
}
// Query if name/passwd can login against the LDAP direcotry pool
// Query if name/passwd can login against the LDAP directory pool
// Create a local user if success
// Return the same LoginUserPlain semantic
func LoginUserSMTPSource(u *User, name, passwd string, sourceId int64, cfg *SMTPConfig, autoRegister bool) (*User, error) {

View file

@ -107,7 +107,7 @@ func SetEngine() (err error) {
return fmt.Errorf("models.init(fail to connect to database): %v", err)
}
// WARNNING: for serv command, MUST remove the output to os.stdout,
// WARNING: for serv command, MUST remove the output to os.stdout,
// so use log file to instead print to stdout.
logPath := path.Join(setting.LogRootPath, "xorm.log")
os.MkdirAll(path.Dir(logPath), os.ModePerm)

View file

@ -79,7 +79,7 @@ func UpdateOauth2(oa *Oauth2) error {
return err
}
// GetOauthByUserId returns list of oauthes that are releated to given user.
// GetOauthByUserId returns list of oauthes that are related to given user.
func GetOauthByUserId(uid int64) ([]*Oauth2, error) {
socials := make([]*Oauth2, 0, 5)
err := x.Find(&socials, Oauth2{Uid: uid})

View file

@ -240,7 +240,7 @@ func IsOrganizationMember(orgId, uid int64) bool {
return has
}
// IsPublicMembership returns ture if given user public his/her membership.
// IsPublicMembership returns true if given user public his/her membership.
func IsPublicMembership(orgId, uid int64) bool {
has, _ := x.Where("uid=?", uid).And("org_id=?", orgId).And("is_public=?", true).Get(new(OrgUser))
return has
@ -861,7 +861,7 @@ func GetTeamMembers(orgId, teamId int64) ([]*User, error) {
return us, err
}
// GetUserTeams returns all teams that user belongs to in given origanization.
// GetUserTeams returns all teams that user belongs to in given organization.
func GetUserTeams(orgId, uid int64) ([]*Team, error) {
tus := make([]*TeamUser, 0, 5)
if err := x.Where("uid=?", uid).And("org_id=?", orgId).Find(&tus); err != nil {

View file

@ -856,7 +856,7 @@ func UpdateRepository(repo *Repository) error {
return err
}
// DeleteRepository deletes a repository for a user or orgnaztion.
// DeleteRepository deletes a repository for a user or organization.
func DeleteRepository(uid, repoId int64, userName string) error {
repo := &Repository{Id: repoId, OwnerId: uid}
has, err := x.Get(repo)
@ -1239,7 +1239,7 @@ func GitGcRepos() error {
// \__/\ / (____ /__| \___ >___| /
// \/ \/ \/ \/
// Watch is connection request for receiving repository notifycation.
// Watch is connection request for receiving repository notification.
type Watch struct {
Id int64
UserId int64 `xorm:"UNIQUE(watch)"`

View file

@ -147,7 +147,7 @@ func (u *User) CustomAvatarPath() string {
}
// UploadAvatar saves custom avatar for user.
// FIXME: splite uploads to different subdirs in case we have massive users.
// FIXME: split uploads to different subdirs in case we have massive users.
func (u *User) UploadAvatar(data []byte) error {
u.UseCustomAvatar = true
@ -584,7 +584,7 @@ func GetUserIdsByNames(names []string) []int64 {
return ids
}
// UserCommit represtns a commit with validation of user.
// UserCommit represents a commit with validation of user.
type UserCommit struct {
User *User
*git.Commit
@ -651,7 +651,7 @@ func SearchUserByName(opt SearchOption) (us []*User, err error) {
return us, err
}
// Follow is connection request for receiving user notifycation.
// Follow is connection request for receiving user notification.
type Follow struct {
Id int64
UserId int64 `xorm:"unique(follow)"`

View file

@ -99,7 +99,7 @@ func (w *Webhook) UpdateEvent() error {
return err
}
// HasPushEvent returns true if hook enbaled push event.
// HasPushEvent returns true if hook enabled push event.
func (w *Webhook) HasPushEvent() bool {
if w.PushOnly {
return true