Skip to content

Commit 52d2988

Browse files
authored
Fix "stop time tracking button" on navbar (#33084) (#33300)
Backport #33084 (no conflict) Fix #33299, and remove incorrect translations
1 parent c09e43a commit 52d2988

File tree

5 files changed

+4
-7
lines changed

5 files changed

+4
-7
lines changed

cmd/migrate.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ import (
1818
var CmdMigrate = &cli.Command{
1919
Name: "migrate",
2020
Usage: "Migrate the database",
21-
Description: "This is a command for migrating the database, so that you can run gitea admin create-user before starting the server.",
21+
Description: `This is a command for migrating the database, so that you can run "gitea admin create user" before starting the server.`,
2222
Action: runMigrate,
2323
}
2424

modules/markup/sanitizer_default.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ func (st *Sanitizer) createDefaultPolicy() *bluemonday.Policy {
4848
policy.AllowAttrs("class").Matching(regexp.MustCompile(`^(unchecked|checked|indeterminate)$`)).OnElements("li")
4949

5050
// Allow 'color' and 'background-color' properties for the style attribute on text elements.
51-
policy.AllowStyles("color", "background-color").OnElements("span", "p")
51+
policy.AllowStyles("color", "background-color").OnElements("div", "span", "p", "tr", "th", "td")
5252

5353
policy.AllowAttrs("src", "autoplay", "controls").OnElements("video")
5454

options/locale/locale_fr-FR.ini

-1
Original file line numberDiff line numberDiff line change
@@ -1687,7 +1687,6 @@ issues.tracking_already_started=`Vous avez déjà un minuteur en cours sur <a hr
16871687
issues.stop_tracking_history=`a fini de travailler sur <b>%s</b> %s.`
16881688
issues.cancel_tracking_history=`a abandonné son minuteur %s.`
16891689
issues.del_time=Supprimer ce minuteur du journal
1690-
issues.add_time_history=`a pointé du temps de travail %s.`
16911690
issues.del_time_history=`a supprimé son temps de travail %s.`
16921691
issues.add_time_manually=Temps pointé manuellement
16931692
issues.add_time_hours=Heures

options/locale/locale_zh-CN.ini

-2
Original file line numberDiff line numberDiff line change
@@ -1687,10 +1687,8 @@ issues.time_estimate_invalid=预计时间格式无效
16871687
issues.start_tracking_history=`开始工作 %s`
16881688
issues.tracker_auto_close=当此工单关闭时,自动停止计时器
16891689
issues.tracking_already_started=`你已经开始对 <a href="%s">另一个工单</a> 进行时间跟踪!`
1690-
issues.stop_tracking_history=`停止工作 %s`
16911690
issues.cancel_tracking_history=`取消时间跟踪 %s`
16921691
issues.del_time=删除此时间跟踪日志
1693-
issues.add_time_history=`添加计时 %s`
16941692
issues.del_time_history=`已删除时间 %s`
16951693
issues.add_time_manually=手动添加时间
16961694
issues.add_time_hours=小时

templates/base/head_navbar.tmpl

+2-2
Original file line numberDiff line numberDiff line change
@@ -191,15 +191,15 @@
191191
<span class="stopwatch-issue">{{.ActiveStopwatch.RepoSlug}}#{{.ActiveStopwatch.IssueIndex}}</span>
192192
</a>
193193
<div class="tw-flex tw-gap-1">
194-
<form class="stopwatch-commit" method="post" action="{{.ActiveStopwatch.IssueLink}}/times/stopwatch/toggle">
194+
<form class="stopwatch-commit form-fetch-action" method="post" action="{{.ActiveStopwatch.IssueLink}}/times/stopwatch/toggle">
195195
{{.CsrfTokenHtml}}
196196
<button
197197
type="submit"
198198
class="ui button mini compact basic icon tw-mr-0"
199199
data-tooltip-content="{{ctx.Locale.Tr "repo.issues.stop_tracking"}}"
200200
>{{svg "octicon-square-fill"}}</button>
201201
</form>
202-
<form class="stopwatch-cancel" method="post" action="{{.ActiveStopwatch.IssueLink}}/times/stopwatch/cancel">
202+
<form class="stopwatch-cancel form-fetch-action" method="post" action="{{.ActiveStopwatch.IssueLink}}/times/stopwatch/cancel">
203203
{{.CsrfTokenHtml}}
204204
<button
205205
type="submit"

0 commit comments

Comments
 (0)