From 4267b3f439b80a8bcbfeac2e60c26ef13fc78dbc Mon Sep 17 00:00:00 2001 From: Jan Date: Fri, 3 Aug 2012 13:46:57 +0300 Subject: [PATCH 01/26] Update README.md Nikogiri -> Nokogiri --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 85b2b333..7b96bc43 100644 --- a/README.md +++ b/README.md @@ -44,7 +44,7 @@ As of version 1.4.4 of this plugin: * Redmine 2.0.x * Rails 3.2.x (Inline with Redmine installation requirement) * zip (Gem) - * Nikogiri 1.4.2 or greater (Gem) + * Nokogiri 1.4.2 or greater (Gem) * UUIDTools 2.1.1 or greater (less than 2.2.0) (Gem) * simple_enum (Gem) From 828a760f1dfe9da5d8bc0cdbaeecbf6dd8e29d1f Mon Sep 17 00:00:00 2001 From: Glennie Vignarajah Date: Wed, 22 Aug 2012 17:26:33 +0200 Subject: [PATCH 02/26] Updated french translation. --- config/locales/fr.yml | 374 ++++++++++++++++++++++-------------------- 1 file changed, 200 insertions(+), 174 deletions(-) diff --git a/config/locales/fr.yml b/config/locales/fr.yml index 9eb0cce3..7cd9de29 100644 --- a/config/locales/fr.yml +++ b/config/locales/fr.yml @@ -1,184 +1,210 @@ fr: :dmsf: "DMSF" - :label_dmsf_file_plural: "Dmsf files" - :warning_no_entries_selected: "No entries selected" - :error_email_to_must_be_entered: "Email To must be entered" - :notice_email_sent: "Email sent" - :warning_file_already_locked: "File already locked" - :notice_file_locked: "File locked" - :warning_file_not_locked: "File not locked" - :notice_file_unlocked: "File unlocked" - :error_only_user_that_locked_file_can_unlock_it: "Only user that locked file can unlock it" - :question_do_you_really_want_to_delete_this_entry: "Do you really want to delete this entry?" - :error_max_files_exceeded: "Limit for %{number} simultaneously downloaded files exceeded" - :question_do_you_really_want_to_delete_this_revision: "Do you really want to delete this revision?" + :label_dmsf_file_plural: "Fichiers DMSF" + :warning_no_entries_selected: "Aucun fichier sélectionné" + :error_email_to_must_be_entered: "La saisie d'une adresse mail est obligatoire" + :notice_email_sent: "Mail envoyé" + :warning_file_already_locked: "Fichier déjà verrouillé" + :notice_file_locked: "Fichier verrouillé" + :warning_file_not_locked: "Fichier déverrouillé" + :notice_file_unlocked: "Fichier déverrouillé" + :error_only_user_that_locked_file_can_unlock_it: "Le fichier ne peut être déverrouillé que par celui qui l'a verrouillé" + :question_do_you_really_want_to_delete_this_entry: "Etes-vous sûr de vouloir supprimer cet élément ?" + :error_max_files_exceeded: "Le nombre de fichiers pouvant être téléchargés simultanément est dépassé" + :question_do_you_really_want_to_delete_this_revision: "Etes-vous sûr de vouloir supprimer cette révision ?" :error_entry_project_does_not_match_current_project: "Entry project doesn't match current project" - :notice_folder_created: "Folder created" - :error_folder_creation_failed: "Folder creation failed" - :error_folder_title_must_be_entered: "Title must be entered" - :notice_folder_deleted: "Folder deleted" - :error_folder_is_not_empty: "Folder is not empty" - :error_folder_title_is_already_used: "Title is already used" - :notice_folder_details_were_saved: "Folder details were saved" - :error_file_is_locked: "File is locked" - :notice_file_deleted: "File deleted" - :error_at_least_one_revision_must_be_present: "At least one revision must be present" - :notice_revision_deleted: "Revision deleted" - :warning_one_of_files_locked: "One of files locked" - :notice_file_unlocked: "File unlocked" - :notice_file_revision_created: "File revision created" - :notice_your_preferences_were_saved: "Your preferences were saved" - :warning_folder_notifications_already_activated: "Folder notifications already activated" - :notice_folder_notifications_activated: "Folder notifications activated" - :warning_folder_notifications_already_deactivated: "Folder notifications already deactivated" - :notice_folder_notifications_deactivated: "Folder notifications deactivated" - :warning_file_notifications_already_activated: "File notifications already activated" - :notice_file_notifications_activated: "File notifications activated" - :warning_file_notifications_already_deactivated: "File notifications already deactivated" - :notice_file_notifications_deactivated: "File notifications deactivated" - :link_details: "%{title} details" - :link_edit: "Edit %{title}" - :submit_create: "Create" - :link_create_folder: "Create folder" - :title_check_uncheck_all_for_zip_download_or_email: "Check/Uncheck all for zip download or email" - :link_title: "Title" - :link_size: "Size" - :link_modified: "Modified" - :link_ver: "Ver." - :link_author: "Author" - :title_check_for_zip_download_or_email: "Check for Zip download or email" - :title_delete: "Delete" - :title_notifications_active_deactivate: "Notifications active: Deactivate" - :title_notifications_not_active_activate: "Notifications not active: Activate" - :title_title_version_version_download: "%{title} version %{version} download" - :title_locked_by_user: "Locked by %{user}" - :title_locked_by_you: "Locked by you" - :title_waiting_for_approval: "Waiting for Approval" - :title_approved: "Approved" - :title_unlock_file: "Unlock to allow changes for other members" - :title_lock_file: "Lock to prevent changes for other members" - :submit_download: "Download" - :title_download_checked: "Download checked in Zip archive" + :notice_folder_created: "Dossier créé" + :error_folder_creation_failed: "Erreur de création du dossier" + :error_folder_title_must_be_entered: "Le titre du document est requis" + :notice_folder_deleted: "Dossier supprimé" + :error_folder_is_not_empty: "Le dossier n'est pas vide" + :error_folder_title_is_already_used: "Le titre du fichier est déjà utilisé" + :notice_folder_details_were_saved: "Les détails du dossier ont été enregistrés" + :error_file_is_locked: "Le fichier est verrouillé" + :notice_file_deleted: "Le fichier a été supprimé" + :error_at_least_one_revision_must_be_present: "Au moins une révision est requise" + :notice_revision_deleted: "Révision supprimée" + :warning_one_of_files_locked: "Un des fichiers sélectionnés est verrouillé" + :notice_file_unlocked: "Fichier déverrouillé" + :notice_file_revision_created: "La révision du fichier a été ajoutée" + :notice_your_preferences_were_saved: "Vos paramètres ont été enregistrés" + :warning_folder_notifications_already_activated: "Les notifications du dossier sont déjà activées" + :notice_folder_notifications_activated: "Les notifications du dossier ont été activées" + :warning_folder_notifications_already_deactivated: "Les notifications du dossier sont déjà désactivées" + :notice_folder_notifications_deactivated: "Les notifications des dossier ont été désactivés" + :warning_file_notifications_already_activated: "Les notifications du fichier sont déjà désactivés" + :notice_file_notifications_activated: "Les notifications du fichier ont été activées" + :warning_file_notifications_already_deactivated: "Les notifications du fichier sont déjà désactivées" + :notice_file_notifications_deactivated: "Les notifications du fichier ont été désactivés" + :link_details: "Détails de %{title}" + :link_edit: "Modification du dossier %{title}" + :submit_create: "Ajouter" + :link_create_folder: "Créer un sous-dossier" + :title_check_uncheck_all_for_zip_download_or_email: "Sélectionner/Ignorer tous les documents pour le téléchargement ou pour la transmission par mail" + :link_title: "Titre" + :link_size: "Taille" + :link_modified: "Modifié" + :link_ver: "Version" + :link_author: "Auteur" + :title_check_for_zip_download_or_email: "Sélectionner pour le téléchargement ou la transmission par mail" + :title_delete: "Supprimer" + :title_notifications_active_deactivate: "Notifications activées : cliquer pour désactiver" + :title_notifications_not_active_activate: "Notifications désactivées : cliquer pour activer" + :title_title_version_version_download: "Télécharger la version %{version} de %{title}" + :title_locked_by_user: "Verrouillé par %{user}" + :title_locked_by_you: "Verrouillé par vous-même" + :title_waiting_for_approval: "Attente de validation" + :title_approved: "Validé" + :title_unlock_file: "Déverrouiller afin de permettre la modification par les membres du projet" + :title_lock_file: "Verrouiller afin d'empêcher les modifications du document" + :submit_download: "Télécharger" + :title_download_checked: "Télécharger les fichiers sélectionnés au format zip" :submit_email: "Email" - :title_send_checked_by_email: "Send checked by email" - :link_user_preferences: "Your DMSF project preferences" - :heading_send_documents_by_email: "Send documents by email" - :label_email_from: "From" - :label_email_to: "To" - :label_email_cc: "CC" - :label_email_subject: "Subject" - :label_email_documents: "Documents" - :label_email_body: "Body" - :label_email_send: "Send" - :title_notifications_active: "Notifications active" - :label_file_size: "File size" - :heading_file_upload: "Upload" - :note_uploaded_maximum_files_at_once: "There can be uploaded maximum of %{number} files at once." - :note_upload_files_greater_than_two_gb: "To upload files greater than 2GB you must have 64b browser." - :submit_upload_files: "Upload" - :info_file_locked: "File locked!" + :title_send_checked_by_email: "Transmettre les fichiers sélectionnés par mail" + :link_user_preferences: "Préférences personnelles du module DMSF" + :heading_send_documents_by_email: "Transmettre les documents par mail" + :label_email_from: "De" + :label_email_to: "A" + :label_email_cc: "Cc" + :label_email_subject: "Objet" + :label_email_documents: "Fichiers" + :label_email_body: "Message" + :label_email_send: "Envoyer" + :title_notifications_active: "Notifications actives" + :label_file_size: "Taille du fichier" + :heading_file_upload: "Déposer des fichiers" + :note_uploaded_maximum_files_at_once: "Seulement %{number} fichiers peuvent être déposés à la fois." + :note_upload_files_greater_than_two_gb: "Afin de transmettre des fichiers de plus de 2Go, l'utilisation d'un navigateur de 64Bits est nécessaire." + :submit_upload_files: "Transmission" + :heading_new_folder: "Nouveau Dossier" + :label_title: "Titre" + :label_description: "Description" + :submit_save: "Enregistrer" + :info_file_locked: "Fichier verrouillé" :label_notifications: "Notifications" - :select_option_default: "Default" - :select_option_deactivated: "Deactivated" - :select_option_activated: "Activated" - :title_save_preferences: "Save preferences" - :heading_revisions: "Revisions" - :title_download: "Download" - :title_delete_revision: "Delete revision" - :label_created: "Created" - :label_changed: "Changed" - :info_changed_by_user: "%{changed} by %{user}" - :label_filename: "Filename" + :select_option_default: "Défaut" + :select_option_deactivated: "Désactivé" + :select_option_activated: "Activé" + :title_save_preferences: "Enregistrer les préférences" + :heading_revisions: "Révisions" + :title_download: "Télécharger" + :title_delete_revision: "Supprimer la révision" + :label_created: "Créé" + :label_changed: "Modifié" + :info_changed_by_user: "%{changed} par %{user}" + :label_filename: "Fichier" :label_version: "Version" - :label_workflow: "Workflow" - :option_workflow_waiting_for_approval: "Waiting for approval" - :option_workflow_approved: "Approved" - :option_workflow_none: "None" - :label_mime: "Mime" - :label_size: "Size" - :label_comment: "Comment" - :heading_new_revision: "New Revision" - :option_version_same: "Same" - :option_version_minor: "Minor" - :option_version_major: "Major" - :label_new_content: "New content" - :label_maximum_files_upload: "Maximum files upload" - :note_maximum_number_of_files_uploaded: "Limits maximum number of files uploaded at once. 0 means unlimited." - :label_maximum_files_download: "Maximum files download" - :note_maximum_number_of_files_downloaded: "Limits maximum number of files downloaded in zip or sent via email. 0 means unlimited." - :label_file_storage_directory: "File storage directory" - :label_index_database: "Index database" - :label_stemming_language: "Stemming Language" - :note_possible_values: "Possible values" - :note_pass_none_to_disable_stemming: "pass 'none' to disable stemming" - :label_stem_strategy: "Stem strategy" - :option_stem_none: "Stem none (default)" - :option_stem_some: "Stem some" - :option_stem_all: "Stem all" - :label_stemming_description: "This controls how the query parser will apply the stemming algorithm. The default value is STEM_NONE. The possible values are" - :note_do_not_stem: "Don't perform any stemming." - :note_stem_some: "Search for stemmed forms of terms except for those which start with a capital letter, or are followed by certain characters, or are used with operators which need positional information. Stemmed terms are prefixed with 'Z'." - :note_stem_all: "Search for stemmed forms of all words (note: no 'Z' prefix is added)." - :note_stemming_applied: "Note that the stemming algorithm is only applied to words in probabilistic fields - boolean filter terms are never stemmed." - :label_default_notifications: "File default notifications" - :heading_uploaded_files: "Uploaded Files" - :submit_commit: "Commit" + :label_workflow: "Etat" + :option_workflow_waiting_for_approval: "En attente de validation" + :option_workflow_approved: "Validé" + :option_workflow_none: "Aucun" + :label_mime: "Type" + :label_size: "Taille" + :label_comment: "Commentaires" + :heading_new_revision: "Nouvelle révision" + :option_version_same: "(identique)" + :option_version_minor: "(modification mineure)" + :option_version_major: "(modification majeure)" + :label_new_content: "Nouvelle version du fichier" + :label_maximum_files_upload: "Nombre maximal de documents pouvant être transmis" + :note_maximum_number_of_files_uploaded: "Nombre maximal de documents pouvant être transmis en une fois. La valeur 0 signifie illimité." + :label_maximum_files_download: "Nombre maximal de fichiers pouvant être téléchargés" + :note_maximum_number_of_files_downloaded: "Nombre maximal de documents pouvant être téléchargés ou transmis par mail en une fois. La valeur 0 signifie illimité." + :label_file_storage_directory: "Dossier de stockage des documents" + :label_index_database: "Indexer la base de données" + :label_stemming_language: "Méthode de racinisation" + :note_possible_values: "valeurs possibles" + :note_pass_none_to_disable_stemming: "Utiliser 'none' pour désactiver la racinisation" + :label_stem_strategy: "Stratégie de racinisation" + :option_stem_none: "Aucun suffixe(défaut)" + :option_stem_some: "Quelques suffixes" + :option_stem_all: "Tous les suffixes" + :label_stemming_description: "Ce paramètre contrôle l'algorithme de racinisation appliqué par le requêteur. La valeur par défaut est STEM_NONE. Les paramètres disponibles sont" + :note_do_not_stem: "N'effectuer aucune transformation" + :note_stem_some: "Rechercher des stemmes pour tous les mots sauf ceux qui commencent par des majuscules, ceux suivis d'un certain nombre de caractères ou ceux utilisés avec des opérateurs nécessitant des informations contextuelles. Les stemmes doivent être préfixées par 'Z'." + :note_stem_all: "Rechercher toutes les racines de tous les mots (note : le préfix 'Z' ne sera pas ajouté)." + :note_stemming_applied: "Il est à noter que l'algorithme de racinisation ne sera appliqué qu'aux mots in probabilistic fields - Les filtres booléans ne seront pas racinisés." + :label_default_notifications: "Les notifications par défaut du document" + :heading_uploaded_files: "Document(s) transmis" + :submit_commit: "Appliquer" :link_documents: "Documents" - :permission_view_dmsf_folders: "Browse documents" - :permission_user_preferences: "User preferences" - :permission_view_dmsf_files: "View documents" - :permission_folder_manipulation: "Folder manipulation" - :permission_file_manipulation: "File manipulation" - :permission_file_approval: "File approval" - :permission_force_file_unlock: "Force file unlock" - :label_file: "File" - :field_folder: "Folder" + :permission_view_dmsf_folders: "Parcourir les documents" + :permission_user_preferences: "Préférences utilisateur" + :permission_view_dmsf_files: "Afficher documents" + :permission_folder_manipulation: "Gestion des dossiers" + :permission_file_manipulation: "Gestion des documents" + :permission_file_approval: "Validation du document" + :permission_force_file_unlock: "Forcer le déverrouillage du document" + :label_file: "Fichier" + :field_folder: "Dossier" :error_create_cycle_in_folder_dependency: "create cycle in folder dependency" - :error_contains_invalid_character: "contains invalid character(s)" - :error_file_commit_require_uploaded_file: "File commit require uploaded file" - :warning_some_files_were_not_commited: "Some files were not commited due to validation errors: %{files}" - :error_user_has_not_right_delete_folder: "User hasn't right to delete forders" - :error_user_has_not_right_delete_file: "User hasn't right to delete file" - :notice_entries_deleted: "Entries deleted" - :warning_some_entries_were_not_deleted: "Some entries weren't deleted: %{entries}" - :question_do_you_really_want_to_delete_entries: "Do you really want to delete checked entries?" - :title_delete_checked: "Delete checked" - :title_number_of_files_in_directory: "Number of files in directory" - :title_filename_for_download: "Filename used for download or in Zip archive" - :label_number_of_folders: "Folders" - :label_number_of_documents: "Documents" - :label_zip_names_encoding: "Zip names encoding" - :note_zip_names_encoding_iconv: "Iconv is used for charset conversion from utf-8 to target encoding" - :error_file_storage_directory_does_not_exist: "File storage directory doesn't exist and can't be created" - :error_file_can_not_be_created: "File can't be created in storage directory" - :error_wrong_zip_encoding: "Wrong Zip encoding" - :warning_xapian_not_available: "Xapian not available" + :error_contains_invalid_character: "Contient de(s) caractère(s) invalide(s)" + :error_file_commit_require_uploaded_file: "Transmission des fichiers nécessaire avant l'enregistrement" + :warning_some_files_were_not_commited: "Erreur d'enregsitrement de certains fichiers %{files}" + :error_user_has_not_right_delete_folder: "L'utilisateur ne dispose pas des droits nécessaires permettant la suppression du dossier" + :error_user_has_not_right_delete_file: "L'utilisateur ne dispose pas des droits nécessaires permettant la suppression du dossier" + :notice_entries_deleted: "Elément(s) supprimé(s)" + :warning_some_entries_were_not_deleted: "Certains éléments n'ont pas été supprimés : %{entries}" + :question_do_you_really_want_to_delete_entries: "Etes-vous sûr de vouloir supprimer le(s) élément(s) sélectionné(s)?" + :title_delete_checked: "Supprimer les éléments sélectionnés" + :title_number_of_files_in_directory: "Nombre de fichiers dans le dossier" + :title_filename_for_download: "Nom du fichier à utiliser lors du téléchargement ou de l'archive ZIP" + :label_number_of_folders: "Dossiers" + :label_number_of_documents: "Fichiers" + :label_zip_names_encoding: "Encodage du nom des fichiers ZIP" + :note_zip_names_encoding_iconv: "Iconv est utilisé lors de la transformation du jeu de caractères utf-8 vers le jeu de caractères cible" + :error_file_storage_directory_does_not_exist: "Le répertoire de stockage des fichiers n'existe pas ou n'a pas pu être créé" + :error_file_can_not_be_created: "Le fichier n'a pas pu être enregistré dans le répertoire de stockage" + :error_wrong_zip_encoding: "Mauvais jeu de caractères pour la transformation du nom du ZIP" + :warning_xapian_not_available: "Le module Xapian est indisponible" :menu_dmsf: "DMSF" - :label_physical_file_delete: "Physical file delete" - :user_is_not_project_member: "You are not member of the project" - :heading_access_downloads_emails: "Downloads/Emails" - :heading_access_first: "First" - :heading_access_last: "Last" - :label_dmsf_updated: "DMSF updated" - :title_total_size_of_all_files: "Total size of all files under this folder" + :label_physical_file_delete: "Suppression des fichiers" + :user_is_not_project_member: "Vous n'êtes pas un membre du projet" + :heading_access_downloads_emails: "Téléchargement / Envoi par mail" + :heading_access_first: "Premier" + :heading_access_last: "Dernier" + :label_dmsf_updated: "Dépôt ou mise à jour du document " + :title_total_size_of_all_files: "Taille totale des fichiers de ce dossier" :project_module_dmsf: "DMSF" - :warning_no_project_to_copy_file_to: "No project to copy file to" - :comment_copied_from: "Copied from %{source}" - :notice_file_copied: "File copied" - :notice_file_moved: "File moved" - :label_target_project: "Target project" - :label_target_folder: "Target folder" - :title_copy_or_move: "Copy/Move" - :label_dmsf_folder_plural: "Dmsf folders" - :comment_moved_from: "Moved from %{source}" - :error_target_folder_same: "Target folder and project are the same as current" - :error_file_cannot_be_moved: "File can't be moved" - :error_file_cannot_be_copied: "File can't be copied" - :warning_no_project_to_copy_folder_to: "No project to copy folder to" - :title_copy: "Copy" - :error_folder_cannot_be_copied: "Folder can't be copied" - :notice_folder_copied: "Folder copied" - :error_max_email_filesize_exceeded: "You've exceeded the maximum filesize for sending via email. (%{number} MB)" - :note_maximum_email_filesize: "Limits maximum filesize that can be sent via email. 0 means unlimited. Number is in MB." - :label_maximum_email_filesize: "Maximum email attachment size" - \ No newline at end of file + :warning_no_project_to_copy_file_to: "Le projet de destination n'est pas défini" + :comment_copied_from: "Copie effectuée depuis %{source}" + :notice_file_copied: "Fichier copié" + :notice_file_moved: "Fichier déplacé" + :label_target_project: "Projet cible" + :label_target_folder: "Dossier cible" + :title_copy_or_move: "Copie/Déplacement" + :label_dmsf_folder_plural: "Les dossiers de DMSF" + :comment_moved_from: "Déplacé depuis %{source}" + :error_target_folder_same: "Le projet et le dossier cible sont identiques au projet et dossier source" + :error_file_cannot_be_moved: "Le fichier ne peut pas être déplacé" + :error_file_cannot_be_copied: "Le fichier ne peut pas être copié" + :warning_no_project_to_copy_folder_to: "Le projet de destination n'est pas défini" + :title_copy: "Copie" + :error_folder_cannot_be_copied: "Le dossier ne peut pas être copié" + :notice_folder_copied: "Dossier copié" + + :error_max_email_filesize_exceeded: "Vous avez dépassé la taille maximale des fichiers pouvant être transmis par mail (%{number} MB)" + :note_maximum_email_filesize: "Taille maximale, en méga octets, des fichiers pouvant être transmis par mail. 0 indique aucune restriction" + :label_maximum_email_filesize: "Taille maximale du fichier attaché" + :header_minimum_filesize: "Erreur de fichier." + :error_minimum_filesize: "Le fichier %{file} est vide. Il ne sera pas transmis." + :parent_directory: "Dossier parent" + :note_webdav: "Après l'activation du module Webdav, celui-ci sera accessible par http://.../dmsf/webdav/" + :label_webdav: "Module Webdav" + :label_dmsf_plural: "Copier les fichiers et les dossiers DMSF (%{files} fichiers dans %{folders} dossiers)" + + :warning_folder_already_locked: "Ce dossier est déjà verrouillé" + :notice_folder_locked: "Dossier verrouillé" + :warning_folder_not_locked: "Echec du verrouillage du dossier" + :notice_folder_unlocked: "Le dossier a été déverrouillé" + :error_only_user_that_locked_folder_can_unlock_it: "Vous n'êtes autorisé à déverrouiller ce dossier" + :title_folder_parent_locked: "Le dossier parent %{name} verrouillé" + :title_file_parent_locked: "Le dossier parent %{name} verrouillé" + :title_unlock_folder: "Déverrouiller afin de permettre la modification par les membres du projet" + :title_lock_folder: "Verrouiller afin d'empêcher les modifications du dossier" + + :select_option_webdav_readonly: "Lecture" + :select_option_webdav_readwrite: "Lecture/Ecriture" + :label_webdav_strategy: "Accès Webdav" + :note_webdav_strategy: "Permet à l'administrateur d'autoriser les utilisateurs au module Webdav en letcure seule ou en lecture et écriture." + From c253c04bfc77829523ddf4c8d0ad08b5898f145a Mon Sep 17 00:00:00 2001 From: Daniel Munn Date: Tue, 28 Aug 2012 10:00:17 +0200 Subject: [PATCH 03/26] Update app/controllers/dmsf_upload_controller.rb Updated to correct file unlock; although functionality for permissions needs to be moved from model however. --- app/controllers/dmsf_upload_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/dmsf_upload_controller.rb b/app/controllers/dmsf_upload_controller.rb index 28c9bdb9..27e40fe4 100644 --- a/app/controllers/dmsf_upload_controller.rb +++ b/app/controllers/dmsf_upload_controller.rb @@ -133,7 +133,7 @@ class DmsfUploadController < ApplicationController end if file.locked? - DmsfFileLock.file_lock_state(file, false) + file.unlock! flash[:notice] = l(:notice_file_unlocked) end From e46d07e8a29223c734b9aa430a34c139d505ce88 Mon Sep 17 00:00:00 2001 From: Daniel Munn Date: Tue, 4 Sep 2012 11:36:12 +0200 Subject: [PATCH 04/26] Resolution attempt for #46 all entities are listed including deleted items (which may have no revisions as a result of deletion) if we call for the scoped listing with .visible should remove deleted items and rectify issue. --- lib/dmsf_zip.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/dmsf_zip.rb b/lib/dmsf_zip.rb index 45bdc18f..d46cbcca 100644 --- a/lib/dmsf_zip.rb +++ b/lib/dmsf_zip.rb @@ -68,8 +68,8 @@ class DmsfZip rescue end @zip_file.put_next_entry(string_path) - folder.subfolders.each { |subfolder| self.add_folder(subfolder, root_path) } - folder.files.each { |file| self.add_file(file, root_path) } + folder.subfolders.visible.each { |subfolder| self.add_folder(subfolder, root_path) } + folder.files.visible.each { |file| self.add_file(file, root_path) } end end \ No newline at end of file From df30c7fea19f685072c026bbd634d38bcac9cb4a Mon Sep 17 00:00:00 2001 From: Daniel Munn Date: Mon, 24 Sep 2012 11:08:53 +0100 Subject: [PATCH 05/26] Relates to #50 should fix issue (awaiting user confirmation) --- app/models/dmsf_file.rb | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/app/models/dmsf_file.rb b/app/models/dmsf_file.rb index a6315180..4b7fccd2 100644 --- a/app/models/dmsf_file.rb +++ b/app/models/dmsf_file.rb @@ -349,10 +349,12 @@ class DmsfFile < ActiveRecord::Base filename = dochash["url"] if !filename.nil? dmsf_attrs = filename.split("_") + id_attribute = 0 + id_attribute = dmsf_attrs[dmsf_attrs.length - 2] if dmsf_attrs.length > 2 next if dmsf_attrs[1].blank? - next unless results.select{|f| f.id.to_s == dmsf_attrs[1]}.empty? + next unless results.select{|f| f.id.to_s == id_attribute}.empty? - dmsf_file = DmsfFile.where(limit_options[:conditions]).where(:id => dmsf_attrs[1], :deleted => false).first + dmsf_file = DmsfFile.where(limit_options[:conditions]).where(:id => id_attribute, :deleted => false).first if !dmsf_file.nil? if options[:offset] From 74deb1e2c68aa16ab4bf04509f98d362eb37c212 Mon Sep 17 00:00:00 2001 From: Daniel Munn Date: Mon, 24 Sep 2012 12:47:19 +0100 Subject: [PATCH 06/26] Fix attempt 2 for issue #50 - this any better? --- app/models/dmsf_file.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/models/dmsf_file.rb b/app/models/dmsf_file.rb index 4b7fccd2..517a23c0 100644 --- a/app/models/dmsf_file.rb +++ b/app/models/dmsf_file.rb @@ -348,10 +348,10 @@ class DmsfFile < ActiveRecord::Base dochash = Hash[*docdata.scan(/(url|sample|modtime|type|size)=\/?([^\n\]]+)/).flatten] filename = dochash["url"] if !filename.nil? - dmsf_attrs = filename.split("_") + dmsf_attrs = filename.scan(/^([^\/]+\/[^_]+)_([\d]+)_(.*)$/) id_attribute = 0 - id_attribute = dmsf_attrs[dmsf_attrs.length - 2] if dmsf_attrs.length > 2 - next if dmsf_attrs[1].blank? + id_attribute = dmsf_attrs[0][1] if dmsf_attrs.length > 0 + next if dmsf_attrs.length == 0 || id_attribute == 0 next unless results.select{|f| f.id.to_s == id_attribute}.empty? dmsf_file = DmsfFile.where(limit_options[:conditions]).where(:id => id_attribute, :deleted => false).first From c7fffa5972248e440d87f6e8f688388737b15e10 Mon Sep 17 00:00:00 2001 From: Daniel Munn Date: Thu, 27 Sep 2012 20:39:47 +0200 Subject: [PATCH 07/26] Update README.md --- README.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/README.md b/README.md index 7b96bc43..bd49a5f7 100644 --- a/README.md +++ b/README.md @@ -17,6 +17,11 @@ Redmine is a flexible project management web application, released under the ter Further information about the GPL license can be found at +Redmine 1.5.0 development +------------------------- +Although regular logs are not publicly updated - you can keep an eye on the 1.5.0 codebase or the changelog: +https://github.com/danmunn/redmine_dmsf/blob/devel-1.5.0/CHANGELOG.md + Features -------- From 46ea07579a99232f4ebe3b1ed830a00b967f2731 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=9D=D0=B0=D0=B7=D0=B0=D1=80=20=D0=92=D1=96=D0=BD=D0=BD?= =?UTF-8?q?=D0=B8=D1=87=D1=83=D0=BA?= Date: Tue, 23 Oct 2012 23:59:15 +0300 Subject: [PATCH 08/26] Added russian localization --- config/locales/ru.yml | 209 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 209 insertions(+) create mode 100644 config/locales/ru.yml diff --git a/config/locales/ru.yml b/config/locales/ru.yml new file mode 100644 index 00000000..7c13105b --- /dev/null +++ b/config/locales/ru.yml @@ -0,0 +1,209 @@ +en: + :dmsf: "Документы" + :label_dmsf_file_plural: "Файлы DMSF" + :warning_no_entries_selected: "Записи не выбраны" + :error_email_to_must_be_entered: "Нужно указать, на какую почту отправить письмо" + :notice_email_sent: "Письмо отправлено" + :warning_file_already_locked: "Файл уже заблокирован" + :notice_file_locked: "Файл заблокирован" + :warning_file_not_locked: "Файл не заблокирован" + :notice_file_unlocked: "Файл разблокирован" + :error_only_user_that_locked_file_can_unlock_it: "Только пользователь, который заблокировал файл может его разблокировать" + :question_do_you_really_want_to_delete_this_entry: "Вы действительно хотите удалить эту запись?" + :error_max_files_exceeded: "Ограничение для %{number} одновременно загружаемых файлов превышено" + :question_do_you_really_want_to_delete_this_revision: "Вы действительно хотите удалить эту редакцию?" + :error_entry_project_does_not_match_current_project: "Проект, которому принадлежит запись, не соответсвует текущему проекту" + :notice_folder_created: "Папка создана" + :error_folder_creation_failed: "Папку не удалось создать" + :error_folder_title_must_be_entered: "Нужно указать название папки" + :notice_folder_deleted: "Папка удалена" + :error_folder_is_not_empty: "Папка не пустая" + :error_folder_title_is_already_used: "Название папки уже используется" + :notice_folder_details_were_saved: "Описание папки было сохранено" + :error_file_is_locked: "Файл заблокирован" + :notice_file_deleted: "Файл удален" + :error_at_least_one_revision_must_be_present: "По крайней мере, одна редакция должна присутствовать" + :notice_revision_deleted: "Редакция удалена" + :warning_one_of_files_locked: "Один из файлов заблокирован" + :notice_file_unlocked: "Файл разблокирован" + :notice_file_revision_created: "Редакция файла создана" + :notice_your_preferences_were_saved: "Ваши настройки были сохранены" + :warning_folder_notifications_already_activated: "Уведомления папки уже включены" + :notice_folder_notifications_activated: "Уведомления папки включены" + :warning_folder_notifications_already_deactivated: "Уведомления папки уже отключены" + :notice_folder_notifications_deactivated: "Уведомления папки отключены" + :warning_file_notifications_already_activated: "Уведомления файла уже включены" + :notice_file_notifications_activated: "Уведомления файла включены" + :warning_file_notifications_already_deactivated: "Уведомления файла уже отключены" + :notice_file_notifications_deactivated: "Уведомления файла отключены" + :link_details: "Подробности %{title}" + :link_edit: "Редактировать %{title}" + :submit_create: "Создать" + :link_create_folder: "Создать папку" + :title_check_uncheck_all_for_zip_download_or_email: "Выбрать/Снять все документы для того, чтобы скачать или отправить их по электронной почте" + :link_title: "Название" + :link_size: "Размер" + :link_modified: "Изменен" + :link_ver: "Версия" + :link_author: "Автор" + :title_check_for_zip_download_or_email: "Выберите документы, которые нужно скачать или отправить их по электронной почте" + :title_delete: "Удалить" + :title_notifications_active_deactivate: "Уведомления включены: Отключить" + :title_notifications_not_active_activate: "Уведомления не включены: Включить" + :title_title_version_version_download: "Скачать %{title} версию %{version}" + :title_locked_by_user: "Заблокировано пользователем %{user}" + :title_locked_by_you: "Заблокировано Вами" + :title_waiting_for_approval: "Ожидается на утверждение" + :title_approved: "Утверждено" + :title_unlock_file: "Разблокируйте файл, чтобы разрешить изменение его другими участниками" + :title_lock_file: "Заблокируйте файл, чтобы запретить его изменение другими участниками" + :submit_download: "Скачать" + :title_download_checked: "Скачать выбранные файлы" + :submit_email: "Отправить письмо" + :title_send_checked_by_email: "Отправить выбранные файлы по электронной почте" + :link_user_preferences: "Ваши настройки DMSF проекта" + :heading_send_documents_by_email: "Отправить документы по электронной почте" + :label_email_from: "От" + :label_email_to: "Кому" + :label_email_cc: "CC" + :label_email_subject: "Тема" + :label_email_documents: "Документы" + :label_email_body: "Содержание" + :label_email_send: "Отправить" + :title_notifications_active: "Уведомления активны" + :label_file_size: "Размер файла" + :heading_file_upload: "Закачать" + :note_uploaded_maximum_files_at_once: "За один раз можно загрузить только %{number} файлов." + :note_upload_files_greater_than_two_gb: "Чтобы загружать файлы размером больше чем 2 Гб у вас должен быть 64-битный браузер." + :submit_upload_files: "Загрузить" + :heading_new_folder: "Новая папка" + :label_title: "Заголовок" + :label_description: "Описание" + :submit_save: "Сохранить" + :info_file_locked: "Файл заблокирован!" + :label_notifications: "Уведомления" + :select_option_default: "По умолчанию" + :select_option_deactivated: "Отключено" + :select_option_activated: "Включено" + :title_save_preferences: "Сохранить настройки" + :heading_revisions: "Редакции" + :title_download: "Скачать" + :title_delete_revision: "Удалить редакцию" + :label_created: "Создан" + :label_changed: "Изменен" + :info_changed_by_user: "%{changed} пользователем %{user}" + :label_filename: "Имя файла" + :label_version: "Версия" + :label_workflow: "Поток работ" + :option_workflow_waiting_for_approval: "Ожидается на утверждение" + :option_workflow_approved: "Утверждено" + :option_workflow_none: "Нет" + :label_mime: "MIME-тип" + :label_size: "Размер" + :label_comment: "Комментарий" + :heading_new_revision: "Новая редакция" + :option_version_same: "Та же версия" + :option_version_minor: "Незначительные изменения" + :option_version_major: "Значительные изменения" + :label_new_content: "Новое содержание" + :label_maximum_files_upload: "Максимальное количество файлов для загрузки" + :note_maximum_number_of_files_uploaded: "Ограничивает максимальное количество файлов, которое может быть загружено за один раз. 0 означает отсутсвие ограничения." + :label_maximum_files_download: "Максимальное количество файлов для скачивания" + :note_maximum_number_of_files_downloaded: "Ограничивает максимальное количество файлов, которое может быть скачано или отправлено по почте за один раз. 0 означает отсутсвие ограничения." + :label_file_storage_directory: "Каталог для хранения файлов" + :label_index_database: "Индексная база данных" + :label_stemming_language: "Язык для стемминга" + :note_possible_values: "Возможные значения" + :note_pass_none_to_disable_stemming: "Укажите 'none' чтобы отключить стемминг" + :label_stem_strategy: "Стратегия стемминга" + :option_stem_none: "Нет (По умолчанию)" + :option_stem_some: "Некоторые" + :option_stem_all: "Все" + :label_stemming_description: "Это контролирует как парсер запросов будет применять алгоритм стемминга. Значением по умолчанию есть STEM_NONE. Возможны следующие значения" + :note_do_not_stem: "Не выполнять никакого стемминга." + :note_stem_some: "Искать обусловленные формы терминов за исключением тех, которые начинаются с большой буквы, или следуют после определенных символов, или используются с операторами, которым нужна информация о позиции. Обусловленные термины имеют префикс 'Z'." + :note_stem_all: "Искать обусловленные формы всех слов (примечание: Префикс 'Z' не добавляется)." + :note_stemming_applied: "Обратите внимание на то, что алгоритм стемминга применяется только к словам в вероятностных областях — логическое фильтрирует термины, которые никогда не обусловлены." + :label_default_notifications: "Значение по умолчанию для уведомлений" + :heading_uploaded_files: "Загруженные файлы" + :submit_commit: "Зафиксировать" + :link_documents: "Документы" + :permission_view_dmsf_folders: "Просматривать список документов" + :permission_user_preferences: "Настройки пользователя" + :permission_view_dmsf_files: "Просматривать документы" + :permission_folder_manipulation: "Манипуляции папками" + :permission_file_manipulation: "Манипуляции файлами" + :permission_file_approval: "Утверждение файлов" + :permission_force_file_unlock: "Разблокировка любых файлов" + :label_file: "Файл" + :field_folder: "Папка" + :error_create_cycle_in_folder_dependency: "создать циклическую зависимость в папке" + :error_contains_invalid_character: "содержит недопустимые символы" + :error_file_commit_require_uploaded_file: "Чтобы зафиксировать файл нужно для начала его загрузить" + :warning_some_files_were_not_commited: "Некоторые файлы не были зафиксированы через ошибки валидации: %{files}" + :error_user_has_not_right_delete_folder: "Пользователь не имеет нужных прав для удаления папки" + :error_user_has_not_right_delete_file: "Пользователь не имеет нужных прав для удаления файла" + :notice_entries_deleted: "Записи удалены" + :warning_some_entries_were_not_deleted: "Некоторые записи не были удалены: %{entries}" + :question_do_you_really_want_to_delete_entries: "Вы действительно хотите удалить выбранные записи?" + :title_delete_checked: "Удалить выбранные документы" + :title_number_of_files_in_directory: "Количество файлов в директории" + :title_filename_for_download: "Имя файла для скачиваемого архива" + :label_number_of_folders: "Папок" + :label_number_of_documents: "Документов" + :label_zip_names_encoding: "Кодировка zip имен" + :note_zip_names_encoding_iconv: "Iconv используется для преобразования кодировки с UTF-8 в целевую кодировку" + :error_file_storage_directory_does_not_exist: "Каталог для хранения файлов не существует и не может быть создан" + :error_file_can_not_be_created: "Файл не может быть создан в каталоге хранения файлов" + :error_wrong_zip_encoding: "Неверная кодировка zip" + :warning_xapian_not_available: "Xapian не доступен" + :menu_dmsf: "Документы" + :label_physical_file_delete: "Физическое удаление файла" + :user_is_not_project_member: "Вы не являетесь участником проекта" + :heading_access_downloads_emails: "Скачивание/Отправка по почте" + :heading_access_first: "Первый" + :heading_access_last: "Последний" + :label_dmsf_updated: "DMSF обновлен" + :title_total_size_of_all_files: "Общий размер всех файлов в этой папке" + :project_module_dmsf: "DMSF" + :warning_no_project_to_copy_file_to: "Не выбран проект, в который нужно скопировать файл" + :comment_copied_from: "Скопировано из %{source}" + :notice_file_copied: "Файл скопирован" + :notice_file_moved: "Файл перемещен" + :label_target_project: "Целевой проект" + :label_target_folder: "Целевая папка" + :title_copy_or_move: "Копировать/Переместить" + :label_dmsf_folder_plural: "DMSF папки" + :comment_moved_from: "Перемещен из %{source}" + :error_target_folder_same: "Целевая папка и проект совпадает с текущими" + :error_file_cannot_be_moved: "Файл не может быть перемещен" + :error_file_cannot_be_copied: "Файл не может быть скопирован" + :warning_no_project_to_copy_folder_to: "Не выбран проект, в который нужно скопировать папку" + :title_copy: "Копировать" + :error_folder_cannot_be_copied: "Папка не может быть скопирована" + :notice_folder_copied: "Папка скопирована" + + :error_max_email_filesize_exceeded: "Вы превысили максимальный размер для отправки по электронной почте. (%{number} Мб)" + :note_maximum_email_filesize: "Ограничение максимального размера файла, который можно отправить по электронной почте. 0 означает отсутсвие ограничения. Значение в мегабайтах." + :label_maximum_email_filesize: "Максимальный размер вложения в письме" + :header_minimum_filesize: "Ошибка файла." + :error_minimum_filesize: "Размер файла %{file} 0 байт и он не будет прикреплен." + :parent_directory: "Родительская директория" + :note_webdav: "После включения WebDAV можно найти по адресу http://redmine-host/dmsf/webdav/" + :label_webdav: "Функциональность WebDAV" + :label_dmsf_plural: "Скопировать DMSF файлы и папки (%{files} файлов в %{folders} папках)" + + :warning_folder_already_locked: "Эта папка уже заблокирована" + :notice_folder_locked: "Папка была успешно заблокирована" + :warning_folder_not_locked: "К сожалению, папка не может быть заблокирована" + :notice_folder_unlocked: "Папка была успешно разблокирована" + :error_only_user_that_locked_folder_can_unlock_it: "Только пользователь, который заблокировал папку, может её разблокировать" + :title_folder_parent_locked: "Родительская папка %{name} заблокирована" + :title_file_parent_locked: "Родительская папка %{name} заблокирована" + :title_unlock_folder: "Разблокируйте папку, чтобы разрешить изменение дего ругими участниками" + :title_lock_folder: "Заблокируйте папку, чтобы запретить его изменение другими участниками" + + :select_option_webdav_readonly: "Только для чтения" + :select_option_webdav_readwrite: "Чтение/Запись" + :label_webdav_strategy: "Стратегия WebDAV" + :note_webdav_strategy: "Позволяет администратору решить в каком режиме предоставить доступ к WebDAV для конечных пользователей (Только для чтения или Чтение+Запись)." From c730dd97e4d148348e4738648dcce2207fcb2e93 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=9D=D0=B0=D0=B7=D0=B0=D1=80=20=D0=92=D1=96=D0=BD=D0=BD?= =?UTF-8?q?=D0=B8=D1=87=D1=83=D0=BA?= Date: Wed, 24 Oct 2012 00:07:18 +0300 Subject: [PATCH 09/26] Fixed russian locale en -> ru --- config/locales/ru.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/locales/ru.yml b/config/locales/ru.yml index 7c13105b..c70130af 100644 --- a/config/locales/ru.yml +++ b/config/locales/ru.yml @@ -1,4 +1,4 @@ -en: +ru: :dmsf: "Документы" :label_dmsf_file_plural: "Файлы DMSF" :warning_no_entries_selected: "Записи не выбраны" From 665e3709e817f66cb0876e9f96e13438601905ec Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=9D=D0=B0=D0=B7=D0=B0=D1=80=20=D0=92=D1=96=D0=BD=D0=BD?= =?UTF-8?q?=D0=B8=D1=87=D1=83=D0=BA?= Date: Wed, 24 Oct 2012 12:21:05 +0300 Subject: [PATCH 10/26] Russian localization strings fixes --- config/locales/ru.yml | 44 +++++++++++++++++++++---------------------- 1 file changed, 22 insertions(+), 22 deletions(-) diff --git a/config/locales/ru.yml b/config/locales/ru.yml index c70130af..1694c33b 100644 --- a/config/locales/ru.yml +++ b/config/locales/ru.yml @@ -1,18 +1,18 @@ ru: - :dmsf: "Документы" + :dmsf: "DMSF" :label_dmsf_file_plural: "Файлы DMSF" - :warning_no_entries_selected: "Записи не выбраны" + :warning_no_entries_selected: "Файлы не выбраны" :error_email_to_must_be_entered: "Нужно указать, на какую почту отправить письмо" :notice_email_sent: "Письмо отправлено" :warning_file_already_locked: "Файл уже заблокирован" :notice_file_locked: "Файл заблокирован" :warning_file_not_locked: "Файл не заблокирован" :notice_file_unlocked: "Файл разблокирован" - :error_only_user_that_locked_file_can_unlock_it: "Только пользователь, который заблокировал файл может его разблокировать" - :question_do_you_really_want_to_delete_this_entry: "Вы действительно хотите удалить эту запись?" + :error_only_user_that_locked_file_can_unlock_it: "Только пользователь, который заблокировал файл, может его разблокировать" + :question_do_you_really_want_to_delete_this_entry: "Вы действительно хотите удалить этот файл?" :error_max_files_exceeded: "Ограничение для %{number} одновременно загружаемых файлов превышено" :question_do_you_really_want_to_delete_this_revision: "Вы действительно хотите удалить эту редакцию?" - :error_entry_project_does_not_match_current_project: "Проект, которому принадлежит запись, не соответсвует текущему проекту" + :error_entry_project_does_not_match_current_project: "Проект, которому принадлежит файл, не соответсвует текущему проекту" :notice_folder_created: "Папка создана" :error_folder_creation_failed: "Папку не удалось создать" :error_folder_title_must_be_entered: "Нужно указать название папки" @@ -107,9 +107,9 @@ ru: :option_version_major: "Значительные изменения" :label_new_content: "Новое содержание" :label_maximum_files_upload: "Максимальное количество файлов для загрузки" - :note_maximum_number_of_files_uploaded: "Ограничивает максимальное количество файлов, которое может быть загружено за один раз. 0 означает отсутсвие ограничения." + :note_maximum_number_of_files_uploaded: "Ограничивает максимальное количество файлов, которое может быть загружено за один раз. 0 означает отсутствие ограничений." :label_maximum_files_download: "Максимальное количество файлов для скачивания" - :note_maximum_number_of_files_downloaded: "Ограничивает максимальное количество файлов, которое может быть скачано или отправлено по почте за один раз. 0 означает отсутсвие ограничения." + :note_maximum_number_of_files_downloaded: "Ограничивает максимальное количество файлов, которое может быть скачано или отправлено по почте за один раз. 0 означает отсутствие ограничений." :label_file_storage_directory: "Каталог для хранения файлов" :label_index_database: "Индексная база данных" :label_stemming_language: "Язык для стемминга" @@ -128,11 +128,11 @@ ru: :heading_uploaded_files: "Загруженные файлы" :submit_commit: "Зафиксировать" :link_documents: "Документы" - :permission_view_dmsf_folders: "Просматривать список документов" + :permission_view_dmsf_folders: "Просматривать папки" :permission_user_preferences: "Настройки пользователя" :permission_view_dmsf_files: "Просматривать документы" - :permission_folder_manipulation: "Манипуляции папками" - :permission_file_manipulation: "Манипуляции файлами" + :permission_folder_manipulation: "Управление папками" + :permission_file_manipulation: "Управление файлами" :permission_file_approval: "Утверждение файлов" :permission_force_file_unlock: "Разблокировка любых файлов" :label_file: "Файл" @@ -143,16 +143,16 @@ ru: :warning_some_files_were_not_commited: "Некоторые файлы не были зафиксированы через ошибки валидации: %{files}" :error_user_has_not_right_delete_folder: "Пользователь не имеет нужных прав для удаления папки" :error_user_has_not_right_delete_file: "Пользователь не имеет нужных прав для удаления файла" - :notice_entries_deleted: "Записи удалены" - :warning_some_entries_were_not_deleted: "Некоторые записи не были удалены: %{entries}" - :question_do_you_really_want_to_delete_entries: "Вы действительно хотите удалить выбранные записи?" + :notice_entries_deleted: "Файлы удалены" + :warning_some_entries_were_not_deleted: "Некоторые файлы не были удалены: %{entries}" + :question_do_you_really_want_to_delete_entries: "Вы действительно хотите удалить выбранные файлы?" :title_delete_checked: "Удалить выбранные документы" :title_number_of_files_in_directory: "Количество файлов в директории" :title_filename_for_download: "Имя файла для скачиваемого архива" :label_number_of_folders: "Папок" :label_number_of_documents: "Документов" :label_zip_names_encoding: "Кодировка zip имен" - :note_zip_names_encoding_iconv: "Iconv используется для преобразования кодировки с UTF-8 в целевую кодировку" + :note_zip_names_encoding_iconv: "Iconv используется для преобразования с кодировки UTF-8 в целевую кодировку" :error_file_storage_directory_does_not_exist: "Каталог для хранения файлов не существует и не может быть создан" :error_file_can_not_be_created: "Файл не может быть создан в каталоге хранения файлов" :error_wrong_zip_encoding: "Неверная кодировка zip" @@ -160,10 +160,10 @@ ru: :menu_dmsf: "Документы" :label_physical_file_delete: "Физическое удаление файла" :user_is_not_project_member: "Вы не являетесь участником проекта" - :heading_access_downloads_emails: "Скачивание/Отправка по почте" + :heading_access_downloads_emails: "Скачивание / Отправка по почте" :heading_access_first: "Первый" :heading_access_last: "Последний" - :label_dmsf_updated: "DMSF обновлен" + :label_dmsf_updated: "Документ обновлен" :title_total_size_of_all_files: "Общий размер всех файлов в этой папке" :project_module_dmsf: "DMSF" :warning_no_project_to_copy_file_to: "Не выбран проект, в который нужно скопировать файл" @@ -175,7 +175,7 @@ ru: :title_copy_or_move: "Копировать/Переместить" :label_dmsf_folder_plural: "DMSF папки" :comment_moved_from: "Перемещен из %{source}" - :error_target_folder_same: "Целевая папка и проект совпадает с текущими" + :error_target_folder_same: "Целевая папка и проект совпадают с текущими" :error_file_cannot_be_moved: "Файл не может быть перемещен" :error_file_cannot_be_copied: "Файл не может быть скопирован" :warning_no_project_to_copy_folder_to: "Не выбран проект, в который нужно скопировать папку" @@ -184,12 +184,12 @@ ru: :notice_folder_copied: "Папка скопирована" :error_max_email_filesize_exceeded: "Вы превысили максимальный размер для отправки по электронной почте. (%{number} Мб)" - :note_maximum_email_filesize: "Ограничение максимального размера файла, который можно отправить по электронной почте. 0 означает отсутсвие ограничения. Значение в мегабайтах." + :note_maximum_email_filesize: "Ограничение максимального размера файла, который можно отправить по электронной почте. 0 означает отсутствие ограничений. Значение в мегабайтах." :label_maximum_email_filesize: "Максимальный размер вложения в письме" :header_minimum_filesize: "Ошибка файла." - :error_minimum_filesize: "Размер файла %{file} 0 байт и он не будет прикреплен." + :error_minimum_filesize: "Файла %{file} является пустым и он не будет прикреплен." :parent_directory: "Родительская директория" - :note_webdav: "После включения WebDAV можно найти по адресу http://redmine-host/dmsf/webdav/" + :note_webdav: "После включения, WebDAV можно найти по адресу http://redmine-host/dmsf/webdav/" :label_webdav: "Функциональность WebDAV" :label_dmsf_plural: "Скопировать DMSF файлы и папки (%{files} файлов в %{folders} папках)" @@ -200,8 +200,8 @@ ru: :error_only_user_that_locked_folder_can_unlock_it: "Только пользователь, который заблокировал папку, может её разблокировать" :title_folder_parent_locked: "Родительская папка %{name} заблокирована" :title_file_parent_locked: "Родительская папка %{name} заблокирована" - :title_unlock_folder: "Разблокируйте папку, чтобы разрешить изменение дего ругими участниками" - :title_lock_folder: "Заблокируйте папку, чтобы запретить его изменение другими участниками" + :title_unlock_folder: "Разблокируйте папку, чтобы разрешить изменение её другими участниками" + :title_lock_folder: "Заблокируйте папку, чтобы запретить ёё изменение другими участниками" :select_option_webdav_readonly: "Только для чтения" :select_option_webdav_readwrite: "Чтение/Запись" From a6cd8995135111d948f417f28b8b42a89acdfedf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=9D=D0=B0=D0=B7=D0=B0=D1=80=20=D0=92=D1=96=D0=BD=D0=BD?= =?UTF-8?q?=D0=B8=D1=87=D1=83=D0=BA?= Date: Wed, 24 Oct 2012 16:50:19 +0300 Subject: [PATCH 11/26] Updated temp downloadable zip file permissions to 0644 - useful when using XSendFile apache module for file downloads --- lib/dmsf_zip.rb | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/lib/dmsf_zip.rb b/lib/dmsf_zip.rb index d46cbcca..484c6bb3 100644 --- a/lib/dmsf_zip.rb +++ b/lib/dmsf_zip.rb @@ -21,25 +21,26 @@ require 'zip/zipfilesystem' require 'iconv' class DmsfZip - + attr_reader :files - + def initialize() @zip = Tempfile.new(["dmsf_zip",".zip"]) + @zip.chmod(0644) @zip_file = Zip::ZipOutputStream.new(@zip.path) @files = [] end - + def finish @zip_file.close unless @zip_file.nil? @zip.path unless @zip.nil? end - + def close @zip_file.close unless @zip_file.nil? @zip.close unless @zip.nil? end - + def add_file(file, root_path = nil) string_path = file.folder.nil? ? "" : file.folder.dmsf_path_str + "/" string_path = string_path[(root_path.length + 1) .. string_path.length] if root_path @@ -50,7 +51,7 @@ class DmsfZip rescue end @zip_file.put_next_entry(string_path) - File.open(file.last_revision.disk_file, "rb") do |f| + File.open(file.last_revision.disk_file, "rb") do |f| buffer = "" while (buffer = f.read(8192)) @zip_file.write(buffer) @@ -58,7 +59,7 @@ class DmsfZip end @files << file end - + def add_folder(folder, root_path = nil) string_path = folder.dmsf_path_str + "/" string_path = string_path[(root_path.length + 1) .. string_path.length] if root_path @@ -71,5 +72,5 @@ class DmsfZip folder.subfolders.visible.each { |subfolder| self.add_folder(subfolder, root_path) } folder.files.visible.each { |file| self.add_file(file, root_path) } end - -end \ No newline at end of file + +end From 9260bb2a7afbefd383c32800aa8c46d12c76846f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=9D=D0=B0=D0=B7=D0=B0=D1=80=20=D0=92=D1=96=D0=BD=D0=BD?= =?UTF-8?q?=D0=B8=D1=87=D1=83=D0=BA?= Date: Wed, 24 Oct 2012 16:51:59 +0300 Subject: [PATCH 12/26] Line breaks converted to unix for file lib/dmsf_zip.rb --- lib/dmsf_zip.rb | 152 ++++++++++++++++++++++++------------------------ 1 file changed, 76 insertions(+), 76 deletions(-) diff --git a/lib/dmsf_zip.rb b/lib/dmsf_zip.rb index 484c6bb3..fee69e17 100644 --- a/lib/dmsf_zip.rb +++ b/lib/dmsf_zip.rb @@ -1,76 +1,76 @@ -# Redmine plugin for Document Management System "Features" -# -# Copyright (C) 2011 Vít Jonáš -# -# This program is free software; you can redistribute it and/or -# modify it under the terms of the GNU General Public License -# as published by the Free Software Foundation; either version 2 -# of the License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - -require 'zip/zip' -require 'zip/zipfilesystem' -require 'iconv' - -class DmsfZip - - attr_reader :files - - def initialize() - @zip = Tempfile.new(["dmsf_zip",".zip"]) - @zip.chmod(0644) - @zip_file = Zip::ZipOutputStream.new(@zip.path) - @files = [] - end - - def finish - @zip_file.close unless @zip_file.nil? - @zip.path unless @zip.nil? - end - - def close - @zip_file.close unless @zip_file.nil? - @zip.close unless @zip.nil? - end - - def add_file(file, root_path = nil) - string_path = file.folder.nil? ? "" : file.folder.dmsf_path_str + "/" - string_path = string_path[(root_path.length + 1) .. string_path.length] if root_path - string_path += file.name - #TODO: somewhat ugly conversion problems handling bellow - begin - string_path = Iconv.conv(Setting.plugin_redmine_dmsf["dmsf_zip_encoding"], "utf-8", string_path) - rescue - end - @zip_file.put_next_entry(string_path) - File.open(file.last_revision.disk_file, "rb") do |f| - buffer = "" - while (buffer = f.read(8192)) - @zip_file.write(buffer) - end - end - @files << file - end - - def add_folder(folder, root_path = nil) - string_path = folder.dmsf_path_str + "/" - string_path = string_path[(root_path.length + 1) .. string_path.length] if root_path - #TODO: somewhat ugly conversion problems handling bellow - begin - string_path = Iconv.conv(Setting.plugin_redmine_dmsf["dmsf_zip_encoding"], "utf-8", string_path) - rescue - end - @zip_file.put_next_entry(string_path) - folder.subfolders.visible.each { |subfolder| self.add_folder(subfolder, root_path) } - folder.files.visible.each { |file| self.add_file(file, root_path) } - end - -end +# Redmine plugin for Document Management System "Features" +# +# Copyright (C) 2011 Vít Jonáš +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + +require 'zip/zip' +require 'zip/zipfilesystem' +require 'iconv' + +class DmsfZip + + attr_reader :files + + def initialize() + @zip = Tempfile.new(["dmsf_zip",".zip"]) + @zip.chmod(0644) + @zip_file = Zip::ZipOutputStream.new(@zip.path) + @files = [] + end + + def finish + @zip_file.close unless @zip_file.nil? + @zip.path unless @zip.nil? + end + + def close + @zip_file.close unless @zip_file.nil? + @zip.close unless @zip.nil? + end + + def add_file(file, root_path = nil) + string_path = file.folder.nil? ? "" : file.folder.dmsf_path_str + "/" + string_path = string_path[(root_path.length + 1) .. string_path.length] if root_path + string_path += file.name + #TODO: somewhat ugly conversion problems handling bellow + begin + string_path = Iconv.conv(Setting.plugin_redmine_dmsf["dmsf_zip_encoding"], "utf-8", string_path) + rescue + end + @zip_file.put_next_entry(string_path) + File.open(file.last_revision.disk_file, "rb") do |f| + buffer = "" + while (buffer = f.read(8192)) + @zip_file.write(buffer) + end + end + @files << file + end + + def add_folder(folder, root_path = nil) + string_path = folder.dmsf_path_str + "/" + string_path = string_path[(root_path.length + 1) .. string_path.length] if root_path + #TODO: somewhat ugly conversion problems handling bellow + begin + string_path = Iconv.conv(Setting.plugin_redmine_dmsf["dmsf_zip_encoding"], "utf-8", string_path) + rescue + end + @zip_file.put_next_entry(string_path) + folder.subfolders.visible.each { |subfolder| self.add_folder(subfolder, root_path) } + folder.files.visible.each { |file| self.add_file(file, root_path) } + end + +end From f0f61e859b8ce31562b57d9c5ebd660db65bb55c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=9D=D0=B0=D0=B7=D0=B0=D1=80=20=D0=92=D1=96=D0=BD=D0=BD?= =?UTF-8?q?=D0=B8=D1=87=D1=83=D0=BA?= Date: Wed, 24 Oct 2012 17:38:34 +0300 Subject: [PATCH 13/26] Created hack, when entries were selected and downloaded (by pressing download button) and after that downloading of other selected files couldn't be achieved without page reload (simply pressing download button does nothing). --- app/views/dmsf/show.html.erb | 38 ++++++++++++++++++++---------------- 1 file changed, 21 insertions(+), 17 deletions(-) diff --git a/app/views/dmsf/show.html.erb b/app/views/dmsf/show.html.erb index e59b50c4..cb423fd8 100644 --- a/app/views/dmsf/show.html.erb +++ b/app/views/dmsf/show.html.erb @@ -43,7 +43,7 @@ <%= render "custom_fields", :object => @folder %> -<%= form_tag({:action => :entries_operation, :id => @project, :folder_id => @folder}, :method => :post, +<%= form_tag({:action => :entries_operation, :id => @project, :folder_id => @folder}, :method => :post, :class => "dmfs_entries", :id => "entries_form") do %> <%= hidden_field_tag("action") %>
@@ -52,7 +52,7 @@ <% if User.current.allowed_to?(:file_manipulation, @project) && (!@folder.nil? && !@folder.locked_for_user?) %> <% end %> -
+ @@ -101,7 +101,7 @@ :title => l(:title_notifications_active_deactivate)) %> <% else %> <%= link_to_function(image_tag("notifynot.png", :plugin => :redmine_dmsf), - "manipulation_link('#{url_for(:action => 'notify_activate', :id => @project, :folder_id => subfolder)}')", + "manipulation_link('#{url_for(:action => 'notify_activate', :id => @project, :folder_id => subfolder)}')", :title => l(:title_notifications_not_active_activate)) %> <% end %> @@ -109,7 +109,7 @@
<% if User.current.allowed_to?(:folder_manipulation, @project) %>
- <%= link_to(image_tag("edit.png", :class =>"detail_icon"), + <%= link_to(image_tag("edit.png", :class =>"detail_icon"), {:action => "edit", :id => @project, :folder_id => subfolder }, :title => l(:link_edit, :title => h(subfolder.title))) unless subfolder.locked_for_user? %>
@@ -119,7 +119,7 @@ <% if subfolder.locked? %> <% if subfolder.unlockable? %> <%= link_to_function(image_tag("unlock.png", :plugin => :redmine_dmsf), - "manipulation_link('#{url_for(:controller => "dmsf", :action => 'unlock', + "manipulation_link('#{url_for(:controller => "dmsf", :action => 'unlock', :id => @project, :folder_id => subfolder)}')", :title => l(:title_unlock_file))%> <% else %> @@ -127,14 +127,14 @@ <% end %> <% else %> <%= link_to_function(image_tag("lock.png", :plugin => :redmine_dmsf), - "manipulation_link('#{url_for(:controller => "dmsf", :action => 'lock', + "manipulation_link('#{url_for(:controller => "dmsf", :action => 'lock', :id => @project, :folder_id => subfolder)}')", :title => l(:title_lock_file)) %> <% end %>   <% end %> <%= link_to_function(image_tag("delete.png", :plugin => :redmine_dmsf), - "confirmation_link('#{url_for(:action => 'delete', :id => @project, :folder_id => @folder, :delete_folder_id => subfolder)}')", + "confirmation_link('#{url_for(:action => 'delete', :id => @project, :folder_id => @folder, :delete_folder_id => subfolder)}')", :title => l(:title_delete)) unless (subfolder.locked_for_user?)%>
@@ -161,7 +161,7 @@
<%= format_time(file.last_revision.updated_at) %> <% if file.locked_for_user? %> - <%= link_to(image_tag("locked.png", :plugin => :redmine_dmsf), + <%= link_to(image_tag("locked.png", :plugin => :redmine_dmsf), {:controller => "users", :action => "show", :id => file.lock.reverse[0].user }, :title => l(:title_locked_by_user, :user => file.lock.reverse[0].user.to_s)) %> <% elsif file.locked? %> @@ -194,7 +194,7 @@ <% end %>
- <%= link_to(image_tag("filedetails.png", :plugin => :redmine_dmsf, :class =>"detail_icon"), + <%= link_to(image_tag("filedetails.png", :plugin => :redmine_dmsf, :class =>"detail_icon"), {:controller => "dmsf_files", :action => :show, :id => file }, :title => l(:link_details, :title =>h(file.last_revision.title))) %>
@@ -212,7 +212,7 @@ <%= link_to_function(image_tag("lock.png", :plugin => :redmine_dmsf), "manipulation_link('#{url_for(:controller => "dmsf_files", :action => 'lock', :id => file)}')", :title => l(:title_lock_file)) %> - <% end %> + <% end %>   <% end %> <% if User.current.allowed_to?(:file_manipulation, @project) && !file.locked_for_user? %> @@ -240,7 +240,7 @@ jQuery("#entries_form").submit(); } }) - + jQuery("#check_all_entries").click(function(event) { var $this = jQuery(this); if($this.prop("checked")) { @@ -248,7 +248,7 @@ } else { jQuery("input[type=checkbox]", jQuery("#browser > tbody")).prop("checked", false); } - }) + }) <% @@ -261,7 +261,7 @@ sUrl = "jquery.dataTables/#{I18n.locale.to_s.downcase}.json" if I18n.locale && ! <%= stylesheet_link_tag "plupload/jquery.ui.plupload.css", :plugin => "redmine_dmsf" %> <%= stylesheet_link_tag "jquery.dataTables/jquery-ui.dataTables.css", :plugin => "redmine_dmsf" %> <%= stylesheet_link_tag "dmsf", :plugin => "redmine_dmsf" %> - + <%= javascript_include_tag "jquery-1.6.1.min.js", :plugin => "redmine_dmsf" %> <%= javascript_include_tag "jquery-ui-1.8.13.min.js", :plugin => "redmine_dmsf" %> <%= javascript_include_tag "jquery.dataTables/jquery.dataTables.min.js", :plugin => "redmine_dmsf" %> @@ -289,7 +289,7 @@ sUrl = "jquery.dataTables/#{I18n.locale.to_s.downcase}.json" if I18n.locale && ! return "<%= l(:label_number_of_folders)%>: <%= @subfolders.length %>, <%= l(:label_number_of_documents)%>: <%= @files.length %>"; } }); - + jQuery("[data-downloadurl]").each(function() { var url = this.getAttribute("data-downloadurl"); if (this.addEventListener) { @@ -300,13 +300,17 @@ sUrl = "jquery.dataTables/#{I18n.locale.to_s.downcase}.json" if I18n.locale && ! },false); } }); + + jQuery("#entries_form").submit(function () { + jQuery(this).removeAttr('data-submitted'); + }); }); - + function manipulation_link(action) { jQuery("#entries_form").attr("action", action); jQuery("#entries_form").submit(); }; - + function confirmation_link(action) { if(!window.confirm("<%= l(:question_do_you_really_want_to_delete_this_entry) %>")) return; jQuery("#entries_form").attr("action", action); @@ -315,6 +319,6 @@ sUrl = "jquery.dataTables/#{I18n.locale.to_s.downcase}.json" if I18n.locale && ! <% end %> -<%= render(:partial => "multi_upload") if (User.current.allowed_to?(:file_manipulation, @project) && +<%= render(:partial => "multi_upload") if (User.current.allowed_to?(:file_manipulation, @project) && ( @folder.nil? || (!@folder.nil? &&!@folder.locked_for_user?) ) ) %>
From 41bf9af83c505a44c45d314f9a52397768be9396 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=9D=D0=B0=D0=B7=D0=B0=D1=80=20=D0=92=D1=96=D0=BD=D0=BD?= =?UTF-8?q?=D0=B8=D1=87=D1=83=D0=BA?= Date: Wed, 24 Oct 2012 18:03:42 +0300 Subject: [PATCH 14/26] Fix for Rails 3.1+ (Redmine 2.x), which does not contain prototype.js library anymore --- app/views/dmsf_files_copy/new.html.erb | 20 ++++++++++---------- app/views/dmsf_folders_copy/new.html.erb | 18 ++++++++++-------- 2 files changed, 20 insertions(+), 18 deletions(-) diff --git a/app/views/dmsf_files_copy/new.html.erb b/app/views/dmsf_files_copy/new.html.erb index b37865bc..a51d6dc4 100644 --- a/app/views/dmsf_files_copy/new.html.erb +++ b/app/views/dmsf_files_copy/new.html.erb @@ -7,7 +7,7 @@

<%= render(:partial => "/dmsf/path", :locals => {:path => path}) %> / -<%= link_to(h(@file.title), {:controller => "dmsf_files", :action => "show", :id=> @file}) %> +<%= link_to(h(@file.title), {:controller => "dmsf_files", :action => "show", :id=> @file}) %> <%= image_tag("notify.png", :plugin => "redmine_dmsf", :title => l(:title_notifications_active)) if @file.notification %>

@@ -17,21 +17,17 @@

<%= select_tag("target_project_id", - project_tree_options_for_select(DmsfFile.allowed_target_projects_on_copy, :selected => @target_project), - :onchange => remote_function(:url => { :action => 'new' }, - :method => :get, - :update => 'content', - :with => "Form.serialize('copyForm')")) %> + project_tree_options_for_select(DmsfFile.allowed_target_projects_on_copy, :selected => @target_project)) %>

<%= label_tag("target_folder_id", l(:label_target_folder) + ":") %> - <%= select_tag("target_folder_id", - options_for_select(DmsfFolder.directory_tree(@target_project), + <%= select_tag("target_folder_id", + options_for_select(DmsfFolder.directory_tree(@target_project), :selected => (@target_folder.id unless @target_folder.nil?))) %>

- - + + <%= submit_tag(l(:button_copy)) %> <% if User.current.allowed_to?(:file_manipulation, @project) %> @@ -44,6 +40,10 @@ jQuery("#copyForm").attr("action", "<%= url_for(:action => 'move', :id => @file) %>"); jQuery("#copyForm").submit(); }); + + jQuery("#target_project_id").change(function () { + jQuery("#content").load("<%= url_for(:action => 'new') %>", jQuery("#copyForm").serialize()); + }); <% content_for :header_tags do %> diff --git a/app/views/dmsf_folders_copy/new.html.erb b/app/views/dmsf_folders_copy/new.html.erb index 5f721e71..bda0ef7a 100644 --- a/app/views/dmsf_folders_copy/new.html.erb +++ b/app/views/dmsf_folders_copy/new.html.erb @@ -11,24 +11,26 @@

<%= select_tag("target_project_id", - project_tree_options_for_select(DmsfFolder.allowed_target_projects_on_copy, :selected => @target_project), - :onchange => remote_function(:url => { :action => 'new' }, - :method => :get, - :update => 'content', - :with => "Form.serialize('copyForm')")) %> + project_tree_options_for_select(DmsfFolder.allowed_target_projects_on_copy, :selected => @target_project)) %>

