diff options
author | wxiaoguang <wxiaoguang@gmail.com> | 2022-01-24 19:36:54 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-01-24 19:36:54 +0800 |
commit | 5506cb92da56b7c4e69573dab5ae5b759ee57e75 (patch) | |
tree | 912549df8d14bc104bd2089d0ba1a929bd51711a /templates/repo/settings/webhook | |
parent | 4bfd749fc5ed29bc14357603c87dc835199b1d11 (diff) | |
download | gitea-5506cb92da56b7c4e69573dab5ae5b759ee57e75.tar.gz gitea-5506cb92da56b7c4e69573dab5ae5b759ee57e75.zip |
Refactor webhooks i18n (#18380)
Diffstat (limited to 'templates/repo/settings/webhook')
-rw-r--r-- | templates/repo/settings/webhook/base_list.tmpl | 22 | ||||
-rw-r--r-- | templates/repo/settings/webhook/dingtalk.tmpl | 2 | ||||
-rw-r--r-- | templates/repo/settings/webhook/discord.tmpl | 2 | ||||
-rw-r--r-- | templates/repo/settings/webhook/feishu.tmpl | 3 | ||||
-rw-r--r-- | templates/repo/settings/webhook/gitea.tmpl | 2 | ||||
-rw-r--r-- | templates/repo/settings/webhook/gogs.tmpl | 2 | ||||
-rw-r--r-- | templates/repo/settings/webhook/matrix.tmpl | 2 | ||||
-rw-r--r-- | templates/repo/settings/webhook/msteams.tmpl | 2 | ||||
-rw-r--r-- | templates/repo/settings/webhook/packagist.tmpl | 2 | ||||
-rw-r--r-- | templates/repo/settings/webhook/slack.tmpl | 2 | ||||
-rw-r--r-- | templates/repo/settings/webhook/telegram.tmpl | 2 | ||||
-rw-r--r-- | templates/repo/settings/webhook/wechatwork.tmpl | 2 |
12 files changed, 23 insertions, 22 deletions
diff --git a/templates/repo/settings/webhook/base_list.tmpl b/templates/repo/settings/webhook/base_list.tmpl index f16c43bad6..b1a3771bdb 100644 --- a/templates/repo/settings/webhook/base_list.tmpl +++ b/templates/repo/settings/webhook/base_list.tmpl @@ -5,37 +5,37 @@ <div class="ui blue tiny button">{{.i18n.Tr "repo.settings.add_webhook"}}</div> <div class="menu"> <a class="item" href="{{.BaseLinkNew}}/gitea/new"> - <img width="20" height="20" src="{{AssetUrlPrefix}}/img/gitea.svg">Gitea + <img width="20" height="20" src="{{AssetUrlPrefix}}/img/gitea.svg">{{.i18n.Tr "repo.settings.web_hook_name_gitea"}} </a> <a class="item" href="{{.BaseLinkNew}}/gogs/new"> - <img width="20" height="20" src="{{AssetUrlPrefix}}/img/gogs.ico">Gogs + <img width="20" height="20" src="{{AssetUrlPrefix}}/img/gogs.ico">{{.i18n.Tr "repo.settings.web_hook_name_gogs"}} </a> <a class="item" href="{{.BaseLinkNew}}/slack/new"> - <img width="20" height="20" src="{{AssetUrlPrefix}}/img/slack.png">Slack + <img width="20" height="20" src="{{AssetUrlPrefix}}/img/slack.png">{{.i18n.Tr "repo.settings.web_hook_name_slack"}} </a> <a class="item" href="{{.BaseLinkNew}}/discord/new"> - <img width="20" height="20" src="{{AssetUrlPrefix}}/img/discord.png">Discord + <img width="20" height="20" src="{{AssetUrlPrefix}}/img/discord.png">{{.i18n.Tr "repo.settings.web_hook_name_discord"}} </a> <a class="item" href="{{.BaseLinkNew}}/dingtalk/new"> - <img width="20" height="20" src="{{AssetUrlPrefix}}/img/dingtalk.ico">Dingtalk + <img width="20" height="20" src="{{AssetUrlPrefix}}/img/dingtalk.ico">{{.i18n.Tr "repo.settings.web_hook_name_dingtalk"}} </a> <a class="item" href="{{.BaseLinkNew}}/telegram/new"> - <img width="20" height="20" src="{{AssetUrlPrefix}}/img/telegram.png">Telegram + <img width="20" height="20" src="{{AssetUrlPrefix}}/img/telegram.png">{{.i18n.Tr "repo.settings.web_hook_name_telegram"}} </a> <a class="item" href="{{.BaseLinkNew}}/msteams/new"> - <img width="20" height="20" src="{{AssetUrlPrefix}}/img/msteams.png">Microsoft Teams + <img width="20" height="20" src="{{AssetUrlPrefix}}/img/msteams.png">{{.i18n.Tr "repo.settings.web_hook_name_msteams"}} </a> <a class="item" href="{{.BaseLinkNew}}/feishu/new"> - <img width="20" height="20" src="{{AssetUrlPrefix}}/img/feishu.png">Feishu + <img width="20" height="20" src="{{AssetUrlPrefix}}/img/feishu.png">{{.i18n.Tr "repo.settings.web_hook_name_feishu_or_larksuite"}} </a> <a class="item" href="{{.BaseLinkNew}}/matrix/new"> - <img width="20" height="20" src="{{AssetUrlPrefix}}/img/matrix.svg">Matrix + <img width="20" height="20" src="{{AssetUrlPrefix}}/img/matrix.svg">{{.i18n.Tr "repo.settings.web_hook_name_matrix"}} </a> <a class="item" href="{{.BaseLinkNew}}/wechatwork/new"> - <img width="20" height="20" src="{{AssetUrlPrefix}}/img/wechatwork.png">Wechatwork + <img width="20" height="20" src="{{AssetUrlPrefix}}/img/wechatwork.png">{{.i18n.Tr "repo.settings.web_hook_name_wechatwork"}} </a> <a class="item" href="{{.BaseLinkNew}}/packagist/new"> - <img width="20" height="20" src="{{AssetUrlPrefix}}/img/packagist.png">Packagist + <img width="20" height="20" src="{{AssetUrlPrefix}}/img/packagist.png">{{.i18n.Tr "repo.settings.web_hook_name_packagist"}} </a> </div> </div> diff --git a/templates/repo/settings/webhook/dingtalk.tmpl b/templates/repo/settings/webhook/dingtalk.tmpl index 7a82c03eb4..04c63791d8 100644 --- a/templates/repo/settings/webhook/dingtalk.tmpl +++ b/templates/repo/settings/webhook/dingtalk.tmpl @@ -1,5 +1,5 @@ {{if eq .HookType "dingtalk"}} - <p>{{.i18n.Tr "repo.settings.add_dingtalk_hook_desc" "https://dingtalk.com" | Str2html}}</p> + <p>{{.i18n.Tr "repo.settings.add_web_hook_desc" "https://dingtalk.com" (.i18n.Tr "repo.settings.web_hook_name_dingtalk") | Str2html}}</p> <form class="ui form" action="{{.BaseLink}}/dingtalk/{{or .Webhook.ID "new"}}" method="post"> {{.CsrfTokenHtml}} <div class="required field {{if .Err_PayloadURL}}error{{end}}"> diff --git a/templates/repo/settings/webhook/discord.tmpl b/templates/repo/settings/webhook/discord.tmpl index fc1582df5a..02c7b44ea9 100644 --- a/templates/repo/settings/webhook/discord.tmpl +++ b/templates/repo/settings/webhook/discord.tmpl @@ -1,5 +1,5 @@ {{if eq .HookType "discord"}} - <p>{{.i18n.Tr "repo.settings.add_discord_hook_desc" "https://discord.com" | Str2html}}</p> + <p>{{.i18n.Tr "repo.settings.add_web_hook_desc" "https://discord.com" (.i18n.Tr "repo.settings.web_hook_name_discord") | Str2html}}</p> <form class="ui form" action="{{.BaseLink}}/discord/{{or .Webhook.ID "new"}}" method="post"> {{.CsrfTokenHtml}} <div class="required field {{if .Err_PayloadURL}}error{{end}}"> diff --git a/templates/repo/settings/webhook/feishu.tmpl b/templates/repo/settings/webhook/feishu.tmpl index 95a5102530..39b5061de3 100644 --- a/templates/repo/settings/webhook/feishu.tmpl +++ b/templates/repo/settings/webhook/feishu.tmpl @@ -1,5 +1,6 @@ {{if eq .HookType "feishu"}} - <p>{{.i18n.Tr "repo.settings.add_feishu_hook_desc" "https://feishu.cn" | Str2html}}</p> + <p>{{.i18n.Tr "repo.settings.add_web_hook_desc" "https://feishu.cn" (.i18n.Tr "repo.settings.web_hook_name_feishu") | Str2html}}</p> + <p>{{.i18n.Tr "repo.settings.add_web_hook_desc" "https://larksuite.com" (.i18n.Tr "repo.settings.web_hook_name_larksuite") | Str2html}}</p> <form class="ui form" action="{{.BaseLink}}/feishu/{{or .Webhook.ID "new"}}" method="post"> {{.CsrfTokenHtml}} <div class="required field {{if .Err_PayloadURL}}error{{end}}"> diff --git a/templates/repo/settings/webhook/gitea.tmpl b/templates/repo/settings/webhook/gitea.tmpl index 09c49500a4..b17950da6a 100644 --- a/templates/repo/settings/webhook/gitea.tmpl +++ b/templates/repo/settings/webhook/gitea.tmpl @@ -1,5 +1,5 @@ {{if eq .HookType "gitea"}} - <p>{{.i18n.Tr "repo.settings.add_webhook_desc" "https://docs.gitea.io/en-us/webhooks/" | Str2html}}</p> + <p>{{.i18n.Tr "repo.settings.add_web_hook_desc" "https://docs.gitea.io/en-us/webhooks/" (.i18n.Tr "repo.settings.web_hook_name_gitea") | Str2html}}</p> <form class="ui form" action="{{.BaseLink}}/gitea/{{or .Webhook.ID "new"}}" method="post"> {{template "base/disable_form_autofill"}} {{.CsrfTokenHtml}} diff --git a/templates/repo/settings/webhook/gogs.tmpl b/templates/repo/settings/webhook/gogs.tmpl index 3a833ddbdc..179f9bd99e 100644 --- a/templates/repo/settings/webhook/gogs.tmpl +++ b/templates/repo/settings/webhook/gogs.tmpl @@ -1,5 +1,5 @@ {{if eq .HookType "gogs"}} - <p>{{.i18n.Tr "repo.settings.add_webhook_desc" "https://docs.gitea.io/en-us/webhooks/" | Str2html}}</p> + <p>{{.i18n.Tr "repo.settings.add_web_hook_desc" "https://docs.gitea.io/en-us/webhooks/" (.i18n.Tr "repo.settings.web_hook_name_gogs") | Str2html}}</p> <form class="ui form" action="{{.BaseLink}}/gogs/{{or .Webhook.ID "new"}}" method="post"> {{template "base/disable_form_autofill"}} {{.CsrfTokenHtml}} diff --git a/templates/repo/settings/webhook/matrix.tmpl b/templates/repo/settings/webhook/matrix.tmpl index a99f8e09b5..2545afae03 100644 --- a/templates/repo/settings/webhook/matrix.tmpl +++ b/templates/repo/settings/webhook/matrix.tmpl @@ -1,5 +1,5 @@ {{if eq .HookType "matrix"}} - <p>{{.i18n.Tr "repo.settings.add_matrix_hook_desc" "https://matrix.org/" | Str2html}}</p> + <p>{{.i18n.Tr "repo.settings.add_web_hook_desc" "https://matrix.org/" (.i18n.Tr "repo.settings.web_hook_name_matrix") | Str2html}}</p> <form class="ui form" action="{{.BaseLink}}/matrix/{{or .Webhook.ID "new"}}" method="post"> {{.CsrfTokenHtml}} <div class="required field {{if .Err_HomeserverURL}}error{{end}}"> diff --git a/templates/repo/settings/webhook/msteams.tmpl b/templates/repo/settings/webhook/msteams.tmpl index 146cf533e8..fa7b137232 100644 --- a/templates/repo/settings/webhook/msteams.tmpl +++ b/templates/repo/settings/webhook/msteams.tmpl @@ -1,5 +1,5 @@ {{if eq .HookType "msteams"}} - <p>{{.i18n.Tr "repo.settings.add_msteams_hook_desc" "https://teams.microsoft.com" | Str2html}}</p> + <p>{{.i18n.Tr "repo.settings.add_web_hook_desc" "https://teams.microsoft.com" (.i18n.Tr "repo.settings.web_hook_name_msteams") | Str2html}}</p> <form class="ui form" action="{{.BaseLink}}/msteams/{{or .Webhook.ID "new"}}" method="post"> {{.CsrfTokenHtml}} <div class="required field {{if .Err_PayloadURL}}error{{end}}"> diff --git a/templates/repo/settings/webhook/packagist.tmpl b/templates/repo/settings/webhook/packagist.tmpl index 04161dc40f..369c520910 100644 --- a/templates/repo/settings/webhook/packagist.tmpl +++ b/templates/repo/settings/webhook/packagist.tmpl @@ -1,5 +1,5 @@ {{if eq .HookType "packagist"}} - <p>{{.i18n.Tr "repo.settings.add_packagist_hook_desc" "https://packagist.org" | Str2html}}</p> + <p>{{.i18n.Tr "repo.settings.add_web_hook_desc" "https://packagist.org" (.i18n.Tr "repo.settings.web_hook_name_packagist") | Str2html}}</p> <form class="ui form" action="{{.BaseLink}}/packagist/{{or .Webhook.ID "new"}}" method="post"> {{.CsrfTokenHtml}} <div class="required field {{if .Err_Username}}error{{end}}"> diff --git a/templates/repo/settings/webhook/slack.tmpl b/templates/repo/settings/webhook/slack.tmpl index d7b6eebf3b..d26f8ebc52 100644 --- a/templates/repo/settings/webhook/slack.tmpl +++ b/templates/repo/settings/webhook/slack.tmpl @@ -1,5 +1,5 @@ {{if eq .HookType "slack"}} - <p>{{.i18n.Tr "repo.settings.add_slack_hook_desc" "http://slack.com" | Str2html}}</p> + <p>{{.i18n.Tr "repo.settings.add_web_hook_desc" "https://slack.com" (.i18n.Tr "repo.settings.web_hook_name_slack") | Str2html}}</p> <form class="ui form" action="{{.BaseLink}}/slack/{{or .Webhook.ID "new"}}" method="post"> {{.CsrfTokenHtml}} <div class="required field {{if .Err_PayloadURL}}error{{end}}"> diff --git a/templates/repo/settings/webhook/telegram.tmpl b/templates/repo/settings/webhook/telegram.tmpl index d062e7aac4..cfd6f01e77 100644 --- a/templates/repo/settings/webhook/telegram.tmpl +++ b/templates/repo/settings/webhook/telegram.tmpl @@ -1,5 +1,5 @@ {{if eq .HookType "telegram"}} - <p>{{.i18n.Tr "repo.settings.add_telegram_hook_desc" "https://core.telegram.org/bots" | Str2html}}</p> + <p>{{.i18n.Tr "repo.settings.add_web_hook_desc" "https://core.telegram.org/bots" (.i18n.Tr "repo.settings.web_hook_name_telegram") | Str2html}}</p> <form class="ui form" action="{{.BaseLink}}/telegram/{{or .Webhook.ID "new"}}" method="post"> {{.CsrfTokenHtml}} <div class="required field {{if .Err_BotToken}}error{{end}}"> diff --git a/templates/repo/settings/webhook/wechatwork.tmpl b/templates/repo/settings/webhook/wechatwork.tmpl index 8c971dc4bb..6efffcb3dd 100644 --- a/templates/repo/settings/webhook/wechatwork.tmpl +++ b/templates/repo/settings/webhook/wechatwork.tmpl @@ -1,5 +1,5 @@ {{if eq .HookType "wechatwork"}} - <p>{{.i18n.Tr "repo.settings.add_Wechat_hook_desc" "https://work.weixin.qq.com" | Str2html}}</p> + <p>{{.i18n.Tr "repo.settings.add_web_hook_desc" "https://work.weixin.qq.com" (.i18n.Tr "repo.settings.web_hook_name_wechatwork") | Str2html}}</p> <form class="ui form" action="{{.BaseLink}}/wechatwork/{{or .Webhook.ID "new"}}" method="post"> {{.CsrfTokenHtml}} <div class="required field {{if .Err_PayloadURL}}error{{end}}"> |