From b59cff8b714aa11b5b1afd209e9d73f6803883cd Mon Sep 17 00:00:00 2001 From: Gerrit Uitslag <klapinklapin@gmail.com> Date: Sat, 21 Sep 2013 02:15:39 +0200 Subject: [PATCH] Move strings to language files. Fix lang key --- lib/plugins/usermanager/admin.php | 8 ++++---- lib/plugins/usermanager/lang/en/lang.php | 5 ++++- lib/plugins/usermanager/lang/nl/lang.php | 3 +-- 3 files changed, 9 insertions(+), 7 deletions(-) diff --git a/lib/plugins/usermanager/admin.php b/lib/plugins/usermanager/admin.php index bea5de177..4abef37ff 100644 --- a/lib/plugins/usermanager/admin.php +++ b/lib/plugins/usermanager/admin.php @@ -143,7 +143,7 @@ class admin_plugin_usermanager extends DokuWiki_Admin_Plugin { $delete_disable = $this->_auth->canDo('delUser') ? '' : 'disabled="disabled"'; $editable = $this->_auth->canDo('UserMod'); - $export_label = empty($this->_filter) ? $this->lang['export_all'] : $this->lang[export_filtered]; + $export_label = empty($this->_filter) ? $this->lang['export_all'] : $this->lang['export_filtered']; print $this->locale_xhtml('intro'); print $this->locale_xhtml('list'); @@ -422,7 +422,7 @@ class admin_plugin_usermanager extends DokuWiki_Admin_Plugin { print $this->locale_xhtml('import'); ptln(' <form action="'.wl($ID).'" method="post" enctype="multipart/form-data">',$indent); formSecurityToken(); - ptln(' <label>User list file (csv): <input type="file" name="import" /></label>',$indent); + ptln(' <label>'.$this->lang['import_userlistcsv'].'<input type="file" name="import" /></label>',$indent); ptln(' <input type="submit" name="fn[import]" value="'.$this->lang['import'].'" />',$indent); ptln(' <input type="hidden" name="do" value="admin" />',$indent); ptln(' <input type="hidden" name="page" value="usermanager" />',$indent); @@ -435,7 +435,7 @@ class admin_plugin_usermanager extends DokuWiki_Admin_Plugin { if ($this->_import_failures) { $digits = strlen(count($this->_import_failures)); ptln('<div class="level3 import_failures">',$indent); - ptln(' <h3>Most Recent Import - Failures</h3>'); + ptln(' <h3>'.$this->lang['import_header'].'</h3>'); ptln(' <table class="import_failures">',$indent); ptln(' <thead>',$indent); ptln(' <tr>',$indent); @@ -460,7 +460,7 @@ class admin_plugin_usermanager extends DokuWiki_Admin_Plugin { } ptln(' </tbody>',$indent); ptln(' </table>',$indent); - ptln(' <p><a href="'.$failure_download_link.'">Download Failures as CSV for correction</a></p>'); + ptln(' <p><a href="'.$failure_download_link.'">'.$this->lang['import_downloadfailures'].'</a></p>'); ptln('</div>'); } diff --git a/lib/plugins/usermanager/lang/en/lang.php b/lib/plugins/usermanager/lang/en/lang.php index 69119e196..f87c77afb 100644 --- a/lib/plugins/usermanager/lang/en/lang.php +++ b/lib/plugins/usermanager/lang/en/lang.php @@ -61,7 +61,9 @@ $lang['add_fail'] = 'User addition failed'; $lang['notify_ok'] = 'Notification email sent'; $lang['notify_fail'] = 'Notification email could not be sent'; -// import errors +// import & errors +$lang['import_userlistcsv'] = 'User list file (CSV): '; +$lang['import_header'] = 'Most Recent Import - Failures'; $lang['import_success_count'] = 'User Import: %d users found, %d imported successfully.'; $lang['import_failure_count'] = 'User Import: %d failed. Failures are listed below.'; $lang['import_error_fields'] = "Insufficient fields, found %d, require 4."; @@ -72,5 +74,6 @@ $lang['import_error_upload'] = 'Import Failed. The csv file could not be upload $lang['import_error_readfail'] = 'Import Failed. Unable to read uploaded file.'; $lang['import_error_create'] = 'Unable to create the user'; $lang['import_notify_fail'] = 'Notification message could not be sent for imported user, %s with email %s.'; +$lang['import_downloadfailures'] = 'Download Failures as CSV for correction'; diff --git a/lib/plugins/usermanager/lang/nl/lang.php b/lib/plugins/usermanager/lang/nl/lang.php index 7be10c16a..da628903d 100644 --- a/lib/plugins/usermanager/lang/nl/lang.php +++ b/lib/plugins/usermanager/lang/nl/lang.php @@ -14,7 +14,6 @@ * @author Timon Van Overveldt <timonvo@gmail.com> * @author Jeroen * @author Ricardo Guijt <ricardoguijt@gmail.com> - * @author Gerrit <klapinklapin@gmail.com> * @author Gerrit Uitslag <klapinklapin@gmail.com> */ $lang['menu'] = 'Gebruikersmanager'; @@ -39,7 +38,7 @@ $lang['search_prompt'] = 'Voer zoekopdracht uit'; $lang['clear'] = 'Verwijder zoekfilter'; $lang['filter'] = 'Filter'; $lang['export_all'] = 'Exporteer Alle Gebruikers (CSV)'; -$lang['export_filtered'] = 'Exporteer de lijst van Gefilterde Gebruikers (CSV)'; +$lang['export_filtered'] = 'Exporteer Gefilterde Gebruikers (CSV)'; $lang['import'] = 'Importeer Nieuwe Gebruikers'; $lang['line'] = 'Regelnummer'; $lang['error'] = 'Foutmelding'; -- GitLab