Browse Source

Fix the hyperlink and the name of the branch #1965

The hyperlink and the display name of the branch if the branch is in a folder or the branch name has '#'
pull/1986/head
Arthur Ouyang 9 years ago
parent
commit
194f62ab05
  1. 2
      conf/locale/locale_bg-BG.ini
  2. 2
      conf/locale/locale_de-DE.ini
  3. 2
      conf/locale/locale_en-US.ini
  4. 2
      conf/locale/locale_es-ES.ini
  5. 2
      conf/locale/locale_fr-FR.ini
  6. 2
      conf/locale/locale_it-IT.ini
  7. 2
      conf/locale/locale_ja-JP.ini
  8. 2
      conf/locale/locale_lv-LV.ini
  9. 2
      conf/locale/locale_nl-NL.ini
  10. 2
      conf/locale/locale_pl-PL.ini
  11. 2
      conf/locale/locale_pt-BR.ini
  12. 2
      conf/locale/locale_ru-RU.ini
  13. 2
      conf/locale/locale_zh-CN.ini
  14. 2
      conf/locale/locale_zh-HK.ini
  15. 4
      modules/git/utils.go
  16. 3
      templates/user/dashboard/feeds.tmpl

2
conf/locale/locale_bg-BG.ini

@ -957,7 +957,7 @@ notices.delete_success=Системното съобщение е изтрито
[action]
create_repo=създаде хранилище <a href="%s"> %s</a>
rename_repo=преименува хранилище от <code>%[1]s</code> на <a href="%[2]s">%[3]s</a>
commit_repo=предаде към <a href="%s/src/%s">%[2]s</a> в <a href="%[1]s">%[3]s</a>
commit_repo=предаде към <a href="%[1]s/src/%[2]s">%[3]s</a> в <a href="%[1]s">%[4]s</a>
create_issue=`отвори проблем <a href="%s/issues/%s">%s#%[2]s"</a>`
create_pull_request=`създаде заявка за сливане <a href="%s/pulls/%s">%s#%[2]s</a>`
comment_issue=`коментира проблем <a href="%s/issues/%s">%s#%[2]s"</a>`

2
conf/locale/locale_de-DE.ini

@ -957,7 +957,7 @@ notices.delete_success=System-Mitteilung erfolgreich gelöscht.
[action]
create_repo=hat Repository <a href="%s">%s</a> erstellt
rename_repo=das Repository wurde umbenannt von <code>%[1]s</code> zu <a href="%[2]s">%[3]s</a>
commit_repo=hat nach <a href="%s/src/%s">%[2]s</a> in <a href="%[1]s">%[3]s</a> gepusht
commit_repo=hat nach <a href="%[1]s/src/%[2]s">%[3]s</a> in <a href="%[1]s">%[4]s</a> gepusht
create_issue=`hat Issue <a href="%s/issues/%s">%s#%[2]s</a> eröffnet`
create_pull_request=`Pull-Anforderung erstellt <a href="%s/pulls/%s">%s#%[2]s</a>`
comment_issue=`hat Issue <a href="%s/issues/%s">%s#%[2]s</a> kommentiert`

2
conf/locale/locale_en-US.ini

@ -962,7 +962,7 @@ notices.delete_success = System notice has been deleted successfully.
[action]
create_repo = created repository <a href="%s">%s</a>
rename_repo = renamed repository from <code>%[1]s</code> to <a href="%[2]s">%[3]s</a>
commit_repo = pushed to <a href="%s/src/%s">%[2]s</a> at <a href="%[1]s">%[3]s</a>
commit_repo = pushed to <a href="%[1]s/src/%[2]s">%[3]s</a> at <a href="%[1]s">%[4]s</a>
create_issue = `opened issue <a href="%s/issues/%s">%s#%[2]s</a>`
create_pull_request = `created pull request <a href="%s/pulls/%s">%s#%[2]s</a>`
comment_issue = `commented on issue <a href="%s/issues/%s">%s#%[2]s</a>`

