Browse Source

add commit comments to actions feed

pull/946/head
Alexey Makhov 10 years ago
parent
commit
7241e9a8f2
  1. 1
      conf/locale/locale_de-DE.ini
  2. 1
      conf/locale/locale_en-US.ini
  3. 1
      conf/locale/locale_es-ES.ini
  4. 1
      conf/locale/locale_fr-CA.ini
  5. 1
      conf/locale/locale_ja-JP.ini
  6. 1
      conf/locale/locale_lv-LV.ini
  7. 1
      conf/locale/locale_nl-NL.ini
  8. 1
      conf/locale/locale_ru-RU.ini
  9. 1
      conf/locale/locale_zh-CN.ini
  10. 1
      conf/locale/locale_zh-HK.ini
  11. 2
      modules/base/template.go
  12. 8
      templates/repo/diff.tmpl
  13. 5
      templates/user/dashboard/feeds.tmpl

1
conf/locale/locale_de-DE.ini

@ -699,6 +699,7 @@ create_repo=hat Repository <a href="%s/%s">%s</a> erstellt
commit_repo=hat nach <a href="%s/%s/src/%s">%s</a> in <a href="%s/%s">%s</a> gepusht
create_issue=`hat Issue <a href="%s/issues/%s">%[1]s#%[2]s</a> eröffnet`
comment_issue=`hat Issue <a href="%s/issues/%s">%[1]s#%[2]s</a> kommentiert`
comment_commit = `commented on commit <a href="%s/commit/%s">%[1]s/%[2]s</a>`
transfer_repo=hat Repository <code>%s</code> transferiert an <a href="/%s%s">%s</a>
push_tag=hat nach <a href="%s/%s/src/%s">%s</a> in <a href="%s/%s">%s</a> gepusht
compare_2_commits=Zeige Vergleich dieser 2 Commits

1
conf/locale/locale_en-US.ini

@ -700,6 +700,7 @@ create_repo = created repository <a href="%s/%s">%s</a>
commit_repo = pushed to <a href="%s/%s/src/%s">%s</a> at <a href="%s/%s">%s</a>
create_issue = `opened issue <a href="%s/issues/%s">%[1]s#%[2]s</a>`
comment_issue = `commented on issue <a href="%s/issues/%s">%[1]s#%[2]s</a>`
comment_commit = `commented on commit <a href="%s/commit/%s">%[1]s/%[2]s</a>`
transfer_repo = transfered repository <code>%s</code> to <a href="/%s%s">%s</a>
push_tag = pushed tag <a href="%s/%s/src/%s">%s</a> to <a href="%s/%s">%s</a>
compare_2_commits = View comparison for these 2 commits

1
conf/locale/locale_es-ES.ini

@ -696,6 +696,7 @@ create_repo=created repository <a href="%s/%s">%s</a>
commit_repo=pushed to <a href="%s/%s/src/%s">%s</a> at <a href="%s/%s">%s</a>
create_issue=`opened issue <a href="%s/issues/%s">%[1]s#%[2]s</a>`
comment_issue=`commented on issue <a href="%s/issues/%s">%[1]s#%[2]s</a>`
comment_commit = `commented on commit <a href="%s/commit/%s">%[1]s/%[2]s</a>`
transfer_repo=transfered repository <code>%s</code> to <a href="/%s%s">%s</a>
push_tag=pushed tag <a href="%s/%s/src/%s">%s</a> to <a href="%s/%s">%s</a>
compare_2_commits=View comparison for these 2 commits

1
conf/locale/locale_fr-CA.ini

@ -699,6 +699,7 @@ create_repo=a crée le Référentiel <a href="%s/%s">%s</a>
commit_repo=a soumis à <a href="%s/%s/src/%s">%s</a> chez <a href="%s/%s">%s</a>
create_issue=`a ouvert un problème <a href="%s/issues/%s">%[1]s#%[2]s</a>`
comment_issue=`a commenté le problème <a href="%s/issues/%s">%[1]s#%[2]s</a>`
comment_commit = `commented on commit <a href="%s/commit/%s">%[1]s/%[2]s</a>`
transfer_repo=a transféré le Référentiel <code>%s</code> à <a href="/%s%s">%s</a>
push_tag=a tagé <a href="%s/%s/src/%s">%s</a> à <a href="%s/%s">%s</a>
compare_2_commits=Comparer ces 2 commissions

