From b090397b36856aa72a3c87dc391f5fea13c68571 Mon Sep 17 00:00:00 2001 From: Benedikt Fey Date: Mon, 18 Nov 2013 11:21:02 +0100 Subject: translation update --- lib/plugins/usermanager/lang/de/lang.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/plugins/usermanager') diff --git a/lib/plugins/usermanager/lang/de/lang.php b/lib/plugins/usermanager/lang/de/lang.php index d1b9b908b..4b297b0dc 100644 --- a/lib/plugins/usermanager/lang/de/lang.php +++ b/lib/plugins/usermanager/lang/de/lang.php @@ -2,7 +2,7 @@ /** * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) - * + * * @author Matthias Grimm * @author Andreas Gohr * @author Michael Klier -- cgit v1.2.3 From 32f730b04ba68c7ca7c2d32208dfac042e6ffffd Mon Sep 17 00:00:00 2001 From: Satoshi Sahara Date: Tue, 19 Nov 2013 08:11:04 +0100 Subject: translation update --- lib/plugins/usermanager/lang/ja/import.txt | 2 +- lib/plugins/usermanager/lang/ja/lang.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'lib/plugins/usermanager') diff --git a/lib/plugins/usermanager/lang/ja/import.txt b/lib/plugins/usermanager/lang/ja/import.txt index d4f7d08bf..751e515ac 100644 --- a/lib/plugins/usermanager/lang/ja/import.txt +++ b/lib/plugins/usermanager/lang/ja/import.txt @@ -4,7 +4,7 @@ 列の順序:ユーザーID、氏名、電子メールアドレス、グループ。 CSVフィールドはカンマ(,)区切り、文字列は引用符("")区切りです。 エスケープにバックスラッシュ(\)を使用できます。 -適切なファイル例は、上記の"エクスポートユーザー"機能で試して下さい。 +適切なファイル例は、上記の"エクスポートユーザー"機能で試して下さい。 重複するユーザーIDは無視されます。 正常にインポートされたユーザー毎に、パスワードを作成し、電子メールで送付します。 \ No newline at end of file diff --git a/lib/plugins/usermanager/lang/ja/lang.php b/lib/plugins/usermanager/lang/ja/lang.php index 0830416f3..23109f2a2 100644 --- a/lib/plugins/usermanager/lang/ja/lang.php +++ b/lib/plugins/usermanager/lang/ja/lang.php @@ -54,7 +54,7 @@ $lang['edit_usermissing'] = '選択したユーザーは見つかりませ $lang['user_notify'] = 'ユーザーに通知する'; $lang['note_notify'] = '通知メールは、ユーザーに新たなパスワードが設定された場合のみ送信されます。'; $lang['note_group'] = 'グループを指定しない場合は、既定のグループ(%s)に配属されます。'; -$lang['note_pass'] = 'パスワードを空欄とした場合は、(”ユーザーに通知する”がチェックされていなくとも)自動生成したパスワードの通知がユーザー宛てに送信されます。'; +$lang['note_pass'] = '”ユーザーに通知する”をチェックしてパスワードを空欄にすると、パスワードは自動生成されます。'; $lang['add_ok'] = 'ユーザーを登録しました'; $lang['add_fail'] = 'ユーザーの登録に失敗しました'; $lang['notify_ok'] = '通知メールを送信しました'; -- cgit v1.2.3 From a6c758f14a44f0415d89385e5612bb9ae32d6daa Mon Sep 17 00:00:00 2001 From: Myeongjin Date: Sun, 24 Nov 2013 11:37:45 +0100 Subject: translation update --- lib/plugins/usermanager/lang/ko/lang.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/plugins/usermanager') diff --git a/lib/plugins/usermanager/lang/ko/lang.php b/lib/plugins/usermanager/lang/ko/lang.php index ccc7f9059..a01cbbdba 100644 --- a/lib/plugins/usermanager/lang/ko/lang.php +++ b/lib/plugins/usermanager/lang/ko/lang.php @@ -68,5 +68,5 @@ $lang['import_error_badmail'] = '잘못된 이메일 주소'; $lang['import_error_upload'] = '가져오기를 실패했습니다. csv 파일을 올릴 수 없거나 비어 있습니다.'; $lang['import_error_readfail'] = '가져오기를 실패했습니다. 올린 파일을 읽을 수 없습니다.'; $lang['import_error_create'] = '사용자를 만들 수 없습니다.'; -$lang['import_notify_fail'] = '알림 메시지를 가져온 %2$s (이메일: %1$s ) 사용자에게 보낼 수 없습니다.'; +$lang['import_notify_fail'] = '알림 메시지를 가져온 %s (이메일: %s ) 사용자에게 보낼 수 없습니다.'; $lang['import_downloadfailures'] = '교정을 위한 CSV로 다운로드 실패'; -- cgit v1.2.3 From 853aa1550199223a46b55e9563790b9ef6a1d234 Mon Sep 17 00:00:00 2001 From: Rami Lehti Date: Sun, 24 Nov 2013 11:38:46 +0100 Subject: translation update --- lib/plugins/usermanager/lang/fi/lang.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'lib/plugins/usermanager') diff --git a/lib/plugins/usermanager/lang/fi/lang.php b/lib/plugins/usermanager/lang/fi/lang.php index 1db4bd7fb..de243133a 100644 --- a/lib/plugins/usermanager/lang/fi/lang.php +++ b/lib/plugins/usermanager/lang/fi/lang.php @@ -1,7 +1,8 @@ * @author Teemu Mattila -- cgit v1.2.3 From 94070874cc8d8702821161dbaa291e8b2d043ad3 Mon Sep 17 00:00:00 2001 From: Thomas Juberg Date: Sun, 24 Nov 2013 18:02:23 +0100 Subject: translation update --- lib/plugins/usermanager/lang/no/lang.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'lib/plugins/usermanager') diff --git a/lib/plugins/usermanager/lang/no/lang.php b/lib/plugins/usermanager/lang/no/lang.php index 7124e4811..83823b2b8 100644 --- a/lib/plugins/usermanager/lang/no/lang.php +++ b/lib/plugins/usermanager/lang/no/lang.php @@ -1,13 +1,14 @@ * @author Arild Burud * @author Torkill Bruland * @author Rune M. Andersen * @author Jakob Vad Nielsen (me@jakobnielsen.net) - * @author Kjell Tore Næsgaard + * @author Kjell Tore Næsgaard * @author Knut Staring * @author Lisa Ditlefsen * @author Erik Pedersen -- cgit v1.2.3 From 8d6ec7dd27c536bbaf7d7c0c4f5f99ae20860f3b Mon Sep 17 00:00:00 2001 From: Tomasz Bosak Date: Sun, 24 Nov 2013 18:03:51 +0100 Subject: translation update --- lib/plugins/usermanager/lang/pl/lang.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'lib/plugins/usermanager') diff --git a/lib/plugins/usermanager/lang/pl/lang.php b/lib/plugins/usermanager/lang/pl/lang.php index cfc0ba327..2e063d2bb 100644 --- a/lib/plugins/usermanager/lang/pl/lang.php +++ b/lib/plugins/usermanager/lang/pl/lang.php @@ -1,7 +1,8 @@ * @author Mariusz Kujawski * @author Maciej Kurczewski -- cgit v1.2.3 From eb1d4fdee478e7cd379c3dd4a89f81ad096155c6 Mon Sep 17 00:00:00 2001 From: Claudio Lanconelli Date: Mon, 25 Nov 2013 02:00:56 +0100 Subject: translation update --- lib/plugins/usermanager/lang/it/lang.php | 3 +++ 1 file changed, 3 insertions(+) (limited to 'lib/plugins/usermanager') diff --git a/lib/plugins/usermanager/lang/it/lang.php b/lib/plugins/usermanager/lang/it/lang.php index dfacc6545..6c6789442 100644 --- a/lib/plugins/usermanager/lang/it/lang.php +++ b/lib/plugins/usermanager/lang/it/lang.php @@ -15,6 +15,7 @@ * @author Jacopo Corbetta * @author Matteo Pasotti * @author snarchio@gmail.com + * @author Claudio Lanconelli */ $lang['menu'] = 'Gestione Utenti'; $lang['noauth'] = '(autenticazione non disponibile)'; @@ -37,6 +38,8 @@ $lang['search'] = 'Cerca'; $lang['search_prompt'] = 'Esegui ricerca'; $lang['clear'] = 'Azzera filtro di ricerca'; $lang['filter'] = 'Filtro'; +$lang['export_all'] = 'Esporta tutti gli utenti (CSV)'; +$lang['export_filtered'] = 'Esporta elenco utenti filtrati (CSV)'; $lang['summary'] = 'Visualizzazione utenti %1$d-%2$d di %3$d trovati. %4$d utenti totali.'; $lang['nonefound'] = 'Nessun utente trovato. %d utenti totali.'; $lang['delete_ok'] = '%d utenti eliminati'; -- cgit v1.2.3 From 79c64e955bca6f4339fafa21543e532b11f341cf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=B4me=20Brandt?= Date: Mon, 25 Nov 2013 08:31:02 +0100 Subject: translation update --- lib/plugins/usermanager/lang/fr/lang.php | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'lib/plugins/usermanager') diff --git a/lib/plugins/usermanager/lang/fr/lang.php b/lib/plugins/usermanager/lang/fr/lang.php index 7c24ef900..dd0e64fc4 100644 --- a/lib/plugins/usermanager/lang/fr/lang.php +++ b/lib/plugins/usermanager/lang/fr/lang.php @@ -23,6 +23,7 @@ * @author Bruno Veilleux * @author Antoine Turmel * @author schplurtz + * @author Jérôme Brandt */ $lang['menu'] = 'Gestion des utilisateurs'; $lang['noauth'] = '(authentification de l\'utilisateur non disponible)'; @@ -70,6 +71,8 @@ $lang['add_ok'] = 'Utilisateur ajouté avec succès'; $lang['add_fail'] = 'Échec de l\'ajout de l\'utilisateur'; $lang['notify_ok'] = 'Courriel de notification expédié'; $lang['notify_fail'] = 'Échec de l\'expédition du courriel de notification'; +$lang['import_userlistcsv'] = 'Liste utilisateur (fichier CSV)'; +$lang['import_header'] = 'Erreurs d\'import les plus récentes'; $lang['import_success_count'] = 'Import d’utilisateurs : %d utilisateurs trouvés, %d utilisateurs importés avec succès.'; $lang['import_failure_count'] = 'Import d\'utilisateurs : %d ont échoué. Les erreurs sont listées ci-dessous.'; $lang['import_error_fields'] = 'Nombre de champs insuffisant, %d trouvé, 4 requis.'; @@ -80,3 +83,4 @@ $lang['import_error_upload'] = 'L\'import a échoué. Le fichier csv n\'a pas $lang['import_error_readfail'] = 'L\'import a échoué. Impossible de lire le fichier téléchargé.'; $lang['import_error_create'] = 'Impossible de créer l\'utilisateur'; $lang['import_notify_fail'] = 'Impossible d\'expédier une notification à l\'utilisateur importé %s, adresse %s.'; +$lang['import_downloadfailures'] = 'Télécharger les erreurs au format CSV pour correction'; -- cgit v1.2.3 From 53afdafe30f20e091aff7b0cf6bbb86aa7b50078 Mon Sep 17 00:00:00 2001 From: Garam Date: Mon, 25 Nov 2013 20:05:58 +0100 Subject: translation update --- lib/plugins/usermanager/lang/ko/lang.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'lib/plugins/usermanager') diff --git a/lib/plugins/usermanager/lang/ko/lang.php b/lib/plugins/usermanager/lang/ko/lang.php index a01cbbdba..3656a1698 100644 --- a/lib/plugins/usermanager/lang/ko/lang.php +++ b/lib/plugins/usermanager/lang/ko/lang.php @@ -10,6 +10,7 @@ * @author erial2@gmail.com * @author Myeongjin * @author Gerrit Uitslag + * @author Garam */ $lang['menu'] = '사용자 관리자'; $lang['noauth'] = '(사용자 인증이 불가능합니다)'; @@ -33,7 +34,7 @@ $lang['search_prompt'] = '검색 수행'; $lang['clear'] = '검색 필터 재설정'; $lang['filter'] = '필터'; $lang['export_all'] = '모든 사용자 목록 내보내기 (CSV)'; -$lang['export_filtered'] = '필터된 사용자 목록 내보내기 (CSV)'; +$lang['export_filtered'] = '필터된 사용자 목록 내보내기(CSV)'; $lang['import'] = '새 사용자 목록 가져오기'; $lang['line'] = '줄 번호'; $lang['error'] = '오류 메시지'; -- cgit v1.2.3 From ffe35fe919de6c9f52316dd272e6e22c4bde8d81 Mon Sep 17 00:00:00 2001 From: Garam Date: Mon, 25 Nov 2013 20:50:59 +0100 Subject: translation update --- lib/plugins/usermanager/lang/ko/lang.php | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'lib/plugins/usermanager') diff --git a/lib/plugins/usermanager/lang/ko/lang.php b/lib/plugins/usermanager/lang/ko/lang.php index a01cbbdba..7c629f74f 100644 --- a/lib/plugins/usermanager/lang/ko/lang.php +++ b/lib/plugins/usermanager/lang/ko/lang.php @@ -10,6 +10,7 @@ * @author erial2@gmail.com * @author Myeongjin * @author Gerrit Uitslag + * @author Garam */ $lang['menu'] = '사용자 관리자'; $lang['noauth'] = '(사용자 인증이 불가능합니다)'; @@ -32,8 +33,8 @@ $lang['search'] = '검색'; $lang['search_prompt'] = '검색 수행'; $lang['clear'] = '검색 필터 재설정'; $lang['filter'] = '필터'; -$lang['export_all'] = '모든 사용자 목록 내보내기 (CSV)'; -$lang['export_filtered'] = '필터된 사용자 목록 내보내기 (CSV)'; +$lang['export_all'] = '모든 사용자 목록 내보내기(CSV)'; +$lang['export_filtered'] = '필터된 사용자 목록 내보내기(CSV)'; $lang['import'] = '새 사용자 목록 가져오기'; $lang['line'] = '줄 번호'; $lang['error'] = '오류 메시지'; @@ -52,12 +53,12 @@ $lang['edit_usermissing'] = '선택된 사용자를 찾을 수 없습니다 $lang['user_notify'] = '사용자에게 알림'; $lang['note_notify'] = '사용자에게 새로운 비밀번호를 준 경우에만 알림 이메일이 보내집니다.'; $lang['note_group'] = '새로운 사용자는 어떤 그룹도 설정하지 않은 경우에 기본 그룹(%s)에 추가됩니다.'; -$lang['note_pass'] = '사용자 통지가 지정되어 있을 때 필드에 아무 값도 입력하지 않으면 비밀번호가 자동으로 만들어집니다.'; +$lang['note_pass'] = '사용자 알림이 지정되어 있을 때 필드에 아무 값도 입력하지 않으면 비밀번호가 자동으로 만들어집니다.'; $lang['add_ok'] = '사용자를 성공적으로 추가했습니다'; $lang['add_fail'] = '사용자 추가를 실패했습니다'; $lang['notify_ok'] = '알림 이메일을 성공적으로 보냈습니다'; $lang['notify_fail'] = '알림 이메일을 보낼 수 없습니다'; -$lang['import_userlistcsv'] = '사용자 목록 파일 (CSV):'; +$lang['import_userlistcsv'] = '사용자 목록 파일(CSV):'; $lang['import_header'] = '가장 최근 가져오기 - 실패'; $lang['import_success_count'] = '사용자 가져오기: 사용자 %d명을 찾았고, %d명을 성공적으로 가져왔습니다.'; $lang['import_failure_count'] = '사용자 가져오기: %d명을 가져오지 못했습니다. 실패는 아래에 나타나 있습니다.'; @@ -68,5 +69,5 @@ $lang['import_error_badmail'] = '잘못된 이메일 주소'; $lang['import_error_upload'] = '가져오기를 실패했습니다. csv 파일을 올릴 수 없거나 비어 있습니다.'; $lang['import_error_readfail'] = '가져오기를 실패했습니다. 올린 파일을 읽을 수 없습니다.'; $lang['import_error_create'] = '사용자를 만들 수 없습니다.'; -$lang['import_notify_fail'] = '알림 메시지를 가져온 %s (이메일: %s ) 사용자에게 보낼 수 없습니다.'; +$lang['import_notify_fail'] = '알림 메시지를 가져온 %s(이메일: %s) 사용자에게 보낼 수 없습니다.'; $lang['import_downloadfailures'] = '교정을 위한 CSV로 다운로드 실패'; -- cgit v1.2.3 From 32087ed0672a7921af76f92eb2e8d3b6e3a166de Mon Sep 17 00:00:00 2001 From: Christopher Smith Date: Thu, 28 Nov 2013 00:01:35 +0000 Subject: Bugfix: correct variable name to --- lib/plugins/usermanager/admin.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/plugins/usermanager') diff --git a/lib/plugins/usermanager/admin.php b/lib/plugins/usermanager/admin.php index c4d71cb22..f2ee95b38 100644 --- a/lib/plugins/usermanager/admin.php +++ b/lib/plugins/usermanager/admin.php @@ -830,7 +830,7 @@ class admin_plugin_usermanager extends DokuWiki_Admin_Plugin { if (!$this->_auth->canDo('addUser')) return false; // check file uploaded ok. - if (empty($_FILES['import']['size']) || !empty($FILES['import']['error']) && is_uploaded_file($FILES['import']['tmp_name'])) { + if (empty($_FILES['import']['size']) || !empty($_FILES['import']['error']) && is_uploaded_file($_FILES['import']['tmp_name'])) { msg($this->lang['import_error_upload'],-1); return false; } -- cgit v1.2.3 From e73725bac6a3c60835092d4e2253730b7d683263 Mon Sep 17 00:00:00 2001 From: Christopher Smith Date: Thu, 28 Nov 2013 00:03:48 +0000 Subject: IMPROVEMENT: remove generated password from import failure data --- lib/plugins/usermanager/admin.php | 1 + 1 file changed, 1 insertion(+) (limited to 'lib/plugins/usermanager') diff --git a/lib/plugins/usermanager/admin.php b/lib/plugins/usermanager/admin.php index f2ee95b38..95524c56a 100644 --- a/lib/plugins/usermanager/admin.php +++ b/lib/plugins/usermanager/admin.php @@ -867,6 +867,7 @@ class admin_plugin_usermanager extends DokuWiki_Admin_Plugin { $import_success_count++; } else { $import_fail_count++; + array_splice($raw, 1, 1); // remove the spliced in password $this->_import_failures[$line] = array('error' => $error, 'user' => $raw, 'orig' => $csv); } } -- cgit v1.2.3 From 5ba64050580b6936c8b364e3a288e7c875263c88 Mon Sep 17 00:00:00 2001 From: Christopher Smith Date: Thu, 28 Nov 2013 00:04:20 +0000 Subject: MINOR: comment spelling corrections --- lib/plugins/usermanager/admin.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib/plugins/usermanager') diff --git a/lib/plugins/usermanager/admin.php b/lib/plugins/usermanager/admin.php index 95524c56a..2c566723a 100644 --- a/lib/plugins/usermanager/admin.php +++ b/lib/plugins/usermanager/admin.php @@ -822,7 +822,7 @@ class admin_plugin_usermanager extends DokuWiki_Admin_Plugin { * * csv file should have 4 columns, user_id, full name, email, groups (comma separated) * - * @return bool whether succesful + * @return bool whether successful */ protected function _import() { // check we are allowed to add users @@ -941,7 +941,7 @@ class admin_plugin_usermanager extends DokuWiki_Admin_Plugin { * * @param array $user data of user * @param string &$error reference catched error message - * @return bool whether succesful + * @return bool whether successful */ protected function _addImportUser($user, & $error){ if (!$this->_auth->triggerUserMod('create', $user)) { -- cgit v1.2.3 From b2c01466e61a7800306d8705eada83563ca90a55 Mon Sep 17 00:00:00 2001 From: Christopher Smith Date: Thu, 28 Nov 2013 00:08:52 +0000 Subject: Improvements to facilitate unit testing - don't die at end of _export() - internal classs wrapper method for is_uploaded_file() to allow overriding for use under cli & without having to upload a file --- lib/plugins/usermanager/admin.php | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'lib/plugins/usermanager') diff --git a/lib/plugins/usermanager/admin.php b/lib/plugins/usermanager/admin.php index 2c566723a..782443ee1 100644 --- a/lib/plugins/usermanager/admin.php +++ b/lib/plugins/usermanager/admin.php @@ -814,6 +814,8 @@ class admin_plugin_usermanager extends DokuWiki_Admin_Plugin { fputcsv($fd, $line); } fclose($fd); + if (defined('DOKU_UNITTEST')){ return; } + die; } @@ -830,7 +832,7 @@ class admin_plugin_usermanager extends DokuWiki_Admin_Plugin { if (!$this->_auth->canDo('addUser')) return false; // check file uploaded ok. - if (empty($_FILES['import']['size']) || !empty($_FILES['import']['error']) && is_uploaded_file($_FILES['import']['tmp_name'])) { + if (empty($_FILES['import']['size']) || !empty($_FILES['import']['error']) && $this->_isUploadedFile($_FILES['import']['tmp_name'])) { msg($this->lang['import_error_upload'],-1); return false; } @@ -974,4 +976,11 @@ class admin_plugin_usermanager extends DokuWiki_Admin_Plugin { die; } + /** + * wrapper for is_uploaded_file to facilitate overriding by test suite + */ + protected function _isUploadedFile($file) { + return is_uploaded_file($file); + } + } -- cgit v1.2.3 From ed6bf75f5a78a346e3c3192b2bab79450e206598 Mon Sep 17 00:00:00 2001 From: Christopher Smith Date: Thu, 28 Nov 2013 00:12:38 +0000 Subject: Add unit tests for usermanager import & export functions --- lib/plugins/usermanager/_test/csv_export.test.php | 59 ++++++++ lib/plugins/usermanager/_test/csv_import.test.php | 155 ++++++++++++++++++++++ lib/plugins/usermanager/_test/mocks.class.php | 43 ++++++ 3 files changed, 257 insertions(+) create mode 100644 lib/plugins/usermanager/_test/csv_export.test.php create mode 100644 lib/plugins/usermanager/_test/csv_import.test.php create mode 100644 lib/plugins/usermanager/_test/mocks.class.php (limited to 'lib/plugins/usermanager') diff --git a/lib/plugins/usermanager/_test/csv_export.test.php b/lib/plugins/usermanager/_test/csv_export.test.php new file mode 100644 index 000000000..d0942a861 --- /dev/null +++ b/lib/plugins/usermanager/_test/csv_export.test.php @@ -0,0 +1,59 @@ +usermanager = new admin_mock_usermanager(); + parent::setUp(); + } + + /** + * based on standard test user/conf setup + * + * users per _test/conf/users.auth.php + * expected to be: testuser:179ad45c6ce2cb97cf1029e212046e81:Arthur Dent:arthur@example.com + */ + function test_export() { + $expected = 'User,"Real Name",Email,Groups +testuser,"Arthur Dent",arthur@example.com, +'; + $this->assertEquals($expected, $this->usermanager->tryExport()); + } + + /** + * when configured to use a different locale, the column headings in the first line of the + * exported csv data should reflect the langauge strings of that locale + */ + function test_export_withlocale(){ + global $conf; + $old_conf = $conf; + $conf['lang'] = 'de'; + + $this->usermanager->localised = false; + $this->usermanager->setupLocale(); + + $conf = $old_conf; + + $expected = 'Benutzername,"Voller Name",E-Mail,Gruppen +testuser,"Arthur Dent",arthur@example.com, +'; + $this->assertEquals($expected, $this->usermanager->tryExport()); + } + + function test_export_withfilter(){ + $this->markTestIncomplete( + 'This test has not been implemented yet.' + ); + } + +} diff --git a/lib/plugins/usermanager/_test/csv_import.test.php b/lib/plugins/usermanager/_test/csv_import.test.php new file mode 100644 index 000000000..5deb201ba --- /dev/null +++ b/lib/plugins/usermanager/_test/csv_import.test.php @@ -0,0 +1,155 @@ +importfile = tempnam(TMP_DIR, 'csv'); + + $this->old_files = $_FILES; + $_FILES = array( + 'import' => array( + 'name' => 'import.csv', + 'tmp_name' => $this->importfile, + 'type' => 'text/plain', + 'size' => 1, + 'error' => 0, + ), + ); + + $this->usermanager = new admin_mock_usermanager(); + parent::setUp(); + } + + function tearDown() { + $_FILES = $this->old_files; + parent::tearDown(); + } + + function doImportTest($importCsv, $expectedResult, $expectedNewUsers, $expectedFailures) { + global $auth; + $before_users = $auth->retrieveUsers(); + + io_savefile($this->importfile, $importCsv); + $result = $this->usermanager->tryImport(); + + $after_users = $auth->retrieveUsers(); + $import_count = count($after_users) - count($before_users); + $new_users = array_diff_key($after_users, $before_users); + $diff_users = array_diff_assoc($after_users, $before_users); + + $expectedCount = count($expectedNewUsers); + + $this->assertEquals($expectedResult, $result); // import result as expected + $this->assertEquals($expectedCount, $import_count); // number of new users matches expected number imported + $this->assertEquals($expectedNewUsers, $this->stripPasswords($new_users)); // new user data matches imported user data + $this->assertEquals($expectedCount, $this->countPasswords($new_users)); // new users have a password + $this->assertEquals($expectedCount, $this->usermanager->mock_email_notifications_sent); // new users notified of their passwords + $this->assertEquals($new_users, $diff_users); // no other users were harmed in the testing of this import + $this->assertEquals($expectedFailures, $this->usermanager->getImportFailures()); // failures as expected + } + + function test_import() { + $csv = 'User,"Real Name",Email,Groups +importuser,"Ford Prefect",ford@example.com,user +'; + $expected = array( + 'importuser' => array( + 'name' => 'Ford Prefect', + 'mail' => 'ford@example.com', + 'grps' => array('user'), + ), + ); + + $this->doImportTest($csv, true, $expected, array()); + } + + function test_importExisting() { + $csv = 'User,"Real Name",Email,Groups +importuser,"Ford Prefect",ford@example.com,user +'; + $failures = array( + '2' => array( + 'error' => $this->usermanager->lang['import_error_create'], + 'user' => array( + 'importuser', + 'Ford Prefect', + 'ford@example.com', + 'user', + ), + 'orig' => 'importuser,"Ford Prefect",ford@example.com,user'.NL, + ), + ); + + $this->doImportTest($csv, true, array(), $failures); + } + + function test_importUtf8() { + $csv = 'User,"Real Name",Email,Groups +importutf8,"Førd Prefect",ford@example.com,user +'; + $expected = array( + 'importutf8' => array( + 'name' => 'Førd Prefect', + 'mail' => 'ford@example.com', + 'grps' => array('user'), + ), + ); + + $this->doImportTest($csv, true, $expected, array()); + } + + /** + * utf8: u+00F8 (ø) <=> 0xF8 :iso-8859-1 + */ + function test_importIso8859() { + $csv = 'User,"Real Name",Email,Groups +importiso8859,"F'.chr(0xF8).'rd Prefect",ford@example.com,user +'; + $expected = array( + 'importiso8859' => array( + 'name' => 'Førd Prefect', + 'mail' => 'ford@example.com', + 'grps' => array('user'), + ), + ); + + $this->doImportTest($csv, true, $expected, array()); + } + + private function stripPasswords($array){ + foreach ($array as $user => $data) { + unset($array[$user]['pass']); + } + return $array; + } + + private function countPasswords($array){ + $count = 0; + foreach ($array as $user => $data) { + if (!empty($data['pass'])) { + $count++; + } + } + return $count; + } + +} + diff --git a/lib/plugins/usermanager/_test/mocks.class.php b/lib/plugins/usermanager/_test/mocks.class.php new file mode 100644 index 000000000..edf5438b2 --- /dev/null +++ b/lib/plugins/usermanager/_test/mocks.class.php @@ -0,0 +1,43 @@ +_import_failures; + } + + public function tryExport() { + ob_start(); + $this->_export(); + return ob_get_clean(); + } + + public function tryImport() { + return $this->_import(); + } + + // no need to send email notifications (mostly) + protected function _notifyUser($user, $password, $status_alert=true) { + if ($this->mock_email_notifications) { + $this->mock_email_notifications_sent++; + return true; + } else { + return parent::_notifyUser($user, $password, $status_alert); + } + } + + protected function _isUploadedFile($file) { + return file_exists($file); + } +} + -- cgit v1.2.3 From 211955bef84071b025e83bdeeefe496a5002fdd8 Mon Sep 17 00:00:00 2001 From: Christopher Smith Date: Thu, 28 Nov 2013 00:49:31 +0000 Subject: test import against auth plugin which doesn't allow adding users --- lib/plugins/usermanager/_test/csv_import.test.php | 18 +++++++++++++++++- lib/plugins/usermanager/_test/mocks.class.php | 7 +++++++ 2 files changed, 24 insertions(+), 1 deletion(-) (limited to 'lib/plugins/usermanager') diff --git a/lib/plugins/usermanager/_test/csv_import.test.php b/lib/plugins/usermanager/_test/csv_import.test.php index 5deb201ba..1f0ee7436 100644 --- a/lib/plugins/usermanager/_test/csv_import.test.php +++ b/lib/plugins/usermanager/_test/csv_import.test.php @@ -47,7 +47,7 @@ class plugin_usermanager_csv_import_test extends DokuWikiTest { global $auth; $before_users = $auth->retrieveUsers(); - io_savefile($this->importfile, $importCsv); + io_savefile($this->importfile, $importCsv); $result = $this->usermanager->tryImport(); $after_users = $auth->retrieveUsers(); @@ -66,6 +66,22 @@ class plugin_usermanager_csv_import_test extends DokuWikiTest { $this->assertEquals($expectedFailures, $this->usermanager->getImportFailures()); // failures as expected } + function test_cantImport(){ + global $auth; + $oldauth = $auth; + + $auth = new auth_mock_authplain(); + $auth->setCanDo('addUser', false); + + $csv = 'User,"Real Name",Email,Groups +importuser,"Ford Prefect",ford@example.com,user +'; + + $this->doImportTest($csv, false, array(), array()); + + $auth = $oldauth; + } + function test_import() { $csv = 'User,"Real Name",Email,Groups importuser,"Ford Prefect",ford@example.com,user diff --git a/lib/plugins/usermanager/_test/mocks.class.php b/lib/plugins/usermanager/_test/mocks.class.php index edf5438b2..f3cc72c27 100644 --- a/lib/plugins/usermanager/_test/mocks.class.php +++ b/lib/plugins/usermanager/_test/mocks.class.php @@ -41,3 +41,10 @@ class admin_mock_usermanager extends admin_plugin_usermanager { } } +class auth_mock_authplain extends auth_plugin_authplain { + + public function setCanDo($op, $canDo) { + $this->cando[$op] = $canDo; + } + +} -- cgit v1.2.3 From d2a843c310418267d3baedd63547d75917da2efe Mon Sep 17 00:00:00 2001 From: Juliano Marconi Lanigra Date: Sat, 30 Nov 2013 23:10:58 +0100 Subject: translation update --- lib/plugins/usermanager/lang/pt-br/lang.php | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'lib/plugins/usermanager') diff --git a/lib/plugins/usermanager/lang/pt-br/lang.php b/lib/plugins/usermanager/lang/pt-br/lang.php index 9bb37742a..356d139eb 100644 --- a/lib/plugins/usermanager/lang/pt-br/lang.php +++ b/lib/plugins/usermanager/lang/pt-br/lang.php @@ -20,6 +20,7 @@ * @author Victor Westmann * @author Leone Lisboa Magevski * @author Dário Estevão + * @author Juliano Marconi Lanigra */ $lang['menu'] = 'Gerenciamento de Usuários'; $lang['noauth'] = '(o gerenciamento de usuários não está disponível)'; @@ -43,6 +44,7 @@ $lang['search_prompt'] = 'Executar a pesquisa'; $lang['clear'] = 'Limpar o filtro de pesquisa'; $lang['filter'] = 'Filtro'; $lang['export_all'] = 'Exportar Todos Usuários (CSV)'; +$lang['export_filtered'] = 'Exportar lista de Usuários Filtrados (CSV)'; $lang['import'] = 'Importar Novos Usuários'; $lang['line'] = 'Linha Nº.'; $lang['error'] = 'Mensagem de Erro'; @@ -66,6 +68,8 @@ $lang['add_ok'] = 'O usuário foi adicionado com sucesso'; $lang['add_fail'] = 'O usuário não foi adicionado'; $lang['notify_ok'] = 'O e-mail de notificação foi enviado'; $lang['notify_fail'] = 'Não foi possível enviar o e-mail de notificação'; +$lang['import_userlistcsv'] = 'Arquivo de lista de usuários (CSV):'; +$lang['import_header'] = 'Importações Mais Recentes - Falhas'; $lang['import_success_count'] = 'Importação de Usuário: %d usuário (s) encontrado (s), %d importado (s) com sucesso.'; $lang['import_failure_count'] = 'Importação de Usuário: %d falhou. As falhas estão listadas abaixo.'; $lang['import_error_fields'] = 'Campos insuficientes, encontrado (s) %d, necessário 4.'; @@ -75,3 +79,5 @@ $lang['import_error_badmail'] = 'Endereço de email errado'; $lang['import_error_upload'] = 'Falha na Importação: O arquivo csv não pode ser carregado ou está vazio.'; $lang['import_error_readfail'] = 'Falha na Importação: Habilitar para ler o arquivo a ser carregado.'; $lang['import_error_create'] = 'Habilitar para criar o usuário.'; +$lang['import_notify_fail'] = 'Mensagem de notificação não pode ser enviada para o usuário importado, %s com email %s.'; +$lang['import_downloadfailures'] = 'Falhas no Download como CSV para correção'; -- cgit v1.2.3 From c9454ee3a82b29418a7ee59f0bb35006ea6a7fb1 Mon Sep 17 00:00:00 2001 From: Christopher Smith Date: Sun, 1 Dec 2013 16:23:02 +0000 Subject: Per FS#2884, implement a local version of str_getcsv() to maintain compatibility with php 5.2.x (str_getcsv() is only available in php 5.3+ and is used by user manager import feature. --- lib/plugins/usermanager/_test/csv_import.test.php | 14 ++++++++++++ lib/plugins/usermanager/_test/mocks.class.php | 8 +++++++ lib/plugins/usermanager/admin.php | 28 ++++++++++++++++++++++- 3 files changed, 49 insertions(+), 1 deletion(-) (limited to 'lib/plugins/usermanager') diff --git a/lib/plugins/usermanager/_test/csv_import.test.php b/lib/plugins/usermanager/_test/csv_import.test.php index 1f0ee7436..5133c1256 100644 --- a/lib/plugins/usermanager/_test/csv_import.test.php +++ b/lib/plugins/usermanager/_test/csv_import.test.php @@ -150,6 +150,20 @@ importiso8859,"F'.chr(0xF8).'rd Prefect",ford@example.com,user $this->doImportTest($csv, true, $expected, array()); } + /** + * Verify usermanager::str_getcsv() behaves identically to php 5.3's str_getcsv() + * within the context/parameters required by _import() + * + * @requires PHP 5.3 + * @deprecated remove when dokuwiki requires 5.3+ + * also associated usermanager & mock usermanager access methods + */ + private function test_getcsvcompatibility() { + $line = 'importuser,"Ford Prefect",ford@example.com,user'.NL; + + $this->assertEquals(str_getcsv($line), $this->usermanager->access_str_getcsv($line)); + } + private function stripPasswords($array){ foreach ($array as $user => $data) { unset($array[$user]['pass']); diff --git a/lib/plugins/usermanager/_test/mocks.class.php b/lib/plugins/usermanager/_test/mocks.class.php index f3cc72c27..91c74768c 100644 --- a/lib/plugins/usermanager/_test/mocks.class.php +++ b/lib/plugins/usermanager/_test/mocks.class.php @@ -26,6 +26,14 @@ class admin_mock_usermanager extends admin_plugin_usermanager { return $this->_import(); } + /** + * @deprecated remove when dokuwiki requires php 5.3+ + * also associated unit test & usermanager methods + */ + public function access_str_getcsv($line){ + return $this->str_getcsv($line); + } + // no need to send email notifications (mostly) protected function _notifyUser($user, $password, $status_alert=true) { if ($this->mock_email_notifications) { diff --git a/lib/plugins/usermanager/admin.php b/lib/plugins/usermanager/admin.php index 782443ee1..156037f09 100644 --- a/lib/plugins/usermanager/admin.php +++ b/lib/plugins/usermanager/admin.php @@ -847,7 +847,7 @@ class admin_plugin_usermanager extends DokuWiki_Admin_Plugin { if (!utf8_check($csv)) { $csv = utf8_encode($csv); } - $raw = str_getcsv($csv); + $raw = $this->_getcsv($csv); $error = ''; // clean out any errors from the previous line // data checks... if (1 == ++$line) { @@ -983,4 +983,30 @@ class admin_plugin_usermanager extends DokuWiki_Admin_Plugin { return is_uploaded_file($file); } + /** + * wrapper for str_getcsv() to simplify maintaining compatibility with php 5.2 + * + * @deprecated remove when dokuwiki php requirement increases to 5.3+ + * also associated unit test & mock access method + */ + protected function _getcsv($csv) { + return function_exists('str_getcsv') ? str_getcsv($csv) : $this->str_getcsv($csv); + } + + /** + * replacement str_getcsv() function for php < 5.3 + * loosely based on www.php.net/str_getcsv#88311 + * + * @deprecated remove when dokuwiki php requirement increases to 5.3+ + */ + protected function str_getcsv($str) { + $fp = fopen("php://temp/maxmemory:1048576", 'r+'); // 1MiB + fputs($fp, $str); + rewind($fp); + + $data = fgetcsv($fp); + + fclose($fp); + return $data; + } } -- cgit v1.2.3 From 3946d21690c98d095fff4a0ad5be4c47c0230ed7 Mon Sep 17 00:00:00 2001 From: Christopher Smith Date: Sun, 1 Dec 2013 16:44:37 +0000 Subject: comment (hide) incomplete export with filter test --- lib/plugins/usermanager/_test/csv_export.test.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib/plugins/usermanager') diff --git a/lib/plugins/usermanager/_test/csv_export.test.php b/lib/plugins/usermanager/_test/csv_export.test.php index d0942a861..667fc71dc 100644 --- a/lib/plugins/usermanager/_test/csv_export.test.php +++ b/lib/plugins/usermanager/_test/csv_export.test.php @@ -49,11 +49,11 @@ testuser,"Arthur Dent",arthur@example.com, '; $this->assertEquals($expected, $this->usermanager->tryExport()); } - +/* function test_export_withfilter(){ $this->markTestIncomplete( 'This test has not been implemented yet.' ); } - +*/ } -- cgit v1.2.3 From 1da08fca34cb20a1b12d83e70a1d915f66cf6438 Mon Sep 17 00:00:00 2001 From: Christopher Smith Date: Sun, 1 Dec 2013 16:45:53 +0000 Subject: remove incorrect 'private' restriction from tset method --- lib/plugins/usermanager/_test/csv_import.test.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/plugins/usermanager') diff --git a/lib/plugins/usermanager/_test/csv_import.test.php b/lib/plugins/usermanager/_test/csv_import.test.php index 5133c1256..3968356bc 100644 --- a/lib/plugins/usermanager/_test/csv_import.test.php +++ b/lib/plugins/usermanager/_test/csv_import.test.php @@ -158,7 +158,7 @@ importiso8859,"F'.chr(0xF8).'rd Prefect",ford@example.com,user * @deprecated remove when dokuwiki requires 5.3+ * also associated usermanager & mock usermanager access methods */ - private function test_getcsvcompatibility() { + function test_getcsvcompatibility() { $line = 'importuser,"Ford Prefect",ford@example.com,user'.NL; $this->assertEquals(str_getcsv($line), $this->usermanager->access_str_getcsv($line)); -- cgit v1.2.3 From 2c01be2ff65c7adeb4e34cd2a507c910e84b79b7 Mon Sep 17 00:00:00 2001 From: zamroni Date: Tue, 3 Dec 2013 06:45:45 +0100 Subject: translation update --- lib/plugins/usermanager/lang/id/lang.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'lib/plugins/usermanager') diff --git a/lib/plugins/usermanager/lang/id/lang.php b/lib/plugins/usermanager/lang/id/lang.php index 457ad4963..425b2ff59 100644 --- a/lib/plugins/usermanager/lang/id/lang.php +++ b/lib/plugins/usermanager/lang/id/lang.php @@ -1,7 +1,8 @@ * @author Yustinus Waruwu */ -- cgit v1.2.3 From 6593db4300a3db6d88c9b09df725ecc8589e99b6 Mon Sep 17 00:00:00 2001 From: Myeongjin Date: Sat, 7 Dec 2013 02:01:38 +0100 Subject: translation update --- lib/plugins/usermanager/lang/ko/lang.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'lib/plugins/usermanager') diff --git a/lib/plugins/usermanager/lang/ko/lang.php b/lib/plugins/usermanager/lang/ko/lang.php index 7c629f74f..ac129c95e 100644 --- a/lib/plugins/usermanager/lang/ko/lang.php +++ b/lib/plugins/usermanager/lang/ko/lang.php @@ -33,8 +33,8 @@ $lang['search'] = '검색'; $lang['search_prompt'] = '검색 수행'; $lang['clear'] = '검색 필터 재설정'; $lang['filter'] = '필터'; -$lang['export_all'] = '모든 사용자 목록 내보내기(CSV)'; -$lang['export_filtered'] = '필터된 사용자 목록 내보내기(CSV)'; +$lang['export_all'] = '모든 사용자 목록 내보내기 (CSV)'; +$lang['export_filtered'] = '필터된 사용자 목록 내보내기 (CSV)'; $lang['import'] = '새 사용자 목록 가져오기'; $lang['line'] = '줄 번호'; $lang['error'] = '오류 메시지'; @@ -58,7 +58,7 @@ $lang['add_ok'] = '사용자를 성공적으로 추가했습니 $lang['add_fail'] = '사용자 추가를 실패했습니다'; $lang['notify_ok'] = '알림 이메일을 성공적으로 보냈습니다'; $lang['notify_fail'] = '알림 이메일을 보낼 수 없습니다'; -$lang['import_userlistcsv'] = '사용자 목록 파일(CSV):'; +$lang['import_userlistcsv'] = '사용자 목록 파일 (CSV):'; $lang['import_header'] = '가장 최근 가져오기 - 실패'; $lang['import_success_count'] = '사용자 가져오기: 사용자 %d명을 찾았고, %d명을 성공적으로 가져왔습니다.'; $lang['import_failure_count'] = '사용자 가져오기: %d명을 가져오지 못했습니다. 실패는 아래에 나타나 있습니다.'; @@ -69,5 +69,5 @@ $lang['import_error_badmail'] = '잘못된 이메일 주소'; $lang['import_error_upload'] = '가져오기를 실패했습니다. csv 파일을 올릴 수 없거나 비어 있습니다.'; $lang['import_error_readfail'] = '가져오기를 실패했습니다. 올린 파일을 읽을 수 없습니다.'; $lang['import_error_create'] = '사용자를 만들 수 없습니다.'; -$lang['import_notify_fail'] = '알림 메시지를 가져온 %s(이메일: %s) 사용자에게 보낼 수 없습니다.'; +$lang['import_notify_fail'] = '알림 메시지를 가져온 %s (이메일: %s) 사용자에게 보낼 수 없습니다.'; $lang['import_downloadfailures'] = '교정을 위한 CSV로 다운로드 실패'; -- cgit v1.2.3 From b21beefdfa477fe0e5810051462f134b3f0e99a9 Mon Sep 17 00:00:00 2001 From: Ivan Peltekov Date: Tue, 31 Dec 2013 05:26:40 +0100 Subject: translation update --- lib/plugins/usermanager/lang/bg/lang.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'lib/plugins/usermanager') diff --git a/lib/plugins/usermanager/lang/bg/lang.php b/lib/plugins/usermanager/lang/bg/lang.php index 9ed27f42a..9700385f8 100644 --- a/lib/plugins/usermanager/lang/bg/lang.php +++ b/lib/plugins/usermanager/lang/bg/lang.php @@ -1,7 +1,8 @@ * @author Viktor Usunov * @author Kiril -- cgit v1.2.3 From 7264d332a1a7e451039aeb9630fc3ab287cf82b5 Mon Sep 17 00:00:00 2001 From: oott123 Date: Sun, 12 Jan 2014 11:56:45 +0100 Subject: translation update --- lib/plugins/usermanager/lang/zh/lang.php | 2 ++ 1 file changed, 2 insertions(+) (limited to 'lib/plugins/usermanager') diff --git a/lib/plugins/usermanager/lang/zh/lang.php b/lib/plugins/usermanager/lang/zh/lang.php index 25eb1a294..b833c6ce4 100644 --- a/lib/plugins/usermanager/lang/zh/lang.php +++ b/lib/plugins/usermanager/lang/zh/lang.php @@ -17,6 +17,7 @@ * @author Shuo-Ting Jian * @author Rachel * @author Yangyu Huang + * @author oott123 */ $lang['menu'] = '用户管理器'; $lang['noauth'] = '(用户认证不可用)'; @@ -76,3 +77,4 @@ $lang['import_error_upload'] = '导入失败。CSV 文件无法上传或是空 $lang['import_error_readfail'] = '导入失败。无法读取上传的文件。'; $lang['import_error_create'] = '不能创建新用户'; $lang['import_notify_fail'] = '通知消息无法发送到导入的用户 %s,电子邮件地址是 %s。'; +$lang['import_downloadfailures'] = '下载CSV的错误信息以修正。'; -- cgit v1.2.3 From 13bc346a49104660b7e9bd823bcc35dfa577d0ae Mon Sep 17 00:00:00 2001 From: Marina Vladi Date: Sun, 19 Jan 2014 01:56:10 +0100 Subject: translation update --- lib/plugins/usermanager/lang/hu/import.txt | 12 ++++++------ lib/plugins/usermanager/lang/hu/lang.php | 7 ++++--- 2 files changed, 10 insertions(+), 9 deletions(-) (limited to 'lib/plugins/usermanager') diff --git a/lib/plugins/usermanager/lang/hu/import.txt b/lib/plugins/usermanager/lang/hu/import.txt index 5a4bc8b1c..f204f6a1e 100644 --- a/lib/plugins/usermanager/lang/hu/import.txt +++ b/lib/plugins/usermanager/lang/hu/import.txt @@ -1,9 +1,9 @@ ==== Felhasználók tömeges importálása ==== -Egy, legalább 4 oszlopot tartalmazó, felhasználóikat tartalmazó fájl szükséges hozzá. -Az oszlopok kötelező tartalma, megfelelő sorrendben: felhasználói azonosító, teljes név, e-mailcím és csoportjai. -A CSV mezőit vesszővel (,) kell elválasztani, a szövegeket idézőjelek ("") közé kell foglalni. -Mintafájl megtekintéséhez próbáld ki a fenti, "Felhasználók exportálása" funkciót. A fordított törtvonallal (\) lehet kilépni. -Megegyező felhasználói azonosítók esetén, nem kerülnek feldolgozásra. +Szükséges egy legalább 4 oszlopot tartalmazó, felhasználókat tartalmazó fájl. +Az oszlopok kötelező tartalma, sorrendben: felhasználói azonosító, teljes név, e-mailcím és csoport. +A CSV-mezőket vesszővel (,) kell elválasztani, a szövegeket idézőjelek ("") közé kell tenni. A fordított törtvonal (\) használható feloldójelnek. +Megfelelő mintafájl megtekintéséhez próbáld ki a "Felhasználók exportálása" funkciót fentebb. +A duplán szereplő felhasználói azonosítók kihagyásra kerülnek. -Minden sikeresen importált felhasználó kap egy e-mailt, amiben megtalálja a generált jelszavát. \ No newline at end of file +Minden sikeresen importált felhasználó számára jelszó készül, amelyet e-mailben kézhez kap. \ No newline at end of file diff --git a/lib/plugins/usermanager/lang/hu/lang.php b/lib/plugins/usermanager/lang/hu/lang.php index dd76bfd50..963fcd1fc 100644 --- a/lib/plugins/usermanager/lang/hu/lang.php +++ b/lib/plugins/usermanager/lang/hu/lang.php @@ -11,6 +11,7 @@ * @author David Szabo * @author Marton Sebok * @author Serenity87HUN + * @author Marina Vladi */ $lang['menu'] = 'Felhasználók kezelése'; $lang['noauth'] = '(A felhasználói azonosítás nem működik.)'; @@ -58,14 +59,14 @@ $lang['add_ok'] = 'A felhasználó sikeresen hozzáadva.'; $lang['add_fail'] = 'A felhasználó hozzáadása nem sikerült.'; $lang['notify_ok'] = 'Értesítő levél elküldve.'; $lang['notify_fail'] = 'Nem sikerült az értesítő levelet elküldeni.'; -$lang['import_userlistcsv'] = 'Felhasználók listája fájl (CSV)'; +$lang['import_userlistcsv'] = 'Felhasználók listájának fájlja (CSV)'; $lang['import_header'] = 'Legutóbbi importálás - Hibák'; $lang['import_success_count'] = 'Felhasználók importálása: %d felhasználót találtunk, ebből %d sikeresen importálva.'; $lang['import_failure_count'] = 'Felhasználók importálása: %d sikertelen. A sikertelenség okait lejjebb találod.'; $lang['import_error_fields'] = 'Túl kevés mezőt adtál meg, %d darabot találtunk, legalább 4-re van szükség.'; $lang['import_error_baduserid'] = 'Felhasználói azonosító hiányzik'; -$lang['import_error_badname'] = 'Nem megfelelő név'; -$lang['import_error_badmail'] = 'Nem megfelelő e-mailcím'; +$lang['import_error_badname'] = 'Helytelen név'; +$lang['import_error_badmail'] = 'Helytelen e-mailcím'; $lang['import_error_upload'] = 'Sikertelen importálás. A csv fájl nem feltölthető vagy üres.'; $lang['import_error_readfail'] = 'Sikertelen importálás. A feltöltött fájl nem olvasható.'; $lang['import_error_create'] = 'Ez a felhasználó nem hozható létre'; -- cgit v1.2.3 From 975e2a1982518e206667387f0540ce46e5c482ca Mon Sep 17 00:00:00 2001 From: Andreas Gohr Date: Fri, 24 Jan 2014 17:33:18 +0100 Subject: removed empty language files our translation interface used to submit empty files for a while but no longer does, so these can go --- lib/plugins/usermanager/lang/hi/lang.php | 7 ------- lib/plugins/usermanager/lang/hr/lang.php | 8 -------- lib/plugins/usermanager/lang/id-ni/lang.php | 7 ------- lib/plugins/usermanager/lang/lb/lang.php | 6 ------ lib/plugins/usermanager/lang/ms/lang.php | 6 ------ lib/plugins/usermanager/lang/vi/lang.php | 5 ----- 6 files changed, 39 deletions(-) delete mode 100644 lib/plugins/usermanager/lang/hi/lang.php delete mode 100644 lib/plugins/usermanager/lang/hr/lang.php delete mode 100644 lib/plugins/usermanager/lang/id-ni/lang.php delete mode 100644 lib/plugins/usermanager/lang/lb/lang.php delete mode 100644 lib/plugins/usermanager/lang/ms/lang.php delete mode 100644 lib/plugins/usermanager/lang/vi/lang.php (limited to 'lib/plugins/usermanager') diff --git a/lib/plugins/usermanager/lang/hi/lang.php b/lib/plugins/usermanager/lang/hi/lang.php deleted file mode 100644 index d6f78ffd6..000000000 --- a/lib/plugins/usermanager/lang/hi/lang.php +++ /dev/null @@ -1,7 +0,0 @@ - - * @author yndesai@gmail.com - */ diff --git a/lib/plugins/usermanager/lang/hr/lang.php b/lib/plugins/usermanager/lang/hr/lang.php deleted file mode 100644 index 96f1d6afe..000000000 --- a/lib/plugins/usermanager/lang/hr/lang.php +++ /dev/null @@ -1,8 +0,0 @@ - - * @author Dražen Odobašić - * @author Dejan Igrec dejan.igrec@gmail.com - */ diff --git a/lib/plugins/usermanager/lang/id-ni/lang.php b/lib/plugins/usermanager/lang/id-ni/lang.php deleted file mode 100644 index d367340b7..000000000 --- a/lib/plugins/usermanager/lang/id-ni/lang.php +++ /dev/null @@ -1,7 +0,0 @@ - - * @author Yustinus Waruwu - */ diff --git a/lib/plugins/usermanager/lang/lb/lang.php b/lib/plugins/usermanager/lang/lb/lang.php deleted file mode 100644 index 59acdf7a8..000000000 --- a/lib/plugins/usermanager/lang/lb/lang.php +++ /dev/null @@ -1,6 +0,0 @@ - Date: Sat, 25 Jan 2014 06:41:06 +0100 Subject: translation update --- lib/plugins/usermanager/lang/sk/lang.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/plugins/usermanager') diff --git a/lib/plugins/usermanager/lang/sk/lang.php b/lib/plugins/usermanager/lang/sk/lang.php index 9aadbb53a..535f77972 100644 --- a/lib/plugins/usermanager/lang/sk/lang.php +++ b/lib/plugins/usermanager/lang/sk/lang.php @@ -51,7 +51,7 @@ $lang['note_notify'] = 'Notifikačné e-maily iba vtedy, ak dostane u $lang['note_group'] = 'Noví užívatelia budú pridaní do východzej skupiny (%s), ak nie je pre nich špecifikovaná iná skupina.'; $lang['note_pass'] = 'Heslo bude vygenerované automaticky, ak bude pole prázdne a je zapnutá notifikácia používateľa.'; $lang['add_ok'] = 'Používateľ úspešne pridaný'; -$lang['add_fail'] = 'Pridávanie užívateľa nebolo úspešné'; +$lang['add_fail'] = 'Pridanie používateľa bolo neúspešné'; $lang['notify_ok'] = 'Notifikačný e-mail bol poslaný'; $lang['notify_fail'] = 'Notifikačný e-mail nemohol byť poslaný'; $lang['import_userlistcsv'] = 'Súbor so zoznamov používateľov (CSV):'; -- cgit v1.2.3 From 3402a2df526d2f8e344fefabb895bfa7de27ef32 Mon Sep 17 00:00:00 2001 From: matej Date: Tue, 4 Feb 2014 13:31:10 +0100 Subject: translation update --- lib/plugins/usermanager/lang/sl/lang.php | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'lib/plugins/usermanager') diff --git a/lib/plugins/usermanager/lang/sl/lang.php b/lib/plugins/usermanager/lang/sl/lang.php index dc2de375e..a10488e75 100644 --- a/lib/plugins/usermanager/lang/sl/lang.php +++ b/lib/plugins/usermanager/lang/sl/lang.php @@ -8,6 +8,7 @@ * @author Gregor Skumavc (grega.skumavc@gmail.com) * @author Matej Urbančič (mateju@svn.gnome.org) * @author Matej Urbančič + * @author matej */ $lang['menu'] = 'Upravljanje uporabnikov'; $lang['noauth'] = '(overjanje istovetnosti uporabnikov ni na voljo)'; @@ -30,6 +31,8 @@ $lang['search'] = 'Iskanje'; $lang['search_prompt'] = 'Poišči'; $lang['clear'] = 'Počisti filter iskanja'; $lang['filter'] = 'Filter'; +$lang['export_all'] = 'Izvozi seznam vseh uporabnikov (CSV)'; +$lang['export_filtered'] = 'Izvozi filtriran seznam uporabnikov (CSV)'; $lang['import'] = 'Uvozi nove uporabnike'; $lang['line'] = 'Številka vrstice'; $lang['error'] = 'Sporočilo napake'; @@ -53,6 +56,10 @@ $lang['add_ok'] = 'Uporabnik je uspešno dodan'; $lang['add_fail'] = 'Dodajanje uporabnika je spodletelo'; $lang['notify_ok'] = 'Obvestilno sporočilo je poslano.'; $lang['notify_fail'] = 'Obvestilnega sporočila ni mogoče poslati.'; +$lang['import_userlistcsv'] = 'Datoteka seznama uporabnikov (CSV)'; +$lang['import_header'] = 'Zadnji uvoz podatkov – napake'; +$lang['import_success_count'] = 'Uvoz uporabnikov: %d najdenih, %d uspešno uvoženih.'; +$lang['import_failure_count'] = 'Uvoz uporabnikov: %d spodletelih. Napake so izpisane spodaj.'; $lang['import_error_fields'] = 'Neustrezno število polj; najdenih je %d, zahtevana pa so 4.'; $lang['import_error_baduserid'] = 'Manjka ID uporabnika'; $lang['import_error_badname'] = 'Napačno navedeno ime'; @@ -61,3 +68,4 @@ $lang['import_error_upload'] = 'Uvoz je spodletel. Datoteke CSV ni mogoče nal $lang['import_error_readfail'] = 'Uvoz je spodletel. Ni mogoče prebrati vsebine datoteke.'; $lang['import_error_create'] = 'Ni mogoče ustvariti računa uporabnika'; $lang['import_notify_fail'] = 'Obvestilnega sporočila za uvoženega uporabnika %s z elektronskim naslovom %s ni mogoče poslati.'; +$lang['import_downloadfailures'] = 'Prejmi podatke o napakah v datoteki CSV'; -- cgit v1.2.3