diff --git a/locale/de/LC_MESSAGES/django.po b/locale/de/LC_MESSAGES/django.po index 1d2bddea9c..a42c083196 100644 --- a/locale/de/LC_MESSAGES/django.po +++ b/locale/de/LC_MESSAGES/django.po @@ -64,8 +64,8 @@ msgstr "" "Project-Id-Version: seahub\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2017-02-17 10:30+0800\n" -"PO-Revision-Date: 2017-02-17 02:31+0000\n" -"Last-Translator: zheng xie \n" +"PO-Revision-Date: 2017-03-20 08:42+0000\n" +"Last-Translator: Andreas Vollmer | HU Berlin \n" "Language-Team: German (http://www.transifex.com/haiwen/seahub/language/de/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" @@ -1657,7 +1657,7 @@ msgstr "Seafile bietet eine clientseitige Ende-zu-Ende-Verschlüsselung. Sie kö #: seahub/help/templates/help/encrypted_libraries.html:10 msgid "When creating an encrypted library:" -msgstr "Wenn Sie eine verschlüsselte Bibliothek anlegen:" +msgstr "Wenn Sie eine verschlüsselte Bibliothek erstellen:" #: seahub/help/templates/help/encrypted_libraries.html:12 msgid "" @@ -2742,7 +2742,7 @@ msgstr "Mitteilung löschen" msgid "" "Virus detected in file %(file_name)s during regular scanning." -msgstr "" +msgstr "Virus gefunden in Datei %(file_name)s beim Routinescan." #: seahub/notifications/templates/notifications/notify_virus.html:20 msgid "Virus is detected on regular scanning. Please check the report at:" @@ -3896,7 +3896,7 @@ msgstr "Bibliotheken nach Eigentümer/in suchen …" #: seahub/templates/js/sysadmin-templates.html:84 msgid "Search groups by name..." -msgstr "" +msgstr "Gruppen nach Name suchen …" #: seahub/templates/js/sysadmin-templates.html:100 msgid "System Info" @@ -4097,11 +4097,11 @@ msgstr "Keine Gruppen" #: seahub/templates/js/sysadmin-templates.html:562 msgid "Search Group" -msgstr "" +msgstr "Gruppe suchen" #: seahub/templates/js/sysadmin-templates.html:564 msgid "Tip: you can search by keyword in name." -msgstr "" +msgstr "Hinweis: Sie können mit einem Schlagwort in Name suchen." #: seahub/templates/js/sysadmin-templates.html:593 msgid "(If left blank, owner will be admin)" @@ -4154,7 +4154,7 @@ msgstr "Mitglieder" #: seahub/templates/js/sysadmin-templates.html:738 #: seahub/templates/js/sysadmin-templates.html:746 msgid "Add Member" -msgstr "" +msgstr "Mitglied hinzufügen" #: seahub/templates/js/sysadmin-templates.html:762 #: seahub/templates/js/templates.html:914 @@ -4170,7 +4170,7 @@ msgstr "Freigabe aufheben" #: seahub/templates/js/sysadmin-templates.html:808 msgid "No members" -msgstr "" +msgstr "Keine Mitglieder" #: seahub/templates/js/templates.html:4 seahub/templates/js/templates.html:771 #: seahub/templates/libraries.html:14 @@ -5517,7 +5517,7 @@ msgstr "Bibliothek löschen" #: seahub/templates/sysadmin/repoadmin_js.html:58 msgid "Successfully deleted 1 item." -msgstr "" +msgstr "1 Objekt erfolgreich gelöscht." #: seahub/templates/sysadmin/settings.html:11 msgid "" @@ -5871,11 +5871,11 @@ msgstr "Benutzer/innen aus CSV-Datei importieren" #: seahub/templates/sysadmin/sys_useradmin.html:64 msgid "File format: user@mail.com,password,name,department,role,quota" -msgstr "" +msgstr "Dateiformat: user@mail.com,passwort,name,bereich,rolle,speicherplatz" #: seahub/templates/sysadmin/sys_useradmin.html:65 msgid "Name, department, role and quota are optional." -msgstr "" +msgstr "Name, Bereich, Rolle und Speicherplatz sind optional." #: seahub/templates/sysadmin/sys_useradmin.html:67 msgid "Please choose a CSV file" diff --git a/locale/fr/LC_MESSAGES/django.po b/locale/fr/LC_MESSAGES/django.po index 6607120af1..f83b68728d 100644 --- a/locale/fr/LC_MESSAGES/django.po +++ b/locale/fr/LC_MESSAGES/django.po @@ -6,6 +6,7 @@ # EricLF44 , 2014-2016 # EricLF44 , 2014 # LowMemory, 2016 +# FLEURY Kévin , 2017 # JulienDemangeon , 2017 # Gaspard , 2013-2017 # Gautier Auburtin , 2016 @@ -27,8 +28,8 @@ msgstr "" "Project-Id-Version: seahub\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2017-02-17 10:30+0800\n" -"PO-Revision-Date: 2017-02-17 02:31+0000\n" -"Last-Translator: zheng xie \n" +"PO-Revision-Date: 2017-03-01 11:08+0000\n" +"Last-Translator: FLEURY Kévin \n" "Language-Team: French (http://www.transifex.com/haiwen/seahub/language/fr/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" @@ -97,7 +98,7 @@ msgstr "L'utilisateur %s est déjà le propriétaire de la bibliothèque." #: seahub/api2/endpoints/invitations.py:49 #, python-format msgid "Email %s invalid." -msgstr "L' e-mail %s n'est pas valide." +msgstr "L'e-mail %s n'est pas valide." #: seahub/api2/endpoints/file.py:366 seahub/views/file.py:1056 msgid "Check file lock error" @@ -156,7 +157,7 @@ msgstr "Erreur de déchiffrement de la bibliothèque" msgid "" "Sending shared link failed. Email service is not properly configured, please" " contact administrator." -msgstr "L'envoi du lien partagé a échoué. Le service d'email n'est pas configuré correctement, veuillez contacter l'administrateur." +msgstr "L'envoi du lien partagé a échoué. Le service d'e-mail n'est pas configuré correctement, veuillez contacter l'administrateur." #: seahub/api2/endpoints/send_share_link_email.py:99 seahub/share/views.py:178 msgid "file" @@ -323,7 +324,7 @@ msgstr "Ancien mot de passe" #: seahub/auth/forms.py:189 msgid "Your old password was entered incorrectly. Please enter it again." -msgstr "Votre ancien mot de passe n'a pas été correctement saisi. Veuillez l’introduire à nouveau." +msgstr "Votre ancien mot de passe n'a pas été correctement saisi. Veuillez l'introduire à nouveau." #: seahub/auth/forms.py:198 seahub/base/accounts.py:581 msgid "Password (again)" @@ -431,7 +432,7 @@ msgstr "Votre avatar a été mis à jour avec succès." #: seahub/avatar/views.py:166 msgid "Successfully deleted the requested avatars." -msgstr "Les avatars demandés ont été supprimés avec succès" +msgstr "Les avatars demandés ont été supprimés avec succès." #: seahub/base/accounts.py:302 #, python-format @@ -1036,7 +1037,7 @@ msgstr "Modifier le contact" #: seahub/templates/view_shared_dir.html:224 #: seahub/templates/view_shared_dir.html:246 msgid "Failed. Please check the network." -msgstr "Échec. Vérifiez le réseau." +msgstr "Échec. Veuillez vérifier le réseau." #: seahub/contacts/templates/contacts/contact_list.html:109 msgid "Delete Contact" @@ -1067,7 +1068,7 @@ msgstr "Vous ne pouvez pas vous ajouter vous-même." #: seahub/contacts/views.py:68 #, python-format msgid "%s is not a valid email." -msgstr "\"%s\" n'est pas une adresse e-mail valide" +msgstr "\"%s\" n'est pas une adresse e-mail valide." #: seahub/contacts/views.py:73 #, python-format @@ -1162,7 +1163,7 @@ msgstr "Veuillez entrer un numéro" #: seahub/forms.py:183 seahub/templates/snippets/repo_create_js.html:34 msgid "Name is required" -msgstr "Le nom est requis." +msgstr "Le nom est requis" #: seahub/forms.py:184 msgid "Please enter a valid number" @@ -1240,7 +1241,7 @@ msgstr "Bonjour," #: seahub/group/templates/group/add_member_email.html:11 #, python-format msgid "%(email)s invited you to join group %(grp_name)s on %(site_name)s: " -msgstr "%(email)s vous invite à joindre le groupe %(grp_name)s sur %(site_name)s:" +msgstr "%(email)s vous invite à joindre le groupe %(grp_name)s sur %(site_name)s :" #: seahub/group/templates/group/group_join_email.html:2 #, python-format @@ -1258,7 +1259,7 @@ msgstr "Merci d'utiliser notre site !" #: seahub/templates/email_base.html:13 #, python-format msgid "The %(site_name)s team" -msgstr "L'équipe de %(site_name)s." +msgstr "L'équipe de %(site_name)s" #: seahub/group/templates/group/group_wiki.html:13 #: seahub/group/templates/group/group_wiki.html:20 @@ -1474,7 +1475,7 @@ msgstr "Inconnu" #: seahub/group/views.py:361 seahub/views/ajax.py:1609 #: seahub/views/wiki.py:136 msgid "Internal Server Error" -msgstr "Erreur interne du serveur." +msgstr "Erreur interne du serveur" #: seahub/group/views.py:363 seahub/views/wiki.py:138 msgid "Wiki does not exists." @@ -1494,7 +1495,7 @@ msgstr "Impossible de créer le wiki." #: seahub/views/ajax.py:1139 seahub/views/ajax.py:2107 #: seahub/views/ajax.py:2127 seahub/views/wiki.py:203 msgid "Permission denied." -msgstr "Autorisation refusée" +msgstr "Autorisation refusée." #: seahub/group/views.py:477 seahub/group/views.py:503 #: seahub/group/views.py:521 seahub/views/wiki.py:228 seahub/views/wiki.py:251 @@ -1510,7 +1511,7 @@ msgstr "La page \"%s\" existe déjà." #: seahub/group/views.py:526 #, python-format msgid "Successfully deleted \"%s\"." -msgstr "\"%s\" supprimé avec succès" +msgstr "\"%s\" supprimé avec succès." #: seahub/group/views.py:528 #, python-format @@ -1689,7 +1690,7 @@ msgstr "Parfois, vous ne voulez pas synchroniser des fichiers ou des dossiers da #: seahub/help/templates/help/ignore.html:10 msgid "A blank line matches no files." -msgstr "Une ligne vide ne trouve pas de fichier" +msgstr "Une ligne vide ne trouve pas de fichier." #: seahub/help/templates/help/ignore.html:11 msgid "A line starting with # serves as a comment." @@ -1732,7 +1733,7 @@ msgid "" "The seafile-ignore.txt file only controls which files to exclude on the " "client side. You can still create a file from seahub web interface that's " "excluded on the client. In this case," -msgstr "Le fichier seafile-ignore.txt contrôle seulement quels fichiers/dossiers exclure du côté client. Vous pouvez toujours créer un fichier/dossier sur l'interface web, il sera exclu du client dans ce cas." +msgstr "Le fichier seafile-ignore.txt contrôle uniquement les fichiers à exclure côté client. Vous pouvez toujours créer un fichier à partir de l'interface web seahub qui sera exclu sur le client. Dans ce cas," #: seahub/help/templates/help/ignore.html:40 msgid "" @@ -1762,7 +1763,7 @@ msgstr "Installation du client Seafile" msgid "" "After downloading Seafile client program, you have 3 steps left to get it up" " and running." -msgstr "Après avoir téléchargé le programme du client Seafile, il vous reste 3 étapes avant de l'utiliser" +msgstr "Après avoir téléchargé le programme du client Seafile, il vous reste 3 étapes avant de l'utiliser." #: seahub/help/templates/help/install.html:10 msgid "1. Select a disk partition to store local Seafile data" @@ -1782,7 +1783,7 @@ msgstr "Renseigner le compte existant sur votre serveur Seafile privé ou sur un #: seahub/help/templates/help/install.html:18 msgid "3. Sync a library" -msgstr "3. Synchronisez une bibliothèque." +msgstr "3. Synchronisez une bibliothèque" #: seahub/help/templates/help/install.html:20 msgid "Click the \"Sync this library\" button to sync it with a local folder." @@ -1928,7 +1929,7 @@ msgstr "Utilisateurs" #: seahub/templates/sysadmin/sys_useradmin_ldap.html:8 #: seahub/templates/sysadmin/sys_useradmin_paid.html:7 msgid "Search users..." -msgstr "Recherche d'utilisateurs..." +msgstr "Recherche d'utilisateurs ..." #: seahub/institutions/templates/institutions/info.html:7 #: seahub/templates/js/sysadmin-templates.html:7 @@ -2197,7 +2198,7 @@ msgstr "Vide" #: seahub/templates/sysadmin/sys_useradmin_paid.html:31 #: seahub/templates/sysadmin/user_search.html:21 msgid "Activating..., please wait" -msgstr "Activation..., veuillez patienter" +msgstr "Activation ..., veuillez patienter" #: seahub/institutions/templates/institutions/useradmin.html:78 #: seahub/institutions/templates/institutions/useradmin_search.html:70 @@ -2220,7 +2221,7 @@ msgstr "Édité avec succès, un e-mail a été envoyé." msgid "" "Edit succeeded, but failed to send email, please check your email " "configuration." -msgstr "Édité avec succès, mais échec d\\'envoi de l'e-mail, veuillez vérifier votre configuration." +msgstr "Édité avec succès, mais échec de l'envoi de l'e-mail, veuillez vérifier votre configuration." #: seahub/institutions/templates/institutions/useradmin.html:128 #: seahub/templates/sysadmin/sys_inst_info_user.html:102 @@ -2380,7 +2381,7 @@ msgstr "Heure" #: seahub/message/templates/message/all_msg_list.html:43 msgid "message..." -msgstr "Message..." +msgstr "message ..." #: seahub/message/templates/message/all_msg_list.html:49 #: seahub/message/templates/message/user_msg_list.html:23 @@ -2398,7 +2399,7 @@ msgstr "Envoyer à : cliquez pour sélectionner les contacts" #: seahub/message/templates/message/all_msg_list.html:110 msgid "please add contacts at first" -msgstr "Veuillez d'abord ajouter des contacts." +msgstr "Veuillez d'abord ajouter des contacts" #: seahub/message/templates/message/all_msg_list.html:118 msgid "Please check the network." @@ -2407,7 +2408,7 @@ msgstr "Veuillez vérifier le réseau." #: seahub/message/templates/message/all_msg_list.html:156 #: seahub/message/views.py:185 msgid "message is required" -msgstr "C'est obligatoire." +msgstr "Un message est requis" #: seahub/message/templates/message/all_msg_list.html:160 #: seahub/message/views.py:188 @@ -2421,7 +2422,7 @@ msgstr "Messages avec %(name)s" #: seahub/message/templates/message/user_msg_list.html:15 msgid "Send a message..." -msgstr "Envoi du message..." +msgstr "Envoi du message ..." #: seahub/message/templates/message/user_msg_list.html:72 #: seahub/templates/file_access.html:56 @@ -2453,7 +2454,7 @@ msgstr "Suivant" #: seahub/message/templates/message/user_msg_list.html:88 msgid "↑Top" -msgstr "↑Haut" +msgstr "↑ Haut" #: seahub/message/templates/message/user_msg_list.html:184 #: seahub/message/templates/message/user_msg_list.html:220 @@ -2690,7 +2691,7 @@ msgstr "Détail de la notification" #: seahub/notifications/templates/notifications/notification_list.html:27 msgid "(current notification)" -msgstr "(Notification actuelle)" +msgstr "(notification actuelle)" #: seahub/notifications/templates/notifications/notification_list.html:31 msgid "Set to current" @@ -2705,7 +2706,7 @@ msgstr "Supprimer la notification" msgid "" "Virus detected in file %(file_name)s during regular scanning." -msgstr "" +msgstr "Un virus a été détecté dans le fichier %(file_name)s pendant le scan de routine." #: seahub/notifications/templates/notifications/notify_virus.html:20 msgid "Virus is detected on regular scanning. Please check the report at:" @@ -2718,7 +2719,7 @@ msgstr "Notifications" #: seahub/notifications/templates/notifications/user_notification_list.html:12 msgid "Mark all read" -msgstr "Tout marquer comme lus" +msgstr "Tout marquer comme lu" #: seahub/notifications/templates/notifications/user_notification_list.html:13 msgid "Clear" @@ -2752,7 +2753,7 @@ msgstr "Sauvegarder les mots de passe dans votre navigateur." #: seahub/options/templates/options/set_user_options.html:12 msgid "Files will be decrypted in your browser when you download them." -msgstr "Les fichiers seront déchiffrés dans votre navigateur quand vous les téléchargerez" +msgstr "Les fichiers seront déchiffrés dans votre navigateur quand vous les téléchargerez." #: seahub/options/templates/options/set_user_options.html:13 msgid "" @@ -2827,7 +2828,7 @@ msgstr "Nom d'utilisateur :" #: seahub/profile/templates/profile/set_profile.html:50 msgid "You can use this field at login." -msgstr "Vous pouvez utiliser ce champ à la connexion" +msgstr "Vous pouvez utiliser ce champ à la connexion." #: seahub/profile/templates/profile/set_profile.html:55 msgid "Contact Email:" @@ -2861,7 +2862,7 @@ msgstr "Votre bibliothèque par défaut :" msgid "" "Default library is the default place to store your personal documents and " "pictures." -msgstr "Votre bibliothèque par défaut est l'espace par défaut où sont stockés vos images et vos documents personnels" +msgstr "Votre bibliothèque par défaut est l'espace par défaut où sont stockés vos images et vos documents personnels." #: seahub/profile/templates/profile/set_profile.html:94 msgid "Choose Default Library" @@ -2945,31 +2946,31 @@ msgstr "%s définie comme votre bibliothèque par défaut avec succès." #: seahub/settings.py:143 msgid "català" -msgstr "Català" +msgstr "Catalan" #: seahub/settings.py:144 msgid "Deutsch" -msgstr "Deutsch" +msgstr "Allemand" #: seahub/settings.py:145 msgid "English" -msgstr "English" +msgstr "Anglais" #: seahub/settings.py:146 msgid "Español" -msgstr "Español" +msgstr "Espagnol" #: seahub/settings.py:147 msgid "Español de Argentina" -msgstr "Español de Argentina" +msgstr "Espagnol Argentin" #: seahub/settings.py:148 msgid "Español de México" -msgstr "Español de México" +msgstr "Espagnol Mexicain" #: seahub/settings.py:149 msgid "Suomi" -msgstr "Suomi" +msgstr "Finlandais" #: seahub/settings.py:150 msgid "français" @@ -2977,55 +2978,55 @@ msgstr "Français" #: seahub/settings.py:151 msgid "עברית" -msgstr "עברית" +msgstr "Hébreu" #: seahub/settings.py:152 msgid "Magyar" -msgstr "Magyar" +msgstr "Hongrois" #: seahub/settings.py:153 msgid "Íslenska" -msgstr "Íslenska" +msgstr "Islandais" #: seahub/settings.py:154 msgid "Italiano" -msgstr "Italiano" +msgstr "Italien" #: seahub/settings.py:155 msgid "日本語" -msgstr "日本語" +msgstr "Japonais" #: seahub/settings.py:156 msgid "한국어" -msgstr "한국어" +msgstr "Coréen" #: seahub/settings.py:157 msgid "Latvian" -msgstr "Latvian" +msgstr "Letton" #: seahub/settings.py:158 msgid "Nederlands" -msgstr "Nederlands" +msgstr "Néerlandais" #: seahub/settings.py:159 msgid "Polski" -msgstr "Polski" +msgstr "Polonais" #: seahub/settings.py:160 msgid "Portuguese, Brazil" -msgstr "Portuguese, Brazil" +msgstr "Portugais, Brésil" #: seahub/settings.py:161 msgid "Русский" -msgstr "РУССКИЙ" +msgstr "Russe" #: seahub/settings.py:162 msgid "Slovak" -msgstr "Slovak" +msgstr "Slovaque" #: seahub/settings.py:163 msgid "Slovenian" -msgstr "Slovenian" +msgstr "Slovène" #: seahub/settings.py:164 msgid "Svenska" @@ -3033,23 +3034,23 @@ msgstr "Svenska" #: seahub/settings.py:165 msgid "ไทย" -msgstr "ไทย" +msgstr "Thaïlandais" #: seahub/settings.py:166 msgid "Türkçe" -msgstr "Türkçe" +msgstr "Turc" #: seahub/settings.py:167 msgid "українська мова" -msgstr "українська мова" +msgstr "Ukrainien" #: seahub/settings.py:168 msgid "简体中文" -msgstr "简体中文" +msgstr "Chinois simplifié" #: seahub/settings.py:169 msgid "繁體中文" -msgstr "繁體中文" +msgstr "Chinois traditionnel" #: seahub/share/forms.py:20 seahub/share/forms.py:33 msgid "Email is required" @@ -3128,7 +3129,7 @@ msgstr "Seul le propriétaire de la bibliothèque a l'autorisation de la partage #: seahub/share/views.py:420 msgid "Please check the email(s) you entered" -msgstr "Veuillez vérifier le(s) e-mail(s) saisis" +msgstr "Veuillez vérifier l'e-mail ou les e-mails que vous avez entré" #: seahub/share/views.py:437 msgid "Email address is not valid" @@ -3172,7 +3173,7 @@ msgstr "Fermer" #: seahub/templates/base.html:54 seahub/templates/base_for_backbone.html:68 #: seahub/templates/sysadmin/sysadmin_backbone.html:52 msgid "View profile and more" -msgstr "Voir le profile et plus" +msgstr "Voir le profil et plus" #: seahub/templates/base.html:72 seahub/templates/js/sysadmin-templates.html:4 #: seahub/templates/js/templates.html:1505 @@ -3195,7 +3196,7 @@ msgstr "Déconnexion" msgid "" "We no longer support this version of IE. Please upgrade it to version 10 or " "above." -msgstr "Cette version de IE n'est plus supportée. Passez à la version 10 ou supérieure" +msgstr "Cette version d'IE n'est plus supportée. Passez à la version 10 ou supérieure." #: seahub/templates/base_for_backbone.html:53 msgid "Side Nav Menu" @@ -3211,7 +3212,7 @@ msgstr "Notifications" #: seahub/templates/base_for_backbone.html:97 #, python-format msgid "Welcome to %(site_name)s" -msgstr "Bienvenu à %(site_name)s" +msgstr "Bienvenue à %(site_name)s" #: seahub/templates/base_for_backbone.html:99 #, python-format @@ -3287,7 +3288,7 @@ msgstr "Télécharger" #: seahub/templates/file_access.html:5 seahub/templates/file_access.html:8 #: seahub/templates/js/templates.html:328 msgid "Access Log" -msgstr "Fichier trace" +msgstr "Fichier journaux" #: seahub/templates/file_access.html:11 #: seahub/templates/file_revisions.html:24 seahub/templates/text_diff.html:21 @@ -3446,15 +3447,15 @@ msgstr "Table" #: seahub/templates/file_edit.html:316 msgid "Undo(Ctrl+Z)" -msgstr "Annuler(Ctrl+Z)" +msgstr "Annuler (Ctrl+Z)" #: seahub/templates/file_edit.html:317 msgid "Redo(Ctrl+Y)" -msgstr "Rétablir(Ctrl+Y)" +msgstr "Rétablir (Ctrl+Y)" #: seahub/templates/file_edit.html:318 msgid "Close live preview" -msgstr "Fermer l’aperçu en direct" +msgstr "Fermer l'aperçu en direct" #: seahub/templates/file_edit.html:319 msgid "Live preview" @@ -3510,7 +3511,7 @@ msgstr "Aligner à droite" #: seahub/templates/file_edit.html:392 msgid "Submit failed. Please check the network." -msgstr "Échec de l\\'envoi. Veuillez vérifier le réseau." +msgstr "Échec de l'envoi. Veuillez vérifier le réseau." #: seahub/templates/file_edit.html:412 msgid "Password is required." @@ -3542,7 +3543,7 @@ msgstr "Retour" msgid "" "Tip: a new version will be generated after each modification, and you can " "restore the file to a previous version." -msgstr "Astuce: une nouvelle version sera générée après chaque modification, et vous pouvez restaurer le fichier dans une version précédente." +msgstr "Astuce : une nouvelle version sera générée après chaque modification, et vous pouvez restaurer le fichier dans une version précédente." #: seahub/templates/file_revisions.html:36 #: seahub/templates/file_revisions.html:38 @@ -3781,7 +3782,7 @@ msgstr "Annuler tout" #: seahub/templates/js/lib-op-popups.html:105 #: seahub/templates/view_shared_upload_link.html:48 msgid "Saving..." -msgstr "Enregistrement..." +msgstr "Sauvegarde ..." #: seahub/templates/js/lib-op-popups.html:115 msgid "This library is password protected" @@ -3789,7 +3790,7 @@ msgstr "Cette bibliothèque est protégée par un mot de passe" #: seahub/templates/js/lib-op-popups.html:119 msgid "*The password will be kept in the server for only 1 hour." -msgstr "Le mot de passe sera conservé seulement 1 heure sur le serveur" +msgstr "* Le mot de passe sera conservé seulement 1 heure sur le serveur." #: seahub/templates/js/lib-op-popups.html:126 msgid "A file with the same name already exists in this folder." @@ -3851,15 +3852,15 @@ msgstr "Termes et conditions" #: seahub/templates/js/sysadmin-templates.html:73 msgid "Search libraries by name..." -msgstr "Recherche de bibliothèques..." +msgstr "Recherche de bibliothèques ..." #: seahub/templates/js/sysadmin-templates.html:78 msgid "Search libraries by owner..." -msgstr "Rechercher les bibliothèques par utilisateur..." +msgstr "Rechercher les bibliothèques par utilisateur ..." #: seahub/templates/js/sysadmin-templates.html:84 msgid "Search groups by name..." -msgstr "" +msgstr "Rechercher des groupes par nom ..." #: seahub/templates/js/sysadmin-templates.html:100 msgid "System Info" @@ -3895,7 +3896,7 @@ msgstr "Total d'appareils" #: seahub/templates/js/sysadmin-templates.html:120 msgid "Current Connected Devices" -msgstr "Appareils actuellement connecté." +msgstr "Appareils actuellement connecté" #: seahub/templates/js/sysadmin-templates.html:124 msgid "Limits" @@ -4019,7 +4020,7 @@ msgstr "Partager" #: seahub/templates/js/sysadmin-templates.html:415 msgid "Tip: libraries deleted 30 days ago will be cleaned automatically." -msgstr "Astuce : Les bibliothèques de plus de 30 jours seront nettoyées automatiquement" +msgstr "Astuce : Les bibliothèques de plus de 30 jours seront nettoyées automatiquement." #: seahub/templates/js/sysadmin-templates.html:422 msgid "Deleted Time" @@ -4060,11 +4061,11 @@ msgstr "Pas de groupe" #: seahub/templates/js/sysadmin-templates.html:562 msgid "Search Group" -msgstr "" +msgstr "Recherche groupe" #: seahub/templates/js/sysadmin-templates.html:564 msgid "Tip: you can search by keyword in name." -msgstr "" +msgstr "Astuce : vous pouvez faire une recherche par mot-clé dans le nom." #: seahub/templates/js/sysadmin-templates.html:593 msgid "(If left blank, owner will be admin)" @@ -4117,7 +4118,7 @@ msgstr "Membres" #: seahub/templates/js/sysadmin-templates.html:738 #: seahub/templates/js/sysadmin-templates.html:746 msgid "Add Member" -msgstr "" +msgstr "Ajouter un membre" #: seahub/templates/js/sysadmin-templates.html:762 #: seahub/templates/js/templates.html:914 @@ -4133,7 +4134,7 @@ msgstr "Annuler le partage" #: seahub/templates/js/sysadmin-templates.html:808 msgid "No members" -msgstr "" +msgstr "Pas de membre" #: seahub/templates/js/templates.html:4 seahub/templates/js/templates.html:771 #: seahub/templates/libraries.html:14 @@ -4188,7 +4189,7 @@ msgstr "Renommer" #: seahub/templates/js/templates.html:56 msgid "History Setting" -msgstr "Paramètre d'historique" +msgstr "Paramètres de l'historique" #: seahub/templates/js/templates.html:58 msgid "Change Password" @@ -4196,7 +4197,7 @@ msgstr "Changement de mot de passe" #: seahub/templates/js/templates.html:61 msgid "Share Links" -msgstr "Liens partagé" +msgstr "Liens partagés" #: seahub/templates/js/templates.html:64 msgid "Folder Permission" @@ -4383,7 +4384,7 @@ msgstr "Message (optionnel) : " #: seahub/templates/js/templates.html:541 #: seahub/templates/snippets/file_share_popup.html:50 msgid "Sending..." -msgstr "Envoi..." +msgstr "Envoi ..." #: seahub/templates/js/templates.html:510 msgid "" @@ -4565,7 +4566,7 @@ msgstr "Liens de téléchargement" #: seahub/templates/js/templates.html:1616 #: seahub/templates/js/templates.html:1652 msgid "Upload Links" -msgstr "Liens d’envoi" +msgstr "Liens d'envoi" #: seahub/templates/js/templates.html:1255 #: seahub/templates/js/templates.html:1274 @@ -4794,7 +4795,7 @@ msgstr "Il n'y a pas encore de discussion dans ce groupe." #: seahub/templates/libraries.html:156 msgid "Add a discussion..." -msgstr "Commencer une discussion..." +msgstr "Commencer une discussion ..." #: seahub/templates/libraries.html:179 msgid "You don't have any starred files yet" @@ -4812,7 +4813,7 @@ msgstr "Vous n'avez pas d'appareils connectés" #: seahub/templates/libraries.html:207 msgid "Your clients (Desktop/Android/iOS) will be listed here." -msgstr "Vos clients (Desktop/Android/iOS) seront affichés ici." +msgstr "Vos clients (Bureau/Android/iOS) seront affichés ici." #: seahub/templates/nav_footer.html:2 msgid "Help" @@ -4878,7 +4879,7 @@ msgstr "CAPTCHA" #: seahub/templates/registration/login.html:18 msgid "Not clear? Refresh it." -msgstr "Pas clair? Rafraîchissez-le." +msgstr "Pas clair ? Rafraîchissez-le." #: seahub/templates/registration/login.html:29 msgid "Incorrect email or password" @@ -4938,7 +4939,7 @@ msgstr "Votre mot de passe a été modifié avec succès." #: seahub/templates/registration/password_change_form.html:3 #: seahub/templates/registration/password_change_form.html:11 msgid "Password Modification" -msgstr "Modification du mot de passe." +msgstr "Modification du mot de passe" #: seahub/templates/registration/password_change_form.html:14 msgid "Please update your password before continue." @@ -4967,7 +4968,7 @@ msgstr "Le mot de passe doit avoir au moins %(min_len)s caractères et contenir #: seahub/templates/registration/password_change_form.html:62 msgid "Current password cannot be blank" -msgstr "Le mot de passe actuel ne peut être vide." +msgstr "Le mot de passe actuel ne peut être vide" #: seahub/templates/registration/password_change_form.html:70 #: seahub/templates/registration/registration_form.html:92 @@ -4976,7 +4977,7 @@ msgstr "Le mot de passe actuel ne peut être vide." #: seahub/templates/sysadmin/sys_org_admin.html:94 #: seahub/templates/sysadmin/sys_useradmin.html:172 msgid "Please enter the password again" -msgstr "Veuillez réintroduire le mot de passe." +msgstr "Veuillez réintroduire le mot de passe" #: seahub/templates/registration/password_change_form.html:74 #: seahub/templates/registration/registration_form.html:96 @@ -4987,7 +4988,7 @@ msgstr "Les mots de passe ne correspondent pas" #: seahub/templates/registration/password_reset_complete.html:4 msgid "Successfully reset password" -msgstr "Mot de passe réinitialisé avec succès." +msgstr "Mot de passe réinitialisé avec succès" #: seahub/templates/registration/password_reset_complete.html:8 msgid "Successfully reset password." @@ -5020,7 +5021,7 @@ msgstr "Impossible de réinitialiser le mot de passe : ce lien n'est plus dispon #: seahub/templates/registration/password_reset_done.html:8 msgid "We've sent a password reset email to your mailbox." -msgstr "Un message de réinitialisation de votre mot de passe a été envoyé dans votre boite aux lettres" +msgstr "Un message de réinitialisation de votre mot de passe a été envoyé dans votre boîte mail." #: seahub/templates/registration/password_reset_email.html:12 #, python-format @@ -5086,7 +5087,7 @@ msgstr "Date de suppression" #: seahub/templates/repo_dir_recycle_view.html:66 msgid "Clear files in trash and history:" -msgstr "Nettoyer les fichiers dans la corbeille et l'historique" +msgstr "Nettoyer les fichiers dans la corbeille et l'historique :" #: seahub/templates/repo_dir_recycle_view.html:68 msgid "3 days ago" @@ -5162,7 +5163,7 @@ msgstr "Partagé par : " #: seahub/templates/shared_file_view.html:36 msgid "Save to..." -msgstr "Enregistrer sous..." +msgstr "Enregistrer sous ..." #: seahub/templates/shared_file_view.html:51 msgid "Save To:" @@ -5192,15 +5193,15 @@ msgstr "Votre compte a bien été créé avec succès, veuillez patienter le tem #: seahub/templates/snippets/add_file_js.html:15 msgid "You don't have any library at present" -msgstr "Vous n'avez aucune bibliothèques." +msgstr "Vous n'avez aucune bibliothèque." #: seahub/templates/snippets/avatar_upload_js.html:40 msgid " is not supported. Please choose an image file." -msgstr " n\\'est pas pris en charge. Veuillez choisir un fichier image." +msgstr " n'est pas pris en charge. Veuillez choisir un fichier image." #: seahub/templates/snippets/avatar_upload_js.html:45 msgid " is not supported. File extensions can only be " -msgstr " n\\'est pas pris en charge. Les extensions de fichier peuvent seulement être " +msgstr " n'est pas pris en charge. Les extensions de fichier peuvent seulement être " #: seahub/templates/snippets/avatar_upload_js.html:52 msgid " is too large. Allowed maximum size is 1MB." @@ -5298,7 +5299,7 @@ msgstr "Échec de conversion du document." #: seahub/templates/snippets/office_convert_js.html:80 msgid "Failed to load this page." -msgstr "Impossible de charger la page" +msgstr "Impossible de charger la page." #: seahub/templates/snippets/password_strength_js.html:42 msgid "too weak" @@ -5423,7 +5424,7 @@ msgstr "Utilisé :" #: seahub/templates/snippets/space_and_traffic.html:19 msgid "Traffic this month:" -msgstr "Bande passante de ce mois:" +msgstr "Bande passante de ce mois :" #: seahub/templates/snippets/space_and_traffic.html:23 msgid "Payment" @@ -5463,7 +5464,7 @@ msgstr "Pas de correspondance" #: seahub/templates/sysadmin/repoadmin_js.html:21 msgid "Searching..." -msgstr "Recherche en cours..." +msgstr "Recherche en cours ..." #: seahub/templates/sysadmin/repoadmin_js.html:22 msgid "Loading failed" @@ -5480,7 +5481,7 @@ msgstr "Supprimer la bibliothèque" #: seahub/templates/sysadmin/repoadmin_js.html:58 msgid "Successfully deleted 1 item." -msgstr "" +msgstr "1 objet supprimé avec succès." #: seahub/templates/sysadmin/settings.html:11 msgid "" @@ -5495,7 +5496,7 @@ msgstr "Confirmer le mot de passe pour continuer" #: seahub/templates/sysadmin/sudo_mode.html:13 msgid "Incorrect password" -msgstr "Mot de passe erroné" +msgstr "Mot de passe incorrect" #: seahub/templates/sysadmin/sudo_mode.html:24 msgid "Tip:" @@ -5518,7 +5519,7 @@ msgstr "Ajouter une institution" #: seahub/templates/sysadmin/sys_inst_admin.html:60 #: seahub/templates/sysadmin/sys_org_admin.html:78 msgid "Name can not be blank" -msgstr "Nom ne peut pas être vide." +msgstr "Le nom ne peut pas être vide" #: seahub/templates/sysadmin/sys_inst_admin.html:66 msgid "Delete Institution" @@ -5593,7 +5594,7 @@ msgstr "Préfixe de l'adresse" #: seahub/templates/sysadmin/sys_org_admin.html:30 msgid "Owner can use admin panel in an organization, must be a new account." -msgstr "Le propriétaire peut utiliser le panneau d’administration dans une organisation et doit être un nouveau compte." +msgstr "Le propriétaire peut utiliser le panneau d'administration dans une organisation et doit être un nouveau compte." #: seahub/templates/sysadmin/sys_org_admin.html:49 msgid "None." @@ -5698,7 +5699,7 @@ msgstr "Êtes-vous certain de vouloir réinitialiser le mot de passe de %s ?" #: seahub/templates/sysadmin/sys_org_search.html:9 msgid "Tip: you can search by keyword in name or creator or both." -msgstr "Astuce: Vous pouvez rechercher par mot clés dans le nom ou le créateur ou dans les deux." +msgstr "Astuce : Vous pouvez rechercher par mot clés dans le nom ou le créateur ou dans les deux." #: seahub/templates/sysadmin/sys_org_set_quota_js.html:13 msgid "Quota can not be empty" @@ -5834,11 +5835,11 @@ msgstr "Importer des utilisateurs depuis un fichier CSV" #: seahub/templates/sysadmin/sys_useradmin.html:64 msgid "File format: user@mail.com,password,name,department,role,quota" -msgstr "" +msgstr "Format de fichier : utilisateur@mail.com,motdepasse,nom,département,rôle,quota" #: seahub/templates/sysadmin/sys_useradmin.html:65 msgid "Name, department, role and quota are optional." -msgstr "" +msgstr "Nom, département, rôle et quota sont optionnels." #: seahub/templates/sysadmin/sys_useradmin.html:67 msgid "Please choose a CSV file" @@ -5847,7 +5848,7 @@ msgstr "Veuillez choisir une fichier CSV" #: seahub/templates/sysadmin/sys_useradmin.html:92 #, python-format msgid "A new server version %(v)s is available." -msgstr "Une nouvelle version %(v)s est disponible." +msgstr "Une nouvelle version serveur %(v)s est disponible." #: seahub/templates/sysadmin/sys_useradmin.html:135 #: seahub/templates/sysadmin/sys_useradmin.html:148 @@ -5925,7 +5926,7 @@ msgstr "Le compte %(user)s est bloqué suite à de trop nombreux échecs de conn msgid "" "Your password on %(site_name)s has been reset. Now it is %(password)s. " "Please change it as soon as possible. " -msgstr "Votre mot de passe sur %(site_name)s a été réinitialisé. votre mot de passe est maintenant %(password)s. Veuillez le changer dès que possible." +msgstr "Votre mot de passe sur %(site_name)s a été réinitialisé. Votre mot de passe est maintenant %(password)s. Veuillez le changer dès que possible." #: seahub/templates/sysadmin/useradmin_js.html:14 #, python-format @@ -6028,19 +6029,19 @@ msgstr "ZIP" #: seahub/templates/view_shared_dir.html:167 msgid "Close (Esc)" -msgstr "Fermer (Esc)" +msgstr "Fermer (Échap)" #: seahub/templates/view_shared_dir.html:168 msgid "Loading..." -msgstr "Chargement..." +msgstr "Chargement ..." #: seahub/templates/view_shared_dir.html:171 msgid "Previous (Left arrow key)" -msgstr "Précédent (flèche gauche)" +msgstr "Précédent (Flèche gauche)" #: seahub/templates/view_shared_dir.html:172 msgid "Next (Right arrow key)" -msgstr "Suivant (flèche gauche)" +msgstr "Suivant (Flèche droite)" #: seahub/templates/view_shared_dir.html:173 #, python-format @@ -6058,7 +6059,7 @@ msgstr " L'image n'a pu être chargé #: seahub/templates/view_shared_dir.html:197 msgid "Packaging..." -msgstr "Packaging..." +msgstr "Packaging ..." #: seahub/templates/view_shared_upload_link.html:8 #, python-format @@ -6099,7 +6100,7 @@ msgstr "La taille du fichier doit être plus petite que %(max_file_size)s" #: seahub/templates/view_shared_upload_link.html:74 msgid "File is too big" -msgstr "Le fichier est trop volumineux." +msgstr "Le fichier est trop gros" #: seahub/templates/view_shared_upload_link.html:75 msgid "File is too small" @@ -6123,7 +6124,7 @@ msgstr "Résultat d'envoi du fichier vide" #: seahub/templates/view_shared_upload_link.html:82 msgid "uploaded" -msgstr "Importé" +msgstr "Envoyé" #: seahub/templates/view_shared_upload_link.html:83 msgid "canceled" @@ -6151,15 +6152,15 @@ msgstr "Pages du wiki personnel" #: seahub/thumbnail/views.py:46 seahub/thumbnail/views.py:154 msgid "Invalid arguments." -msgstr "Arguments non valides" +msgstr "Arguments non valides." #: seahub/thumbnail/views.py:63 seahub/thumbnail/views.py:170 msgid "Failed to create thumbnail." -msgstr "Échec de la création de la vignette" +msgstr "Échec de la création de la vignette." #: seahub/thumbnail/views.py:136 msgid "Invalid token." -msgstr "Token non valide" +msgstr "Token non valide." #: seahub/utils/__init__.py:128 msgid "permission error" @@ -6219,7 +6220,7 @@ msgstr "Erreur interne" #: seahub/views/__init__.py:986 #, python-format msgid "Unable to download directory \"%s\": size is too large." -msgstr "Impossible de télécharger le dossier \"%s\" : cet élément est trop volumineux." +msgstr "Impossible de télécharger le dossier \"%s\" : La taille est trop grande." #: seahub/views/__init__.py:1002 #, python-format @@ -6236,7 +6237,7 @@ msgstr "Désactivation de \"Wiki personnel\" réussie." #: seahub/views/ajax.py:99 msgid "You don't have permission to access the library." -msgstr "Vous n'avez pas l'autorisation d’accéder à la bibliothèque" +msgstr "Vous n'avez pas l'autorisation d’accéder à la bibliothèque." #: seahub/views/ajax.py:107 msgid "No path." @@ -6385,7 +6386,7 @@ msgstr "Le groupe n'existe pas." #: seahub/views/ajax.py:2178 msgid "Failed, file is too large" -msgstr "Échec, Le fichier est trop volumineux" +msgstr "Échec, le fichier est trop grand" #: seahub/views/file.py:143 msgid "HTTPError: failed to open file online" @@ -6401,7 +6402,7 @@ msgstr "L'encodage que vous avez choisi n'est pas approprié." #: seahub/views/file.py:171 seahub/views/file.py:174 msgid "Unknown file encoding" -msgstr "Encodage de fichier inconnu." +msgstr "Encodage de fichier inconnu" #: seahub/views/file.py:294 seahub/views/file.py:303 #, python-format @@ -6410,7 +6411,7 @@ msgstr "La taille du fichier dépasse %s, il ne peut donc pas être visionné en #: seahub/views/file.py:318 msgid "The library is encrypted, can not open file online." -msgstr "La bibliothèque est chiffrée. Elle ne peut pas être ouverte en ligne" +msgstr "La bibliothèque est chiffrée. Elle ne peut pas être ouverte en ligne." #: seahub/views/file.py:396 seahub/views/file.py:657 seahub/views/file.py:672 #: seahub/views/file.py:690 @@ -6427,7 +6428,7 @@ msgstr "Impossible de télécharger le fichier, chemin de fichier erroné" #: seahub/views/file.py:731 msgid "Unable to download file, share link traffic is used up." -msgstr "Impossible de télécharger le fichier, le volume de transfert du lien de partage est dépassé" +msgstr "Impossible de télécharger le fichier, le volume de transfert du lien de partage est dépassé." #: seahub/views/file.py:794 msgid "Unable to view raw file, share link traffic is used up." @@ -6574,7 +6575,7 @@ msgstr "Impossible de renommer l'organisation" #: seahub/views/sysadmin.py:1228 seahub/views/sysadmin.py:1645 #: seahub/views/sysadmin.py:1741 msgid "Successfully deleted." -msgstr "Supprimé avec succès" +msgstr "Supprimé avec succès." #: seahub/views/sysadmin.py:1534 msgid "Failed to transfer, invalid arguments." @@ -6605,12 +6606,12 @@ msgstr "Échec de la suppression, veuillez réessayer plus tard." #: seahub/views/sysadmin.py:1775 #, python-format msgid "Successfully set %s as admin." -msgstr "%s défini avec succès en tant qu’administrateur." +msgstr "%s défini avec succès en tant qu'administrateur." #: seahub/views/sysadmin.py:1777 #, python-format msgid "Failed to set %s as admin: user does not exist." -msgstr "Impossible de définir %s en tant qu’administrateur : l'utilisateur n'existe pas." +msgstr "Impossible de définir %s en tant qu'administrateur : l'utilisateur n'existe pas." #: seahub/views/sysadmin.py:1874 msgid "Import succeeded" diff --git a/locale/fr/LC_MESSAGES/djangojs.po b/locale/fr/LC_MESSAGES/djangojs.po index 9738902ccc..084a740745 100644 --- a/locale/fr/LC_MESSAGES/djangojs.po +++ b/locale/fr/LC_MESSAGES/djangojs.po @@ -5,6 +5,7 @@ # Translators: # EricLF44 , 2015 # LowMemory, 2016 +# FLEURY Kévin , 2017 # Gaspard , 2016-2017 # Gilles Chauvin , 2016 # jcbeylot78, 2015 @@ -13,8 +14,8 @@ msgstr "" "Project-Id-Version: seahub\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2017-02-17 10:30+0800\n" -"PO-Revision-Date: 2017-02-17 02:31+0000\n" -"Last-Translator: zheng xie \n" +"PO-Revision-Date: 2017-03-01 11:06+0000\n" +"Last-Translator: FLEURY Kévin \n" "Language-Team: French (http://www.transifex.com/haiwen/seahub/language/fr/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" @@ -104,7 +105,7 @@ msgstr "Lecture seulement" #: static/scripts/sysadmin-app/views/group-members.js:96 #: static/scripts/sysadmin-app/views/groups.js:100 msgid "Please check the network." -msgstr "Vérifier le réseau." +msgstr "Veuillez vérifier le réseau." #: static/scripts/app/views/details.js:47 msgid "New files" @@ -183,7 +184,7 @@ msgstr "Dossiers supprimés" #: static/scripts/sysadmin-app/views/system-repo.js:59 #: static/scripts/sysadmin-app/views/trash-repos.js:142 msgid "Failed. Please check the network." -msgstr "Échec. Vérifiez le réseau" +msgstr "Échec. Veuillez vérifier le réseau." #: static/scripts/app/views/device.js:42 msgid "Unlink device" @@ -195,12 +196,12 @@ msgstr "Êtes-vous certain de vouloir supprimer le lien de l'appareil ?" #: static/scripts/app/views/device.js:44 msgid "Delete files from this device the next time it comes online." -msgstr "Supprimer les fichiers de cet appareil la prochaine fois q'uil est en ligne." +msgstr "Supprimer les fichiers de cet appareil la prochaine fois qu'il est en ligne." #: static/scripts/app/views/device.js:53 static/scripts/app/views/device.js:73 #: static/scripts/sysadmin-app/views/device.js:44 msgid "Successfully unlink %(name)s." -msgstr "Le lien %(name)s a été annulé avec succès" +msgstr "Le lien %(name)s a été annulé avec succès." #: static/scripts/app/views/dialogs/dirent-mvcp.js:50 msgid "Move {placeholder} to:" @@ -208,7 +209,7 @@ msgstr "Déplacer {placeholder} vers :" #: static/scripts/app/views/dialogs/dirent-mvcp.js:50 msgid "Copy {placeholder} to:" -msgstr "Copier {placeholder} vers:" +msgstr "Copier {placeholder} vers :" #: static/scripts/app/views/dialogs/dirent-mvcp.js:89 msgid "Moving %(name)s" @@ -220,7 +221,7 @@ msgstr "Copie de %(name)s" #: static/scripts/app/views/dialogs/dirent-mvcp.js:105 msgid "Saving..." -msgstr "Enregistrement..." +msgstr "Sauvegarde ..." #: static/scripts/app/views/dialogs/dirent-mvcp.js:119 msgid "Failed." @@ -355,22 +356,22 @@ msgstr "Liens de partage pour {placeholder}" #: static/scripts/app/views/dir.js:50 #: static/scripts/app/views/starred-file.js:60 msgid "Close (Esc)" -msgstr "Fermer (Esc)" +msgstr "Fermer (Échap)" #: static/scripts/app/views/dir.js:51 #: static/scripts/app/views/starred-file.js:61 msgid "Loading..." -msgstr "Chargement..." +msgstr "Chargement ..." #: static/scripts/app/views/dir.js:54 #: static/scripts/app/views/starred-file.js:64 msgid "Previous (Left arrow key)" -msgstr "Précédent (flèche gauche)" +msgstr "Précédent (Flèche gauche)" #: static/scripts/app/views/dir.js:55 #: static/scripts/app/views/starred-file.js:65 msgid "Next (Right arrow key)" -msgstr "Suivant (flèche droite)" +msgstr "Suivant (Flèche droite)" #: static/scripts/app/views/dir.js:56 #: static/scripts/app/views/starred-file.js:66 @@ -389,14 +390,14 @@ msgstr "L'image ne peut être chargée." #: static/scripts/app/views/dir.js:314 msgid "Password is required." -msgstr "Le mot de passe est obligatoire" +msgstr "Le mot de passe est obligatoire." #: static/scripts/app/views/dir.js:501 static/scripts/app/views/dir.js:559 #: static/scripts/app/views/groups.js:112 #: static/scripts/app/views/invitations.js:54 #: static/scripts/sysadmin-app/views/dir.js:82 msgid "It is required." -msgstr "c'est obligatoire." +msgstr "C'est obligatoire." #: static/scripts/app/views/dir.js:565 msgid "Only an extension there, please input a name." @@ -404,7 +405,7 @@ msgstr "Une seule extension ici, saisissez un nom." #: static/scripts/app/views/dir.js:813 static/scripts/app/views/dir.js:953 msgid "Processing..." -msgstr "Traitement en cours..." +msgstr "Traitement en cours ..." #: static/scripts/app/views/dir.js:850 msgid "Successfully deleted %(name)s." @@ -452,7 +453,7 @@ msgstr " %(name)s déplacé avec succès." #: static/scripts/app/views/dir.js:999 msgid "Successfully moved %(name)s and 1 other item." -msgstr " %(name)s et 1 autre élément déplacés avec succès" +msgstr " %(name)s et 1 autre élément déplacés avec succès." #: static/scripts/app/views/dir.js:1001 msgid "Successfully moved %(name)s and %(amount)s other items." @@ -472,11 +473,11 @@ msgstr "%(name)s et %(amount)s autres éléments copiés avec succès." #: static/scripts/app/views/dir.js:1021 msgid "Internal error. Failed to move %(name)s and %(amount)s other item(s)." -msgstr "Erreur interne. Échec du déplacement de %(name)s et %(amount)s autres élément(s)." +msgstr "Erreur interne. Échec du déplacement de %(name)s et %(amount)s autre(s) élément(s)." #: static/scripts/app/views/dir.js:1023 msgid "Internal error. Failed to move %(name)s." -msgstr " Erreur interne. Échec du déplacement de %(name)s " +msgstr " Erreur interne. Échec du déplacement de %(name)s." #: static/scripts/app/views/dir.js:1027 msgid "Internal error. Failed to copy %(name)s and %(amount)s other item(s)." @@ -484,7 +485,7 @@ msgstr "Erreur interne. Échec de la copie de %(name)s et %(amount)s autres él #: static/scripts/app/views/dir.js:1029 msgid "Internal error. Failed to copy %(name)s." -msgstr "Erreur interne. Échec de la copie de %(name)s" +msgstr "Erreur interne. Échec de la copie de %(name)s." #: static/scripts/app/views/dir.js:1069 msgid "Moving file %(index)s of %(total)s" @@ -514,7 +515,7 @@ msgstr "%(name)s supprimé avec succès" #: static/scripts/app/views/fileupload.js:10 msgid "File is too big" -msgstr "Le fichier est trop volumineux" +msgstr "Le fichier est trop gros" #: static/scripts/app/views/fileupload.js:11 msgid "File is too small" @@ -575,7 +576,7 @@ msgstr "Supprimer" #: static/scripts/app/views/fileupload.js:46 msgid "File Uploading..." -msgstr "Envoi du fichier en cours..." +msgstr "Envoi du fichier en cours ..." #: static/scripts/app/views/fileupload.js:47 msgid "File Upload complete" @@ -599,11 +600,11 @@ msgstr "Échec de la mise à jour de l'url" #: static/scripts/app/views/fileupload.js:233 msgid "Replace file {filename}?" -msgstr "Remplacer le fichier {filename}?" +msgstr "Remplacer le fichier {filename} ?" #: static/scripts/app/views/fileupload.js:259 msgid "File is locked" -msgstr "Le fichier est vérouillé" +msgstr "Le fichier est verrouillé" #: static/scripts/app/views/folder-perm.js:48 msgid "Set {placeholder}'s permission" @@ -659,7 +660,7 @@ msgstr "Supprimer le groupe" #: static/scripts/app/views/group-settings.js:308 msgid "Really want to dismiss this group?" -msgstr "Voulez-vous réellement supprimer ce groupe?" +msgstr "Voulez-vous réellement supprimer ce groupe ?" #: static/scripts/app/views/group-settings.js:341 msgid "Quit Group" @@ -739,7 +740,7 @@ msgstr "saisissez un nombre de jours valide" #: static/scripts/app/views/share.js:312 msgid "Please input at least an email." -msgstr "Saisissez au moins une adresse mel " +msgstr "Saisissez au moins une adresse e-mail." #: static/scripts/app/views/share.js:329 msgid "Successfully sent to {placeholder}" @@ -776,7 +777,7 @@ msgstr "Pas de correspondance" #: static/scripts/common.js:597 static/scripts/common.js:668 msgid "Searching..." -msgstr "Recherche en cours..." +msgstr "Recherche en cours ..." #: static/scripts/common.js:598 static/scripts/common.js:669 msgid "Loading failed" @@ -788,7 +789,7 @@ msgstr "Recherche de groupes" #: static/scripts/common.js:977 msgid "Packaging..." -msgstr "Packaging..." +msgstr "Packaging ..." #: static/scripts/sysadmin-app/views/device-errors.js:39 msgid "Successfully clean all errors." @@ -796,28 +797,28 @@ msgstr "Toutes les erreurs ont été effacées avec succès." #: static/scripts/sysadmin-app/views/group-member.js:81 msgid "Delete Member" -msgstr "" +msgstr "Supprimer le membre" #: static/scripts/sysadmin-app/views/group-member.js:95 msgid "Successfully deleted member {placeholder}" -msgstr "" +msgstr "Membre supprimé avec succès {placeholder}" #: static/scripts/sysadmin-app/views/group-members.js:51 msgid "Email is required." -msgstr "" +msgstr "L'e-mail est requis." #: static/scripts/sysadmin-app/views/group-repo.js:28 msgid "Unshare Library" -msgstr "" +msgstr "Bibliothèque non partagée" #: static/scripts/sysadmin-app/views/group-repo.js:29 #, javascript-format msgid "Are you sure you want to unshare %s ?" -msgstr "" +msgstr "Êtes-vous certain de ne plus vouloir partager %s ?" #: static/scripts/sysadmin-app/views/group-repo.js:42 msgid "Successfully unshared library {placeholder}" -msgstr "" +msgstr "Partage de {placeholder} supprimé avec succès" #: static/scripts/sysadmin-app/views/group.js:30 msgid "Delete Group" diff --git a/locale/lv/LC_MESSAGES/django.po b/locale/lv/LC_MESSAGES/django.po index d438ce9d1f..da8eb5c2ba 100644 --- a/locale/lv/LC_MESSAGES/django.po +++ b/locale/lv/LC_MESSAGES/django.po @@ -3,14 +3,14 @@ # This file is distributed under the same license as the PACKAGE package. # # Translators: -# Qubit Bit, 2014-2016 +# Qubit Bit, 2014-2017 msgid "" msgstr "" "Project-Id-Version: seahub\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2017-02-17 10:30+0800\n" -"PO-Revision-Date: 2017-02-17 02:31+0000\n" -"Last-Translator: zheng xie \n" +"PO-Revision-Date: 2017-02-22 07:48+0000\n" +"Last-Translator: Qubit Bit\n" "Language-Team: Latvian (http://www.transifex.com/haiwen/seahub/language/lv/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" @@ -3876,15 +3876,15 @@ msgstr "jaunināšana uz profesionālo izdevumu" #: seahub/templates/js/sysadmin-templates.html:117 msgid "Storage Used" -msgstr "" +msgstr "Krātuves izlietojums" #: seahub/templates/js/sysadmin-templates.html:120 msgid "Total Devices" -msgstr "" +msgstr "Kopā ierīces" #: seahub/templates/js/sysadmin-templates.html:120 msgid "Current Connected Devices" -msgstr "" +msgstr "Tagad savienotas ierīces" #: seahub/templates/js/sysadmin-templates.html:124 msgid "Limits" @@ -4049,7 +4049,7 @@ msgstr "Nav grupas" #: seahub/templates/js/sysadmin-templates.html:562 msgid "Search Group" -msgstr "" +msgstr "Meklēt grupu" #: seahub/templates/js/sysadmin-templates.html:564 msgid "Tip: you can search by keyword in name." @@ -4106,7 +4106,7 @@ msgstr "Dalībnieki" #: seahub/templates/js/sysadmin-templates.html:738 #: seahub/templates/js/sysadmin-templates.html:746 msgid "Add Member" -msgstr "" +msgstr "Pievienot dalībnieku" #: seahub/templates/js/sysadmin-templates.html:762 #: seahub/templates/js/templates.html:914 @@ -4122,7 +4122,7 @@ msgstr "Atcelt koplietošanu" #: seahub/templates/js/sysadmin-templates.html:808 msgid "No members" -msgstr "" +msgstr "Nav dalībnieka" #: seahub/templates/js/templates.html:4 seahub/templates/js/templates.html:771 #: seahub/templates/libraries.html:14 @@ -4131,11 +4131,11 @@ msgstr "Jauna bibliotēka" #: seahub/templates/js/templates.html:8 msgid "Template" -msgstr "" +msgstr "Šablons" #: seahub/templates/js/templates.html:10 msgid "Select a template" -msgstr "" +msgstr "Atlasīt šablonu" #: seahub/templates/js/templates.html:18 msgid "Share Permission" @@ -5777,7 +5777,7 @@ msgstr "LDAP(importēts)" #: seahub/templates/sysadmin/useradmin_table.html:12 #: seahub/templates/sysadmin/userinfo.html:73 msgid "Space Used / Quota" -msgstr "" +msgstr "Izlietots / Kvota" #: seahub/templates/sysadmin/sys_user_admin_ldap_imported.html:30 #: seahub/views/sysadmin.py:279 seahub/views/sysadmin.py:283 @@ -5788,7 +5788,7 @@ msgstr "Pēdējā pieteikšanās" #: seahub/templates/sysadmin/useradmin_table.html:82 #: seahub/templates/sysadmin/userinfo.html:83 msgid "Edit Quota" -msgstr "" +msgstr "Rediģēt kvotu" #: seahub/templates/sysadmin/sys_user_admin_ldap_imported.html:90 msgid "No LDAP users have been imported" @@ -6453,11 +6453,11 @@ msgstr "Neizdevās eksportēšana uz Excel" #: seahub/views/sysadmin.py:278 seahub/views/sysadmin.py:282 msgid "Space Usage" -msgstr "" +msgstr "Izlietots" #: seahub/views/sysadmin.py:278 seahub/views/sysadmin.py:282 msgid "Space Quota" -msgstr "" +msgstr "Kvota" #: seahub/views/sysadmin.py:663 seahub/views/sysadmin.py:689 msgid "Failed to set quota: internal server error" diff --git a/locale/sv/LC_MESSAGES/django.po b/locale/sv/LC_MESSAGES/django.po index 505305b110..2e87ad9f8e 100644 --- a/locale/sv/LC_MESSAGES/django.po +++ b/locale/sv/LC_MESSAGES/django.po @@ -4,7 +4,7 @@ # # Translators: # Radapompa , 2015-2016 -# Radapompa , 2016 +# Radapompa , 2016-2017 # Robert Högberg , 2016 # tompa , 2014 # ugusta , 2014 @@ -13,8 +13,8 @@ msgstr "" "Project-Id-Version: seahub\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2017-02-17 10:30+0800\n" -"PO-Revision-Date: 2017-02-17 02:31+0000\n" -"Last-Translator: zheng xie \n" +"PO-Revision-Date: 2017-03-07 15:33+0000\n" +"Last-Translator: Radapompa \n" "Language-Team: Swedish (http://www.transifex.com/haiwen/seahub/language/sv/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" @@ -24,16 +24,16 @@ msgstr "" #: seahub/api2/endpoints/account.py:162 msgid "Name is too long (maximum is 64 characters)" -msgstr "" +msgstr "Namnet är för långt (max 64 tecken)" #: seahub/api2/endpoints/account.py:166 seahub/forms.py:43 #: seahub/profile/forms.py:17 seahub/templates/sysadmin/userinfo.html:317 msgid "Name should not include '/'." -msgstr "" +msgstr "Namn ska inte inkludera '/'." #: seahub/api2/endpoints/account.py:173 msgid "Department is too long (maximum is 512 characters)" -msgstr "" +msgstr "Avdelning är för långt (max 512 tecken)" #: seahub/api2/endpoints/account.py:180 seahub/forms.py:154 msgid "Space quota can't be empty" @@ -41,7 +41,7 @@ msgstr "Utrymmeskvot måste anges" #: seahub/api2/endpoints/account.py:186 msgid "Must be an integer that is greater than or equal to 0." -msgstr "" +msgstr "Måste vara en siddra som är större eller lika med 0." #: seahub/api2/endpoints/account.py:190 seahub/forms.py:155 msgid "Space quota is too low (minimum value is 0)" @@ -108,12 +108,12 @@ msgstr "Kan inte hitta användaren %s i organisationen." #: seahub/api2/endpoints/invitations.py:53 msgid "The email address is not allowed to be invited as a guest." -msgstr "" +msgstr "Mejladressen är inte tillåten att bli inbjuden som gäst." #: seahub/api2/endpoints/invitations.py:58 #, python-format msgid "%s is already invited." -msgstr "" +msgstr "%s är redan inbjuden." #: seahub/api2/endpoints/invitations.py:68 seahub/base/accounts.py:601 #, python-format @@ -439,7 +439,7 @@ msgstr "Detta värde måste ha längden 40" #: seahub/base/accounts.py:591 seahub/forms.py:29 #: seahub/views/sysadmin.py:1802 msgid "The number of users exceeds the limit." -msgstr "" +msgstr "Antalet användare överskrider begränsningen." #: seahub/base/accounts.py:595 msgid "Enter a valid email address." @@ -2010,7 +2010,7 @@ msgstr "Sätt användarutrymme" #: seahub/templates/sysadmin/useradmin_table.html:113 #: seahub/templates/sysadmin/userinfo.html:105 msgid "An integer that is greater than or equal to 0." -msgstr "" +msgstr "En siffra som är större än eller lika med 0." #: seahub/institutions/templates/institutions/user_info.html:57 #: seahub/templates/sysadmin/sys_org_info_base.html:36 @@ -2691,7 +2691,7 @@ msgstr "Ta bort systemmeddelande" msgid "" "Virus detected in file %(file_name)s during regular scanning." -msgstr "" +msgstr "Virus detekterat i filen %(file_name)s under en skannning." #: seahub/notifications/templates/notifications/notify_virus.html:20 msgid "Virus is detected on regular scanning. Please check the report at:" @@ -2955,7 +2955,7 @@ msgstr "Español de México" #: seahub/settings.py:149 msgid "Suomi" -msgstr "" +msgstr "Finska" #: seahub/settings.py:150 msgid "français" @@ -3845,7 +3845,7 @@ msgstr "Sök katalog med ägare..." #: seahub/templates/js/sysadmin-templates.html:84 msgid "Search groups by name..." -msgstr "" +msgstr "Sök grupper via namn..." #: seahub/templates/js/sysadmin-templates.html:100 msgid "System Info" @@ -3873,15 +3873,15 @@ msgstr "Uppgradera till Pro Edition" #: seahub/templates/js/sysadmin-templates.html:117 msgid "Storage Used" -msgstr "" +msgstr "Använt Utrymme" #: seahub/templates/js/sysadmin-templates.html:120 msgid "Total Devices" -msgstr "" +msgstr "Total Enheter" #: seahub/templates/js/sysadmin-templates.html:120 msgid "Current Connected Devices" -msgstr "" +msgstr "Nuvarande Anslutna Enheter" #: seahub/templates/js/sysadmin-templates.html:124 msgid "Limits" @@ -4046,15 +4046,15 @@ msgstr "Inga grupper" #: seahub/templates/js/sysadmin-templates.html:562 msgid "Search Group" -msgstr "" +msgstr "Sök Grupp" #: seahub/templates/js/sysadmin-templates.html:564 msgid "Tip: you can search by keyword in name." -msgstr "" +msgstr "Tips: du kan söka genom att ange nyckelord namnet." #: seahub/templates/js/sysadmin-templates.html:593 msgid "(If left blank, owner will be admin)" -msgstr "" +msgstr "(Om det lämnas blankt, kommer ägaren bli admin)" #: seahub/templates/js/sysadmin-templates.html:659 #: seahub/templates/js/templates.html:446 @@ -4103,7 +4103,7 @@ msgstr "Medlemmar" #: seahub/templates/js/sysadmin-templates.html:738 #: seahub/templates/js/sysadmin-templates.html:746 msgid "Add Member" -msgstr "" +msgstr "Lägg till medlem" #: seahub/templates/js/sysadmin-templates.html:762 #: seahub/templates/js/templates.html:914 @@ -4119,7 +4119,7 @@ msgstr "Sluta dela" #: seahub/templates/js/sysadmin-templates.html:808 msgid "No members" -msgstr "" +msgstr "Inga Medlemmar" #: seahub/templates/js/templates.html:4 seahub/templates/js/templates.html:771 #: seahub/templates/libraries.html:14 @@ -4128,11 +4128,11 @@ msgstr "Ny katalog" #: seahub/templates/js/templates.html:8 msgid "Template" -msgstr "" +msgstr "Mall" #: seahub/templates/js/templates.html:10 msgid "Select a template" -msgstr "" +msgstr "Välj en mall" #: seahub/templates/js/templates.html:18 msgid "Share Permission" @@ -5088,7 +5088,7 @@ msgstr "1 månad sedan" #: seahub/templates/repo_dir_recycle_view.html:169 msgid "Successfully restored 1 item." -msgstr "" +msgstr "Lyckades återställa 1 fil." #: seahub/templates/repo_history.html:14 #, python-format @@ -5466,7 +5466,7 @@ msgstr "Ta bort katalog" #: seahub/templates/sysadmin/repoadmin_js.html:58 msgid "Successfully deleted 1 item." -msgstr "" +msgstr "Lyckades ta bort 1 fil." #: seahub/templates/sysadmin/settings.html:11 msgid "" @@ -5774,7 +5774,7 @@ msgstr "LDAP(importerad)" #: seahub/templates/sysadmin/useradmin_table.html:12 #: seahub/templates/sysadmin/userinfo.html:73 msgid "Space Used / Quota" -msgstr "" +msgstr "Utrymme Använt / Kvot" #: seahub/templates/sysadmin/sys_user_admin_ldap_imported.html:30 #: seahub/views/sysadmin.py:279 seahub/views/sysadmin.py:283 @@ -5785,7 +5785,7 @@ msgstr "Senast Inloggning" #: seahub/templates/sysadmin/useradmin_table.html:82 #: seahub/templates/sysadmin/userinfo.html:83 msgid "Edit Quota" -msgstr "" +msgstr "Ändra Kvot" #: seahub/templates/sysadmin/sys_user_admin_ldap_imported.html:90 msgid "No LDAP users have been imported" @@ -5802,11 +5802,11 @@ msgstr "Lägg till användare" #: seahub/templates/sysadmin/sys_useradmin.html:36 msgid "Name(optional)" -msgstr "" +msgstr "Namn(valfritt)" #: seahub/templates/sysadmin/sys_useradmin.html:38 msgid "Department(optional)" -msgstr "" +msgstr "Avdelning(Valfritt)" #: seahub/templates/sysadmin/sys_useradmin.html:42 msgid "" @@ -5820,11 +5820,11 @@ msgstr "Importera användare från en CSV fil" #: seahub/templates/sysadmin/sys_useradmin.html:64 msgid "File format: user@mail.com,password,name,department,role,quota" -msgstr "" +msgstr "Filformat: användare@mejl.com,lösenord,namn,avdelning,roll,kvot" #: seahub/templates/sysadmin/sys_useradmin.html:65 msgid "Name, department, role and quota are optional." -msgstr "" +msgstr "Namn, avdelning, roll och kvot är valfria." #: seahub/templates/sysadmin/sys_useradmin.html:67 msgid "Please choose a CSV file" @@ -5924,11 +5924,11 @@ msgstr "Organisation" #: seahub/templates/sysadmin/userinfo.html:88 msgid "Set user name" -msgstr "" +msgstr "Sätt användarens namn" #: seahub/templates/sysadmin/userinfo.html:95 msgid "Set user department" -msgstr "" +msgstr "Sätt användarens avdelning" #: seahub/templates/sysadmin/userinfo.html:168 msgid "Share From" @@ -6260,7 +6260,7 @@ msgstr "Felaktig destination" #: seahub/views/ajax.py:678 seahub/views/ajax.py:941 msgid "Out of quota." -msgstr "" +msgstr "Slut på kvoten." #: seahub/views/ajax.py:718 seahub/views/ajax.py:797 #, python-format @@ -6450,11 +6450,11 @@ msgstr "Misslyckades att exportera till Excel" #: seahub/views/sysadmin.py:278 seahub/views/sysadmin.py:282 msgid "Space Usage" -msgstr "" +msgstr "Använt utrymme" #: seahub/views/sysadmin.py:278 seahub/views/sysadmin.py:282 msgid "Space Quota" -msgstr "" +msgstr "Utrymmeskvot" #: seahub/views/sysadmin.py:663 seahub/views/sysadmin.py:689 msgid "Failed to set quota: internal server error" diff --git a/locale/sv/LC_MESSAGES/djangojs.po b/locale/sv/LC_MESSAGES/djangojs.po index 19878fb809..ba4ffbacc7 100644 --- a/locale/sv/LC_MESSAGES/djangojs.po +++ b/locale/sv/LC_MESSAGES/djangojs.po @@ -4,15 +4,15 @@ # # Translators: # Radapompa , 2016 -# Radapompa , 2016 +# Radapompa , 2016-2017 # Robert Högberg , 2016 msgid "" msgstr "" "Project-Id-Version: seahub\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2017-02-17 10:30+0800\n" -"PO-Revision-Date: 2017-02-17 02:31+0000\n" -"Last-Translator: zheng xie \n" +"PO-Revision-Date: 2017-03-07 14:56+0000\n" +"Last-Translator: Radapompa \n" "Language-Team: Swedish (http://www.transifex.com/haiwen/seahub/language/sv/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" @@ -794,28 +794,28 @@ msgstr "Rensade alla meddelanden" #: static/scripts/sysadmin-app/views/group-member.js:81 msgid "Delete Member" -msgstr "" +msgstr "Ta bort medlem" #: static/scripts/sysadmin-app/views/group-member.js:95 msgid "Successfully deleted member {placeholder}" -msgstr "" +msgstr "Lyckades ta bort medlem {placeholder}" #: static/scripts/sysadmin-app/views/group-members.js:51 msgid "Email is required." -msgstr "" +msgstr "Mejladress krävs." #: static/scripts/sysadmin-app/views/group-repo.js:28 msgid "Unshare Library" -msgstr "" +msgstr "Sluta dela katalog" #: static/scripts/sysadmin-app/views/group-repo.js:29 #, javascript-format msgid "Are you sure you want to unshare %s ?" -msgstr "" +msgstr "Är du säker på att du vill sluta dela %s ?" #: static/scripts/sysadmin-app/views/group-repo.js:42 msgid "Successfully unshared library {placeholder}" -msgstr "" +msgstr "Lyckades sluta dela katalogen {placeholder}" #: static/scripts/sysadmin-app/views/group.js:30 msgid "Delete Group" @@ -835,7 +835,7 @@ msgstr "Lyckades skicka gruppen." #: static/scripts/sysadmin-app/views/groups.js:79 msgid "Name is required." -msgstr "" +msgstr "Namn krävs." #: static/scripts/sysadmin-app/views/search-trash-repos.js:46 msgid "Delete Library By Owner" diff --git a/locale/zh_CN/LC_MESSAGES/django.po b/locale/zh_CN/LC_MESSAGES/django.po index 2e788fa0b2..dd7e3db645 100644 --- a/locale/zh_CN/LC_MESSAGES/django.po +++ b/locale/zh_CN/LC_MESSAGES/django.po @@ -14,7 +14,7 @@ msgstr "" "Project-Id-Version: seahub\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2017-02-17 10:30+0800\n" -"PO-Revision-Date: 2017-02-17 02:40+0000\n" +"PO-Revision-Date: 2017-03-25 02:29+0000\n" "Last-Translator: imwhatiam \n" "Language-Team: Chinese (China) (http://www.transifex.com/haiwen/seahub/language/zh_CN/)\n" "MIME-Version: 1.0\n" @@ -3602,7 +3602,7 @@ msgstr "我的资料库" #: seahub/templates/home_base.html:13 seahub/templates/js/templates.html:180 #: seahub/templates/js/templates.html:636 seahub/templates/libraries.html:29 msgid "Shared with me" -msgstr "私人共享" +msgstr "共享给我的" #: seahub/templates/home_base.html:15 seahub/templates/js/templates.html:176 #: seahub/templates/js/templates.html:641 seahub/templates/libraries.html:44 diff --git a/seahub/api2/authentication.py b/seahub/api2/authentication.py index 2ecaddb0dd..5e3e61eaa0 100644 --- a/seahub/api2/authentication.py +++ b/seahub/api2/authentication.py @@ -5,7 +5,7 @@ from rest_framework import status from rest_framework.authentication import BaseAuthentication from rest_framework.exceptions import APIException -import seaserv +from seaserv import ccnet_api from seahub.base.accounts import User from seahub.api2.models import Token, TokenV2 from seahub.api2.utils import get_client_ip @@ -78,7 +78,7 @@ class TokenAuthentication(BaseAuthentication): raise AuthenticationFailed('User inactive or deleted') if MULTI_TENANCY: - orgs = seaserv.get_orgs_by_user(token.user) + orgs = ccnet_api.get_orgs_by_user(token.user) if orgs: user.org = orgs[0] @@ -103,7 +103,7 @@ class TokenAuthentication(BaseAuthentication): raise AuthenticationFailed('User inactive or deleted') if MULTI_TENANCY: - orgs = seaserv.get_orgs_by_user(token.user) + orgs = ccnet_api.get_orgs_by_user(token.user) if orgs: user.org = orgs[0] diff --git a/seahub/api2/endpoints/admin/libraries.py b/seahub/api2/endpoints/admin/libraries.py index 8531e92ce2..7ce5617f03 100644 --- a/seahub/api2/endpoints/admin/libraries.py +++ b/seahub/api2/endpoints/admin/libraries.py @@ -28,8 +28,13 @@ except ImportError: logger = logging.getLogger(__name__) def get_repo_info(repo): + repo_owner = seafile_api.get_repo_owner(repo.repo_id) - org_repo_owner = seafile_api.get_org_repo_owner(repo.repo_id) + if not repo_owner: + try: + org_repo_owner = seafile_api.get_org_repo_owner(repo.repo_id) + except Exception: + org_repo_owner = None result = {} result['id'] = repo.repo_id diff --git a/seahub/api2/endpoints/admin/library_dirents.py b/seahub/api2/endpoints/admin/library_dirents.py index e6c3548a95..26e5949874 100644 --- a/seahub/api2/endpoints/admin/library_dirents.py +++ b/seahub/api2/endpoints/admin/library_dirents.py @@ -18,7 +18,7 @@ from seahub.utils.timeutils import timestamp_to_isoformat_timestr from seahub.views.sysadmin import can_view_sys_admin_repo from seahub.views.file import send_file_access_msg from seahub.utils import is_org_context, gen_file_get_url, \ - check_filename_with_rename + check_filename_with_rename, is_valid_dirent_name from seahub.views import get_system_default_repo_id from seahub.api2.authentication import TokenAuthentication @@ -128,7 +128,7 @@ class AdminLibraryDirents(APIView): return api_error(status.HTTP_404_NOT_FOUND, error_msg) obj_name = request.data.get('obj_name', None) - if not obj_name or not seafile_api.is_valid_filename(repo_id, obj_name): + if not obj_name or not is_valid_dirent_name(obj_name): error_msg = 'obj_name invalid.' return api_error(status.HTTP_400_BAD_REQUEST, error_msg) diff --git a/seahub/api2/endpoints/dir.py b/seahub/api2/endpoints/dir.py index c6c0a1fdac..c62c25a717 100644 --- a/seahub/api2/endpoints/dir.py +++ b/seahub/api2/endpoints/dir.py @@ -16,7 +16,7 @@ from seahub.api2.views import get_dir_recursively, \ get_dir_entrys_by_id from seahub.views import check_folder_permission -from seahub.utils import check_filename_with_rename +from seahub.utils import check_filename_with_rename, is_valid_dirent_name from seahub.utils.timeutils import timestamp_to_isoformat_timestr from seaserv import seafile_api @@ -160,6 +160,11 @@ class DirView(APIView): return api_error(status.HTTP_404_NOT_FOUND, error_msg) new_dir_name = os.path.basename(path) + + if not is_valid_dirent_name(new_dir_name): + return api_error(status.HTTP_400_BAD_REQUEST, + 'name invalid.') + new_dir_name = check_filename_with_rename(repo_id, parent_dir, new_dir_name) try: seafile_api.post_dir(repo_id, parent_dir, new_dir_name, username) @@ -188,10 +193,15 @@ class DirView(APIView): old_dir_name = os.path.basename(path) new_dir_name = request.data.get('newname', None) + if not new_dir_name: error_msg = 'newname invalid.' return api_error(status.HTTP_400_BAD_REQUEST, error_msg) + if not is_valid_dirent_name(new_dir_name): + return api_error(status.HTTP_400_BAD_REQUEST, + 'name invalid.') + if new_dir_name == old_dir_name: dir_info = self.get_dir_info(repo_id, path) resp = Response(dir_info) diff --git a/seahub/api2/endpoints/file.py b/seahub/api2/endpoints/file.py index ccf8f76fc4..1ff1151930 100644 --- a/seahub/api2/endpoints/file.py +++ b/seahub/api2/endpoints/file.py @@ -17,7 +17,7 @@ from seahub.api2.authentication import TokenAuthentication from seahub.api2.utils import api_error from seahub.utils import check_filename_with_rename, is_pro_version, \ - gen_file_upload_url + gen_file_upload_url, is_valid_dirent_name from seahub.utils.timeutils import timestamp_to_isoformat_timestr from seahub.views import check_folder_permission, check_file_lock @@ -152,6 +152,11 @@ class FileView(APIView): # create new empty file new_file_name = os.path.basename(path) + + if not is_valid_dirent_name(new_file_name): + return api_error(status.HTTP_400_BAD_REQUEST, + 'name invalid.') + new_file_name = check_filename_with_rename(repo_id, parent_dir, new_file_name) try: @@ -198,6 +203,10 @@ class FileView(APIView): error_msg = 'newname invalid.' return api_error(status.HTTP_400_BAD_REQUEST, error_msg) + if not is_valid_dirent_name(new_file_name): + return api_error(status.HTTP_400_BAD_REQUEST, + 'name invalid.') + if len(new_file_name) > MAX_UPLOAD_FILE_NAME_LEN: error_msg = 'newname is too long.' return api_error(status.HTTP_400_BAD_REQUEST, error_msg) diff --git a/seahub/api2/endpoints/repo_history.py b/seahub/api2/endpoints/repo_history.py new file mode 100644 index 0000000000..d9ebd879e8 --- /dev/null +++ b/seahub/api2/endpoints/repo_history.py @@ -0,0 +1,123 @@ +# Copyright (c) 2012-2016 Seafile Ltd. +import logging + +from rest_framework.authentication import SessionAuthentication +from rest_framework.permissions import IsAuthenticated +from rest_framework.response import Response +from rest_framework.views import APIView +from rest_framework import status + +from seahub.api2.throttling import UserRateThrottle +from seahub.api2.authentication import TokenAuthentication +from seahub.api2.utils import api_error +from seahub.profile.models import Profile +from seahub.base.templatetags.seahub_tags import email2nickname +from seahub.options.models import UserOptions, CryptoOptionNotSetError +from seahub.utils.timeutils import timestamp_to_isoformat_timestr +from seahub.utils import new_merge_with_no_conflict +from seahub.views import check_folder_permission + +from seaserv import seafile_api + +logger = logging.getLogger(__name__) + +class RepoHistory(APIView): + + authentication_classes = (TokenAuthentication, SessionAuthentication) + permission_classes = (IsAuthenticated, ) + throttle_classes = (UserRateThrottle, ) + + def get_item_info(self, commit): + email = commit.creator_name + item_info = { + "name": email2nickname(email), + "contact_email": Profile.objects.get_contact_email_by_user(email), + 'email': email, + 'time': timestamp_to_isoformat_timestr(commit.ctime), + 'description': commit.desc, + 'commit_id': commit.id, + } + + return item_info + + def get(self, request, repo_id, format=None): + """ Return history of library + + Permission checking: + 1. all authenticated user can perform this action. + """ + + # resource check + repo = seafile_api.get_repo(repo_id) + if not repo: + error_msg = 'Library %s not found.' % repo_id + return api_error(status.HTTP_404_NOT_FOUND, error_msg) + + # permission check + if check_folder_permission(request, repo_id, '/') is None: + error_msg = 'Permission denied.' + return api_error(status.HTTP_403_FORBIDDEN, error_msg) + + username = request.user.username + try: + server_crypto = UserOptions.objects.is_server_crypto(username) + except CryptoOptionNotSetError: + # Assume server_crypto is ``False`` if this option is not set. + server_crypto = False + + password_set = False + if repo.encrypted and \ + (repo.enc_version == 1 or (repo.enc_version == 2 and server_crypto)): + try: + ret = seafile_api.is_passwd_set(repo_id, username) + if ret == 1: + password_set = True + except Exception as e: + logger.error(e) + error_msg = 'Internal Server Error' + return api_error(status.HTTP_500_INTERNAL_SERVER_ERROR, error_msg) + + if not password_set: + error_msg = 'Library is encrypted, but password is not set in server.' + return api_error(status.HTTP_403_FORBIDDEN, error_msg) + + try: + page = int(request.GET.get('page', '1')) + per_page = int(request.GET.get('per_page', '100')) + except ValueError: + page = 1 + per_page = 100 + + if page <= 0: + error_msg = 'page invalid.' + return api_error(status.HTTP_400_BAD_REQUEST, error_msg) + + if per_page <= 0: + error_msg = 'per_page invalid.' + return api_error(status.HTTP_400_BAD_REQUEST, error_msg) + + start = (page - 1) * per_page + limit = per_page + 1 + + try: + all_commits = seafile_api.get_commit_list(repo_id, start, limit) + except Exception as e: + logger.error(e) + error_msg = 'Internal Server Error' + return api_error(status.HTTP_500_INTERNAL_SERVER_ERROR, error_msg) + + items = [] + commits = all_commits[:per_page] + for commit in commits: + if new_merge_with_no_conflict(commit): + continue + + item_info = self.get_item_info(commit) + items.append(item_info) + + result = { + 'data': items, + 'more': True if len(all_commits) == per_page + 1 else False + } + + return Response(result) diff --git a/seahub/api2/endpoints/repo_trash.py b/seahub/api2/endpoints/repo_trash.py new file mode 100644 index 0000000000..3ef29bc548 --- /dev/null +++ b/seahub/api2/endpoints/repo_trash.py @@ -0,0 +1,117 @@ +# Copyright (c) 2012-2016 Seafile Ltd. +import stat +import logging + +from rest_framework.authentication import SessionAuthentication +from rest_framework.permissions import IsAuthenticated +from rest_framework.response import Response +from rest_framework.views import APIView +from rest_framework import status + +from seahub.api2.throttling import UserRateThrottle +from seahub.api2.authentication import TokenAuthentication +from seahub.api2.utils import api_error + +from seahub.utils.timeutils import timestamp_to_isoformat_timestr +from seahub.views import check_folder_permission + +from seaserv import seafile_api +from pysearpc import SearpcError + +logger = logging.getLogger(__name__) + +class RepoTrash(APIView): + + authentication_classes = (TokenAuthentication, SessionAuthentication) + permission_classes = (IsAuthenticated, ) + throttle_classes = (UserRateThrottle, ) + + def get_item_info(self, trash_item): + + item_info = { + 'parent_dir': trash_item.basedir, + 'obj_name': trash_item.obj_name, + 'deleted_time': timestamp_to_isoformat_timestr(trash_item.delete_time), + 'scan_stat': trash_item.scan_stat, + 'commit_id': trash_item.commit_id, + } + + if stat.S_ISDIR(trash_item.mode): + is_dir = True + else: + is_dir = False + + item_info['is_dir'] = is_dir + item_info['size'] = trash_item.file_size if not is_dir else '' + item_info['obj_id'] = trash_item.obj_id if not is_dir else '' + + return item_info + + def get(self, request, repo_id, format=None): + """ Return deleted files/dirs of a repo/folder + + Permission checking: + 1. all authenticated user can perform this action. + """ + + # argument check + path = request.GET.get('path', '/') + + # resource check + repo = seafile_api.get_repo(repo_id) + if not repo: + error_msg = 'Library %s not found.' % repo_id + return api_error(status.HTTP_404_NOT_FOUND, error_msg) + + try: + dir_id = seafile_api.get_dir_id_by_path(repo_id, path) + except SearpcError as e: + logger.error(e) + error_msg = 'Internal Server Error' + return api_error(status.HTTP_500_INTERNAL_SERVER_ERROR, error_msg) + + if not dir_id: + error_msg = 'Folder %s not found.' % path + return api_error(status.HTTP_404_NOT_FOUND, error_msg) + + # permission check + if check_folder_permission(request, repo_id, path) is None: + error_msg = 'Permission denied.' + return api_error(status.HTTP_403_FORBIDDEN, error_msg) + + try: + show_days = int(request.GET.get('show_days', '0')) + except ValueError: + show_days = 0 + + if show_days < 0: + error_msg = 'show_days invalid.' + return api_error(status.HTTP_400_BAD_REQUEST, error_msg) + + scan_stat = request.GET.get('scan_stat', None) + try: + # a list will be returned, with at least 1 item in it + # the last item is not a deleted entry, and it contains an attribute named 'scan_stat' + deleted_entries = seafile_api.get_deleted(repo_id, + show_days, path, scan_stat) + except Exception as e: + logger.error(e) + error_msg = 'Internal Server Error' + return api_error(status.HTTP_500_INTERNAL_SERVER_ERROR, error_msg) + + scan_stat = deleted_entries[-1].scan_stat + more = True if scan_stat is not None else False + + items = [] + if len(deleted_entries) > 1: + for item in deleted_entries[0:-1]: + item_info = self.get_item_info(item) + items.append(item_info) + + result = { + 'data': items, + 'more': more, + 'scan_stat': scan_stat, + } + + return Response(result) diff --git a/seahub/api2/views.py b/seahub/api2/views.py index 9c45ceecc6..9d272a3da5 100644 --- a/seahub/api2/views.py +++ b/seahub/api2/views.py @@ -63,7 +63,7 @@ from seahub.utils import gen_file_get_url, gen_token, gen_file_upload_url, \ gen_block_get_url, get_file_type_and_ext, HAS_FILE_SEARCH, \ gen_file_share_link, gen_dir_share_link, is_org_context, gen_shared_link, \ get_org_user_events, calculate_repos_last_modify, send_perm_audit_msg, \ - gen_shared_upload_link, convert_cmmt_desc_link, \ + gen_shared_upload_link, convert_cmmt_desc_link, is_valid_dirent_name, \ is_org_repo_creation_allowed, is_windows_operating_system from seahub.utils.devices import do_unlink_device from seahub.utils.repo import get_sub_repo_abbrev_origin_path @@ -264,10 +264,10 @@ class AccountInfo(APIView): info['name'] = email2nickname(email) info['total'] = seafile_api.get_user_quota(email) info['usage'] = seafile_api.get_user_self_usage(email) - info['login_id'] = p.login_id if p else "" + info['login_id'] = p.login_id if p and p.login_id else "" info['department'] = d_p.department if d_p else "" info['contact_email'] = p.contact_email if p else "" - info['institution'] = p.institution if p else "" + info['institution'] = p.institution if p and p.institution else "" return Response(info) @@ -318,10 +318,23 @@ class Search(APIView): if not keyword: return api_error(status.HTTP_400_BAD_REQUEST, "Missing argument") + search_repo = request.GET.get('search_repo', None) # val: 'all' or 'search_repo_id' + if search_repo and search_repo != 'all': + + try: + repo = seafile_api.get_repo(search_repo) + except Exception as e: + logger.error(e) + error_msg = 'Internal Server Error' + return api_error(status.HTTP_500_INTERNAL_SERVER_ERROR, error_msg) + + if not repo: + error_msg = 'Library %s not found.' % search_repo + return api_error(status.HTTP_404_NOT_FOUND, error_msg) + results, total, has_more = search_keyword(request, keyword) for e in results: e.pop('repo', None) - e.pop('content_highlight', None) e.pop('exists', None) e.pop('last_modified_by', None) e.pop('name_highlight', None) @@ -555,6 +568,11 @@ class Repos(APIView): if not repo_name: return api_error(status.HTTP_400_BAD_REQUEST, 'Library name is required.') + + if not is_valid_dirent_name(repo_name): + return api_error(status.HTTP_400_BAD_REQUEST, + 'name invalid.') + repo_desc = request.data.get("desc", '') org_id = -1 if is_org_context(request): @@ -848,6 +866,10 @@ class Repo(APIView): repo_name = request.POST.get('repo_name') repo_desc = request.POST.get('repo_desc') + if not is_valid_dirent_name(repo_name): + return api_error(status.HTTP_400_BAD_REQUEST, + 'name invalid.') + # check permission if is_org_context(request): repo_owner = seafile_api.get_org_repo_owner(repo.id) diff --git a/seahub/base/accounts.py b/seahub/base/accounts.py index a9d2ce0764..1efecd04c3 100644 --- a/seahub/base/accounts.py +++ b/seahub/base/accounts.py @@ -217,7 +217,7 @@ class User(object): orgs = [] if is_pro_version(): - orgs = ccnet_threaded_rpc.get_orgs_by_user(username) + orgs = ccnet_api.get_orgs_by_user(username) # remove owned repos owned_repos = [] diff --git a/seahub/base/middleware.py b/seahub/base/middleware.py index 05137f4c51..b6385e020d 100644 --- a/seahub/base/middleware.py +++ b/seahub/base/middleware.py @@ -5,7 +5,7 @@ from django.core.cache import cache from django.core.urlresolvers import reverse from django.http import HttpResponseRedirect -import seaserv +from seaserv import ccnet_api from seahub.notifications.models import Notification from seahub.notifications.utils import refresh_cache @@ -32,7 +32,7 @@ class BaseMiddleware(object): request.cloud_mode = True if MULTI_TENANCY: - orgs = seaserv.get_orgs_by_user(username) + orgs = ccnet_api.get_orgs_by_user(username) if orgs: request.user.org = orgs[0] else: diff --git a/seahub/forms.py b/seahub/forms.py index e1c1e0ac4d..1c4ff5a987 100644 --- a/seahub/forms.py +++ b/seahub/forms.py @@ -4,11 +4,11 @@ from django.conf import settings from django import forms from django.utils.translation import ugettext_lazy as _ -from seaserv import is_valid_filename from pysearpc import SearpcError from seahub.base.accounts import User from seahub.constants import DEFAULT_USER, GUEST_USER +from seahub.utils import is_valid_dirent_name from seahub.utils.licenseparse import user_number_over_limit class AddUserForm(forms.Form): @@ -78,7 +78,7 @@ class RepoCreateForm(forms.Form): def clean_repo_name(self): repo_name = self.cleaned_data['repo_name'] - if not is_valid_filename(repo_name): + if not is_valid_dirent_name(repo_name): error_msg = _(u"Name %s is not valid") % repo_name raise forms.ValidationError(error_msg) else: @@ -117,7 +117,7 @@ class RepoRenameDirentForm(forms.Form): def clean_newname(self): newname = self.cleaned_data['newname'] try: - if not is_valid_filename(newname): + if not is_valid_dirent_name(newname): error_msg = _(u'Name "%s" is not valid') % newname raise forms.ValidationError(error_msg) else: @@ -138,7 +138,7 @@ class RepoNewDirentForm(forms.Form): def clean_dirent_name(self): dirent_name = self.cleaned_data['dirent_name'] try: - if not is_valid_filename(dirent_name): + if not is_valid_dirent_name(dirent_name): error_msg = _(u'Name "%s" is not valid') % dirent_name raise forms.ValidationError(error_msg) else: @@ -164,7 +164,7 @@ class RepoSettingForm(forms.Form): def clean_repo_name(self): repo_name = self.cleaned_data['repo_name'] - if not is_valid_filename(repo_name): + if not is_valid_dirent_name(repo_name): error_msg = _(u"Name %s is not valid") % repo_name raise forms.ValidationError(error_msg) else: diff --git a/seahub/group/forms.py b/seahub/group/forms.py index 65a7fbf243..445894aee7 100644 --- a/seahub/group/forms.py +++ b/seahub/group/forms.py @@ -1,11 +1,9 @@ # Copyright (c) 2012-2016 Seafile Ltd. # encoding: utf-8 -import os - from django import forms from django.conf import settings from django.utils.translation import ugettext_lazy as _ -from seaserv import is_valid_filename +from seahub.utils import is_valid_dirent_name from seahub.group.utils import validate_group_name @@ -65,7 +63,7 @@ class WikiCreateForm(forms.Form): def clean_repo_name(self): repo_name = self.cleaned_data['repo_name'] - if not is_valid_filename(repo_name): + if not is_valid_dirent_name(repo_name): error_msg = _(u'"%s" is not a valid name') % repo_name raise forms.ValidationError(error_msg) else: diff --git a/seahub/group/templates/group/add_member_email.html b/seahub/group/templates/group/add_member_email.html index f5890e7db8..812c7dbb89 100644 --- a/seahub/group/templates/group/add_member_email.html +++ b/seahub/group/templates/group/add_member_email.html @@ -8,7 +8,7 @@

{% trans "Hi, " %}

-{% blocktrans with grp_name=group.group_name %}{{ email|email2nickname|escape }} invited you to join group {{ grp_name }} on {{ site_name }}: {% endblocktrans %}
+{% blocktrans with grp_name=group.group_name escaped_nickname=email|email2nickname|escape %}{{ escaped_nickname }} invited you to join group {{ grp_name }} on {{ site_name }}: {% endblocktrans %}
{{ url_base }}{% url 'registration_register' %}?src={{ to_email }}

diff --git a/seahub/settings.py b/seahub/settings.py index 9afb83e346..4d29695981 100644 --- a/seahub/settings.py +++ b/seahub/settings.py @@ -227,6 +227,7 @@ AUTHENTICATION_BACKENDS = ( ) LOGIN_REDIRECT_URL = '/profile/' LOGIN_URL = SITE_ROOT + 'accounts/login' +LOGOUT_REDIRECT_URL = None ACCOUNT_ACTIVATION_DAYS = 7 diff --git a/seahub/templates/file_edit.html b/seahub/templates/file_edit.html index 82181f4530..98af977a62 100644 --- a/seahub/templates/file_edit.html +++ b/seahub/templates/file_edit.html @@ -7,6 +7,7 @@ {% if filetype == 'Text' %} @@ -186,6 +187,7 @@ if ('localStorage' in window && window['localStorage'] !== null) { var saved_draft = browserStorage.get(key); if (saved_draft) { $('#load-draft').modal(); + $('#simplemodal-container').css({'width':'auto', 'height':'auto'}); } } diff --git a/seahub/templates/file_revisions.html b/seahub/templates/file_revisions.html index 18bddc9108..da2012efbc 100644 --- a/seahub/templates/file_revisions.html +++ b/seahub/templates/file_revisions.html @@ -13,7 +13,7 @@ {% block wide_page_content %}

{% blocktrans %}{{ u_filename }} Version History{% endblocktrans %}

{% if referer %} - + {% endif %} @@ -123,5 +123,7 @@ $('.restore-file').click(function() { $('.text-diff').each(function() { $(this).attr('href', $(this).attr('href') + '&referer=' + encodeURIComponent(location.href)); }); + +{% include 'snippets/go_back_js.html' %} {% endblock %} diff --git a/seahub/templates/repo_dir_recycle_view.html b/seahub/templates/repo_dir_recycle_view.html index e5ad65922b..6185a01176 100644 --- a/seahub/templates/repo_dir_recycle_view.html +++ b/seahub/templates/repo_dir_recycle_view.html @@ -12,7 +12,7 @@ {% block wide_page_content %}

{% blocktrans %}{{repo_dir_name}} Trash{% endblocktrans %}

{% if referer %} - + {% endif %} @@ -179,5 +179,7 @@ $('table').on("click", ".restore-file, .restore-dir", function() { return false; }); {% endif %} + +{% include 'snippets/go_back_js.html' %} {% endblock %} diff --git a/seahub/templates/repo_history.html b/seahub/templates/repo_history.html index ce76cd82cd..34cf2d5395 100644 --- a/seahub/templates/repo_history.html +++ b/seahub/templates/repo_history.html @@ -14,7 +14,7 @@

{% blocktrans with repo_name=repo.props.name %}{{repo_name}} Modification History{% endblocktrans %}

{% if referer %} - + {% endif %} @@ -89,5 +89,7 @@ $('.view-snapshot').each(function() { $(this).attr('href', $(this).attr('href') + '&referer=' + encodeURIComponent(location.href)); }); + +{% include 'snippets/go_back_js.html' %} {% endblock %} diff --git a/seahub/templates/repo_history_view.html b/seahub/templates/repo_history_view.html index 898c1ed3a0..18e72db613 100644 --- a/seahub/templates/repo_history_view.html +++ b/seahub/templates/repo_history_view.html @@ -13,7 +13,7 @@

{% blocktrans with repo_name=repo.props.name %}{{repo_name}} Snapshot{% endblocktrans %} ({{ current_commit.props.ctime|tsstr_sec }})

{% if referer %} - + {% endif %} @@ -122,5 +122,7 @@ $('.restore-file, .restore-dir').click(function() { $('.repo-history-view-link').each(function() { $(this).attr('href', $(this).attr('href') + '&referer=' + encodeURIComponent(location.href)); }); + +{% include 'snippets/go_back_js.html' %} {% endblock %} diff --git a/seahub/templates/shared_link_email.html b/seahub/templates/shared_link_email.html index bad01a1ccb..f0e5c99293 100644 --- a/seahub/templates/shared_link_email.html +++ b/seahub/templates/shared_link_email.html @@ -1,6 +1,6 @@ {% extends 'email_base.html' %} -{% load i18n %} +{% load i18n seahub_tags %} {% block email_con %} @@ -9,7 +9,7 @@

{% trans "Hi," %}

-{% blocktrans %}{{ email|email2nickname|escape }} shared a {{ file_shared_type }} {{ file_shared_name}} to you on {{ site_name }}:{% endblocktrans%}
+{% blocktrans with escaped_nickname=email|email2nickname|escape %}{{ escaped_nickname }} shared a {{ file_shared_type }} {{ file_shared_name}} to you on {{ site_name }}:{% endblocktrans%}
{{ file_shared_link }}

diff --git a/seahub/templates/shared_upload_link_email.html b/seahub/templates/shared_upload_link_email.html index da74b26d6c..75a816ce18 100644 --- a/seahub/templates/shared_upload_link_email.html +++ b/seahub/templates/shared_upload_link_email.html @@ -1,6 +1,6 @@ {% extends 'email_base.html' %} -{% load i18n %} +{% load i18n seahub_tags %} {% block email_con %} {% autoescape off %} @@ -8,7 +8,7 @@

{% trans "Hi," %}

-{% blocktrans %}{{ email|email2nickname|escape }} shared an upload link to you on {{ site_name }}.{% endblocktrans%} +{% blocktrans with escaped_nickname=email|email2nickname|escape %}{{ escaped_nickname }} shared an upload link to you on {{ site_name }}.{% endblocktrans%}

diff --git a/seahub/templates/snippets/go_back_js.html b/seahub/templates/snippets/go_back_js.html new file mode 100644 index 0000000000..459370967f --- /dev/null +++ b/seahub/templates/snippets/go_back_js.html @@ -0,0 +1,8 @@ +$('.go-back').click(function() { + var referer = '{{referer|escapejs}}'; + var str = location.protocol + '//' + location.host; + if (referer.indexOf(str) == 0) { // check referer + location.href = referer; + } + return false; +}); diff --git a/seahub/templates/snippets/shared_link_js.html b/seahub/templates/snippets/shared_link_js.html index ff6950e439..e919a4c9bd 100644 --- a/seahub/templates/snippets/shared_link_js.html +++ b/seahub/templates/snippets/shared_link_js.html @@ -123,7 +123,8 @@ $('#gen-link-btn').click(function() { form_id = form.attr('id'), use_passwd = $('#link-passwd-switch').prop('checked'), set_expiration = $('#link-expire-switch').prop('checked'), - password, password_again, expire_days, post_data; + password, password_again, expire_days, + post_data = {}; if (use_passwd) { password = $('input[name="password"]', form).val(); @@ -145,7 +146,7 @@ $('#gen-link-btn').click(function() { apply_form_error(form_id, "{% trans "Passwords don't match" %}"); return false; } - post_data = {'password': password}; + post_data['password'] = password; } if (set_expiration) { diff --git a/seahub/templates/sysadmin/user_add_email.html b/seahub/templates/sysadmin/user_add_email.html index f6b85ad0ea..a0b97c1796 100644 --- a/seahub/templates/sysadmin/user_add_email.html +++ b/seahub/templates/sysadmin/user_add_email.html @@ -1,6 +1,6 @@ {% extends 'email_base.html' %} -{% load i18n %} +{% load i18n seahub_tags %} {% block email_con %} @@ -10,9 +10,9 @@

{% if org %} -{% blocktrans with org_name=org.org_name %}{{ user|email2nickname|escape }} invited you to join organization "{{ org_name }}" on {{ site_name }}.{% endblocktrans%} +{% blocktrans with org_name=org.org_name escaped_nickname=user|email2nickname|escape %}{{ escaped_nickname }} invited you to join organization "{{ org_name }}" on {{ site_name }}.{% endblocktrans%} {% else %} -{% blocktrans %}{{ user|email2nickname|escape }} invited you to join {{ site_name }}.{% endblocktrans%} +{% blocktrans with escaped_nickname=user|email2nickname|escape %}{{ escaped_nickname }} invited you to join {{ site_name }}.{% endblocktrans%} {% endif %}

diff --git a/seahub/templates/sysadmin/user_batch_add_email.html b/seahub/templates/sysadmin/user_batch_add_email.html index fa55ec1816..6c06c5749d 100644 --- a/seahub/templates/sysadmin/user_batch_add_email.html +++ b/seahub/templates/sysadmin/user_batch_add_email.html @@ -1,6 +1,6 @@ {% extends 'email_base.html' %} -{% load i18n %} +{% load i18n seahub_tags %} {% block email_con %} @@ -9,7 +9,7 @@

{% trans "Hi," %}

-{% blocktrans %}{{ user|email2nickname|escape }} invited you to join {{ site_name }}.{% endblocktrans%} +{% blocktrans with escaped_nickname=user|email2nickname|escape %}{{ escaped_nickname }} invited you to join {{ site_name }}.{% endblocktrans%}

diff --git a/seahub/templates/text_diff.html b/seahub/templates/text_diff.html index afb525ebee..5001416cc3 100644 --- a/seahub/templates/text_diff.html +++ b/seahub/templates/text_diff.html @@ -12,7 +12,7 @@

{{ u_filename }} {% trans "modification details" %} {% avatar current_commit.creator_name 16 %}{{ current_commit.creator_name|email2nickname }}{{ current_commit.ctime|translate_seahub_time }}

{% if referer %} - + {% endif %} @@ -49,5 +49,6 @@ {% block extra_script %} {% endblock %} diff --git a/seahub/thumbnail/utils.py b/seahub/thumbnail/utils.py index bbd380c741..23ca830a5e 100644 --- a/seahub/thumbnail/utils.py +++ b/seahub/thumbnail/utils.py @@ -33,27 +33,31 @@ def get_rotated_image(image): orientation = exif.get(0x0112) if isinstance(exif, dict) else 1 # rotate image according to Orientation info + + # im.transpose(method) + # Returns a flipped or rotated copy of an image. + # Method can be one of the following: FLIP_LEFT_RIGHT, FLIP_TOP_BOTTOM, ROTATE_90, ROTATE_180, or ROTATE_270. if orientation == 2: # Vertical image image = image.transpose(Image.FLIP_LEFT_RIGHT) elif orientation == 3: # Rotation 180 - image = image.transpose(Image.ROTATE_180) + image = image.rotate(180) elif orientation == 4: + image = image.rotate(180).transpose(Image.FLIP_LEFT_RIGHT) # Horizontal image - image = image.transpose(Image.FLIP_TOP_BOTTOM) elif orientation == 5: # Horizontal image + Rotation 90 CCW - image = image.transpose(Image.FLIP_TOP_BOTTOM).transpose(Image.ROTATE_90) + image = image.rotate(-90).transpose(Image.FLIP_LEFT_RIGHT) elif orientation == 6: # Rotation 270 - image = image.transpose(Image.ROTATE_270) + image = image.rotate(-90) elif orientation == 7: # Horizontal image + Rotation 270 - image = image.transpose(Image.FLIP_TOP_BOTTOM).transpose(Image.ROTATE_270) + image = image.rotate(90).transpose(Image.FLIP_LEFT_RIGHT) elif orientation == 8: # Rotation 90 - image = image.transpose(Image.ROTATE_90) + image = image.rotate(90) return image diff --git a/seahub/urls.py b/seahub/urls.py index f8ac6b3b0f..51d821864f 100644 --- a/seahub/urls.py +++ b/seahub/urls.py @@ -27,6 +27,8 @@ from seahub.api2.endpoints.shared_repos import SharedRepos, SharedRepo from seahub.api2.endpoints.upload_links import UploadLinks, UploadLink from seahub.api2.endpoints.file import FileView from seahub.api2.endpoints.dir import DirView +from seahub.api2.endpoints.repo_trash import RepoTrash +from seahub.api2.endpoints.repo_history import RepoHistory from seahub.api2.endpoints.repo_set_password import RepoSetPassword from seahub.api2.endpoints.zip_task import ZipTaskView from seahub.api2.endpoints.share_link_zip_task import ShareLinkZipTaskView @@ -171,56 +173,89 @@ urlpatterns = patterns( ### Apps ### (r'^api2/', include('seahub.api2.urls')), + + ## user::groups url(r'^api/v2.1/groups/$', Groups.as_view(), name='api-v2.1-groups'), url(r'^api/v2.1/groups/(?P\d+)/$', Group.as_view(), name='api-v2.1-group'), url(r'^api/v2.1/groups/(?P\d+)/members/$', GroupMembers.as_view(), name='api-v2.1-group-members'), url(r'^api/v2.1/groups/(?P\d+)/members/bulk/$', GroupMembersBulk.as_view(), name='api-v2.1-group-members-bulk'), url(r'^api/v2.1/groups/(?P\d+)/members/(?P[^/]+)/$', GroupMember.as_view(), name='api-v2.1-group-member'), url(r'^api/v2.1/search-group/$', SearchGroup.as_view(), name='api-v2.1-search-group'), + + ## user::shared-folders url(r'^api/v2.1/shared-folders/$', SharedFolders.as_view(), name='api-v2.1-shared-folders'), + + ## user::shared-repos url(r'^api/v2.1/shared-repos/$', SharedRepos.as_view(), name='api-v2.1-shared-repos'), url(r'^api/v2.1/shared-repos/(?P[-0-9a-f]{36})/$', SharedRepo.as_view(), name='api-v2.1-shared-repo'), + + ## user::share-links url(r'^api/v2.1/share-links/$', ShareLinks.as_view(), name='api-v2.1-share-links'), url(r'^api/v2.1/share-links/(?P[a-f0-9]+)/$', ShareLink.as_view(), name='api-v2.1-share-link'), url(r'^api/v2.1/upload-links/$', UploadLinks.as_view(), name='api-v2.1-upload-links'), url(r'^api/v2.1/upload-links/(?P[a-f0-9]+)/$', UploadLink.as_view(), name='api-v2.1-upload-link'), + + ## user::repos url(r'^api/v2.1/repos/(?P[-0-9a-f]{36})/file/$', FileView.as_view(), name='api-v2.1-file-view'), + url(r'^api/v2.1/repos/(?P[-0-9a-f]{36})/dir/$', DirView.as_view(), name='api-v2.1-dir-view'), + url(r'^api/v2.1/repos/(?P[-0-9a-f]{36})/trash/$', RepoTrash.as_view(), name='api-v2.1-repo-trash'), + url(r'^api/v2.1/repos/(?P[-0-9a-f]{36})/history/$', RepoHistory.as_view(), name='api-v2.1-repo-history'), + url(r'^api/v2.1/repos/(?P[-0-9a-f]{36})/set-password/$', RepoSetPassword.as_view(), name="api-v2.1-repo-set-password"), + + ## user::download-dir-zip-task url(r'^api/v2.1/repos/(?P[-0-9a-f]{36})/zip-task/$', ZipTaskView.as_view(), name='api-v2.1-zip-task'), url(r'^api/v2.1/repos/(?P[-0-9a-f]{36})/file-uploaded-bytes/$', RepoFileUploadedBytesView.as_view(), name='api-v2.1-repo-file-uploaded-bytes'), url(r'^api/v2.1/share-link-zip-task/$', ShareLinkZipTaskView.as_view(), name='api-v2.1-share-link-zip-task'), url(r'^api/v2.1/query-zip-progress/$', QueryZipProgressView.as_view(), name='api-v2.1-query-zip-progress'), url(r'^api/v2.1/copy-move-task/$', CopyMoveTaskView.as_view(), name='api-v2.1-copy-move-task'), url(r'^api/v2.1/query-copy-move-progress/$', QueryCopyMoveProgressView.as_view(), name='api-v2.1-query-copy-move-progress'), - url(r'^api/v2.1/repos/(?P[-0-9a-f]{36})/dir/$', DirView.as_view(), name='api-v2.1-dir-view'), - url(r'^api/v2.1/repos/(?P[-0-9a-f]{36})/set-password/$', RepoSetPassword.as_view(), name="api-v2.1-repo-set-password"), - url(r'^api/v2.1/invitations/$', InvitationsView.as_view()), - url(r'^api/v2.1/invitations/(?P[a-f0-9]{32})/$', InvitationView.as_view()), url(r'^api/v2.1/notifications/$', NotificationsView.as_view(), name='api-v2.1-notifications'), url(r'^api/v2.1/notification/$', NotificationView.as_view(), name='api-v2.1-notification'), url(r'^api/v2.1/user-enabled-modules/$', UserEnabledModulesView.as_view(), name='api-v2.1-user-enabled-module'), + + ## user::invitations + url(r'^api/v2.1/invitations/$', InvitationsView.as_view()), + url(r'^api/v2.1/invitations/(?P[a-f0-9]{32})/$', InvitationView.as_view()), + + ## admin::sysinfo url(r'^api/v2.1/admin/sysinfo/$', SysInfo.as_view(), name='api-v2.1-sysinfo'), + + ## admin::devices url(r'^api/v2.1/admin/devices/$', AdminDevices.as_view(), name='api-v2.1-admin-devices'), url(r'^api/v2.1/admin/device-errors/$', AdminDeviceErrors.as_view(), name='api-v2.1-admin-device-errors'), + + ## admin::libraries url(r'^api/v2.1/admin/libraries/$', AdminLibraries.as_view(), name='api-v2.1-admin-libraries'), url(r'^api/v2.1/admin/libraries/(?P[-0-9a-f]{36})/$', AdminLibrary.as_view(), name='api-v2.1-admin-library'), url(r'^api/v2.1/admin/libraries/(?P[-0-9a-f]{36})/dirents/$', AdminLibraryDirents.as_view(), name='api-v2.1-admin-library-dirents'), + url(r'^api/v2.1/admin/libraries/(?P[-0-9a-f]{36})/dirent/$', AdminLibraryDirent.as_view(), name='api-v2.1-admin-library-dirent'), + + ## admin::system-library + url(r'^api/v2.1/admin/system-library/$', AdminSystemLibrary.as_view(), name='api-v2.1-admin-system-library'), + + ## admin::default-library + url(r'^api/v2.1/admin/default-library/$', AdminDefaultLibrary.as_view(), name='api-v2.1-admin-default-library'), + + ## admin::trash-libraries + url(r'^api/v2.1/admin/trash-libraries/$', AdminTrashLibraries.as_view(), name='api-v2.1-admin-trash-libraries'), + url(r'^api/v2.1/admin/trash-libraries/(?P[-0-9a-f]{36})/$', AdminTrashLibrary.as_view(), name='api-v2.1-admin-trash-library'), + + ## admin::groups url(r'^api/v2.1/admin/groups/$', AdminGroups.as_view(), name='api-v2.1-admin-groups'), url(r'^api/v2.1/admin/groups/(?P\d+)/$', AdminGroup.as_view(), name='api-v2.1-admin-group'), url(r'^api/v2.1/admin/groups/(?P\d+)/libraries/$', AdminGroupLibraries.as_view(), name='api-v2.1-admin-group-libraries'), url(r'^api/v2.1/admin/groups/(?P\d+)/libraries/(?P[-0-9a-f]{36})/$', AdminGroupLibrary.as_view(), name='api-v2.1-admin-group-library'), url(r'^api/v2.1/admin/groups/(?P\d+)/members/$', AdminGroupMembers.as_view(), name='api-v2.1-admin-group-members'), url(r'^api/v2.1/admin/groups/(?P\d+)/members/(?P[^/]+)/$', AdminGroupMember.as_view(), name='api-v2.1-admin-group-member'), - url(r'^api/v2.1/admin/libraries/(?P[-0-9a-f]{36})/dirent/$', AdminLibraryDirent.as_view(), name='api-v2.1-admin-library-dirent'), - url(r'^api/v2.1/admin/system-library/$', AdminSystemLibrary.as_view(), name='api-v2.1-admin-system-library'), - url(r'^api/v2.1/admin/default-library/$', AdminDefaultLibrary.as_view(), name='api-v2.1-admin-default-library'), - url(r'^api/v2.1/admin/trash-libraries/$', AdminTrashLibraries.as_view(), name='api-v2.1-admin-trash-libraries'), - url(r'^api/v2.1/admin/trash-libraries/(?P[-0-9a-f]{36})/$', AdminTrashLibrary.as_view(), name='api-v2.1-admin-trash-library'), + + ## admin::shares url(r'^api/v2.1/admin/shares/$', AdminShares.as_view(), name='api-v2.1-admin-shares'), url(r'^api/v2.1/admin/admin-logs/$', AdminLogs.as_view(), name='api-v2.1-admin-admin-logs'), url(r'^api/v2.1/admin/users/batch/$', AdminUsersBatch.as_view(), name='api-v2.1-admin-users-batch'), + ## admin::organizations url(r'^api/v2.1/admin/organizations/(?P\d+)/users/$', AdminOrgUsers.as_view(), name='api-v2.1-admin-org-users'), url(r'^api/v2.1/admin/organizations/(?P\d+)/users/(?P[^/]+)/$', AdminOrgUser.as_view(), name='api-v2.1-admin-org-user'), diff --git a/seahub/utils/__init__.py b/seahub/utils/__init__.py index 48ae7df9f1..0e12153a0c 100644 --- a/seahub/utils/__init__.py +++ b/seahub/utils/__init__.py @@ -245,6 +245,12 @@ def is_valid_username(username): """ return is_valid_email(username) +def is_valid_dirent_name(name): + """Check whether repo/dir/file name is valid. + """ + # `repo_id` parameter is not used in seafile api + return seafile_api.is_valid_filename('fake_repo_id', name) + def is_ldap_user(user): """Check whether user is a LDAP user. """ diff --git a/seahub/views/__init__.py b/seahub/views/__init__.py index f771bfc52f..88cc69877e 100644 --- a/seahub/views/__init__.py +++ b/seahub/views/__init__.py @@ -21,7 +21,7 @@ from django.utils.translation import ugettext as _ from django.views.decorators.http import condition import seaserv -from seaserv import get_repo, get_commits, is_valid_filename, \ +from seaserv import get_repo, get_commits, \ seafserv_threaded_rpc, seafserv_rpc, is_repo_owner, \ get_file_size, MAX_DOWNLOAD_DIR_SIZE, \ seafile_api @@ -42,7 +42,7 @@ from seahub.utils import render_permission_error, render_error, \ gen_dir_share_link, gen_file_share_link, get_file_type_and_ext, \ get_user_repos, EMPTY_SHA1, gen_file_get_url, \ new_merge_with_no_conflict, get_max_upload_file_size, \ - is_pro_version, FILE_AUDIT_ENABLED, \ + is_pro_version, FILE_AUDIT_ENABLED, is_valid_dirent_name, \ is_org_repo_creation_allowed, is_windows_operating_system from seahub.utils.star import get_dir_starred_files from seahub.utils.timeutils import utc_to_local @@ -800,7 +800,7 @@ def validate_filename(request): result = {'ret':'yes'} try: - ret = is_valid_filename(filename) + ret = is_valid_dirent_name(filename) except SearpcError: result['ret'] = 'error' else: diff --git a/seahub/views/ajax.py b/seahub/views/ajax.py index f6ff29d65b..81be5fc969 100644 --- a/seahub/views/ajax.py +++ b/seahub/views/ajax.py @@ -906,7 +906,7 @@ def space_and_traffic(request): username = request.user.username # space & quota calculation - org = ccnet_threaded_rpc.get_orgs_by_user(username) + org = ccnet_api.get_orgs_by_user(username) if not org: space_quota = seafile_api.get_user_quota(username) space_usage = seafile_api.get_user_self_usage(username) diff --git a/seahub/views/sysadmin.py b/seahub/views/sysadmin.py index f746dc0070..3b7b806a98 100644 --- a/seahub/views/sysadmin.py +++ b/seahub/views/sysadmin.py @@ -132,7 +132,7 @@ def _populate_user_quota_usage(user): Arguments: - `user`: """ - orgs = ccnet_threaded_rpc.get_orgs_by_user(user.email) + orgs = ccnet_api.get_orgs_by_user(user.email) try: if orgs: user.org = orgs[0] @@ -502,7 +502,7 @@ def user_info(request, email): org_name = None space_quota = space_usage = 0 - org = ccnet_threaded_rpc.get_orgs_by_user(email) + org = ccnet_api.get_orgs_by_user(email) if not org: owned_repos = mute_seafile_api.get_owned_repo_list(email, ret_corrupted=True) @@ -646,7 +646,7 @@ def user_set_quota(request, email): space_quota_mb = f.cleaned_data['space_quota'] space_quota = space_quota_mb * get_file_size_unit('MB') - org = ccnet_threaded_rpc.get_orgs_by_user(email) + org = ccnet_api.get_orgs_by_user(email) try: if not org: seafile_api.set_user_quota(email, space_quota) @@ -702,7 +702,7 @@ def user_remove(request, email): try: user = User.objects.get(email=email) - org = ccnet_threaded_rpc.get_orgs_by_user(user.email) + org = ccnet_api.get_orgs_by_user(user.email) if org: if org[0].creator == user.email: messages.error(request, _(u'Failed to delete: the user is an organization creator')) diff --git a/seahub/wiki/forms.py b/seahub/wiki/forms.py index 7c6ba13f35..71f36a9aa0 100644 --- a/seahub/wiki/forms.py +++ b/seahub/wiki/forms.py @@ -4,7 +4,7 @@ from django import forms from django.conf import settings from django.utils.translation import ugettext_lazy as _ -from seaserv import is_valid_filename +from seahub.utils import is_valid_dirent_name from utils import clean_page_name @@ -24,7 +24,7 @@ class WikiCreateForm(forms.Form): def clean_repo_name(self): repo_name = self.cleaned_data['repo_name'] - if not is_valid_filename(repo_name): + if not is_valid_dirent_name(repo_name): error_msg = _(u'"%s" is not a valid name') % repo_name raise forms.ValidationError(error_msg) else: diff --git a/static/scripts/app/models/repo.js b/static/scripts/app/models/repo.js index d3b8becf15..3922fc6715 100644 --- a/static/scripts/app/models/repo.js +++ b/static/scripts/app/models/repo.js @@ -31,6 +31,10 @@ define([ validate: function(attrs, options) { if (!attrs.name) return gettext("Name is required"); + if (attrs.name.indexOf('/') != -1) { + return gettext("Name should not include '/'."); + } + if (attrs.encrypted) { if (!attrs.passwd1) return gettext("Please enter password"); if (!attrs.passwd2) return gettext("Please enter the password again"); diff --git a/static/scripts/app/views/dialogs/dirent-rename.js b/static/scripts/app/views/dialogs/dirent-rename.js index f369adce33..e6c7d530ef 100644 --- a/static/scripts/app/views/dialogs/dirent-rename.js +++ b/static/scripts/app/views/dialogs/dirent-rename.js @@ -52,10 +52,20 @@ define([ formSubmit: function() { var _this = this; var new_name = $.trim(this.$('[name="newname"]').val()); + var err_msg; if (!new_name) { + err_msg = gettext("It is required."); + this.$error.html(err_msg).removeClass('hide'); return false; } + + if (new_name.indexOf('/') != -1) { + err_msg = gettext("Name should not include '/'."); + this.$error.html(err_msg).removeClass('hide'); + return false; + } + if (new_name == this.dirent.get('obj_name')) { $.modal.close(); return false; diff --git a/static/scripts/app/views/dir.js b/static/scripts/app/views/dir.js index 13e2ee71b4..ea2417db2b 100644 --- a/static/scripts/app/views/dir.js +++ b/static/scripts/app/views/dir.js @@ -583,6 +583,11 @@ define([ return false; }; + if (dirent_name.indexOf('/') != -1) { + Common.showFormError(form_id, gettext("Name should not include '/'.")); + return false; + } + var post_data = { 'operation': 'mkdir' }, post_url = Common.getUrl({name: "new_dir", repo_id: dir.repo_id}) + '?p=' + encodeURIComponent(Common.pathJoin([dir.path, dirent_name])); @@ -639,6 +644,11 @@ define([ return false; }; + if (dirent_name.indexOf('/') != -1) { + Common.showFormError(form_id, gettext("Name should not include '/'.")); + return false; + } + // if it has an extension, make sure it has a name if (dirent_name.lastIndexOf('.') != -1 && dirent_name.substr(0, dirent_name.lastIndexOf('.')).length == 0) { Common.showFormError(form_id, gettext("Only an extension there, please input a name.")); diff --git a/static/scripts/app/views/dirent.js b/static/scripts/app/views/dirent.js index 225eefc5bf..e5297d9224 100644 --- a/static/scripts/app/views/dirent.js +++ b/static/scripts/app/views/dirent.js @@ -410,9 +410,20 @@ define([ var _this = this; form.submit(function() { var new_name = $.trim($('[name="newname"]', form).val()); + var err_msg; + if (!new_name) { + err_msg = gettext("It is required."); + Common.feedback(err_msg, 'error'); return false; } + + if (new_name.indexOf('/') != -1) { + err_msg = gettext("Name should not include '/'."); + Common.feedback(err_msg, 'error'); + return false; + } + if (new_name == dirent_name) { cancelRename(); return false; diff --git a/static/scripts/app/views/repo.js b/static/scripts/app/views/repo.js index 622305290e..a0448cb60e 100644 --- a/static/scripts/app/views/repo.js +++ b/static/scripts/app/views/repo.js @@ -156,9 +156,19 @@ define([ var _this = this; form.submit(function() { var new_name = $.trim($('[name="newname"]', form).val()); + var err_msg; if (!new_name) { + err_msg = gettext("It is required."); + Common.feedback(err_msg, 'error'); return false; } + + if (new_name.indexOf('/') != -1) { + err_msg = gettext("Name should not include '/'."); + Common.feedback(err_msg, 'error'); + return false; + } + if (new_name == repo_name) { cancelRename(); return false; @@ -177,7 +187,7 @@ define([ var after_op_error = function(xhr) { var err_msg; if (xhr.responseText) { - err_msg = $.parseJSON(xhr.responseText).error; + err_msg = $.parseJSON(xhr.responseText).error||$.parseJSON(xhr.responseText).error_msg; } else { err_msg = gettext("Failed. Please check the network."); } diff --git a/static/scripts/app/views/share.js b/static/scripts/app/views/share.js index 662e6d3b7d..63edf4ccda 100644 --- a/static/scripts/app/views/share.js +++ b/static/scripts/app/views/share.js @@ -117,6 +117,7 @@ define([ var $panel = $('#download-link-share'); var $loadingTip = this.$('.loading-tip'); var _this = this; + // check if downloadLink exists $.ajax({ url: Common.getUrl({name: 'share_admin_share_links'}), @@ -133,7 +134,7 @@ define([ _this.download_link = link; // for 'link send' _this.download_link_token = link_data.token; // for 'link delete' _this.$('#download-link').html(link); - _this.$('#direct-dl-link').html(link + '?raw=1'); + _this.$('#direct-dl-link').html(link + '?dl=1'); if (link_data.is_expired) { _this.$('#send-download-link').addClass('hide'); _this.$('#download-link, #direct-dl-link').append(' (' + gettext('Expired') + ')'); @@ -289,7 +290,7 @@ define([ if (link_type == 'download') { _this.$('#download-link').html(data["link"]); // TODO: add 'click & select' func - _this.$('#direct-dl-link').html(data['link'] + '?raw=1'); + _this.$('#direct-dl-link').html(data['link'] + '?dl=1'); _this.download_link = data["link"]; // for 'link send' _this.download_link_token = data["token"]; // for 'link delete' _this.$('#download-link-operations').removeClass('hide'); diff --git a/static/scripts/app/views/starred-file.js b/static/scripts/app/views/starred-file.js index fc5cea7577..e10b9084c9 100644 --- a/static/scripts/app/views/starred-file.js +++ b/static/scripts/app/views/starred-file.js @@ -94,7 +94,6 @@ define([ render: function() { this.$el.html(this.template()); - $("#right-panel").html(this.$el); this.$table = this.$('table'); this.$tableBody = this.$('tbody'); diff --git a/tests/api/endpoints/test_dir_view.py b/tests/api/endpoints/test_dir_view.py index fda1bab488..ea25484463 100644 --- a/tests/api/endpoints/test_dir_view.py +++ b/tests/api/endpoints/test_dir_view.py @@ -173,6 +173,17 @@ class DirViewTest(BaseTestCase): # check old file has been renamed to new_name assert new_name == self.get_lib_folder_name(self.repo_id) + def test_rename_folder_with_invalid_name(self): + self.login_as(self.user) + + # check old folder exist + assert self.folder_name == self.get_lib_folder_name(self.repo_id) + + data = {'operation': 'rename', 'newname': '123/456'} + resp = self.client.post(self.url + '?p=' + self.folder_path, data) + + self.assertEqual(400, resp.status_code) + def test_can_rename_folder_with_same_name(self): self.login_as(self.user) diff --git a/tests/api/endpoints/test_file_view.py b/tests/api/endpoints/test_file_view.py index 8c6231b858..b9bfd8bdae 100644 --- a/tests/api/endpoints/test_file_view.py +++ b/tests/api/endpoints/test_file_view.py @@ -170,6 +170,16 @@ class FileViewTest(BaseTestCase): # check old file has been renamed to new_name assert new_name == self.get_lib_file_name(self.repo_id) + def test_rename_file_with_invalid_name(self): + self.login_as(self.user) + + # check old file exist + assert self.file_name == self.get_lib_file_name(self.repo_id) + + data = {'operation': 'rename', 'newname': '123/456'} + resp = self.client.post(self.url + '?p=' + self.file_path, data) + self.assertEqual(400, resp.status_code) + def test_can_rename_file_with_same_name(self): self.login_as(self.user) diff --git a/tests/api/endpoints/test_repo_history.py b/tests/api/endpoints/test_repo_history.py new file mode 100644 index 0000000000..8da8dae397 --- /dev/null +++ b/tests/api/endpoints/test_repo_history.py @@ -0,0 +1,23 @@ +import json + +from django.core.urlresolvers import reverse + +from seahub.test_utils import BaseTestCase + +class RepoHistoryTest(BaseTestCase): + + def setUp(self): + self.repo_id = self.repo.id + self.user_name = self.user.username + self.url = reverse('api-v2.1-repo-history', args=[self.repo_id]) + + def tearDown(self): + self.remove_repo() + self.remove_group() + + def test_can_get(self): + self.login_as(self.user) + resp = self.client.get(self.url) + self.assertEqual(200, resp.status_code) + json_resp = json.loads(resp.content) + assert json_resp['data'][0]['email'] == self.user_name diff --git a/tests/api/endpoints/test_repo_trash.py b/tests/api/endpoints/test_repo_trash.py new file mode 100644 index 0000000000..bd3c5ed329 --- /dev/null +++ b/tests/api/endpoints/test_repo_trash.py @@ -0,0 +1,30 @@ +import os +import json + +from django.core.urlresolvers import reverse + +from seaserv import seafile_api +from seahub.test_utils import BaseTestCase + +class RepoTrashTest(BaseTestCase): + + def setUp(self): + self.repo_id = self.repo.id + self.user_name = self.user.username + self.url = reverse('api-v2.1-repo-trash', args=[self.repo_id]) + + def tearDown(self): + self.remove_repo() + self.remove_group() + + def test_can_get(self): + # delete a file first + file_name = os.path.basename(self.file) + seafile_api.del_file(self.repo_id, '/', file_name, self.user_name) + + self.login_as(self.user) + resp = self.client.get(self.url) + self.assertEqual(200, resp.status_code) + json_resp = json.loads(resp.content) + assert json_resp['data'][0]['obj_name'] == file_name + assert json_resp['data'][0]['is_dir'] == False diff --git a/tests/api/test_repo.py b/tests/api/test_repo.py index 4e2d1380f8..37f16d08f4 100644 --- a/tests/api/test_repo.py +++ b/tests/api/test_repo.py @@ -32,6 +32,33 @@ class RepoTest(BaseTestCase): ) self.assertEqual(200, resp.status_code) + def test_rename_with_invalid_name(self): + + self.login_as(self.user) + + invalid_name = '123/456' + data = {'repo_name': invalid_name} + + resp = self.client.post( + reverse('api2-repo', args=[self.repo.id])+'?op=rename', data) + + self.assertEqual(400, resp.status_code) + + def test_rename_repo(self): + + self.login_as(self.user) + + invalid_name = '123456' + data = {'repo_name': invalid_name} + + resp = self.client.post( + reverse('api2-repo', args=[self.repo.id])+'?op=rename', data) + + self.assertEqual(200, resp.status_code) + + json_resp = json.loads(resp.content) + assert json_resp == 'success' + def test_cleaning_stuff_when_delete(self): self.login_as(self.user) diff --git a/tests/api/test_repos.py b/tests/api/test_repos.py index 1c5adafbe2..8bc8a2728d 100644 --- a/tests/api/test_repos.py +++ b/tests/api/test_repos.py @@ -4,7 +4,6 @@ Test repos api. """ import pytest import uuid -import unittest from seaserv import seafile_api from tests.api.apitestbase import ApiTestBase @@ -12,7 +11,7 @@ from tests.api.urls import ( REPOS_URL, DEFAULT_REPO_URL, GET_REPO_TOKENS_URL ) from tests.common.utils import apiurl, urljoin, randstring -from tests.common.common import USERNAME, PASSWORD, SEAFILE_BASE_URL +from tests.common.common import SEAFILE_BASE_URL # TODO: all tests should be run on an encrypted repo class ReposApiTest(ApiTestBase): @@ -105,6 +104,10 @@ class ReposApiTest(ApiTestBase): # Check the repo is really removed self.get(urljoin(REPOS_URL, repo_id), expected=404) + def test_create_repo_with_invalid_name(self): + data = {'name': 'test/test'} + self.post(REPOS_URL, data=data, expected=400) + def test_check_or_create_sub_repo(self): # TODO: create a sub folder and use it as a sub repo pass diff --git a/tests/seahub/auth/views/__init__.py b/tests/seahub/auth/views/__init__.py new file mode 100644 index 0000000000..e69de29bb2 diff --git a/tests/seahub/auth/views/test_logout.py b/tests/seahub/auth/views/test_logout.py new file mode 100644 index 0000000000..fcdb19c828 --- /dev/null +++ b/tests/seahub/auth/views/test_logout.py @@ -0,0 +1,11 @@ +from django.core.urlresolvers import reverse + +from seahub.test_utils import BaseTestCase + + +class LogoutTest(BaseTestCase): + def test_can_logout(self): + resp = self.client.get(reverse('auth_logout')) + + self.assertEqual(200, resp.status_code) + self.assertContains(resp, 'Log in again') diff --git a/thirdpart/registration/auth_urls.py b/thirdpart/registration/auth_urls.py index 93a1f26bc4..91664d356a 100644 --- a/thirdpart/registration/auth_urls.py +++ b/thirdpart/registration/auth_urls.py @@ -70,7 +70,8 @@ else: name='auth_login'), url(r'^logout/$', auth_views.logout, - {'template_name': 'registration/logout.html'}, + {'template_name': 'registration/logout.html', + 'next_page': settings.LOGOUT_REDIRECT_URL}, name='auth_logout'), )