2
conf/locale/locale_es-ES.ini

@ -957,7 +957,7 @@ notices.delete_success=La notificación del sistema se ha eliminado correctament
[action]
create_repo=repositorio creado <a href="%s">%s</a>
rename_repo=repositorio renombrado de <code>%[1]s</code> a <a href="%[2]s">%[3]s</a>
commit_repo=hizo push a <a href="%s/src/%s">%[2]s</a> en <a href="%[1]s">%[3]s</a>
commit_repo=hizo push a <a href="%[1]s/src/%[2]s">%[3]s</a> en <a href="%[1]s">%[4]s</a>
create_issue=`incidencia abierta <a href="%s/issues/%s">%s#%[2]s</a>`
create_pull_request=`creado pull request <a href="%s/pulls/%s">%s#%[2]s</a>`
comment_issue=`comentó en la incidencia <a href="%s/issues/%s">%s#%[2]s</a>`

2
conf/locale/locale_fr-FR.ini

@ -957,7 +957,7 @@ notices.delete_success=Note système supprimée avec succès.
[action]
create_repo=a crée le dépôt <a href="%s">%s</a>
rename_repo=rebaptisé le dépôt de <code>%[1]s</code> à <a href="%[2]s">%[3]s</a>
commit_repo=a soumis à <a href="%s/src/%s">%[2]s</a> chez <a href="%[1]s">%[3]s</a>
commit_repo=a soumis à <a href="%[1]s/src/%[2]s">%[3]s</a> chez <a href="%[1]s">%[4]s</a>
create_issue=`a ouvert un problème <a href="%s/issues/%s">%s#%[2]s</a>`
create_pull_request=`pull request créée le <a href="%s/pulls/%s">%s#%[2]s</a>`
comment_issue=`a commenté le problème <a href="%s/issues/%s">%s#%[2]s</a>`

2
conf/locale/locale_it-IT.ini

@ -957,7 +957,7 @@ notices.delete_success=Avviso di sistema cancellato con successo.
[action]
create_repo=ha creato il repository <a href="%s">%s</a>
rename_repo=renamed repository from <code>%[1]s</code> to <a href="%[2]s">%[3]s</a>
commit_repo=ha pushato nel <a href="%s/src/%s">%[2]s</a> in <a href="%[1]s">%[3]s</a>
commit_repo=ha pushato nel <a href="%[1]s/src/%[2]s">%[3]s</a> in <a href="%[1]s">%[4]s</a>
create_issue=`ha aperto il problema <a href="%s/issues/%s">%s#%[2]s</a>`
create_pull_request=`creata pull request <a href="%s/pulls/%s">%s#%[2]s</a>`
comment_issue=`ha commentato il problema <a href="%s/issues/%s">%s#%[2]s</a>`

2
conf/locale/locale_ja-JP.ini

@ -957,7 +957,7 @@ notices.delete_success=システム通知が正常に削除されました。
[action]
create_repo=リポジトリ <a href="%s"> %s</a>を作成しました
rename_repo=<code>%[1]s</code> から <a href="%[2]s">[3]s</a> にリポジトリ名を変更した
commit_repo=<a href="%[1]s">%[3]s</a>を<a href="%[1]s/src/%[2]s">%[2]s</a>にプッシュしました
commit_repo=<a href="%[1]s">%[4]s</a>を<a href="%[1]s/src/%[2]s">%[3]s</a>にプッシュしました
create_issue=`問題 <a href="%s/issues/%s">%s#%[2]s</a> を開きました`
create_pull_request=`プルリクエスト <a href="%s/pulls/%s"> %s[2]s</a>を作成`
comment_issue=`問題 <a href="%s/issues/%s">%s#%[2]s</a> のコメント`

2
conf/locale/locale_lv-LV.ini

