From 2d8b8b107133bd62821f1a03648c0093020ef807 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=A1=D0=B5=D1=80=D0=B3=D0=B5=D0=B9=20=D0=90=D0=BA=D1=81?= =?UTF-8?q?=D0=B5=D0=BD=D0=BE=D0=B2?= Date: Sun, 28 Aug 2022 12:57:52 +0000 Subject: [PATCH] =?UTF-8?q?#38=20=D0=9D=D0=B5=20=D0=BF=D0=B5=D1=80=D0=B5?= =?UTF-8?q?=D0=B2=D0=BE=D0=B4=D0=B8=D0=BB=20=D0=B2=D1=81=D0=B5,=20=D1=81?= =?UTF-8?q?=D0=B2=D1=8F=D0=B7=D0=B0=D0=BD=D0=BD=D0=BE=D0=B5=20=D1=81=20Pul?= =?UTF-8?q?l=20request?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- services/webhook/general.go | 34 +++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/services/webhook/general.go b/services/webhook/general.go index 5080cf98dc..7985c9af59 100644 --- a/services/webhook/general.go +++ b/services/webhook/general.go @@ -36,36 +36,36 @@ func getIssuesPayloadInfo(p *api.IssuePayload, linkFormatter linkFormatter, with switch p.Action { case api.HookIssueOpened: - text = fmt.Sprintf("[%s] Issue opened: %s", repoLink, titleLink) + text = fmt.Sprintf("[%s] Задача открыта: %s", repoLink, titleLink) color = orangeColor case api.HookIssueClosed: - text = fmt.Sprintf("[%s] Issue closed: %s", repoLink, titleLink) + text = fmt.Sprintf("[%s] Задача закрыта: %s", repoLink, titleLink) color = redColor case api.HookIssueReOpened: - text = fmt.Sprintf("[%s] Issue re-opened: %s", repoLink, titleLink) + text = fmt.Sprintf("[%s] Задача вновь открыта: %s", repoLink, titleLink) case api.HookIssueEdited: - text = fmt.Sprintf("[%s] Issue edited: %s", repoLink, titleLink) + text = fmt.Sprintf("[%s] Задача отредактирована: %s", repoLink, titleLink) case api.HookIssueAssigned: list := make([]string, len(p.Issue.Assignees)) for i, user := range p.Issue.Assignees { list[i] = linkFormatter(setting.AppURL+url.PathEscape(user.UserName), user.UserName) } - text = fmt.Sprintf("[%s] Issue assigned to %s: %s", repoLink, strings.Join(list, ", "), titleLink) + text = fmt.Sprintf("[%s] Задача назначена участику %s: %s", repoLink, strings.Join(list, ", "), titleLink) color = greenColor case api.HookIssueUnassigned: - text = fmt.Sprintf("[%s] Issue unassigned: %s", repoLink, titleLink) + text = fmt.Sprintf("[%s] Задача ни кому не назначена: %s", repoLink, titleLink) case api.HookIssueLabelUpdated: - text = fmt.Sprintf("[%s] Issue labels updated: %s", repoLink, titleLink) + text = fmt.Sprintf("[%s] Обновлены метки задачи: %s", repoLink, titleLink) case api.HookIssueLabelCleared: - text = fmt.Sprintf("[%s] Issue labels cleared: %s", repoLink, titleLink) + text = fmt.Sprintf("[%s] Удалены метки задачи: %s", repoLink, titleLink) case api.HookIssueSynchronized: - text = fmt.Sprintf("[%s] Issue synchronized: %s", repoLink, titleLink) + text = fmt.Sprintf("[%s] Задача синхронизирована: %s", repoLink, titleLink) case api.HookIssueMilestoned: mileStoneLink := fmt.Sprintf("%s/milestone/%d", p.Repository.HTMLURL, p.Issue.Milestone.ID) - text = fmt.Sprintf("[%s] Issue milestoned to %s: %s", repoLink, + text = fmt.Sprintf("[%s] Контрольные показатели выданы для %s: %s", repoLink, linkFormatter(mileStoneLink, p.Issue.Milestone.Title), titleLink) case api.HookIssueDemilestoned: - text = fmt.Sprintf("[%s] Issue milestone cleared: %s", repoLink, titleLink) + text = fmt.Sprintf("[%s] Контрольная точка задачи устранена: %s", repoLink, titleLink) } if withSender { text += fmt.Sprintf(" by %s", linkFormatter(setting.AppURL+url.PathEscape(p.Sender.UserName), p.Sender.UserName)) @@ -145,13 +145,13 @@ func getReleasePayloadInfo(p *api.ReleasePayload, linkFormatter linkFormatter, w switch p.Action { case api.HookReleasePublished: - text = fmt.Sprintf("[%s] Release created: %s", repoLink, refLink) + text = fmt.Sprintf("[%s] Созданный релиз: %s", repoLink, refLink) color = greenColor case api.HookReleaseUpdated: - text = fmt.Sprintf("[%s] Release updated: %s", repoLink, refLink) + text = fmt.Sprintf("[%s] Обновленный релиз: %s", repoLink, refLink) color = yellowColor case api.HookReleaseDeleted: - text = fmt.Sprintf("[%s] Release deleted: %s", repoLink, refLink) + text = fmt.Sprintf("[%s] Удаленный релиз: %s", repoLink, refLink) color = redColor } if withSender { @@ -178,16 +178,16 @@ func getIssueCommentPayloadInfo(p *api.IssueCommentPayload, linkFormatter linkFo switch p.Action { case api.HookIssueCommentCreated: - text = fmt.Sprintf("[%s] New comment on %s %s", repoLink, typ, titleLink) + text = fmt.Sprintf("[%s] Новый коментарий на %s %s", repoLink, typ, titleLink) if p.IsPull { color = greenColorLight } else { color = orangeColorLight } case api.HookIssueCommentEdited: - text = fmt.Sprintf("[%s] Comment edited on %s %s", repoLink, typ, titleLink) + text = fmt.Sprintf("[%s] Комментарий изменен на %s %s", repoLink, typ, titleLink) case api.HookIssueCommentDeleted: - text = fmt.Sprintf("[%s] Comment deleted on %s %s", repoLink, typ, titleLink) + text = fmt.Sprintf("[%s] Комментарий удален на %s %s", repoLink, typ, titleLink) color = redColor } if withSender {