1
conf/locale/locale_ja-JP.ini

@ -699,6 +699,7 @@ create_repo=リポジトリ <a href="%s/%s"> %s</a>を作成しました
commit_repo=<a href="%s/%s">%s</a>を<a href="%s/%s/src/%s">%s</a>にプッシュしました
create_issue=`問題 <a href="%s/issues/%s">%[1]s#%[2]s</a> を開きました`
comment_issue=`問題 <a href="%s/issues/%s">%[1]s#%[2]s</a> のコメント`
comment_commit = `commented on commit <a href="%s/commit/%s">%[1]s/%[2]s</a>`
transfer_repo=リポジトリ <code>%s</code> を <a href="/%s%s">%s</a> へ転送しました
push_tag=<a href="%s/%s">%s</a> に タグ <a href="%s/%s/src/%s">%s</a> をプッシュしました
compare_2_commits=これら 2 のコミットの比較を閲覧する

1
conf/locale/locale_lv-LV.ini

@ -699,6 +699,7 @@ create_repo=izveidoja repozitoriju <a href="%s/%s">%s</a>
commit_repo=veica izmaiņu nosūtīšanu atzaram <a href="%s/%s/src/%s">%s</a> repozitorijā <a href="%s/%s">%s</a>
create_issue=`reģistrēja problēmu <a href="%s/issues/%s">%[1]s#%[2]s</a>`
comment_issue=`pievienoja komentāru problēmai <a href="%s/issues/%s">%[1]s#%[2]s</a>`
comment_commit = `commented on commit <a href="%s/commit/%s">%[1]s/%[2]s</a>`
transfer_repo=mainīja repozitorija <code>%s</code> īpašnieku uz <a href="/%s%s">%s</a>
push_tag=pievienoja tagu <a href="%s/%s/src/%s">%s</a> repozitorijam <a href="%s/%s">%s</a>
compare_2_commits=Veikt salīdzināšanu starp šīm 2 revīzijām

1
conf/locale/locale_nl-NL.ini

@ -699,6 +699,7 @@ create_repo=repositorie aangemaakt in <a href="%s/%s">%s</a>
commit_repo=push update naar <a href="%s/%s/src/%s">%s</a> in <a href="%s/%s">%s</a
create_issue=`opende issue in <a href="%s/issues/%s">%[1]s#%[2]s</a>`
comment_issue=`reactie op issue <a href="%s/issues/%s">%[1]s#%[2]s</a>`
comment_commit = `commented on commit <a href="%s/commit/%s">%[1]s/%[2]s</a>`
transfer_repo=repositorie verplaatst naar <code>%s</code> naar <a href="/%s%s">%s</a>
push_tag=geduwd label <a href="%s/%s/src/%s"> %s</a> naar <a href="%s/%s"> %s</a>
compare_2_commits=Weergave vergelijking voor deze 2 commits

1
conf/locale/locale_ru-RU.ini

@ -699,6 +699,7 @@ create_repo=создан репозиторий <a href="%s/%s"> %s</a>
commit_repo=pushed to <a href="%s/%s/src/%s">%s</a> at <a href="%s/%s">%s</a>
create_issue=`opened issue <a href="%s/issues/%s">%[1]s#%[2]s</a>`
comment_issue=`commented on issue <a href="%s/issues/%s">%[1]s#%[2]s</a>`
comment_commit = `commented on commit <a href="%s/commit/%s">%[1]s/%[2]s</a>`
transfer_repo=transfered repository <code>%s</code> to <a href="/%s%s">%s</a>
push_tag=pushed tag <a href="%s/%s/src/%s">%s</a> to <a href="%s/%s">%s</a>
compare_2_commits=View comparison for these 2 commits