@ -957,7 +957,7 @@ notices.delete_success=Sistēmas paziņojums tika veiksmīgi izdzēsts.
[action]
create_repo=izveidoja repozitoriju <a href="%s">%s</a>
rename_repo=pārsauca repozitoriju no <code>%[1]s</code> uz <a href="%[2]s">%[3]s</a>
commit_repo=veica izmaiņu nosūtīšanu atzaram <a href="%s/src/%s">%[2]s</a> repozitorijā <a href="%[1]s">%[3]s</a>
commit_repo=veica izmaiņu nosūtīšanu atzaram <a href="%[1]s/src/%[2]s">%[3]s</a> repozitorijā <a href="%[1]s">%[4]s</a>
create_issue=`reģistrēja problēmu <a href="%s/issues/%s">%s#%[2]s</a>`
create_pull_request=`izveidoja izmaiņu pieprasījumu <a href="%s/pulls/%s">%s#%[2]s</a>`
comment_issue=`pievienoja komentāru problēmai <a href="%s/issues/%s">%s#%[2]s</a>`

2
conf/locale/locale_nl-NL.ini

@ -957,7 +957,7 @@ notices.delete_success=Systeem bericht is met succes verwijderd.
[action]
create_repo=repositorie aangemaakt in <a href="%s">%s</a>
rename_repo=renamed repository from <code>%[1]s</code> to <a href="%[2]s">%[3]s</a>
commit_repo=push update naar <a href="%s/src/%s">%[2]s</a> in <a href="%[1]s">%[3]s</a>
commit_repo=push update naar <a href="%[1]s/src/%[2]s">%[3]s</a> in <a href="%[1]s">%[4]s</a>
create_issue=`opende issue in <a href="%s/issues/%s">%s#%[2]s</a>`
create_pull_request=`created pull request <a href="%s/pulls/%s">%s#%[2]s</a>`
comment_issue=`reactie op issue <a href="%s/issues/%s">%s#%[2]s</a>`

2
conf/locale/locale_pl-PL.ini

@ -957,7 +957,7 @@ notices.delete_success=Powiadomienia systemowe zostały usunięte pomyślnie.
[action]
create_repo=utworzono repozytorium <a href="%s"> %s</a>
rename_repo=nazwa repozytorium zmieniona z <code>%[1]s</code> na <a href="%[2]s">%[3]s</a>
commit_repo=wypchnął do <a href="%s/src/%s">%[2]s</a> w <a href="%[1]s"> %[3]s</a>
commit_repo=wypchnął do <a href="%[1]s/src/%[2]s">%[3]s</a> w <a href="%[1]s"> %[4]s</a>
create_issue=`zgłosił problem <a href="%s/issues/%s">#%[2]s %[3]s</a>`
create_pull_request="stworzył pull request <a href="%s/pulls/%s"> %s #%[2]s"</a>
comment_issue=`skomentował problem <a href="%s/issues/%s">#%[2]s %[3]s</a>`

2
conf/locale/locale_pt-BR.ini

@ -957,7 +957,7 @@ notices.delete_success=Aviso do sistema foi deletado com sucesso.
[action]
create_repo=repositório criado <a href="%s"> %s</a>
rename_repo=renomeou o o repositório <code>%[1]s</code> para <a href="%[2]s">%[3]s</a>
commit_repo=pushed para <a href="%s/src/%s">%[2]s</a> em <a href="%[1]s">%[3]s</a>
commit_repo=pushed para <a href="%[1]s/src/%[2]s">%[3]s</a> em <a href="%[1]s">%[4]s</a>
create_issue='questão aberta <a href="%s/issues/%s">%s#%[2]s</a>'
create_pull_request=`criou o pull request <a href="%s/pulls/%s">%s#%[2]s</a>`
comment_issue='comentou sobre a questão <a href="%s/issues/%s">%s#%[2]s</a>'

2
conf/locale/locale_ru-RU.ini

