]> source.dussan.org Git - gitea.git/commit
Editor error message misleading due to re-used key. (#29859) (#29876)
authorGiteabot <teabot@gitea.io>
Mon, 18 Mar 2024 06:45:43 +0000 (14:45 +0800)
committerGitHub <noreply@github.com>
Mon, 18 Mar 2024 06:45:43 +0000 (14:45 +0800)
commit00ea9af8e118790a186b4cf78a0ce85ce986bf1d
treed8c80158f3155218ce409741d514ae867f0da16b
parentc044510ca8bed67cb2d50ba741b3d0b520aa3c43
Editor error message misleading due to re-used key. (#29859) (#29876)

Backport #29859 by @buckybytes

The error message:

`editor.file_changed_while_editing = The file contents have changed
since you started editing. <a target="_blank" rel="noopener noreferrer"
href="%s">Click here</a> to see them or <strong>Commit Changes
again</strong> to overwrite them.`

Is re-used in inappropriate contexts. The link in the key goes to a 404
when the key is used in a situation where the file contents have not
changed.

Added two new keys to differentiate commit id mismatch and push out of
date conditions.

Co-authored-by: buckybytes <158571971+buckybytes@users.noreply.github.com>
options/locale/locale_en-US.ini
routers/web/repo/editor.go