Skip to content

Commit 07845a2

Browse files
committed
Unify locale keys
1 parent 349d5b1 commit 07845a2

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

options/locale/locale_en-US.ini

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1330,6 +1330,9 @@ editor.upload_file = Upload File
13301330
editor.edit_file = Edit File
13311331
editor.preview_changes = Preview Changes
13321332
editor.cannot_edit_lfs_files = LFS files cannot be edited in the web interface.
1333+
editor.cannot_edit_too_large_file = The file is too large to be edited.
1334+
editor.cannot_edit_binary_files = Binary files cannot be edited in the web interface.
1335+
editor.file_not_editable_hint = But you can still rename or move it.
13331336
editor.edit_this_file = Edit File
13341337
editor.this_file_locked = File is locked
13351338
editor.must_be_on_a_branch = You must be on a branch to make or propose changes to this file.
@@ -1393,9 +1396,6 @@ editor.user_no_push_to_branch = User cannot push to branch
13931396
editor.require_signed_commit = Branch requires a signed commit
13941397
editor.cherry_pick = Cherry-pick %s onto:
13951398
editor.revert = Revert %s onto:
1396-
editor.file_too_large_not_editable = The file is too large to be edited.
1397-
editor.binary_file_not_editable = Binary file content is not editable.
1398-
editor.file_not_editable_hint = But you can still rename or move it.
13991399
14001400
commits.desc = Browse source code change history.
14011401
commits.commits = Commits

routers/web/repo/editor.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -182,11 +182,11 @@ func editFile(ctx *context.Context, isNewFile bool) {
182182
if fInfo.isLFSFile {
183183
ctx.Data["NotEditableReason"] = ctx.Tr("repo.editor.cannot_edit_lfs_files")
184184
} else if !fInfo.isTextFile {
185-
ctx.Data["NotEditableReason"] = ctx.Tr("repo.editor.binary_file_not_editable")
185+
ctx.Data["NotEditableReason"] = ctx.Tr("repo.editor.cannot_edit_binary_files")
186186
}
187187

188188
if blob.Size() >= setting.UI.MaxDisplayFileSize {
189-
ctx.Data["NotEditableReason"] = ctx.Tr("repo.editor.file_too_large_not_editable")
189+
ctx.Data["NotEditableReason"] = ctx.Tr("repo.editor.cannot_edit_too_large_file")
190190
} else {
191191
d, _ := io.ReadAll(dataRc)
192192

0 commit comments

Comments
 (0)