diff options
Diffstat (limited to 'lib/plugins/usermanager')
22 files changed, 452 insertions, 34 deletions
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..667fc71dc --- /dev/null +++ b/lib/plugins/usermanager/_test/csv_export.test.php @@ -0,0 +1,59 @@ +<?php + +/** + * @group plugin_usermanager + * @group admin_plugins + * @group plugins + * @group bundled_plugins + */ +require_once(dirname(__FILE__).'/mocks.class.php'); + +class plugin_usermanager_csv_export_test extends DokuWikiTest { + + protected $usermanager; + + function setUp() { + $this->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..3968356bc --- /dev/null +++ b/lib/plugins/usermanager/_test/csv_import.test.php @@ -0,0 +1,185 @@ +<?php + +/** + * @group plugin_usermanager + * @group admin_plugins + * @group plugins + * @group bundled_plugins + */ + +require_once(dirname(__FILE__).'/mocks.class.php'); + +/** + * !!!!! NOTE !!!!! + * + * At present, users imported in individual tests remain in the user list for subsequent tests + */ +class plugin_usermanager_csv_import_test extends DokuWikiTest { + + private $old_files; + protected $usermanager; + protected $importfile; + + function setUp() { + $this->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_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 +'; + $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()); + } + + /** + * 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 + */ + 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']); + } + 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..91c74768c --- /dev/null +++ b/lib/plugins/usermanager/_test/mocks.class.php @@ -0,0 +1,58 @@ +<?php + +/** + * test wrapper to allow access to private/protected functions/properties + * + * NB: for plugin introspection methods, getPluginType() & getPluginName() to work + * this class name needs to start "admin_" and end "_usermanager". Internally + * these methods are used in setting up the class, e.g. for language strings + */ +class admin_mock_usermanager extends admin_plugin_usermanager { + + public $mock_email_notifications = true; + public $mock_email_notifications_sent = 0; + + public function getImportFailures() { + return $this->_import_failures; + } + + public function tryExport() { + ob_start(); + $this->_export(); + return ob_get_clean(); + } + + public function tryImport() { + 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) { + $this->mock_email_notifications_sent++; + return true; + } else { + return parent::_notifyUser($user, $password, $status_alert); + } + } + + protected function _isUploadedFile($file) { + return file_exists($file); + } +} + +class auth_mock_authplain extends auth_plugin_authplain { + + public function setCanDo($op, $canDo) { + $this->cando[$op] = $canDo; + } + +} diff --git a/lib/plugins/usermanager/admin.php b/lib/plugins/usermanager/admin.php index c4d71cb22..156037f09 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; } @@ -822,7 +824,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 @@ -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; } @@ -845,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) { @@ -867,6 +869,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); } } @@ -940,7 +943,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)) { @@ -973,4 +976,37 @@ 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); + } + + /** + * 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; + } } 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 @@ <?php + /** - * bulgarian language file - * + * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) + * * @author Nikolay Vladimirov <nikolay@vladimiroff.com> * @author Viktor Usunov <usun0v@mail.bg> * @author Kiril <neohidra@gmail.com> diff --git a/lib/plugins/usermanager/lang/da/lang.php b/lib/plugins/usermanager/lang/da/lang.php index 6b615b51d..47d7efea2 100644 --- a/lib/plugins/usermanager/lang/da/lang.php +++ b/lib/plugins/usermanager/lang/da/lang.php @@ -12,6 +12,7 @@ * @author rasmus@kinnerup.com * @author Michael Pedersen subben@gmail.com * @author Mikael Lyngvig <mikael@lyngvig.org> + * @author soer9648 <soer9648@eucl.dk> */ $lang['menu'] = 'Brugerstyring'; $lang['noauth'] = '(Brugervalidering er ikke tilgængelig)'; @@ -34,6 +35,11 @@ $lang['search'] = 'Søg'; $lang['search_prompt'] = 'Udfør søgning'; $lang['clear'] = 'Nulstil søgefilter'; $lang['filter'] = 'Filter'; +$lang['export_all'] = 'Eksportér Alle Brugere (CSV)'; +$lang['export_filtered'] = 'Eksportér Filtrerede Brugerliste (CSV)'; +$lang['import'] = 'Importér Nye Brugere'; +$lang['line'] = 'Linje nr.'; +$lang['error'] = 'Fejlmeddelelse'; $lang['summary'] = 'Viser brugerne %1$d-%2$d ud af %3$d fundne. %4$d brugere totalt.'; $lang['nonefound'] = 'Ingen brugere fundet. %d brugere totalt.'; $lang['delete_ok'] = '%d brugere slettet'; @@ -54,3 +60,15 @@ $lang['add_ok'] = 'Bruger tilføjet uden fejl.'; $lang['add_fail'] = 'Tilføjelse af bruger mislykkedes'; $lang['notify_ok'] = 'Meddelelse sendt'; $lang['notify_fail'] = 'Meddelelse kunne ikke sendes'; +$lang['import_userlistcsv'] = 'Brugerlistefil (CSV):'; +$lang['import_header'] = 'Nyeste Import - Fejl'; +$lang['import_success_count'] = 'Bruger-Import: %d brugere fundet, %d importeret med succes.'; +$lang['import_failure_count'] = 'Bruger-Import: %d fejlet. Fejl er listet nedenfor.'; +$lang['import_error_fields'] = 'Utilstrækkelige felter, fandt %d, påkrævet 4.'; +$lang['import_error_baduserid'] = 'Bruger-id mangler'; +$lang['import_error_badname'] = 'Ugyldigt navn'; +$lang['import_error_badmail'] = 'Ugyldig email-adresse'; +$lang['import_error_upload'] = 'Import Fejlet. CSV-filen kunne ikke uploades eller er tom.'; +$lang['import_error_readfail'] = 'Import Fejlet. Ikke muligt at læse uploadede fil.'; +$lang['import_error_create'] = 'Ikke muligt at oprette brugeren'; +$lang['import_notify_fail'] = 'Notifikationsmeddelelse kunne ikke sendes for importerede bruger %s, med emailen %s.'; diff --git a/lib/plugins/usermanager/lang/de/lang.php b/lib/plugins/usermanager/lang/de/lang.php index 21be74f71..4b297b0dc 100644 --- a/lib/plugins/usermanager/lang/de/lang.php +++ b/lib/plugins/usermanager/lang/de/lang.php @@ -20,6 +20,8 @@ * @author Matthias Schulte <dokuwiki@lupo49.de> * @author Sven <Svenluecke48@gmx.d> * @author christian studer <cstuder@existenz.ch> + * @author Ben Fey <benedikt.fey@beck-heun.de> + * @author Jonas Gröger <jonas.groeger@gmail.com> */ $lang['menu'] = 'Benutzerverwaltung'; $lang['noauth'] = '(Authentifizierungssystem nicht verfügbar)'; @@ -67,6 +69,8 @@ $lang['add_ok'] = 'Nutzer erfolgreich angelegt'; $lang['add_fail'] = 'Nutzer konnte nicht angelegt werden'; $lang['notify_ok'] = 'Benachrichtigungsmail wurde versandt'; $lang['notify_fail'] = 'Benachrichtigungsmail konnte nicht versandt werden'; +$lang['import_userlistcsv'] = 'Benutzerliste (CSV-Datei):'; +$lang['import_header'] = 'Letzte Fehler bei Import'; $lang['import_success_count'] = 'User-Import: %d User gefunden, %d erfolgreich importiert.'; $lang['import_failure_count'] = 'User-Import: %d fehlgeschlagen. Fehlgeschlagene User sind nachfolgend aufgelistet.'; $lang['import_error_fields'] = 'Unzureichende Anzahl an Feldern: %d gefunden, benötigt sind 4.'; @@ -77,3 +81,4 @@ $lang['import_error_upload'] = 'Import fehlgeschlagen. Die CSV-Datei konnte ni $lang['import_error_readfail'] = 'Import fehlgeschlagen. Die hochgeladene Datei konnte nicht gelesen werden.'; $lang['import_error_create'] = 'User konnte nicht angelegt werden'; $lang['import_notify_fail'] = 'Notifikation konnte nicht an den importierten Benutzer %s (E-Mail: %s) gesendet werden.'; +$lang['import_downloadfailures'] = 'Fehler als CSV-Datei zur Korrektur herunterladen'; 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 @@ <?php + /** - * Finnish language file - * + * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) + * * @author otto@valjakko.net * @author Otto Vainio <otto@valjakko.net> * @author Teemu Mattila <ghcsystems@gmail.com> 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 <bruno.vey@gmail.com> * @author Antoine Turmel <geekshadow@gmail.com> * @author schplurtz <Schplurtz@laposte.net> + * @author Jérôme Brandt <jeromebrandt@gmail.com> */ $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'; 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 <szabo.david@gyumolcstarhely.hu> * @author Marton Sebok <sebokmarton@gmail.com> * @author Serenity87HUN <anikototh87@gmail.com> + * @author Marina Vladi <deldadam@gmail.com> */ $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'; 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 @@ <?php + /** - * Indonesian language file - * + * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) + * * @author Irwan Butar Butar <irwansah.putra@gmail.com> * @author Yustinus Waruwu <juswaruwu@gmail.com> */ 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 <jacopo.corbetta@gmail.com> * @author Matteo Pasotti <matteo@xquiet.eu> * @author snarchio@gmail.com + * @author Claudio Lanconelli <lancos@libero.it> */ $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'; 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'] = '通知メールを送信しました'; diff --git a/lib/plugins/usermanager/lang/ko/lang.php b/lib/plugins/usermanager/lang/ko/lang.php index 1905fadc2..ac129c95e 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 <aranet100@gmail.com> * @author Gerrit Uitslag <klapinklapin@gmail.com> + * @author Garam <rowain8@gmail.com> */ $lang['menu'] = '사용자 관리자'; $lang['noauth'] = '(사용자 인증이 불가능합니다)'; @@ -28,9 +29,9 @@ $lang['delete_selected'] = '선택 삭제'; $lang['edit'] = '편집'; $lang['edit_prompt'] = '이 사용자 편집'; $lang['modify'] = '바뀜 저장'; -$lang['search'] = '찾기'; -$lang['search_prompt'] = '찾기 실행'; -$lang['clear'] = '찾기 필터 재설정'; +$lang['search'] = '검색'; +$lang['search_prompt'] = '검색 수행'; +$lang['clear'] = '검색 필터 재설정'; $lang['filter'] = '필터'; $lang['export_all'] = '모든 사용자 목록 내보내기 (CSV)'; $lang['export_filtered'] = '필터된 사용자 목록 내보내기 (CSV)'; @@ -52,7 +53,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'] = '알림 이메일을 성공적으로 보냈습니다'; @@ -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'] = '알림 메시지를 가져온 %2$s (이메일: %1$s ) 사용자에게 보낼 수 없습니다.'; +$lang['import_notify_fail'] = '알림 메시지를 가져온 %s (이메일: %s) 사용자에게 보낼 수 없습니다.'; $lang['import_downloadfailures'] = '교정을 위한 CSV로 다운로드 실패'; 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 @@ <?php + /** - * Norwegianlanguage file - * + * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) + * * @author Thomas Nygreen <nygreen@gmail.com> * @author Arild Burud <arildb@met.no> * @author Torkill Bruland <torkar-b@online.no> * @author Rune M. Andersen <rune.andersen@gmail.com> * @author Jakob Vad Nielsen (me@jakobnielsen.net) - * @author Kjell Tore Næsgaard <kjell.t.nasgaard@ntnu.no> + * @author Kjell Tore Næsgaard <kjell.t.nasgaard@ntnu.no> * @author Knut Staring <knutst@gmail.com> * @author Lisa Ditlefsen <lisa@vervesearch.com> * @author Erik Pedersen <erik.pedersen@shaw.ca> 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 @@ <?php + /** - * polish language file - * + * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) + * * @author Grzegorz Żur <grzegorz.zur@gmail.com> * @author Mariusz Kujawski <marinespl@gmail.com> * @author Maciej Kurczewski <pipijajko@gmail.com> 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 <victor.westmann@gmail.com> * @author Leone Lisboa Magevski <leone1983@gmail.com> * @author Dário Estevão <darioems@gmail.com> + * @author Juliano Marconi Lanigra <juliano.marconi@gmail.com> */ $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'; diff --git a/lib/plugins/usermanager/lang/zh-tw/import.txt b/lib/plugins/usermanager/lang/zh-tw/import.txt new file mode 100644 index 000000000..a6bb5f6ef --- /dev/null +++ b/lib/plugins/usermanager/lang/zh-tw/import.txt @@ -0,0 +1,9 @@ +===== 批次匯入使用者 ===== + +需提供 CSV 格式的使用者列表檔案(UTF-8 編碼)。 +每列至少 4 欄,依序為:帳號、姓名、電郵、群組。 +各欄以半形逗號 (,) 分隔,有半形逗號的字串可用半形雙引號 ("") 分開,引號可用反斜線 (\) 跳脫。 +重複的使用者帳號會自動忽略。 +如需要範例檔案,可用上面的「匯出使用者」取得。 + +系統會為成功匯入的使用者產生密碼並寄信通知。 diff --git a/lib/plugins/usermanager/lang/zh-tw/lang.php b/lib/plugins/usermanager/lang/zh-tw/lang.php index c7126bd1a..3fb6b6712 100644 --- a/lib/plugins/usermanager/lang/zh-tw/lang.php +++ b/lib/plugins/usermanager/lang/zh-tw/lang.php @@ -9,21 +9,26 @@ * @author Wayne San <waynesan@zerozone.tw> * @author Li-Jiun Huang <ljhuang.tw@gmai.com> * @author Cheng-Wei Chien <e.cwchien@gmail.com> - * @author Danny Lin <danny0838@pchome.com.tw> * @author Shuo-Ting Jian <shoting@gmail.com> * @author syaoranhinata@gmail.com * @author Ichirou Uchiki <syaoranhinata@gmail.com> * @author tsangho <ou4222@gmail.com> + * @author Danny Lin <danny0838@gmail.com> */ $lang['menu'] = '帳號管理器'; + +// custom language strings for the plugin $lang['noauth'] = '(帳號認證尚未開放)'; $lang['nosupport'] = '(尚不支援帳號管理)'; + $lang['badauth'] = '錯誤的認證機制'; + $lang['user_id'] = '帳號'; $lang['user_pass'] = '密碼'; $lang['user_name'] = '名稱'; $lang['user_mail'] = '電郵'; $lang['user_groups'] = '群組'; + $lang['field'] = '欄位'; $lang['value'] = '設定值'; $lang['add'] = '增加'; @@ -36,8 +41,12 @@ $lang['search'] = '搜尋'; $lang['search_prompt'] = '開始搜尋'; $lang['clear'] = '重設篩選條件'; $lang['filter'] = '篩選條件 (Filter)'; -$lang['import'] = '匯入新的用戶'; +$lang['export_all'] = '匯出所有使用者 (CSV)'; +$lang['export_filtered'] = '匯出篩選後的使用者列表 (CSV)'; +$lang['import'] = '匯入新使用者'; +$lang['line'] = '列號'; $lang['error'] = '錯誤訊息'; + $lang['summary'] = '顯示帳號 %1$d-%2$d,共 %3$d 筆符合。共有 %4$d 個帳號。'; $lang['nonefound'] = '找不到帳號。共有 %d 個帳號。'; $lang['delete_ok'] = '已刪除 %d 個帳號'; @@ -45,10 +54,13 @@ $lang['delete_fail'] = '%d 個帳號無法刪除。'; $lang['update_ok'] = '已更新該帳號'; $lang['update_fail'] = '無法更新該帳號'; $lang['update_exists'] = '無法變更帳號名稱 (%s) ,因為有同名帳號存在。其他修改則已套用。'; + $lang['start'] = '開始'; $lang['prev'] = '上一頁'; $lang['next'] = '下一頁'; $lang['last'] = '最後一頁'; + +// added after 2006-03-09 release $lang['edit_usermissing'] = '找不到選取的帳號,可能已被刪除或改為其他名稱。'; $lang['user_notify'] = '通知使用者'; $lang['note_notify'] = '通知信只會在指定使用者新密碼時寄送。'; @@ -58,4 +70,18 @@ $lang['add_ok'] = '已新增使用者'; $lang['add_fail'] = '無法新增使用者'; $lang['notify_ok'] = '通知信已寄出'; $lang['notify_fail'] = '通知信無法寄出'; -$lang['import_error_readfail'] = '會入錯誤,無法讀取已經上傳的檔案'; + +// import & errors +$lang['import_userlistcsv'] = '使用者列表檔案 (CSV): '; +$lang['import_header'] = '最近一次匯入 - 失敗'; +$lang['import_success_count'] = '使用者匯入:找到 %d 個使用者,已成功匯入 %d 個。'; +$lang['import_failure_count'] = '使用者匯入:%d 個匯入失敗,列出於下。'; +$lang['import_error_fields'] = '欄位不足,需要 4 個,找到 %d 個。'; +$lang['import_error_baduserid'] = '使用者帳號遺失'; +$lang['import_error_badname'] = '名稱不正確'; +$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_downloadfailures'] = '下載失敗項的 CSV 檔案以供修正'; 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 <shoting@gmail.com> * @author Rachel <rzhang0802@gmail.com> * @author Yangyu Huang <yangyu.huang@gmail.com> + * @author oott123 <ip.192.168.1.1@qq.com> */ $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的错误信息以修正。'; |