<%= label_tag("target_folder_id", l(:label_target_folder) + ":") %> - <%= select_tag("target_folder_id", - options_for_select(DmsfFolder.directory_tree(@target_project, @folder), + <%= select_tag("target_folder_id", + options_for_select(DmsfFolder.directory_tree(@target_project, @folder), :selected => (@target_folder.id unless @target_folder.nil?))) %>

- + <%= submit_tag(l(:button_copy)) %> <% end %> <% end %> + + <% content_for :header_tags do %> <%= stylesheet_link_tag "dmsf", :plugin => "redmine_dmsf" %> <%= javascript_include_tag "jquery-1.6.1.min.js", :plugin => "redmine_dmsf" %> From 076f840eee6a9fca615be083e585dc1ce04ae4f5 Mon Sep 17 00:00:00 2001 From: Daniel Munn Date: Wed, 9 Jan 2013 23:55:20 +0000 Subject: [PATCH 15/26] Resolves pull request #84 --- app/models/dmsf_file.rb | 14 ++++++---- app/models/dmsf_folder.rb | 19 +++++++++++++ config/routes.rb | 2 ++ init.rb | 8 +++--- lib/redmine_dmsf/patches/project_patch.rb | 34 ++++++++++++++++++++++- 5 files changed, 67 insertions(+), 10 deletions(-) diff --git a/app/models/dmsf_file.rb b/app/models/dmsf_file.rb index 517a23c0..7ee6b244 100644 --- a/app/models/dmsf_file.rb +++ b/app/models/dmsf_file.rb @@ -354,7 +354,7 @@ class DmsfFile < ActiveRecord::Base next if dmsf_attrs.length == 0 || id_attribute == 0 next unless results.select{|f| f.id.to_s == id_attribute}.empty? - dmsf_file = DmsfFile.where(limit_options[:conditions]).where(:id => id_attribute, :deleted => false).first + dmsf_file = DmsfFile.where(limit_options[:conditions]).where(:id => dmsf_attrs[2], :deleted => false).first if !dmsf_file.nil? if options[:offset] @@ -368,10 +368,14 @@ class DmsfFile < ActiveRecord::Base allowed = User.current.allowed_to?(:view_dmsf_files, dmsf_file.project) project_included = false project_included = true if projects.nil? - if !project_included - projects.each {|x| - project_included = true if x[:id] == dmsf_file.project.id - } + unless project_included + projects.each do |x| + if x.is_a?(ActiveRecord::Relation) + project_included = x.first.id == dmsf_file.project.id + else + project_included = x[:id] == dmsf_file.project.id + end + end end if (allowed && project_included) diff --git a/app/models/dmsf_folder.rb b/app/models/dmsf_folder.rb index b68859e0..8ab595e2 100644 --- a/app/models/dmsf_folder.rb +++ b/app/models/dmsf_folder.rb @@ -144,6 +144,25 @@ class DmsfFolder < ActiveRecord::Base self.subfolders.visible.each {|subfolder| file_count += subfolder.deep_file_count} file_count end + + def deep_folder_count + folder_count = self.subfolders.length + self.subfolders.each {|subfolder| folder_count += subfolder.deep_folder_count} + folder_count + end + + def self.project_deep_folder_count(project) + subfolders = self.project_root_folders(project) + folder_count = subfolders.length + subfolders.each{|subfolder| folder_count += subfolder.deep_folder_count} + folder_count + end + + def self.project_deep_file_count(project) + file_count = DmsfFile.project_root_files(project).length + self.project_root_folders(project).each{|subfolder| file_count += subfolder.deep_file_count} + file_count + end def deep_folder_count folder_count = self.subfolders.length diff --git a/config/routes.rb b/config/routes.rb index 5d00a4c3..31b9c45f 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -70,6 +70,8 @@ RedmineApp::Application.routes.draw do get '/dmsf/files/:id/download', :controller => 'dmsf_files', :action => 'show', :download => '' #Otherwise will not route nil download param get '/dmsf/files/:id/download/:download', :controller => 'dmsf_files', :action => 'show' get '/dmsf/files/:id', :controller => 'dmsf_files', :action => 'show' + # Just to keep backward compatibility of external url links + get '/dmsf_files/:id', :controller => 'dmsf_files', :action => 'show' # # files_copy controller diff --git a/init.rb b/init.rb index 8bdfb9eb..6334174b 100644 --- a/init.rb +++ b/init.rb @@ -72,7 +72,7 @@ Redmine::Plugin.register :redmine_dmsf do unless entry.nil? || entry.deleted title = args[1] ? args[1] : entry.title revision = args[2] ? args[2] : "" - return link_to "#{title}", :controller => "dmsf_files", :action => "show", :id => entry, :download => revision + return link_to "#{title}", :controller => "dmsf_files", :action => "show", :id => entry, :download => revision, :only_path => false end nil end @@ -85,13 +85,13 @@ Redmine::Plugin.register :redmine_dmsf do macro :dmsff do |obj, args| if args.length < 1 - return link_to l(:link_documents), :controller => "dmsf", :action => "show", :id => @project + return link_to l(:link_documents), :controller => "dmsf", :action => "show", :id => @project, :only_path => false else entry_id = args[0].strip entry = DmsfFolder.find(entry_id) unless entry.nil? title = args[1] ? args[1] : entry.title - return link_to "#{title}", :controller => "dmsf", :action => "show", :id => entry.project, :folder_id => entry + return link_to "#{title}", :controller => "dmsf", :action => "show", :id => entry.project, :folder_id => entry, :only_path => false end end nil @@ -109,7 +109,7 @@ Redmine::Plugin.register :redmine_dmsf do entry = DmsfFile.find(entry_id) unless entry.nil? || entry.deleted title = args[1] ? args[1] : entry.title - return link_to "#{title}", :controller => "dmsf_files", :action => "show", :id => entry + return link_to "#{title}", :controller => "dmsf_files", :action => "show", :id => entry, :only_path => false end nil end diff --git a/lib/redmine_dmsf/patches/project_patch.rb b/lib/redmine_dmsf/patches/project_patch.rb index 224f6f0f..a7f3c95b 100644 --- a/lib/redmine_dmsf/patches/project_patch.rb +++ b/lib/redmine_dmsf/patches/project_patch.rb @@ -1,6 +1,6 @@ # Redmine plugin for Document Management System "Features" # -# Copyright (C) 2011 Vt Jon +# Copyright (C) 2011 V�t Jon� # Copyright (C) 2012 Daniel Munn # # This program is free software; you can redistribute it and/or @@ -28,6 +28,7 @@ module RedmineDmsf base.extend(ClassMethods) base.class_eval do unloadable +<<<<<<< HEAD alias_method_chain :copy, :dmsf has_many :dmsf_files, :class_name => "DmsfFile", :foreign_key => "project_id", :conditions => { :dmsf_folder_id => nil } @@ -36,6 +37,10 @@ module RedmineDmsf end +======= + alias_method_chain :copy, :dmsf_copy + end +>>>>>>> d4e19db3410db4cae44a55b0e8c022a6fd82e9fa end module ClassMethods @@ -45,6 +50,7 @@ module RedmineDmsf def all_dmsf_custom_fields @all_dmsf_custom_fields ||= (DmsfFileRevisionCustomField.for_all).uniq.sort # + dmsf_file_revision_custom_fields).uniq.sort end +<<<<<<< HEAD def dmsf_count file_count = DmsfFile.visible.project_root_files(self).count @@ -79,6 +85,32 @@ module RedmineDmsf f.copy_to(self, nil) } end +======= + + def copy_with_dmsf_copy(project, options={}) + project = project.is_a?(Project) ? project : Project.find(project) + + to_be_copied = %w(wiki versions issue_categories issues members queries boards dmsf) + to_be_copied = to_be_copied & options[:only].to_a unless options[:only].nil? + + Project.transaction do + if save + reload + to_be_copied.each do |name| + send "copy_#{name}", project + end + Redmine::Hook.call_hook(:model_project_copy_before_save, :source_project => project, :destination_project => self) + save + end + end + end + + # Copies DMSF from +project+ + def copy_dmsf(project) + DmsfFolder.project_root_folders(project).each{|subfolder| subfolder.copy_to(self, nil)} + DmsfFile.project_root_files(project).each{|file| file.copy_to(self, nil)} + end +>>>>>>> d4e19db3410db4cae44a55b0e8c022a6fd82e9fa end end end From fdb99d7af05c0e2dc00e816ac6e0df4bd018e72c Mon Sep 17 00:00:00 2001 From: Daniel Munn Date: Thu, 10 Jan 2013 10:13:49 +0000 Subject: [PATCH 16/26] Resolve error in project_patch.rb #84 --- lib/redmine_dmsf/patches/project_patch.rb | 32 ----------------------- 1 file changed, 32 deletions(-) diff --git a/lib/redmine_dmsf/patches/project_patch.rb b/lib/redmine_dmsf/patches/project_patch.rb index a7f3c95b..844c6847 100644 --- a/lib/redmine_dmsf/patches/project_patch.rb +++ b/lib/redmine_dmsf/patches/project_patch.rb @@ -28,7 +28,6 @@ module RedmineDmsf base.extend(ClassMethods) base.class_eval do unloadable -<<<<<<< HEAD alias_method_chain :copy, :dmsf has_many :dmsf_files, :class_name => "DmsfFile", :foreign_key => "project_id", :conditions => { :dmsf_folder_id => nil } @@ -37,10 +36,6 @@ module RedmineDmsf end -======= - alias_method_chain :copy, :dmsf_copy - end ->>>>>>> d4e19db3410db4cae44a55b0e8c022a6fd82e9fa end module ClassMethods @@ -50,7 +45,6 @@ module RedmineDmsf def all_dmsf_custom_fields @all_dmsf_custom_fields ||= (DmsfFileRevisionCustomField.for_all).uniq.sort # + dmsf_file_revision_custom_fields).uniq.sort end -<<<<<<< HEAD def dmsf_count file_count = DmsfFile.visible.project_root_files(self).count @@ -85,32 +79,6 @@ module RedmineDmsf f.copy_to(self, nil) } end -======= - - def copy_with_dmsf_copy(project, options={}) - project = project.is_a?(Project) ? project : Project.find(project) - - to_be_copied = %w(wiki versions issue_categories issues members queries boards dmsf) - to_be_copied = to_be_copied & options[:only].to_a unless options[:only].nil? - - Project.transaction do - if save - reload - to_be_copied.each do |name| - send "copy_#{name}", project - end - Redmine::Hook.call_hook(:model_project_copy_before_save, :source_project => project, :destination_project => self) - save - end - end - end - - # Copies DMSF from +project+ - def copy_dmsf(project) - DmsfFolder.project_root_folders(project).each{|subfolder| subfolder.copy_to(self, nil)} - DmsfFile.project_root_files(project).each{|file| file.copy_to(self, nil)} - end ->>>>>>> d4e19db3410db4cae44a55b0e8c022a6fd82e9fa end end end From 2f6e3e11b4b5ec5725282ebc88e711df57ffae76 Mon Sep 17 00:00:00 2001 From: Daniel Munn Date: Fri, 18 Jan 2013 23:22:53 +0000 Subject: [PATCH 17/26] Starting to resolve problems with migration script for 1.4.4 See #86 #91 #40 --- db/migrate/07_dmsf_1_4_4.rb | 28 +++++++++++++++++++--------- 1 file changed, 19 insertions(+), 9 deletions(-) diff --git a/db/migrate/07_dmsf_1_4_4.rb b/db/migrate/07_dmsf_1_4_4.rb index 3dee1ddd..7fc381e7 100644 --- a/db/migrate/07_dmsf_1_4_4.rb +++ b/db/migrate/07_dmsf_1_4_4.rb @@ -45,7 +45,7 @@ class Dmsf144 < ActiveRecord::Migration # only on appearing in group, find_each imposes a limit and incorrect # ordering, so adapted that, we grab id's load a mock object, and reload # data into it, which should enable us to run checks we need, not as - # efficient, however compatible accross the board. + # efficient, however compatible across the board. DmsfFileLock.select("MAX(#{DmsfFileLock.table_name}.id) id"). order("MAX(#{DmsfFileLock.table_name}.id) DESC"). group("#{DmsfFileLock.table_name}.dmsf_file_id"). @@ -83,25 +83,35 @@ class Dmsf144 < ActiveRecord::Migration remove_column :dmsf_file_locks, :locked rename_table :dmsf_file_locks, :dmsf_locks - #Not sure if this is the right place to do this, as its file manipulation, not database (stricly) + #Not sure if this is the right place to do this, as its file manipulation, not database (strictly) say "Completing one-time file migration ..." begin DmsfFileRevision.visible.each {|rev| next if rev.project.nil? existing = "#{DmsfFile.storage_path}/#{rev.disk_filename}" new_path = rev.disk_file - if File.exist?(existing) - if File.exist?(new_path) - rev.disk_filename = rev.new_storage_filename - new_path = rev.disk_file - rev.save! + begin + if File.exist?(existing) + if File.exist?(new_path) + rev.disk_filename = rev.new_storage_filename + new_path = rev.disk_file + rev.save! + end + #Ensure the project path exists + project_directory = File.dirname(new_path) + Dir.mkdir(project_directory) unless File.directory? project_directory + FileUtils.mv(existing, new_path) + say "Migration: #{existing} -> #{new_path} succeeded" end - FileUtils.mv(existing, new_path) + rescue #Here we wrap around IO in the loop to prevent one failure ruining complete run. + say "Migration: #{existing} -> #{new_path} failed" end } say "Action was successful" - rescue + rescue Exception => e say "Action was not successful" + puts e.message + puts e.backtrace.inspect #See issue 86 #Nothing here, we just dont want a migration to break end end From 367316d6e755bbb7583d5dae4494c237690ffb1b Mon Sep 17 00:00:00 2001 From: Daniel Munn Date: Fri, 18 Jan 2013 23:29:34 +0000 Subject: [PATCH 18/26] Resolves #92 --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index bd49a5f7..9fc3b911 100644 --- a/README.md +++ b/README.md @@ -86,7 +86,7 @@ From Omega documentation: On Debian use: -```apt-get install libxapian-ruby1.8 xapian-omega libxapian-dev xpdf antiword unzip\ +```apt-get install libxapian-ruby1.8 xapian-omega libxapian-dev xpdf xpdf-utils antiword unzip\ catdoc libwpd8c2a libwps-0.1-1 gzip unrtf catdvi djview djview3``` On Ubuntu use: From 6633c9b0c86fb30e6033afbc149cd3b2c06c1a74 Mon Sep 17 00:00:00 2001 From: Daniel Munn Date: Fri, 18 Jan 2013 23:32:09 +0000 Subject: [PATCH 19/26] Resolves regression seen in #93 --- app/models/dmsf_file.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/models/dmsf_file.rb b/app/models/dmsf_file.rb index 7ee6b244..6fd87643 100644 --- a/app/models/dmsf_file.rb +++ b/app/models/dmsf_file.rb @@ -354,7 +354,7 @@ class DmsfFile < ActiveRecord::Base next if dmsf_attrs.length == 0 || id_attribute == 0 next unless results.select{|f| f.id.to_s == id_attribute}.empty? - dmsf_file = DmsfFile.where(limit_options[:conditions]).where(:id => dmsf_attrs[2], :deleted => false).first + dmsf_file = DmsfFile.where(limit_options[:conditions]).where(:id => id_attribute, :deleted => false).first if !dmsf_file.nil? if options[:offset] From 9f86383ab45e78fe8cfeae5968311d1b1d793648 Mon Sep 17 00:00:00 2001 From: Daniel Munn Date: Fri, 18 Jan 2013 23:34:24 +0000 Subject: [PATCH 20/26] Resolves #89 - with thanks to nolar --- lib/redmine_dmsf/webdav/controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/redmine_dmsf/webdav/controller.rb b/lib/redmine_dmsf/webdav/controller.rb index cced9480..bd33f616 100644 --- a/lib/redmine_dmsf/webdav/controller.rb +++ b/lib/redmine_dmsf/webdav/controller.rb @@ -95,7 +95,7 @@ module RedmineDmsf end response.body = doc.to_xml response["Content-Type"] = 'application/xml; charset="utf-8"' - response["Content-Length"] = response.body.size.to_s + response["Content-Length"] = response.body.bytesize.to_s end From f6eee501b7194ad96b54db29a296a898140505a5 Mon Sep 17 00:00:00 2001 From: Karel Picman Date: Thu, 28 Feb 2013 13:47:42 +0100 Subject: [PATCH 21/26] #82 Save button and #57 en-IS --- app/views/dmsf_state/_user_pref.html.erb | 33 ++-- config/locales/en-IS.yml | 186 ----------------------- 2 files changed, 16 insertions(+), 203 deletions(-) delete mode 100644 config/locales/en-IS.yml diff --git a/app/views/dmsf_state/_user_pref.html.erb b/app/views/dmsf_state/_user_pref.html.erb index 5a62fb02..d10394f8 100644 --- a/app/views/dmsf_state/_user_pref.html.erb +++ b/app/views/dmsf_state/_user_pref.html.erb @@ -15,23 +15,22 @@ <%= submit_tag(l(:submit_save), :title => l(:title_save_preferences)) %> <% end %> - - <%= form_for @project, :url => project_path(@project), :html => {:method=>:post} do %> - <% custom_fields = DmsfFileRevisionCustomField.find(:all) %> - <% unless custom_fields.empty? %> -
<%=l(:label_custom_field_plural)%> - <% custom_fields.each do |custom_field| %> - - <% end %> - <%= hidden_field_tag 'project[dmsf_file_revision_custom_field_ids][]', '' %> - <%= hidden_field_tag '_method', 'put' %> -
- <% end %> - - <%= submit_tag(l(:submit_save), :title => l(:title_save_preferences)) %> + + <% custom_fields = DmsfFileRevisionCustomField.find(:all) %> + <% unless custom_fields.empty? %> + <%= form_for @project, :url => project_path(@project), :html => {:method=>:post} do %> +
<%=l(:label_custom_field_plural)%> + <% custom_fields.each do |custom_field| %> + + <% end %> + <%= hidden_field_tag 'project[dmsf_file_revision_custom_field_ids][]', '' %> + <%= hidden_field_tag '_method', 'put' %> +
+ <%= submit_tag(l(:submit_save), :title => l(:title_save_preferences)) %> + <% end %> <% end %> diff --git a/config/locales/en-IS.yml b/config/locales/en-IS.yml deleted file mode 100644 index 3e5a29b4..00000000 --- a/config/locales/en-IS.yml +++ /dev/null @@ -1,186 +0,0 @@ -en-IS: - :dmsf: "DMSF" - :label_dmsf_file_plural: "Dmsf files" - :warning_no_entries_selected: "No entries selected" - :error_email_to_must_be_entered: "Email To must be entered" - :notice_email_sent: "Email sent" - :warning_file_already_locked: "File already locked" - :notice_file_locked: "File locked" - :warning_file_not_locked: "File not locked" - :notice_file_unlocked: "File unlocked" - :error_only_user_that_locked_file_can_unlock_it: "Only user that locked file can unlock it" - :question_do_you_really_want_to_delete_this_entry: "Do you really want to delete this entry?" - :error_max_files_exceeded: "Limit for %{number} simultaneously downloaded files exceeded" - :question_do_you_really_want_to_delete_this_revision: "Do you really want to delete this revision?" - :error_entry_project_does_not_match_current_project: "Entry project doesn't match current project" - :notice_folder_created: "Folder created" - :error_folder_creation_failed: "Folder creation failed" - :error_folder_title_must_be_entered: "Title must be entered" - :notice_folder_deleted: "Folder deleted" - :error_folder_is_not_empty: "Folder is not empty" - :error_folder_title_is_already_used: "Title is already used" - :notice_folder_details_were_saved: "Folder details were saved" - :error_file_is_locked: "File is locked" - :notice_file_deleted: "File deleted" - :error_at_least_one_revision_must_be_present: "At least one revision must be present" - :notice_revision_deleted: "Revision deleted" - :warning_one_of_files_locked: "One of files locked" - :notice_file_unlocked: "File unlocked" - :notice_file_revision_created: "File revision created" - :notice_your_preferences_were_saved: "Your preferences were saved" - :warning_folder_notifications_already_activated: "Folder notifications already activated" - :notice_folder_notifications_activated: "Folder notifications activated" - :warning_folder_notifications_already_deactivated: "Folder notifications already deactivated" - :notice_folder_notifications_deactivated: "Folder notifications deactivated" - :warning_file_notifications_already_activated: "File notifications already activated" - :notice_file_notifications_activated: "File notifications activated" - :warning_file_notifications_already_deactivated: "File notifications already deactivated" - :notice_file_notifications_deactivated: "File notifications deactivated" - :link_details: "%{title} details" - :link_edit: "Edit %{title}" - :submit_create: "Create" - :link_create_folder: "Create folder" - :title_check_uncheck_all_for_zip_download_or_email: "Check/Uncheck all for zip download or email" - :link_title: "Title" - :link_size: "Size" - :link_modified: "Modified" - :link_ver: "Ver." - :link_author: "Author" - :title_check_for_zip_download_or_email: "Check for Zip download or email" - :title_delete: "Delete" - :title_notifications_active_deactivate: "Notifications active: Deactivate" - :title_notifications_not_active_activate: "Notifications not active: Activate" - :title_title_version_version_download: "%{title} version %{version} download" - :title_locked_by_user: "Locked by %{user}" - :title_locked_by_you: "Locked by you" - :title_waiting_for_approval: "Waiting for Approval" - :title_approved: "Approved" - :title_unlock_file: "Unlock to allow changes for other members" - :title_lock_file: "Lock to prevent changes for other members" - :submit_download: "Download" - :title_download_checked: "Download checked in Zip archive" - :submit_email: "Email" - :title_send_checked_by_email: "Send checked by email" - :link_user_preferences: "Your DMSF project preferences" - :heading_send_documents_by_email: "Send documents by email" - :label_email_from: "From" - :label_email_to: "To" - :label_email_cc: "CC" - :label_email_subject: "Subject" - :label_email_documents: "Documents" - :label_email_body: "Body" - :label_email_send: "Send" - :title_notifications_active: "Notifications active" - :label_file_size: "File size" - :heading_file_upload: "Upload" - :note_uploaded_maximum_files_at_once: "There can be uploaded maximum of %{number} files at once." - :note_upload_files_greater_than_two_gb: "To upload files greater than 2GB you must have 64b browser." - :submit_upload_files: "Upload" - :info_file_locked: "File locked!" - :label_notifications: "Notifications" - :select_option_default: "Default" - :select_option_deactivated: "Deactivated" - :select_option_activated: "Activated" - :title_save_preferences: "Save preferences" - :heading_revisions: "Revisions" - :title_download: "Download" - :title_delete_revision: "Delete revision" - :label_created: "Created" - :label_changed: "Changed" - :info_changed_by_user: "%{changed} by %{user}" - :label_filename: "Filename" - :label_version: "Version" - :label_workflow: "Workflow" - :option_workflow_waiting_for_approval: "Waiting for approval" - :option_workflow_approved: "Approved" - :option_workflow_none: "None" - :label_mime: "Mime" - :label_size: "Size" - :label_comment: "Comment" - :heading_new_revision: "New Revision" - :option_version_same: "Same" - :option_version_minor: "Minor" - :option_version_major: "Major" - :label_new_content: "New content" - :label_maximum_files_upload: "Maximum files upload" - :note_maximum_number_of_files_uploaded: "Limits maximum number of files uploaded at once. 0 means unlimited." - :label_maximum_files_download: "Maximum files download" - :note_maximum_number_of_files_downloaded: "Limits maximum number of files downloaded in zip or sent via email. 0 means unlimited." - :label_file_storage_directory: "File storage directory" - :label_index_database: "Index database" - :label_stemming_language: "Stemming Language" - :note_possible_values: "Possible values" - :note_pass_none_to_disable_stemming: "pass 'none' to disable stemming" - :label_stem_strategy: "Stem strategy" - :option_stem_none: "Stem none (default)" - :option_stem_some: "Stem some" - :option_stem_all: "Stem all" - :label_stemming_description: "This controls how the query parser will apply the stemming algorithm. The default value is STEM_NONE. The possible values are" - :note_do_not_stem: "Don't perform any stemming." - :note_stem_some: "Search for stemmed forms of terms except for those which start with a capital letter, or are followed by certain characters, or are used with operators which need positional information. Stemmed terms are prefixed with 'Z'." - :note_stem_all: "Search for stemmed forms of all words (note: no 'Z' prefix is added)." - :note_stemming_applied: "Note that the stemming algorithm is only applied to words in probabilistic fields - boolean filter terms are never stemmed." - :label_default_notifications: "File default notifications" - :heading_uploaded_files: "Uploaded Files" - :submit_commit: "Commit" - :link_documents: "Documents" - :permission_view_dmsf_folders: "Browse documents" - :permission_user_preferences: "User preferences" - :permission_view_dmsf_files: "View documents" - :permission_folder_manipulation: "Folder manipulation" - :permission_file_manipulation: "File manipulation" - :permission_file_approval: "File approval" - :permission_force_file_unlock: "Force file unlock" - :label_file: "File" - :field_folder: "Folder" - :error_create_cycle_in_folder_dependency: "create cycle in folder dependency" - :error_contains_invalid_character: "contains invalid character(s)" - :error_file_commit_require_uploaded_file: "File commit require uploaded file" - :warning_some_files_were_not_commited: "Some files were not commited due to validation errors: %{files}" - :error_user_has_not_right_delete_folder: "User hasn't right to delete forders" - :error_user_has_not_right_delete_file: "User hasn't right to delete file" - :notice_entries_deleted: "Entries deleted" - :warning_some_entries_were_not_deleted: "Some entries weren't deleted: %{entries}" - :question_do_you_really_want_to_delete_entries: "Do you really want to delete checked entries?" - :title_delete_checked: "Delete checked" - :title_number_of_files_in_directory: "Number of files in directory" - :title_filename_for_download: "Filename used for download or in Zip archive" - :label_number_of_folders: "Folders" - :label_number_of_documents: "Documents" - :label_zip_names_encoding: "Zip names encoding" - :note_zip_names_encoding_iconv: "Iconv is used for charset conversion from utf-8 to target encoding" - :error_file_storage_directory_does_not_exist: "File storage directory doesn't exist and can't be created" - :error_file_can_not_be_created: "File can't be created in storage directory" - :error_wrong_zip_encoding: "Wrong Zip encoding" - :warning_xapian_not_available: "Xapian not available" - :menu_dmsf: "DMSF" - :label_physical_file_delete: "Physical file delete" - :user_is_not_project_member: "You are not member of the project" - :heading_access_downloads_emails: "Downloads/Emails" - :heading_access_first: "First" - :heading_access_last: "Last" - :label_dmsf_updated: "DMSF updated" - :title_total_size_of_all_files: "Total size of all files under this folder" - :project_module_dmsf: "DMSF" - :warning_no_project_to_copy_file_to: "No project to copy file to" - :comment_copied_from: "Copied from %{source}" - :notice_file_copied: "File copied" - :notice_file_moved: "File moved" - :label_target_project: "Target project" - :label_target_folder: "Target folder" - :title_copy_or_move: "Copy/Move" - :label_dmsf_folder_plural: "Dmsf folders" - :comment_moved_from: "Moved from %{source}" - :error_target_folder_same: "Target folder and project are the same as current" - :error_file_cannot_be_moved: "File can't be moved" - :error_file_cannot_be_copied: "File can't be copied" - :warning_no_project_to_copy_folder_to: "No project to copy folder to" - :title_copy: "Copy" - :error_folder_cannot_be_copied: "Folder can't be copied" - :notice_folder_copied: "Folder copied" - :error_max_email_filesize_exceeded: "You've exceeded the maximum filesize for sending via email. (%{number} MB)" - :note_maximum_email_filesize: "Limits maximum filesize that can be sent via email. 0 means unlimited. Number is in MB." - :label_maximum_email_filesize: "Maximum email attachment size" - :parent_directory: "Parent Directory" - :note_webdav: "Webdav once enabled can be found at http://.../dmsf/webdav/" - :label_webdav: "Webdav functionality" From e3801a7cb9457b197a440aa3ae4a5dd31fd1173f Mon Sep 17 00:00:00 2001 From: Karel Picman Date: Thu, 28 Feb 2013 15:29:30 +0100 Subject: [PATCH 22/26] German localisation update - #74 --- config/locales/de.yml | 41 +++++++++++++++++++++++++++++++---------- 1 file changed, 31 insertions(+), 10 deletions(-) diff --git a/config/locales/de.yml b/config/locales/de.yml index 71e86004..9f4fe8e0 100644 --- a/config/locales/de.yml +++ b/config/locales/de.yml @@ -1,6 +1,6 @@ de: - :dmsf: "DMSF" - :label_dmsf_file_plural: "DMSF" + :dmsf: "DMS" + :label_dmsf_file_plural: "DMS" :warning_no_entries_selected: "Keine Einträge ausgewählt" :error_email_to_must_be_entered: "Es muss ein Email-Empfänger angegeben werden." :notice_email_sent: "Email gesendet" @@ -71,15 +71,16 @@ de: :label_email_documents: "Dateien" :label_email_body: "Text" :label_email_send: "Senden" - :label_description: "Beschreibung" - :label_title: "Titel" - :submit_save: "Speichern" :title_notifications_active: "Benachrichtigungen aktiv" :label_file_size: "Dateigröße" :heading_file_upload: "Upload" :note_uploaded_maximum_files_at_once: "Es können maximal %{number} Dateien auf einmal hochgeladen werden." :note_upload_files_greater_than_two_gb: "Um Dateien größer 2GB hochzuladen brauchst du einen 64bit-Browser." :submit_upload_files: "Upload" + :heading_new_folder: "Neuer Ordner" + :label_title: "Titel" + :label_description: "Beschreibung" + :submit_save: "Speichern" :info_file_locked: "Datei gesperrt!" :label_notifications: "Benachrichtigungen" :select_option_default: "Voreinstellung" @@ -157,14 +158,15 @@ de: :error_file_can_not_be_created: "Datei kann nicht in dem gewählten Ordner gebildet werden." :error_wrong_zip_encoding: "Falsche ZIP-kodierung" :warning_xapian_not_available: "Xapian nicht zur Verfügung" - :menu_dmsf: "DMSF" + :menu_dmsf: "DMS" :label_physical_file_delete: "Physisches Dateilöschen" :user_is_not_project_member: "Du bist kein Projektmitglied" :heading_access_downloads_emails: "Herunterladene/Emails" :heading_access_first: "Erste" :heading_access_last: "Letzte" - :title_total_size_of_all_files: "Gesamtgröße aller Datein in diesem Ordner" - :project_module_dmsf: "DMSF" + :label_dmsf_updated: "DMS aktualisiert" + :title_total_size_of_all_files: "Gesamtgröße aller Datein in diesem Ordner" + :project_module_dmsf: "DMS" :warning_no_project_to_copy_file_to: "Kein Projekt für das Dateikopieren." :comment_copied_from: "Kopiert aus %{source}" :notice_file_copied: "Datei kopiert" @@ -184,5 +186,24 @@ de: :error_max_email_filesize_exceeded: "Maximale Dateigröße der Anlage wurde überschritten. (%{number} MB)" :note_maximum_email_filesize: "Maximale Dateigröße der Anlage. 0 bedeutet keinen Limit. Der Nummer ist in MB." :label_maximum_email_filesize: "Maximale Dateigröße der Anlage" - -# Not translated + :header_minimum_filesize: "Dateifehler wegen minimaler Dateigröße." + :error_minimum_filesize: "Die Datei %{file} ist 0 Bytes groß und wird deswegen nicht angehängt." + :parent_directory: "übergeordnetes Verzeichnis" + :note_webdav: "Nach der Aktivierung von WebDav kann der Dienst über die URL http(s)://.../dmsf/webdav/ erreicht werden." + :label_webdav: "Webdav Funktionalität" + :label_dmsf_plural: "Kopieren von Dateien und Ordnern (%{files} Dateien in %{folders} Ordnern)" + :warning_folder_already_locked: "Dieser Ordner ist bereits gesperrt" + :notice_folder_locked: "Der Ordner wurde erfolgreich gesperrt" + :warning_folder_not_locked: "Der Ordner konnte nicht gesperrt werden" + :notice_folder_unlocked: "Der Ordner wurde erfolgreich entsperrt" + :error_only_user_that_locked_folder_can_unlock_it: Sie haben keine Berechtigung zur Entsperrung des Ordners" + :title_folder_parent_locked: "Übergeordnetes Verzeichnis %{name} ist gesperrt" + :title_file_parent_locked: "Übergeordnetes Verzeichnis %{name} ist gesperrt" + :title_unlock_folder: "Zur Modifikation für andere Benutzer entsperren" + :title_lock_folder: "Zum Schutz vor Modifikation durch andere Benutzer sperren" + :select_option_webdav_readonly: "nur Lesen" + :select_option_webdav_readwrite: "Lesen/Schreiben" + :label_webdav_strategy: "Webdav Strategie" + :note_webdav_strategy: "Erlaubt dem Administrator den Wechsel der WebDav Nutzung zwischen nur lesend und auch schreibenden Zugriffen." + :DMSF_custom_field: "DMSF" + :custom_field: "DMSF" \ No newline at end of file From c2c2bebdbd508f9dbe1110ab78f4a3d6019aea6d Mon Sep 17 00:00:00 2001 From: Karel Picman Date: Fri, 1 Mar 2013 14:27:14 +0100 Subject: [PATCH 23/26] Multiple DMSF tabs in Administration->Custom fields fixed --- .../patches/custom_fields_helper.rb | 27 ++++++++++++++++--- 1 file changed, 24 insertions(+), 3 deletions(-) diff --git a/lib/redmine_dmsf/patches/custom_fields_helper.rb b/lib/redmine_dmsf/patches/custom_fields_helper.rb index d700bd31..bd2b5009 100644 --- a/lib/redmine_dmsf/patches/custom_fields_helper.rb +++ b/lib/redmine_dmsf/patches/custom_fields_helper.rb @@ -1,3 +1,20 @@ +# Copyright (C) 2011 Vit Jons +# Copyright (C) 2012 Daniel Munn +# Copyright (C) 2013 Karel Picman +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + module RedmineDmsf module Patches module CustomFieldsHelper @@ -7,9 +24,13 @@ module RedmineDmsf end end - def custom_fields_tabs_with_customer_tab - tabs = custom_fields_tabs_without_customer_tab - tabs << {:name => 'DmsfFileRevisionCustomField', :partial => 'custom_fields/index', :label => :DMSF_custom_field} + def custom_fields_tabs_with_customer_tab + cf = {:name => 'DmsfFileRevisionCustomField', :partial => 'custom_fields/index', :label => :dmsf} + unless CustomField::CUSTOM_FIELDS_NAMES.include?(cf[:name]) + CustomField::CUSTOM_FIELDS_TABS << cf + CustomField::CUSTOM_FIELDS_NAMES << cf[:name] + end + custom_fields_tabs_without_customer_tab end end end From d6c3209f80a573b80b00ceca7d9dde931c15da91 Mon Sep 17 00:00:00 2001 From: Karel Picman Date: Fri, 1 Mar 2013 15:19:47 +0100 Subject: [PATCH 24/26] Czech localisation updated, en-GB removed, yml files formated --- config/locales/cs.yml | 23 +++++ config/locales/de.yml | 14 +-- config/locales/en-GB.yml | 187 --------------------------------------- config/locales/en.yml | 1 + config/locales/es.yml | 35 +++++++- config/locales/fr.yml | 2 +- config/locales/ja.yml | 34 ++++++- config/locales/ru.yml | 1 + config/locales/zh.yml | 32 ++++++- 9 files changed, 124 insertions(+), 205 deletions(-) delete mode 100644 config/locales/en-GB.yml diff --git a/config/locales/cs.yml b/config/locales/cs.yml index 506607e7..d311103f 100644 --- a/config/locales/cs.yml +++ b/config/locales/cs.yml @@ -1,3 +1,4 @@ +# Czech translation for DMSF by vit.jonas@gmail.com, karel.picman@kontron.com cs: :dmsf: "DMSF" :label_dmsf_file_plural: "Dmsf soubory" @@ -183,6 +184,28 @@ cs: :error_folder_cannot_be_copied: "Složka nemůže být zkopírována" :notice_folder_copied: "Složka zkopírována" :error_max_email_filesize_exceeded: "Přesáhli jste maximální velikost souboru, který lze poslat emailem. (%{number} MB)" + :note_maximum_email_filesize: "Omezí se maximální velikost souboru, který může být poslán emailem. 0 znamená neomezený. Číslo je v MB." :label_maximum_email_filesize: "Maximální velikost souboru emailu" + :header_minimum_filesize: "File Error." + :error_minimum_filesize: "The file %{file} is 0 bytes and will not be attached." + :parent_directory: "Parent Directory" + :note_webdav: "Webdav once enabled can be found at http://.../dmsf/webdav/" + :label_webdav: "Webdav functionality" + :label_dmsf_plural: "Copy DMSF files and folders (%{files} files in %{folders} folders)" + + :warning_folder_already_locked: "Tato složka je již zamčená" + :notice_folder_locked: "Složka byla úspěšně zamčena" + :warning_folder_not_locked: "Složku nelze zamknout" + :notice_folder_unlocked: "Složka byla odemčena" + :error_only_user_that_locked_folder_can_unlock_it: "Nemáte oprávnění k odemknutí této složky" + :title_folder_parent_locked: "Nadřazená složka %{name} je zamčená" + :title_file_parent_locked: "Nadřazená složka %{name} je zamčená" + :title_unlock_folder: "Odemknout" + :title_lock_folder: "Zamknout" + + :select_option_webdav_readonly: "Pouze pro čtení" + :select_option_webdav_readwrite: "Čtení/Zápis" + :label_webdav_strategy: "Webdav strategie" + :note_webdav_strategy: "Umožní administrátorovi rozhodnout, zdali je webdav pouze pro čtení nebo i pro zápis." \ No newline at end of file diff --git a/config/locales/de.yml b/config/locales/de.yml index 9f4fe8e0..c8ed33ac 100644 --- a/config/locales/de.yml +++ b/config/locales/de.yml @@ -1,3 +1,4 @@ +# German translation for DMSF by Terrence Miller de: :dmsf: "DMS" :label_dmsf_file_plural: "DMS" @@ -62,8 +63,7 @@ de: :submit_email: "Email" :title_send_checked_by_email: "Sende gewählte Dateien per Email" :link_user_preferences: "Deine Einstellungen" - :heading_send_documents_by_email: "Sende Dateien per Email" - :heading_new_folder : "Neuen Ordner erstellen" + :heading_send_documents_by_email: "Sende Dateien per Email" :label_email_from: "Von" :label_email_to: "An" :label_email_cc: "CC" @@ -77,7 +77,7 @@ de: :note_uploaded_maximum_files_at_once: "Es können maximal %{number} Dateien auf einmal hochgeladen werden." :note_upload_files_greater_than_two_gb: "Um Dateien größer 2GB hochzuladen brauchst du einen 64bit-Browser." :submit_upload_files: "Upload" - :heading_new_folder: "Neuer Ordner" + :heading_new_folder: "Neuer Ordner" :label_title: "Titel" :label_description: "Beschreibung" :submit_save: "Speichern" @@ -183,6 +183,7 @@ de: :title_copy: "Kopieren" :error_folder_cannot_be_copied: "Der Ordner kann nicht kopiert werden." :notice_folder_copied: "Ordner kopiert" + :error_max_email_filesize_exceeded: "Maximale Dateigröße der Anlage wurde überschritten. (%{number} MB)" :note_maximum_email_filesize: "Maximale Dateigröße der Anlage. 0 bedeutet keinen Limit. Der Nummer ist in MB." :label_maximum_email_filesize: "Maximale Dateigröße der Anlage" @@ -190,8 +191,9 @@ de: :error_minimum_filesize: "Die Datei %{file} ist 0 Bytes groß und wird deswegen nicht angehängt." :parent_directory: "übergeordnetes Verzeichnis" :note_webdav: "Nach der Aktivierung von WebDav kann der Dienst über die URL http(s)://.../dmsf/webdav/ erreicht werden." - :label_webdav: "Webdav Funktionalität" + :label_webdav: "Webdav Funktionalität" :label_dmsf_plural: "Kopieren von Dateien und Ordnern (%{files} Dateien in %{folders} Ordnern)" + :warning_folder_already_locked: "Dieser Ordner ist bereits gesperrt" :notice_folder_locked: "Der Ordner wurde erfolgreich gesperrt" :warning_folder_not_locked: "Der Ordner konnte nicht gesperrt werden" @@ -201,9 +203,9 @@ de: :title_file_parent_locked: "Übergeordnetes Verzeichnis %{name} ist gesperrt" :title_unlock_folder: "Zur Modifikation für andere Benutzer entsperren" :title_lock_folder: "Zum Schutz vor Modifikation durch andere Benutzer sperren" + :select_option_webdav_readonly: "nur Lesen" :select_option_webdav_readwrite: "Lesen/Schreiben" :label_webdav_strategy: "Webdav Strategie" :note_webdav_strategy: "Erlaubt dem Administrator den Wechsel der WebDav Nutzung zwischen nur lesend und auch schreibenden Zugriffen." - :DMSF_custom_field: "DMSF" - :custom_field: "DMSF" \ No newline at end of file + \ No newline at end of file diff --git a/config/locales/en-GB.yml b/config/locales/en-GB.yml deleted file mode 100644 index 78d7d92f..00000000 --- a/config/locales/en-GB.yml +++ /dev/null @@ -1,187 +0,0 @@ -en-GB: - :dmsf: "DMSF" - :label_dmsf_file_plural: "Dmsf files" - :warning_no_entries_selected: "No entries selected" - :error_email_to_must_be_entered: "Email To must be entered" - :notice_email_sent: "Email sent" - :warning_file_already_locked: "File already locked" - :notice_file_locked: "File locked" - :warning_file_not_locked: "File not locked" - :notice_file_unlocked: "File unlocked" - :error_only_user_that_locked_file_can_unlock_it: "Only user that locked file can unlock it" - :question_do_you_really_want_to_delete_this_entry: "Do you really want to delete this entry?" - :error_max_files_exceeded: "Limit for %{number} simultaneously downloaded files exceeded" - :question_do_you_really_want_to_delete_this_revision: "Do you really want to delete this revision?" - :error_entry_project_does_not_match_current_project: "Entry project doesn't match current project" - :notice_folder_created: "Folder created" - :error_folder_creation_failed: "Folder creation failed" - :error_folder_title_must_be_entered: "Title must be entered" - :notice_folder_deleted: "Folder deleted" - :error_folder_is_not_empty: "Folder is not empty" - :error_folder_title_is_already_used: "Title is already used" - :notice_folder_details_were_saved: "Folder details were saved" - :error_file_is_locked: "File is locked" - :notice_file_deleted: "File deleted" - :error_at_least_one_revision_must_be_present: "At least one revision must be present" - :notice_revision_deleted: "Revision deleted" - :warning_one_of_files_locked: "One of files locked" - :notice_file_unlocked: "File unlocked" - :notice_file_revision_created: "File revision created" - :notice_your_preferences_were_saved: "Your preferences were saved" - :warning_folder_notifications_already_activated: "Folder notifications already activated" - :notice_folder_notifications_activated: "Folder notifications activated" - :warning_folder_notifications_already_deactivated: "Folder notifications already deactivated" - :notice_folder_notifications_deactivated: "Folder notifications deactivated" - :warning_file_notifications_already_activated: "File notifications already activated" - :notice_file_notifications_activated: "File notifications activated" - :warning_file_notifications_already_deactivated: "File notifications already deactivated" - :notice_file_notifications_deactivated: "File notifications deactivated" - :link_details: "%{title} details" - :link_edit: "Edit %{title}" - :submit_create: "Create" - :link_create_folder: "Create folder" - :title_check_uncheck_all_for_zip_download_or_email: "Check/Uncheck all for zip download or email" - :link_title: "Title" - :link_size: "Size" - :link_modified: "Modified" - :link_ver: "Ver." - :link_author: "Author" - :title_check_for_zip_download_or_email: "Check for Zip download or email" - :title_delete: "Delete" - :title_notifications_active_deactivate: "Notifications active: Deactivate" - :title_notifications_not_active_activate: "Notifications not active: Activate" - :title_title_version_version_download: "%{title} version %{version} download" - :title_locked_by_user: "Locked by %{user}" - :title_locked_by_you: "Locked by you" - :title_waiting_for_approval: "Waiting for Approval" - :title_approved: "Approved" - :title_unlock_file: "Unlock to allow changes for other members" - :title_lock_file: "Lock to prevent changes for other members" - :submit_download: "Download" - :title_download_checked: "Download checked in Zip archive" - :submit_email: "Email" - :title_send_checked_by_email: "Send checked by email" - :link_user_preferences: "Your DMSF project preferences" - :heading_send_documents_by_email: "Send documents by email" - :label_email_from: "From" - :label_email_to: "To" - :label_email_cc: "CC" - :label_email_subject: "Subject" - :label_email_documents: "Documents" - :label_email_body: "Body" - :label_email_send: "Send" - :title_notifications_active: "Notifications active" - :label_file_size: "File size" - :heading_file_upload: "Upload" - :note_uploaded_maximum_files_at_once: "There can be uploaded maximum of %{number} files at once." - :note_upload_files_greater_than_two_gb: "To upload files greater than 2GB you must have 64b browser." - :submit_upload_files: "Upload" - :info_file_locked: "File locked!" - :label_notifications: "Notifications" - :select_option_default: "Default" - :select_option_deactivated: "Deactivated" - :select_option_activated: "Activated" - :title_save_preferences: "Save preferences" - :heading_revisions: "Revisions" - :title_download: "Download" - :title_delete_revision: "Delete revision" - :label_created: "Created" - :label_changed: "Changed" - :info_changed_by_user: "%{changed} by %{user}" - :label_filename: "Filename" - :label_version: "Version" - :label_workflow: "Workflow" - :option_workflow_waiting_for_approval: "Waiting for approval" - :option_workflow_approved: "Approved" - :option_workflow_none: "None" - :label_mime: "Mime" - :label_size: "Size" - :label_comment: "Comment" - :heading_new_revision: "New Revision" - :option_version_same: "Same" - :option_version_minor: "Minor" - :option_version_major: "Major" - :label_new_content: "New content" - :label_maximum_files_upload: "Maximum files upload" - :note_maximum_number_of_files_uploaded: "Limits maximum number of files uploaded at once. 0 means unlimited." - :label_maximum_files_download: "Maximum files download" - :note_maximum_number_of_files_downloaded: "Limits maximum number of files downloaded in zip or sent via email. 0 means unlimited." - :label_file_storage_directory: "File storage directory" - :label_index_database: "Index database" - :label_stemming_language: "Stemming Language" - :note_possible_values: "Possible values" - :note_pass_none_to_disable_stemming: "pass 'none' to disable stemming" - :label_stem_strategy: "Stem strategy" - :option_stem_none: "Stem none (default)" - :option_stem_some: "Stem some" - :option_stem_all: "Stem all" - :label_stemming_description: "This controls how the query parser will apply the stemming algorithm. The default value is STEM_NONE. The possible values are" - :note_do_not_stem: "Don't perform any stemming." - :note_stem_some: "Search for stemmed forms of terms except for those which start with a capital letter, or are followed by certain characters, or are used with operators which need positional information. Stemmed terms are prefixed with 'Z'." - :note_stem_all: "Search for stemmed forms of all words (note: no 'Z' prefix is added)." - :note_stemming_applied: "Note that the stemming algorithm is only applied to words in probabilistic fields - boolean filter terms are never stemmed." - :label_default_notifications: "File default notifications" - :heading_uploaded_files: "Uploaded Files" - :submit_commit: "Commit" - :link_documents: "Documents" - :permission_view_dmsf_folders: "Browse documents" - :permission_user_preferences: "User preferences" - :permission_view_dmsf_files: "View documents" - :permission_folder_manipulation: "Folder manipulation" - :permission_file_manipulation: "File manipulation" - :permission_file_approval: "File approval" - :permission_force_file_unlock: "Force file unlock" - :label_file: "File" - :field_folder: "Folder" - :error_create_cycle_in_folder_dependency: "create cycle in folder dependency" - :error_contains_invalid_character: "contains invalid character(s)" - :error_file_commit_require_uploaded_file: "File commit require uploaded file" - :warning_some_files_were_not_commited: "Some files were not commited due to validation errors: %{files}" - :error_user_has_not_right_delete_folder: "User hasn't right to delete forders" - :error_user_has_not_right_delete_file: "User hasn't right to delete file" - :notice_entries_deleted: "Entries deleted" - :warning_some_entries_were_not_deleted: "Some entries weren't deleted: %{entries}" - :question_do_you_really_want_to_delete_entries: "Do you really want to delete checked entries?" - :title_delete_checked: "Delete checked" - :title_number_of_files_in_directory: "Number of files in directory" - :title_filename_for_download: "Filename used for download or in Zip archive" - :label_number_of_folders: "Folders" - :label_number_of_documents: "Documents" - :label_zip_names_encoding: "Zip names encoding" - :note_zip_names_encoding_iconv: "Iconv is used for charset conversion from utf-8 to target encoding" - :error_file_storage_directory_does_not_exist: "File storage directory doesn't exist and can't be created" - :error_file_can_not_be_created: "File can't be created in storage directory" - :error_wrong_zip_encoding: "Wrong Zip encoding" - :warning_xapian_not_available: "Xapian not available" - :menu_dmsf: "DMSF" - :label_physical_file_delete: "Physical file delete" - :user_is_not_project_member: "You are not member of the project" - :heading_access_downloads_emails: "Downloads/Emails" - :heading_access_first: "First" - :heading_access_last: "Last" - :label_dmsf_updated: "DMSF updated" - :title_total_size_of_all_files: "Total size of all files under this folder" - :project_module_dmsf: "DMSF" - :warning_no_project_to_copy_file_to: "No project to copy file to" - :comment_copied_from: "Copied from %{source}" - :notice_file_copied: "File copied" - :notice_file_moved: "File moved" - :label_target_project: "Target project" - :label_target_folder: "Target folder" - :title_copy_or_move: "Copy/Move" - :label_dmsf_folder_plural: "Dmsf folders" - :comment_moved_from: "Moved from %{source}" - :error_target_folder_same: "Target folder and project are the same as current" - :error_file_cannot_be_moved: "File can't be moved" - :error_file_cannot_be_copied: "File can't be copied" - :warning_no_project_to_copy_folder_to: "No project to copy folder to" - :title_copy: "Copy" - :error_folder_cannot_be_copied: "Folder can't be copied" - :notice_folder_copied: "Folder copied" - :error_max_email_filesize_exceeded: "You've exceeded the maximum filesize for sending via email. (%{number} MB)" - :note_maximum_email_filesize: "Limits maximum filesize that can be sent via email. 0 means unlimited. Number is in MB." - :label_maximum_email_filesize: "Maximum email attachment size" - :parent_directory: "Parent Directory" - :note_webdav: "Webdav once enabled can be found at http://.../dmsf/webdav/" - :label_webdav: "Webdav functionality" - diff --git a/config/locales/en.yml b/config/locales/en.yml index e15f1a0c..386252a4 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -1,3 +1,4 @@ +# English translation for DMSF by vit.jonas@gmail.com, dan.munn@munnster.co.uk en: :dmsf: "DMSF" :label_dmsf_file_plural: "Dmsf files" diff --git a/config/locales/es.yml b/config/locales/es.yml index 53b767fb..a390e261 100644 --- a/config/locales/es.yml +++ b/config/locales/es.yml @@ -1,3 +1,4 @@ +# Spanish translation for DMSF es: :dmsf: "DMSF" :label_dmsf_file_plural: "DMSF Archivos" @@ -35,10 +36,11 @@ es: :warning_file_notifications_already_activated: "Las notificaciones del archivo seleccionado ya estaban activadas previamente" :notice_file_notifications_activated: "Notificación de archivo activado" :warning_file_notifications_already_deactivated: "Las notificaciones del archivo seleccionado ya estaban desactivadas previamente" - :notice_file_notifications_deactivated: "Notificación de archivo desactivada" - -# Not translated + :notice_file_notifications_deactivated: "Notificación de archivo desactivada" :link_details: "%{title} details" + +# Not translated + :link_edit: "Edit %{title}" :submit_create: "Create" :link_create_folder: "Create folder" @@ -78,6 +80,10 @@ es: :note_uploaded_maximum_files_at_once: "There can be uploaded maximum of %{number} files at once." :note_upload_files_greater_than_two_gb: "To upload files greater than 2GB you must have 64b browser." :submit_upload_files: "Upload" + :heading_new_folder: "New Folder" + :label_title: "Title" + :label_description: "Description" + :submit_save: "Save" :info_file_locked: "File locked!" :label_notifications: "Notifications" :select_option_default: "Default" @@ -180,7 +186,28 @@ es: :title_copy: "Copy" :error_folder_cannot_be_copied: "Folder can't be copied" :notice_folder_copied: "Folder copied" + :error_max_email_filesize_exceeded: "You've exceeded the maximum filesize for sending via email. (%{number} MB)" :note_maximum_email_filesize: "Limits maximum filesize that can be sent via email. 0 means unlimited. Number is in MB." :label_maximum_email_filesize: "Maximum email attachment size" - \ No newline at end of file + :header_minimum_filesize: "File Error." + :error_minimum_filesize: "The file %{file} is 0 bytes and will not be attached." + :parent_directory: "Parent Directory" + :note_webdav: "Webdav once enabled can be found at http://.../dmsf/webdav/" + :label_webdav: "Webdav functionality" + :label_dmsf_plural: "Copy DMSF files and folders (%{files} files in %{folders} folders)" + + :warning_folder_already_locked: "This folder is already locked" + :notice_folder_locked: "The folder was successfully locked" + :warning_folder_not_locked: "Unfortunately, the folder could not be locked" + :notice_folder_unlocked: "The folder was successfully unlocked" + :error_only_user_that_locked_folder_can_unlock_it: "You are not authorised to unlock this folder" + :title_folder_parent_locked: "Parent folder %{name} is locked" + :title_file_parent_locked: "Parent folder %{name} is locked" + :title_unlock_folder: "Unlock to allow changes for other members" + :title_lock_folder: "Lock to prevent changes for other members" + + :select_option_webdav_readonly: "Read-only" + :select_option_webdav_readwrite: "Read/Write" + :label_webdav_strategy: "Webdav strategy" + :note_webdav_strategy: "Enables the administrator to decide if webdav is a read-only or read-write platform for end users." diff --git a/config/locales/fr.yml b/config/locales/fr.yml index 7cd9de29..27c81c21 100644 --- a/config/locales/fr.yml +++ b/config/locales/fr.yml @@ -1,3 +1,4 @@ +# French translation for DMSF fr: :dmsf: "DMSF" :label_dmsf_file_plural: "Fichiers DMSF" @@ -207,4 +208,3 @@ fr: :select_option_webdav_readwrite: "Lecture/Ecriture" :label_webdav_strategy: "Accès Webdav" :note_webdav_strategy: "Permet à l'administrateur d'autoriser les utilisateurs au module Webdav en letcure seule ou en lecture et écriture." - diff --git a/config/locales/ja.yml b/config/locales/ja.yml index bb87fb68..8e69e1b4 100644 --- a/config/locales/ja.yml +++ b/config/locales/ja.yml @@ -1,3 +1,4 @@ +# Japanese translation for DMSF ja: :dmsf: "DMSF" :label_dmsf_file_plural: "Dmsf ファイル" @@ -163,6 +164,7 @@ ja: :heading_access_downloads_emails: "ダウンロード/電子メール" :heading_access_first: "初回アクセス" :heading_access_last: "最終アクセス" + :label_dmsf_updated: "DMSF updated" :title_total_size_of_all_files: "このフォルダにある全ファイルの合計サイズ" :project_module_dmsf: "DMSF" :warning_no_project_to_copy_file_to: "ファイルをコピーするプロジェクトがありません" @@ -172,9 +174,7 @@ ja: :label_target_project: "ターゲットプロジェクト" :label_target_folder: "ターゲットフォルダ" :title_copy_or_move: "コピー/移動" - :label_dmsf_folder_plural: "Dmsf フォルダ" - -#Not translated + :label_dmsf_folder_plural: "Dmsf フォルダ" :comment_moved_from: "%{source} から移動しました" :error_target_folder_same: "コピー/移動先のフォルダとプロジェクトが現在と同じです" :error_file_cannot_be_moved: "ファイルを移動できません" @@ -183,4 +183,30 @@ ja: :title_copy: "コピー" :error_folder_cannot_be_copied: "フォルダをコピーできません" :notice_folder_copied: "フォルダをコピーしました" - \ No newline at end of file + +# Not translated + + :error_max_email_filesize_exceeded: "You've exceeded the maximum filesize for sending via email. (%{number} MB)" + :note_maximum_email_filesize: "Limits maximum filesize that can be sent via email. 0 means unlimited. Number is in MB." + :label_maximum_email_filesize: "Maximum email attachment size" + :header_minimum_filesize: "File Error." + :error_minimum_filesize: "The file %{file} is 0 bytes and will not be attached." + :parent_directory: "Parent Directory" + :note_webdav: "Webdav once enabled can be found at http://.../dmsf/webdav/" + :label_webdav: "Webdav functionality" + :label_dmsf_plural: "Copy DMSF files and folders (%{files} files in %{folders} folders)" + + :warning_folder_already_locked: "This folder is already locked" + :notice_folder_locked: "The folder was successfully locked" + :warning_folder_not_locked: "Unfortunately, the folder could not be locked" + :notice_folder_unlocked: "The folder was successfully unlocked" + :error_only_user_that_locked_folder_can_unlock_it: "You are not authorised to unlock this folder" + :title_folder_parent_locked: "Parent folder %{name} is locked" + :title_file_parent_locked: "Parent folder %{name} is locked" + :title_unlock_folder: "Unlock to allow changes for other members" + :title_lock_folder: "Lock to prevent changes for other members" + + :select_option_webdav_readonly: "Read-only" + :select_option_webdav_readwrite: "Read/Write" + :label_webdav_strategy: "Webdav strategy" + :note_webdav_strategy: "Enables the administrator to decide if webdav is a read-only or read-write platform for end users." diff --git a/config/locales/ru.yml b/config/locales/ru.yml index 1694c33b..0adb0fcb 100644 --- a/config/locales/ru.yml +++ b/config/locales/ru.yml @@ -1,3 +1,4 @@ +# Russian translation for DMSF ru: :dmsf: "DMSF" :label_dmsf_file_plural: "Файлы DMSF" diff --git a/config/locales/zh.yml b/config/locales/zh.yml index d9754216..6f17acd3 100644 --- a/config/locales/zh.yml +++ b/config/locales/zh.yml @@ -1,4 +1,4 @@ -# For Simplified Chinese +# Chinese translation for DMSF zh: :dmsf: "文档管家" :label_dmsf_file_plural: "Dmsf files" @@ -167,8 +167,9 @@ zh: :label_dmsf_updated: "DMSF updated" :title_total_size_of_all_files: "文件夹所有文件总大小" :project_module_dmsf: "文档管家" - -# Not translated + +# Not translated + :warning_no_project_to_copy_file_to: "No project to copy file to" :comment_copied_from: "Copied from %{source}" :notice_file_copied: "File copied" @@ -185,4 +186,29 @@ zh: :title_copy: "Copy" :error_folder_cannot_be_copied: "Folder can't be copied" :notice_folder_copied: "Folder copied" + + :error_max_email_filesize_exceeded: "You've exceeded the maximum filesize for sending via email. (%{number} MB)" + :note_maximum_email_filesize: "Limits maximum filesize that can be sent via email. 0 means unlimited. Number is in MB." + :label_maximum_email_filesize: "Maximum email attachment size" + :header_minimum_filesize: "File Error." + :error_minimum_filesize: "The file %{file} is 0 bytes and will not be attached." + :parent_directory: "Parent Directory" + :note_webdav: "Webdav once enabled can be found at http://.../dmsf/webdav/" + :label_webdav: "Webdav functionality" + :label_dmsf_plural: "Copy DMSF files and folders (%{files} files in %{folders} folders)" + + :warning_folder_already_locked: "This folder is already locked" + :notice_folder_locked: "The folder was successfully locked" + :warning_folder_not_locked: "Unfortunately, the folder could not be locked" + :notice_folder_unlocked: "The folder was successfully unlocked" + :error_only_user_that_locked_folder_can_unlock_it: "You are not authorised to unlock this folder" + :title_folder_parent_locked: "Parent folder %{name} is locked" + :title_file_parent_locked: "Parent folder %{name} is locked" + :title_unlock_folder: "Unlock to allow changes for other members" + :title_lock_folder: "Lock to prevent changes for other members" + + :select_option_webdav_readonly: "Read-only" + :select_option_webdav_readwrite: "Read/Write" + :label_webdav_strategy: "Webdav strategy" + :note_webdav_strategy: "Enables the administrator to decide if webdav is a read-only or read-write platform for end users." \ No newline at end of file From cf6620b01f5407a713f56572deb240db2ba7be42 Mon Sep 17 00:00:00 2001 From: Karel Picman Date: Fri, 1 Mar 2013 15:27:07 +0100 Subject: [PATCH 25/26] Czech localization updated --- config/locales/cs.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/config/locales/cs.yml b/config/locales/cs.yml index d311103f..5b37f2bd 100644 --- a/config/locales/cs.yml +++ b/config/locales/cs.yml @@ -187,12 +187,12 @@ cs: :note_maximum_email_filesize: "Omezí se maximální velikost souboru, který může být poslán emailem. 0 znamená neomezený. Číslo je v MB." :label_maximum_email_filesize: "Maximální velikost souboru emailu" - :header_minimum_filesize: "File Error." - :error_minimum_filesize: "The file %{file} is 0 bytes and will not be attached." - :parent_directory: "Parent Directory" - :note_webdav: "Webdav once enabled can be found at http://.../dmsf/webdav/" - :label_webdav: "Webdav functionality" - :label_dmsf_plural: "Copy DMSF files and folders (%{files} files in %{folders} folders)" + :header_minimum_filesize: "Chyba souboru." + :error_minimum_filesize: "Soubor %{file} má nulovou velikost a nebude přiložen." + :parent_directory: "Nadřazený adresář" + :note_webdav: "Webdav je po založení k dispozici na http://.../dmsf/webdav/" + :label_webdav: "Webdav functionalita" + :label_dmsf_plural: "Kopíruj DMSF soubory a složky (%{files} souborů v %{folders} složkách)" :warning_folder_already_locked: "Tato složka je již zamčená" :notice_folder_locked: "Složka byla úspěšně zamčena" From f42ad9bd8f47ddcb09aa7d0167e3e6ea31a44051 Mon Sep 17 00:00:00 2001 From: Tatsuya Saito Date: Thu, 28 Mar 2013 19:27:35 +0900 Subject: [PATCH 26/26] Changes required zip gem 'zip' to 'rubyzip'. --- Gemfile | 2 +- README.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Gemfile b/Gemfile index f475dd92..596b3740 100644 --- a/Gemfile +++ b/Gemfile @@ -1,6 +1,6 @@ source :rubygems -gem "zip" +gem "rubyzip" gem "simple_enum" gem "nokogiri", ">= 1.4.2" gem "uuidtools", "~> 2.1.1" diff --git a/README.md b/README.md index 9fc3b911..3b47307f 100644 --- a/README.md +++ b/README.md @@ -48,7 +48,7 @@ As of version 1.4.4 of this plugin: * Bundler 1.1 or greater (Gem) * Redmine 2.0.x * Rails 3.2.x (Inline with Redmine installation requirement) - * zip (Gem) + * rubyzip (Gem) * Nokogiri 1.4.2 or greater (Gem) * UUIDTools 2.1.1 or greater (less than 2.2.0) (Gem) * simple_enum (Gem)