diff --git a/options/locale/locale_en-US.ini b/options/locale/locale_en-US.ini index c1c6903a44..b0a2148a91 100644 --- a/options/locale/locale_en-US.ini +++ b/options/locale/locale_en-US.ini @@ -1330,6 +1330,9 @@ editor.upload_file = Upload File editor.edit_file = Edit File editor.preview_changes = Preview Changes editor.cannot_edit_lfs_files = LFS files cannot be edited in the web interface. +editor.cannot_edit_too_large_file = The file is too large to be edited. +editor.cannot_edit_binary_files = Binary files cannot be edited in the web interface. +editor.file_not_editable_hint = But you can still rename or move it. editor.edit_this_file = Edit File editor.this_file_locked = File is locked 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 editor.require_signed_commit = Branch requires a signed commit editor.cherry_pick = Cherry-pick %s onto: editor.revert = Revert %s onto: -editor.file_too_large_not_editable = The file is too large to be edited. -editor.binary_file_not_editable = Binary file content is not editable. -editor.file_not_editable_hint = But you can still rename or move it. commits.desc = Browse source code change history. commits.commits = Commits diff --git a/routers/web/repo/editor.go b/routers/web/repo/editor.go index ee43037bd1..70bbcd9965 100644 --- a/routers/web/repo/editor.go +++ b/routers/web/repo/editor.go @@ -182,11 +182,11 @@ func editFile(ctx *context.Context, isNewFile bool) { if fInfo.isLFSFile { ctx.Data["NotEditableReason"] = ctx.Tr("repo.editor.cannot_edit_lfs_files") } else if !fInfo.isTextFile { - ctx.Data["NotEditableReason"] = ctx.Tr("repo.editor.binary_file_not_editable") + ctx.Data["NotEditableReason"] = ctx.Tr("repo.editor.cannot_edit_binary_files") } if blob.Size() >= setting.UI.MaxDisplayFileSize { - ctx.Data["NotEditableReason"] = ctx.Tr("repo.editor.file_too_large_not_editable") + ctx.Data["NotEditableReason"] = ctx.Tr("repo.editor.cannot_edit_too_large_file") } else { d, _ := io.ReadAll(dataRc)