diff options
author | Unknwon <joe2010xtmf@163.com> | 2014-12-12 01:29:36 -0500 |
---|---|---|
committer | Unknwon <joe2010xtmf@163.com> | 2014-12-12 01:29:36 -0500 |
commit | 2f3a7e53cb58e922055baf3cf14138100a1f05ac (patch) | |
tree | 847a3474584d616a16013aa0edf13de7118be91d | |
parent | 42c7bb75295ae7587b7ca36f103a7dc25f87754a (diff) | |
download | gitea-2f3a7e53cb58e922055baf3cf14138100a1f05ac.tar.gz gitea-2f3a7e53cb58e922055baf3cf14138100a1f05ac.zip |
fix #735
-rwxr-xr-x | conf/locale/locale_zh-CN.ini | 24 | ||||
-rw-r--r-- | models/repo.go | 1 | ||||
-rw-r--r-- | routers/repo/setting.go | 1 | ||||
-rw-r--r-- | templates/repo/release/edit.tmpl | 2 | ||||
-rw-r--r-- | templates/repo/release/new.tmpl | 2 |
5 files changed, 28 insertions, 2 deletions
diff --git a/conf/locale/locale_zh-CN.ini b/conf/locale/locale_zh-CN.ini index a354e99f8f..3bfefa1211 100755 --- a/conf/locale/locale_zh-CN.ini +++ b/conf/locale/locale_zh-CN.ini @@ -377,6 +377,30 @@ diff.stats_desc=共有 <strong> %d 个文件被更改</strong>,包括 <strong> diff.bin=二进制
diff.view_file=查看文件
+release.releases=版本发布
+release.new_release=发布新版
+release.draft=草稿
+release.prerelease=预发行
+release.stable=稳定
+release.edit=编辑
+release.ahead=在该版本发布之后已有 <strong>%d</strong> 次代码提交到 %s 分支
+release.source_code=源代码
+release.tag_name=标签名称
+release.target=目标分支
+release.tag_helper=选择或创建一个已经存在的标签
+release.release_title=发布标题
+release.content_with_md=使用 <a href="%s">Markdown</a> 编辑内容
+release.write=内容编辑
+release.preview=效果预览
+release.content_placeholder=请输入内容
+release.loading=正在加载...
+release.prerelease_desc=这是一个预发行版本
+release.prerelease_helper=我们会告知用户不建议将本次发布投入生产环境使用。
+release.publish=发布版本
+release.save_draft=保存草稿
+release.edit_release=编辑发布信息
+release.tag_name_already_exist=已经存在使用相同标签进行发布的版本。
+
[org]
org_name_holder=组织名称
org_name_helper=伟大的组织都有一个简短而寓意深刻的名字。
diff --git a/models/repo.go b/models/repo.go index be03ebd6cd..bf46696dfb 100644 --- a/models/repo.go +++ b/models/repo.go @@ -811,6 +811,7 @@ func TransferOwnership(u *User, newOwner string, repo *Repository) error { // ChangeRepositoryName changes all corresponding setting from old repository name to new one. func ChangeRepositoryName(userName, oldRepoName, newRepoName string) (err error) { + newRepoName = strings.ToLower(newRepoName) if !IsLegalName(newRepoName) { return ErrRepoNameIllegal } diff --git a/routers/repo/setting.go b/routers/repo/setting.go index 491448a792..94c642b2b2 100644 --- a/routers/repo/setting.go +++ b/routers/repo/setting.go @@ -72,6 +72,7 @@ func SettingsPost(ctx *middleware.Context, form auth.RepoSettingForm) { } log.Trace("Repository name changed: %s/%s -> %s", ctx.Repo.Owner.Name, ctx.Repo.Repository.Name, newRepoName) ctx.Repo.Repository.Name = newRepoName + ctx.Repo.Repository.LowerName = strings.ToLower(newRepoName) } br := form.Branch diff --git a/templates/repo/release/edit.tmpl b/templates/repo/release/edit.tmpl index 3473ecafc3..44f2d7b748 100644 --- a/templates/repo/release/edit.tmpl +++ b/templates/repo/release/edit.tmpl @@ -37,7 +37,7 @@ <textarea class="ipt ipt-large ipt-radius" name="content" id="release-new-content" rows="10" placeholder="{{.i18n.Tr "repo.release.content_placeholder"}}" data-ajax-rel="release-preview" data-ajax-val="val" data-ajax-field="text" required>{{.Release.Note}}</textarea> </div> </div> - <div class="markdown hide" id="release-preview">{{.i18n.Tr "repo.release.loading"}}...</div> + <div class="markdown hide" id="release-preview">{{.i18n.Tr "repo.release.loading"}}</div> <br> <hr> <div class="text-right"> diff --git a/templates/repo/release/new.tmpl b/templates/repo/release/new.tmpl index 7dbefd7633..101a22456c 100644 --- a/templates/repo/release/new.tmpl +++ b/templates/repo/release/new.tmpl @@ -49,7 +49,7 @@ <textarea class="ipt ipt-large ipt-radius" name="content" id="release-new-content" rows="10" placeholder="{{.i18n.Tr "repo.release.content_placeholder"}}" data-ajax-rel="release-preview" data-ajax-val="val" data-ajax-field="text" required>{{.content}}</textarea> </div> </div> - <div class="markdown hide" id="release-preview">{{.i18n.Tr "repo.release.loading"}}...</div> + <div class="markdown hide" id="release-preview">{{.i18n.Tr "repo.release.loading"}}</div> <hr> <div class="text-right"> <input class="ipt-chk" name="prerelease" type="checkbox" {{if .prerelease}}checked{{end}}/> |