1
conf/locale/locale_zh-CN.ini

@ -699,6 +699,7 @@ create_repo=创建了仓库 <a href="%s/%s">%s</a>
commit_repo=推送了 <a href="%s/%s/src/%s">%s</a> 分支的代码到 <a href="%s/%s">%s</a>
create_issue=`创建了工单 <a href="%s/issues/%s">%[1]s#%[2]s</a>`
comment_issue=`评论了工单 <a href="%s/issues/%s">%[1]s#%[2]s</a>`
comment_commit = `commented on commit <a href="%s/commit/%s">%[1]s/%[2]s</a>`
transfer_repo=将仓库 <code>%s</code> 转移至 <a href="/%s%s">%s</a>
push_tag=推送了标签 <a href="%s/%s/src/%s">%s</a> 到 <a href="%s/%s">%s</a>
compare_2_commits=查看 2 次提交的内容对比

1
conf/locale/locale_zh-HK.ini

@ -696,6 +696,7 @@ create_repo=創建了倉庫 <a href="%s/%s">%s</a>
commit_repo=推送了 <a href="%s/%s/src/%s">%s</a> 分支的代碼到 <a href="%s/%s">%s</a>
create_issue=`創建了問題 <a href="%s/issues/%s">%[1]s#%[2]s</a>`
comment_issue=`評論了問題 <a href="%s/issues/%s">%[1]s#%[2]s</a>`
comment_commit = `добавил комментарий к коммиту <a href="%s/commit/%s">%[1]s/%[2]s</a>`
transfer_repo=將倉庫 <code>%s</code> 轉移至 <a href="/%s%s">%s</a>
push_tag=推送了標籤 <a href="%s/%s/src/%s">%s</a> 到 <a href="%s/%s">%s</a>
compare_2_commits=查看 2 次提交的內容對比

2
modules/base/template.go

@ -188,7 +188,7 @@ func ActionIcon(opType int) string {
return "git-commit"
case 6: // Create issue.
return "issue-opened"
case 10: // Comment issue.
case 10, 11: // Comment issue.
return "comment"
default:
return "invalid type"

8
templates/repo/diff.tmpl

@ -138,8 +138,12 @@
{{if eq $.Repository.Owner.Id .Poster.Id}}
<span class="label label-black label-radius">{{$.i18n.Tr "repo.owner"}}</span>
{{end}}
<!--<a href="#"><i class="octicon octicon-pencil"></i></a>-->
<!--<a href="#"><i class="octicon octicon-x"></i></a>-->
{{if $.SignedUser}}
{{if eq $.SignedUser.Id .Poster.Id}}
<a href="#"><i class="octicon octicon-pencil"></i></a>
<a href="#"><i class="octicon octicon-x"></i></a>
{{end}}
{{end}}
</span>
</p>

5
templates/user/dashboard/feeds.tmpl

@ -20,6 +20,9 @@
{{else if eq .GetOpType 10}}
{{ $index := index .GetIssueInfos 0}}
{{$.i18n.Tr "action.comment_issue" .GetRepoLink $index | Str2html}}
{{else if eq .GetOpType 11}}
{{ $index := index .GetIssueInfos 0}}
{{$.i18n.Tr "action.comment_commit" .GetRepoLink $index | Str2html}}
{{end}}
</p>
{{if eq .GetOpType 5}}
@ -35,7 +38,7 @@
</div>
{{else if eq .GetOpType 6}}
<p class="news-content comment-news">{{index .GetIssueInfos 1}}</p>
{{else if eq .GetOpType 10}}
{{else if or (eq .GetOpType 10) (eq .GetOpType 11)}}
<p class="news-content comment-news">{{index .GetIssueInfos 1}}</p>
{{end}}
<p class="news-time text-italic">{{TimeSince .GetCreate $.i18n.Lang}}</p>

Loading…
Cancel
Save