diff --git a/conf/locale/TRANSLATORS b/conf/locale/TRANSLATORS index b869cdc71..651c83099 100644 --- a/conf/locale/TRANSLATORS +++ b/conf/locale/TRANSLATORS @@ -17,6 +17,7 @@ Barış Arda Yılmaz Camille Baronnet Christoph Kisfeld Cysioland +Damaris Padieu Daniel Speichert David Yzaguirre Dmitriy Nogay diff --git a/conf/locale/locale_de-DE.ini b/conf/locale/locale_de-DE.ini index 21d2c0d21..422be93ba 100644 --- a/conf/locale/locale_de-DE.ini +++ b/conf/locale/locale_de-DE.ini @@ -456,6 +456,7 @@ editor.cancel=Abbrechen editor.filename_cannot_be_empty=Der Dateiname darf nicht leer sein. editor.branch_already_exists=Branch '%s' existiert bereits in diesem Repository. editor.directory_is_a_file='%s' im übergeordneten Verzeichnis ist eine Datei und kein Verzeichnis. +editor.file_is_a_symlink=Die Datei '%s' ist ein Symlink der nicht über den Web Editor bearbeitet werden kann. editor.filename_is_a_directory=Die Datei '%s' existiert bereits als Verzeichnis in diesem Repository. editor.file_editing_no_longer_exists=Die Datei '%s', welche Sie bearbeiten, existiert in diesem Repository nicht mehr. editor.file_changed_while_editing=Seit dem Start der Bearbeitung hat sich die Datei geändert. Hier klicken um die Änderungen zu sehen, oder nochmals Commit drücken um die Änderungen zu überschreiben. diff --git a/conf/locale/locale_en-US.ini b/conf/locale/locale_en-US.ini index de58cce75..24868b5c0 100644 --- a/conf/locale/locale_en-US.ini +++ b/conf/locale/locale_en-US.ini @@ -461,6 +461,7 @@ editor.cancel = Cancel editor.filename_cannot_be_empty = Filename cannot be empty. editor.branch_already_exists = Branch '%s' already exists in this repository. editor.directory_is_a_file = Entry '%s' in the parent path is a file not a directory in this repository. +editor.file_is_a_symlink = The file '%s' is a symlink that cannot be modified from the web editor editor.filename_is_a_directory = The filename '%s' is an existing directory in this repository. editor.file_editing_no_longer_exists = The file '%s' you are editing no longer exists in the repository. editor.file_changed_while_editing = File content has been changed since you started editing. Click here to see what have been changed or press commit again to overwrite those changes. diff --git a/conf/locale/locale_fr-FR.ini b/conf/locale/locale_fr-FR.ini index 2302c605d..2e21944cc 100644 --- a/conf/locale/locale_fr-FR.ini +++ b/conf/locale/locale_fr-FR.ini @@ -455,6 +455,7 @@ editor.cancel=Annuler editor.filename_cannot_be_empty=Nom de fichier ne peut pas être vide. editor.branch_already_exists=La branche '%s' existe déjà dans ce dépôt. editor.directory_is_a_file=L'entrée '%s' dans le chemin d’accès parent est un fichier pas un répertoire dans ce dépôt. +editor.file_is_a_symlink=Le fichier '%s' est un lien symbolique qui ne peut pas être modifié par l'éditeur web editor.filename_is_a_directory=Le nom de fichier '%s' existe déjà dans ce dépot. editor.file_editing_no_longer_exists=Le fichier '%s' que vous modifiez n'existe plus dans le dépôt. editor.file_changed_while_editing=Le contenu du fichier à changé depuis que vous avez commencé à l'éditer. Cliquez ici pour voir ce qui à été modifié ou appuyez sur commit encore une fois pour remplacer ces changements. diff --git a/conf/locale/locale_zh-CN.ini b/conf/locale/locale_zh-CN.ini index 50b822fe7..557b3aee7 100644 --- a/conf/locale/locale_zh-CN.ini +++ b/conf/locale/locale_zh-CN.ini @@ -459,6 +459,7 @@ editor.cancel=取消 editor.filename_cannot_be_empty=文件名不能为空。 editor.branch_already_exists=此仓库已存在名为 '%s' 的分支。 editor.directory_is_a_file=路径 '%s' 的父路径中包含此仓库已存在的文件名。 +editor.file_is_a_symlink = '%s'数据是网页编辑器不能改变的符号链接。 editor.filename_is_a_directory=文件名 '%s' 是此仓库中已存在的目录名。 editor.file_editing_no_longer_exists=您编辑的文件 '%s' 已经不存在于此仓库中。 editor.file_changed_while_editing=文件内容在您进行编辑时已经发生变动。单击此处 查看变动的具体内容,或者 再次提交 覆盖已发生的变动。 diff --git a/routers/repo/editor.go b/routers/repo/editor.go index 8d45521a2..0c4220472 100644 --- a/routers/repo/editor.go +++ b/routers/repo/editor.go @@ -186,6 +186,11 @@ func editFilePost(ctx *context.Context, form auth.EditRepoFileForm, isNewFile bo return } } else { + if entry.IsLink() { + ctx.Data["Err_TreePath"] = true + ctx.RenderWithErr(ctx.Tr("repo.editor.file_is_a_symlink", part), tplEditFile, &form) + return + } if entry.IsDir() { ctx.Data["Err_TreePath"] = true ctx.RenderWithErr(ctx.Tr("repo.editor.filename_is_a_directory", part), tplEditFile, &form)