@ -957,7 +957,7 @@ notices.delete_success=Системное уведомление успешно
[action]
create_repo=создан репозиторий <a href="%s"> %s</a>
rename_repo=репозиторий переименован из <code>%[1]s</code>на <a href="%[2]s">%[3]s</a>
commit_repo=запушил <a href="%s/src/%s">%[2]s</a> в <a href="%[1]s">%[3]s</a>
commit_repo=запушил <a href="%[1]s/src/%[2]s">%[3]s</a> в <a href="%[1]s">%[4]s</a>
create_issue=`открытый вопрос <a href="%s/issues/%s">%s#%[2]</a>`
create_pull_request=`созданный пулл-реквест <a href="%s/pulls/%s">%s#%[2]s</a>`
comment_issue=`прокомментировал(а) вопрос <a href="%s/issues/%s">%s#%[2]s</a>`

2
conf/locale/locale_zh-CN.ini

@ -957,7 +957,7 @@ notices.delete_success=系统提示删除成功!
[action]
create_repo=创建了仓库 <a href="%s">%s</a>
rename_repo=重命名仓库 <code>%[1]s</code> 为 <a href="%[2]s">%[3]s</a>
commit_repo=推送了 <a href="%s/src/%s">%[2]s</a> 分支的代码到 <a href="%[1]s">%[3]s</a>
commit_repo=推送了 <a href="%[1]s/src/%[2]s">%[3]s</a> 分支的代码到 <a href="%[1]s">%[4]s</a>
create_issue=`创建了工单 <a href="%s/issues/%s">%s#%[2]s</a>`
create_pull_request=`创建了合并请求 <a href="%s/pulls/%s">%s#%[2]s</a>`
comment_issue=`评论了工单 <a href="%s/issues/%s">%s#%[2]s</a>`

2
conf/locale/locale_zh-HK.ini

@ -957,7 +957,7 @@ notices.delete_success=系統提示刪除成功!
[action]
create_repo=創建了倉庫 <a href="%s">%s</a>
rename_repo=renamed repository from <code>%[1]s</code> to <a href="%[2]s">%[3]s</a>
commit_repo=推送了 <a href="%s/src/%s">%[2]s</a> 分支的代碼到 <a href="%[1]s">%[3]s</a>
commit_repo=推送了 <a href="%[1]s/src/%[2]s">%[3]s</a> 分支的代碼到 <a href="%[1]s">%[4]s</a>
create_issue=`創建了問題 <a href="%s/issues/%s">%s#%[2]s</a>`
create_pull_request=`created pull request <a href="%s/pulls/%s">%s#%[2]s</a>`
comment_issue=`評論了問題 <a href="%s/issues/%s">%s#%[2]s</a>`

4
modules/git/utils.go

@ -35,6 +35,10 @@ func parsePrettyFormatLog(repo *Repository, logByts []byte) (*list.List, error)
}
func RefEndName(refStr string) string {
if strings.HasPrefix(refStr, "refs/heads/") {
return strings.TrimPrefix(refStr, "refs/heads/")
}
index := strings.LastIndex(refStr, "/")
if index != -1 {
return refStr[index+1:]

3
templates/user/dashboard/feeds.tmpl

@ -13,7 +13,8 @@
{{else if eq .GetOpType 2}}
{{$.i18n.Tr "action.rename_repo" .GetContent .GetRepoLink .GetRepoPath | Str2html}}
{{else if eq .GetOpType 5}}
{{$.i18n.Tr "action.commit_repo" .GetRepoLink .GetBranch .GetRepoPath | Str2html}}
{{ $branchLink := .GetBranch | EscapePound}}
{{$.i18n.Tr "action.commit_repo" .GetRepoLink $branchLink .GetBranch .GetRepoPath | Str2html}}
{{else if eq .GetOpType 6}}
{{ $index := index .GetIssueInfos 0}}
{{$.i18n.Tr "action.create_issue" .GetRepoLink $index .GetRepoPath | Str2html}}

Loading…
Cancel
Save