diff options
Diffstat (limited to 'lib/plugins/extension')
-rw-r--r-- | lib/plugins/extension/admin.php | 6 | ||||
-rw-r--r-- | lib/plugins/extension/helper/extension.php | 8 | ||||
-rw-r--r-- | lib/plugins/extension/helper/list.php | 6 | ||||
-rw-r--r-- | lib/plugins/extension/helper/repository.php | 6 | ||||
-rw-r--r-- | lib/plugins/extension/lang/cs/intro_templates.txt | 1 | ||||
-rw-r--r-- | lib/plugins/extension/lang/cs/lang.php | 26 | ||||
-rw-r--r-- | lib/plugins/extension/lang/da/lang.php | 24 | ||||
-rw-r--r-- | lib/plugins/extension/lang/en/lang.php | 4 | ||||
-rw-r--r-- | lib/plugins/extension/lang/it/lang.php | 21 | ||||
-rw-r--r-- | lib/plugins/extension/lang/nl/lang.php | 2 | ||||
-rw-r--r-- | lib/plugins/extension/lang/zh-tw/intro_plugins.txt | 1 | ||||
-rw-r--r-- | lib/plugins/extension/lang/zh-tw/lang.php | 30 |
12 files changed, 124 insertions, 11 deletions
diff --git a/lib/plugins/extension/admin.php b/lib/plugins/extension/admin.php index 99c74848b..de4992937 100644 --- a/lib/plugins/extension/admin.php +++ b/lib/plugins/extension/admin.php @@ -75,10 +75,10 @@ class admin_plugin_extension extends DokuWiki_Admin_Plugin { case 'uninstall': $extension->setExtension($extname); $status = $extension->uninstall(); - if($status !== true) { - msg($status, -1); - } else { + if($status) { msg(sprintf($this->getLang('msg_delete_success'), hsc($extension->getDisplayName())), 1); + } else { + msg(sprintf($this->getLang('msg_delete_failed'), hsc($extension->getDisplayName())), -1); } break; case 'enable'; diff --git a/lib/plugins/extension/helper/extension.php b/lib/plugins/extension/helper/extension.php index 2aca0e218..dfa624907 100644 --- a/lib/plugins/extension/helper/extension.php +++ b/lib/plugins/extension/helper/extension.php @@ -799,7 +799,7 @@ class helper_plugin_extension_extension extends DokuWiki_Plugin { * * The directory is registered for cleanup when the class is destroyed * - * @return bool|string + * @return false|string */ protected function mkTmpDir(){ $dir = io_mktmpdir(); @@ -1079,7 +1079,7 @@ class helper_plugin_extension_extension extends DokuWiki_Plugin { * * @author Andreas Gohr <andi@splitbrain.org> * @param string $file The file to analyze - * @return string|bool false if the file can't be read, otherwise an "extension" + * @return string|false false if the file can't be read, otherwise an "extension" */ private function guess_archive($file) { $fh = fopen($file, 'rb'); @@ -1095,6 +1095,10 @@ class helper_plugin_extension_extension extends DokuWiki_Plugin { /** * Copy with recursive sub-directory support + * + * @param string $src filename path to file + * @param string $dst filename path to file + * @return bool|int|string */ private function dircopy($src, $dst) { global $conf; diff --git a/lib/plugins/extension/helper/list.php b/lib/plugins/extension/helper/list.php index 9b1988d84..872cccc8c 100644 --- a/lib/plugins/extension/helper/list.php +++ b/lib/plugins/extension/helper/list.php @@ -333,7 +333,6 @@ class helper_plugin_extension_list extends DokuWiki_Plugin { * Shortens the URL for display * * @param string $url - * * @return string HTML link */ function shortlink($url){ @@ -461,6 +460,7 @@ class helper_plugin_extension_list extends DokuWiki_Plugin { * @return string The HTML code */ function make_actions(helper_plugin_extension_extension $extension) { + global $conf; $return = ''; $errors = ''; @@ -492,6 +492,10 @@ class helper_plugin_extension_list extends DokuWiki_Plugin { $errors .= '<p class="permerror">'.$this->getLang('git').'</p>'; } + if ($extension->isEnabled() && in_array('Auth', $extension->getTypes()) && $conf['auth'] != $extension->getID()) { + $errors .= '<p class="permerror">'.$this->getLang('auth').'</p>'; + } + }else{ if (($canmod = $extension->canModify()) === true) { if ($extension->getDownloadURL()) { diff --git a/lib/plugins/extension/helper/repository.php b/lib/plugins/extension/helper/repository.php index 6ffe89eb7..5dc2707cf 100644 --- a/lib/plugins/extension/helper/repository.php +++ b/lib/plugins/extension/helper/repository.php @@ -32,7 +32,7 @@ class helper_plugin_extension_repository extends DokuWiki_Plugin { $request_needed = false; foreach ($list as $name) { $cache = new cache('##extension_manager##'.$name, '.repo'); - $result = null; + if (!isset($this->loaded_extensions[$name]) && $this->hasAccess() && !$cache->useCache(array('age' => 3600 * 24))) { $this->loaded_extensions[$name] = true; $request_data['ext'][] = $name; @@ -64,7 +64,7 @@ class helper_plugin_extension_repository extends DokuWiki_Plugin { public function hasAccess() { if ($this->has_access === null) { $cache = new cache('##extension_manager###hasAccess', '.repo'); - $result = null; + if (!$cache->useCache(array('age' => 3600 * 24, 'purge'=>1))) { $httpclient = new DokuHTTPClient(); $httpclient->timeout = 5; @@ -91,7 +91,7 @@ class helper_plugin_extension_repository extends DokuWiki_Plugin { */ public function getData($name) { $cache = new cache('##extension_manager##'.$name, '.repo'); - $result = null; + if (!isset($this->loaded_extensions[$name]) && $this->hasAccess() && !$cache->useCache(array('age' => 3600 * 24))) { $this->loaded_extensions[$name] = true; $httpclient = new DokuHTTPClient(); diff --git a/lib/plugins/extension/lang/cs/intro_templates.txt b/lib/plugins/extension/lang/cs/intro_templates.txt new file mode 100644 index 000000000..45abe952c --- /dev/null +++ b/lib/plugins/extension/lang/cs/intro_templates.txt @@ -0,0 +1 @@ +Toto jsou šablony, které jsou momentálně nainstalovány v této DokuWiki. Aktuálně používanu šablonu lze vybrat ve [[?do=admin&page=config|Správci rozšíření]].
\ No newline at end of file diff --git a/lib/plugins/extension/lang/cs/lang.php b/lib/plugins/extension/lang/cs/lang.php index 27b3a94a3..f6db2b153 100644 --- a/lib/plugins/extension/lang/cs/lang.php +++ b/lib/plugins/extension/lang/cs/lang.php @@ -15,6 +15,7 @@ $lang['notimplemented'] = 'Tato vychytávka není dosud implementována'; $lang['notinstalled'] = 'Toto rozšíření není instalováno'; $lang['alreadyenabled'] = 'Toto rozšíření je již povoleno'; $lang['alreadydisabled'] = 'Toto rozšíření je již vypnuto'; +$lang['pluginlistsaveerror'] = 'Došlo k chybě při ukládání seznamu zásuvných modulů'; $lang['unknownauthor'] = 'Neznámý autor'; $lang['unknownversion'] = 'Neznámá verze'; $lang['btn_info'] = 'Zobrazit více informací'; @@ -27,12 +28,15 @@ $lang['btn_reinstall'] = 'Přeinstalovat'; $lang['js']['reallydel'] = 'Opravdu odinstalovat toto rozšíření?'; $lang['search_for'] = 'Hledat rozšíření:'; $lang['search'] = 'Hledat'; +$lang['extensionby'] = '<strong>%s</strong> od %s'; +$lang['screenshot'] = 'Screenshot %s'; $lang['popularity'] = 'Popularita: %s%%'; $lang['homepage_link'] = 'Dokumenty'; $lang['bugs_features'] = 'Chyby'; $lang['tags'] = 'Štítky:'; $lang['author_hint'] = 'Vyhledat rozšíření podle tohoto autora'; $lang['installed'] = 'Nainstalováno:'; +$lang['downloadurl'] = 'URL stahování:'; $lang['repository'] = 'Repozitář:'; $lang['unknown'] = '<em>neznámý</em>'; $lang['installed_version'] = 'Nainstalovaná verze:'; @@ -41,6 +45,7 @@ $lang['available_version'] = 'Dostupná verze:'; $lang['compatible'] = 'Kompatibilní s:'; $lang['depends'] = 'Závisí na:'; $lang['similar'] = 'Podobný jako:'; +$lang['conflicts'] = 'Koliduje s:'; $lang['donate'] = 'Líbí se ti to?'; $lang['donate_action'] = 'Kup autorovi kávu!'; $lang['repo_retry'] = 'Opakovat'; @@ -54,4 +59,25 @@ $lang['status_disabled'] = 'zakázaný'; $lang['status_unmodifiable'] = 'neměnný'; $lang['status_plugin'] = 'zásuvný modul'; $lang['status_template'] = 'šablona'; +$lang['status_bundled'] = 'svázaný'; +$lang['msg_enabled'] = 'Zásuvný modul %s povolen'; +$lang['msg_disabled'] = 'Zásuvný modul %s zakázán'; $lang['msg_delete_success'] = 'Rozšíření odinstalováno'; +$lang['msg_template_install_success'] = 'Šablona %s úspěšně nainstalována'; +$lang['msg_template_update_success'] = 'Šablona %s úspěšně aktualizována'; +$lang['msg_plugin_install_success'] = 'Zásuvný modul %s úspěšně nainstalován.'; +$lang['msg_plugin_update_success'] = 'Zásuvný modul %s úspěšně aktualizován.'; +$lang['msg_upload_failed'] = 'Nahrávání souboru selhalo'; +$lang['missing_dependency'] = '<strong>Chybějící nebo zakázaná závislost:</strong> %s'; +$lang['security_issue'] = '<strong>Bezpečnostní problém:</strong> %s'; +$lang['security_warning'] = '<strong>Bezpečnostní varování:</strong> %s'; +$lang['update_available'] = '<strong>Aktualizace:</strong> Je dostupná nová verze %s.'; +$lang['wrong_folder'] = '<strong>Zásuvný modul nesprávně nainstalován:</strong> Přejmenujte adresár modulu "%s" na "%s".'; +$lang['error_badurl'] = 'Adresy URL by měly začínat s http nebo https'; +$lang['error_dircreate'] = 'Nelze vytvořit dočasný adresář pro přijetí stahování'; +$lang['error_download'] = 'Nelze stáhnout soubor: %s'; +$lang['error_findfolder'] = 'Nelze rozpoznat adresář pro rozšíření, je třeba stáhnout a instalovat ručně'; +$lang['noperms'] = 'Nelze zapisovat do adresáře pro rozšíření'; +$lang['notplperms'] = 'Nelze zapisovat do odkládacího adresáře'; +$lang['nopluginperms'] = 'Nelze zapisovat do adresáře se zásuvnými moduly'; +$lang['git'] = 'Toto rozšíření bylo nainstalováno přes git, nejspíš ho tady aktualizovat nechcete.'; diff --git a/lib/plugins/extension/lang/da/lang.php b/lib/plugins/extension/lang/da/lang.php new file mode 100644 index 000000000..c341bc5f9 --- /dev/null +++ b/lib/plugins/extension/lang/da/lang.php @@ -0,0 +1,24 @@ +<?php + +/** + * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) + * + * @author Søren Birk <soer9648@eucl.dk> + */ +$lang['update_available'] = '<strong>Opdatering:</strong> Ny version %s er tilgængelig.'; +$lang['wrong_folder'] = '<strong>Plugin ikke installeret korrekt:</strong> Omdøb plugin-mappe "%s" til "%s".'; +$lang['url_change'] = '<strong>URL ændret:</strong> Download-URL er blevet ændret siden sidste download. Kontrollér om den nye URL er valid, inden udvidelsen opdateres.<br />Ny: %s<br />Gammel: %s'; +$lang['error_badurl'] = 'URL\'er skal starte med http eller https'; +$lang['error_dircreate'] = 'Ikke i stand til at oprette midlertidig mappe til modtagelse af download'; +$lang['error_download'] = 'Ikke i stand til at downloade filen: %s'; +$lang['error_decompress'] = 'Ikke i stand til at dekomprimere den downloadede fil. Dette kan være et resultat af en dårlig download, hvor du i så fald bør du prøve igen; eller komprimeringsformatet kan være ukendt, hvor du i så fald bliver nød til at downloade og installere manuelt.'; +$lang['error_findfolder'] = 'Ikke i stand til at identificere udvidelsesmappe - du bliver nød til at downloade og installere manuelt.'; +$lang['error_copy'] = 'Der opstod en kopieringsfejl under installation af filer til mappen <em>%s</em>: disken kan være fuld, eller mangel på fil-tilladelser. Dette kan have resulteret i et delvist installeret plugin, og efterladt din wiki-installation ustabil.'; +$lang['noperms'] = 'Udvidelsesmappe er ikke skrivbar'; +$lang['notplperms'] = 'Skabelonmappe er ikke skrivbar'; +$lang['nopluginperms'] = 'Pluginmappe er ikke skrivbar'; +$lang['git'] = 'Udvidelsen blev installeret via git - du vil muligvis ikke opdatere herfra.'; +$lang['auth'] = 'Auth-plugin er ikke aktiveret i konfigurationen - overvej at deaktivere den.'; +$lang['install_url'] = 'Installér fra URL:'; +$lang['install_upload'] = 'Upload Udvidelse:'; +$lang['repo_error'] = 'Plugin-arkivet kunne ikke kontaktes. Kontrollér at din server kan kontakte www.dokuwiki.org kontrollér dine proxy-indstillinger.'; diff --git a/lib/plugins/extension/lang/en/lang.php b/lib/plugins/extension/lang/en/lang.php index 72c9b9e2d..d7541b422 100644 --- a/lib/plugins/extension/lang/en/lang.php +++ b/lib/plugins/extension/lang/en/lang.php @@ -69,7 +69,8 @@ $lang['status_bundled'] = 'bundled'; $lang['msg_enabled'] = 'Plugin %s enabled'; $lang['msg_disabled'] = 'Plugin %s disabled'; -$lang['msg_delete_success'] = 'Extension uninstalled'; +$lang['msg_delete_success'] = 'Extension %s uninstalled'; +$lang['msg_delete_failed'] = 'Uninstalling Extension %s failed'; $lang['msg_template_install_success'] = 'Template %s installed successfully'; $lang['msg_template_update_success'] = 'Template %s updated successfully'; $lang['msg_plugin_install_success'] = 'Plugin %s installed successfully'; @@ -94,6 +95,7 @@ $lang['noperms'] = 'Extension directory is not writable'; $lang['notplperms'] = 'Template directory is not writable'; $lang['nopluginperms'] = 'Plugin directory is not writable'; $lang['git'] = 'This extension was installed via git, you may not want to update it here.'; +$lang['auth'] = 'This auth plugin is not enabled in configuration, consider disabling it.'; $lang['install_url'] = 'Install from URL:'; $lang['install_upload'] = 'Upload Extension:'; diff --git a/lib/plugins/extension/lang/it/lang.php b/lib/plugins/extension/lang/it/lang.php index 7dff6c5b2..1aa658e0f 100644 --- a/lib/plugins/extension/lang/it/lang.php +++ b/lib/plugins/extension/lang/it/lang.php @@ -5,11 +5,18 @@ * * @author Francesco <francesco.cavalli@hotmail.com> * @author Fabio <fabioslurp@yahoo.it> + * @author Torpedo <dgtorpedo@gmail.com> */ +$lang['unknownauthor'] = 'Autore sconosciuto'; +$lang['unknownversion'] = 'Revisione sconosciuta'; +$lang['btn_info'] = 'Mostra maggiori informazioni'; +$lang['btn_update'] = 'Aggiorna'; +$lang['btn_uninstall'] = 'Disinstalla'; $lang['btn_enable'] = 'Abilita'; $lang['btn_disable'] = 'Disabilita'; $lang['btn_install'] = 'Installa'; $lang['btn_reinstall'] = 'Reinstalla'; +$lang['js']['reallydel'] = 'Sicuro di disinstallare questa estensione?'; $lang['search'] = 'Cerca'; $lang['homepage_link'] = 'Documenti'; $lang['bugs_features'] = 'Bug'; @@ -18,13 +25,18 @@ $lang['author_hint'] = 'Cerca estensioni per questo autore'; $lang['installed'] = 'Installato:'; $lang['downloadurl'] = 'URL download:'; $lang['repository'] = 'Repository'; +$lang['unknown'] = '<em>sconosciuto</em>'; $lang['installed_version'] = 'Versione installata'; $lang['install_date'] = 'Il tuo ultimo aggiornamento:'; $lang['available_version'] = 'Versione disponibile:'; $lang['compatible'] = 'Compatibile con:'; +$lang['depends'] = 'Dipende da:'; $lang['similar'] = 'Simile a:'; +$lang['conflicts'] = 'Conflitto con:'; $lang['donate'] = 'Simile a questo?'; +$lang['donate_action'] = 'Paga un caffè all\'autore!'; $lang['repo_retry'] = 'Riprova'; +$lang['provides'] = 'Fornisce:'; $lang['status'] = 'Status:'; $lang['status_installed'] = 'installato'; $lang['status_not_installed'] = 'non installato'; @@ -34,6 +46,15 @@ $lang['status_disabled'] = 'disabilitato'; $lang['status_unmodifiable'] = 'inmodificabile'; $lang['status_plugin'] = 'plugin'; $lang['status_template'] = 'modello'; +$lang['msg_enabled'] = 'Plugin %s abilitato'; +$lang['msg_disabled'] = 'Plugin %s disabilitato'; +$lang['msg_delete_success'] = 'Estensione %s disinstallata'; +$lang['msg_plugin_install_success'] = 'Plugin %s installato con successo'; +$lang['msg_plugin_update_success'] = 'Plugin %s aggiornato con successo'; +$lang['msg_upload_failed'] = 'Caricamento del file fallito'; +$lang['missing_dependency'] = '<strong>Dipendenza mancante o disabilitata: </strong> %s'; +$lang['update_available'] = '<strong>Aggiornamento:</strong> Nuova versione %s disponibile.'; +$lang['wrong_folder'] = '<strong>Plugin non installato correttamente:</strong> rinomina la directory del plugin "%s" in "%s".'; $lang['error_badurl'] = 'URLs deve iniziare con http o https'; $lang['error_dircreate'] = 'Impossibile creare una cartella temporanea per ricevere il download'; $lang['error_download'] = 'Impossibile scaricare il file: %s'; diff --git a/lib/plugins/extension/lang/nl/lang.php b/lib/plugins/extension/lang/nl/lang.php index a54924e93..f75f78121 100644 --- a/lib/plugins/extension/lang/nl/lang.php +++ b/lib/plugins/extension/lang/nl/lang.php @@ -63,7 +63,7 @@ $lang['status_template'] = 'template'; $lang['status_bundled'] = 'Gebundeld'; $lang['msg_enabled'] = 'Plugin %s ingeschakeld'; $lang['msg_disabled'] = 'Plugin %s uitgeschakeld'; -$lang['msg_delete_success'] = 'Uitbreiding gedeinstalleerd'; +$lang['msg_delete_success'] = 'Uitbreiding %s gedeinstalleerd'; $lang['msg_template_install_success'] = 'Template %s werd succesvol geïnstalleerd'; $lang['msg_template_update_success'] = 'Template %s werd succesvol geüpdatet'; $lang['msg_plugin_install_success'] = 'Plugin %s werd succesvol geïnstalleerd'; diff --git a/lib/plugins/extension/lang/zh-tw/intro_plugins.txt b/lib/plugins/extension/lang/zh-tw/intro_plugins.txt new file mode 100644 index 000000000..b5b77a267 --- /dev/null +++ b/lib/plugins/extension/lang/zh-tw/intro_plugins.txt @@ -0,0 +1 @@ +已經有一些外掛套件被安裝在你的DokuWiki之中。你可以在這裡啟用、禁用,甚至是完全移除它們。如外掛可更新也同時會顯示在這裡,請確保在更新前先閱讀過該套件之文件。
\ No newline at end of file diff --git a/lib/plugins/extension/lang/zh-tw/lang.php b/lib/plugins/extension/lang/zh-tw/lang.php index a86364d7a..79657ffeb 100644 --- a/lib/plugins/extension/lang/zh-tw/lang.php +++ b/lib/plugins/extension/lang/zh-tw/lang.php @@ -5,6 +5,7 @@ * * @author Stan <talktostan@gmail.com> * @author June-Hao Hou <junehao@gmail.com> + * @author lioujheyu <lioujheyu@gmail.com> */ $lang['menu'] = '延伸功能管理'; $lang['tab_plugins'] = '已安裝外掛'; @@ -28,20 +29,49 @@ $lang['btn_reinstall'] = '重新安裝'; $lang['js']['reallydel'] = '確定要移除此延伸功能?'; $lang['search_for'] = '搜尋延伸功能:'; $lang['search'] = '搜尋'; +$lang['homepage_link'] = '文件'; $lang['tags'] = '標籤:'; $lang['author_hint'] = '搜尋相同作者的延伸功能'; $lang['installed'] = '已安裝:'; $lang['downloadurl'] = '下載網址:'; +$lang['unknown'] = '<em>未知</em>'; $lang['installed_version'] = '已安裝版本:'; +$lang['install_date'] = '你最後一次更新: '; $lang['available_version'] = '可用版本:'; $lang['compatible'] = '相容於:'; +$lang['depends'] = '依賴於: '; +$lang['similar'] = '類似於: '; +$lang['conflicts'] = '相衝突於: '; +$lang['donate'] = '像這樣?'; +$lang['donate_action'] = '請作者一杯咖啡!'; $lang['repo_retry'] = '再試一次'; $lang['status'] = '狀態:'; $lang['status_installed'] = '已安裝'; $lang['status_not_installed'] = '未安裝'; +$lang['status_protected'] = '已保護'; $lang['status_enabled'] = '作用中'; $lang['status_disabled'] = '停用中'; +$lang['status_unmodifiable'] = '不可更動'; $lang['status_plugin'] = '外掛'; +$lang['status_template'] = '模板'; +$lang['status_bundled'] = '已綑綁內附'; +$lang['msg_enabled'] = '外掛 %s 已啟用'; +$lang['msg_disabled'] = '外掛 %s 已禁用'; +$lang['msg_delete_success'] = '附加元件已移除'; +$lang['msg_template_install_success'] = '模板 %s 以成功安裝'; +$lang['msg_template_update_success'] = '模板 %s 以成功更新'; +$lang['msg_plugin_install_success'] = '外掛 %s 以成功安裝'; +$lang['msg_plugin_update_success'] = '外掛 %s 以成功更新'; +$lang['msg_upload_failed'] = '上傳檔案失敗'; +$lang['missing_dependency'] = '<strong>遺失或禁用相依性套件:</strong> %s'; +$lang['security_issue'] = '<strong>安全性問題:</strong> %s'; +$lang['security_warning'] = '<strong>安全問題警告:</strong> %s'; +$lang['update_available'] = '<strong>更新:</strong> 已可取得 %s 的新版本'; +$lang['wrong_folder'] = '<strong>外掛安裝不正確:</strong> 將外掛資料夾從 "%s" 更名至 "%s"。'; +$lang['url_change'] = '<strong>網址已變更:</strong> 自從上次下載後下載網址已變更。在更新延伸功能前請先檢查新網址是否可用。<br />新: %s<br />舊: %s'; +$lang['error_download'] = '無法下載檔案:%s'; +$lang['error_decompress'] = '無法解壓縮檔案。這可能是下載品質不佳所致,在這個情況下你應該再試一次;也有可能是因為無法辨識的壓縮格式,在這個情況下你應該自行下載並手動安裝'; +$lang['error_findfolder'] = '無法辨認延伸功能資料夾,你必須自行下載並手動安裝'; $lang['noperms'] = '延伸功能資料夾無法寫入'; $lang['notplperms'] = '版型資料夾無法寫入'; $lang['nopluginperms'] = '外掛資料夾無法寫入'; |