From 6009e7c04ca85b2ce621dfdd59eef9240583b005 Mon Sep 17 00:00:00 2001 From: Nayenezgani Date: Fri, 13 Oct 2017 12:09:55 +0200 Subject: [PATCH 1/4] Add Czech translation --- filemanager-l10n.php | 94 +++++++++++++++++++++++++++++++++++++++++--- tinyfilemanager.php | 2 +- 2 files changed, 90 insertions(+), 6 deletions(-) diff --git a/filemanager-l10n.php b/filemanager-l10n.php index 92e4d60..1788bb3 100644 --- a/filemanager-l10n.php +++ b/filemanager-l10n.php @@ -1,6 +1,6 @@ + "fr" => array( "Username" => "Utilisateur", "Password" => "Mot de passe", @@ -11,7 +11,7 @@ return array( "Save" => "Sauvegarder", "Select all" => "Tout sélectionner", "Unselect all" => "Tout déselectionner", - "Cancel" => "Annuler", + "Cancel" => "Annuler", "File" => "Fichier", "Files:" => "Fichiers:", "files:" => "fichiers:", @@ -21,7 +21,7 @@ return array( "Select folder:" => "Sélectionner un dossier:", "Download" => "Télécharger", "Open" => "Ouvrir", - "Back" => "Retour", + "Back" => "Retour", "File not found" => "Fichier non trouvé", "File Saved Successfully" => "Fichier sauvegarder", "FILE EXTENSION HAS NOT SUPPORTED" => "EXTENSION DE FICHIER NON SUPPORTE", @@ -52,7 +52,7 @@ return array( "New name" => "Nouveau nom", "Uploading files" => "Envoyer des fichiers", "Copying" => "Copier", - "Create New Item" => "Créer un nouvel élément", + "Create New Item" => "Créer un nouvel élément", "Item Name" => "Nom de l'élément", "Item Type" => "Type d'élement", "Find a item in current folder..." => "Trouver un élément dans le dossier actuel...", @@ -61,5 +61,89 @@ return array( "Name" => "Nom", "Advanced Edit" => "Edition avancée", "Advanced Editor" => "Editeur avancé" - ) + ), + "cs" => + array( + "Username" => "Uživatelské jméno", + "Password" => "Heslo", + "Login" => "Přihlášení", + "Logout" => "Odhlášení", + "Move" => "Přesun", + "Copy" => "Kopírování", + "Save" => "Uložení", + "Select all" => "Označit vše", + "Unselect all" => "Zrušit označení", + "Cancel" => "Zrušit", + "File" => "Soubor", + "Files:" => "Soubory:", + "files:" => "soubory:", + "Source folder:" => "Zdrojový adresář:", + "Source path:" => "Zdrojová cesta:", + "Destination folder:" => "Cílová cesta:", + "Select folder:" => "Vyberte adresář:", + "Download" => "Stažení", + "Open" => "Otevřít", + "Back" => "Zpět", + "File not found" => "Soubor nenalezen", + "File Saved Successfully" => "Soubor byl úspěšně uložen", + "FILE EXTENSION HAS NOT SUPPORTED" => "NEPODPOROVANÁ PŘÍPONA SOUBORU", + "Change" => "Změna", + "Size" => "Velikost", + "Modified" => "Změněno", + "Owner" => "Vlastník", + "Invert selection" => "Obrátit výběr", + "Search" => "Vyhledat", + "Search Results" => "Výsledek hledání", + "Upload files" => "Nahrát soubor(y)", + "New folder" => "Nový adresář", + "Folder" => "Adresář", + "folders:" => "adresáře:", + "Delete" => "Výmaz", + "Rename" => "Přejmenování", + "Copy to..." => "Kopírovat do...", + "Direct link" => "Přímý odkaz", + "Change Permissions" => "Změna oprávnění", + "Full path:" => "Celá cesta:", + "Full size:" => "Celková velikost:", + "File size:" => "Velikost souboru:", + "MIME-type:" => "Typ MIME:", + "Group" => "Skupina", + "Other" => "Ostatní", + "Read" => "Čtení", + "Write" => "Zápis", + "Execute" => "Spuštění", + "New name" => "Nový název", + "Uploading files" => "Nahrávání souboru", + "Copying" => "Kopírování", + "Create New Item" => "Vytvořit novou položku", + "Item Name" => "Název položky", + "Item Type" => "Typ položky", + "Find a item in current folder..." => "Hledání položky v aktuálním adresáři...", + "Close" => "Zavřít", + "Create Now" => "Vytvořit", + "Name" => "Název", + "Edit" => "Změna", + "Plain Editor" => "Základní editor", + "Advanced" => "Rozšířený", + "Advanced Edit" => "Rozšířená změna", + "Advanced Editor" => "Rozšíření editor", + "Zip" => "Komprimovat (ZIP)", + "UnZip to folder" => "Rozbalit do adresáře", + "Backup" => "Záloha", + "Search" => "Hledání", + "Upload" => "Nahrát", + "File %s created" => "Soubor %s vytvořen", + "File %s already exists" => "Soubor %s již existuje", + "Folder %s created" => "Adresář %s vytvořen", + "Folder %s already exists" => "Adresář %s již existuje", + "Folder %s not created" => "Adresář %s nebyl vytvořen", + "Mail" => "E-mail", + "Actions" => "Akce", + "Perms" => "Oprávnění", + "File info" => "Informace o souboru", + "%s bytes" => "%s bytů", + "Folder is empty" => "Adresář je prázdný", + "Delete selected files and folders?" => "Vymazat označené soubory a adresáře?", + "Create archive?" => "Vytvořit archiv?", + ), ); diff --git a/tinyfilemanager.php b/tinyfilemanager.php index 90f5bf8..586508a 100644 --- a/tinyfilemanager.php +++ b/tinyfilemanager.php @@ -1119,7 +1119,7 @@ $all_files_size = 0; -Actions + Date: Fri, 13 Oct 2017 16:06:23 +0200 Subject: [PATCH 2/4] Czech language translation update --- filemanager-l10n.php | 46 +++++++++++++++++++++++--------------------- 1 file changed, 24 insertions(+), 22 deletions(-) diff --git a/filemanager-l10n.php b/filemanager-l10n.php index 1788bb3..a7e797f 100644 --- a/filemanager-l10n.php +++ b/filemanager-l10n.php @@ -106,7 +106,7 @@ return array( "Full path:" => "Celá cesta:", "Full size:" => "Celková velikost:", "File size:" => "Velikost souboru:", - "MIME-type:" => "Typ MIME:", + "MIME-type:" => "Typ MIME:", "Group" => "Skupina", "Other" => "Ostatní", "Read" => "Čtení", @@ -122,28 +122,30 @@ return array( "Close" => "Zavřít", "Create Now" => "Vytvořit", "Name" => "Název", - "Edit" => "Změna", - "Plain Editor" => "Základní editor", - "Advanced" => "Rozšířený", + "Edit" => "Změna", + "Plain Editor" => "Základní editor", + "Advanced" => "Rozšířený", "Advanced Edit" => "Rozšířená změna", "Advanced Editor" => "Rozšíření editor", - "Zip" => "Komprimovat (ZIP)", - "UnZip to folder" => "Rozbalit do adresáře", - "Backup" => "Záloha", - "Search" => "Hledání", - "Upload" => "Nahrát", - "File %s created" => "Soubor %s vytvořen", - "File %s already exists" => "Soubor %s již existuje", - "Folder %s created" => "Adresář %s vytvořen", - "Folder %s already exists" => "Adresář %s již existuje", - "Folder %s not created" => "Adresář %s nebyl vytvořen", - "Mail" => "E-mail", - "Actions" => "Akce", - "Perms" => "Oprávnění", - "File info" => "Informace o souboru", - "%s bytes" => "%s bytů", - "Folder is empty" => "Adresář je prázdný", - "Delete selected files and folders?" => "Vymazat označené soubory a adresáře?", - "Create archive?" => "Vytvořit archiv?", + "Zip" => "Komprimovat (ZIP)", + "UnZip" => "Rozbalit", + "UnZip to folder" => "Rozbalit do adresáře", + "Backup" => "Záloha", + "Search" => "Hledání", + "Upload" => "Nahrát", + "File %s created" => "Soubor %s vytvořen", + "File %s already exists" => "Soubor %s již existuje", + "Folder %s created" => "Adresář %s vytvořen", + "Folder %s already exists" => "Adresář %s již existuje", + "Folder %s not created" => "Adresář %s nebyl vytvořen", + "Mail" => "E-mail", + "Actions" => "Akce", + "Perms" => "Oprávnění", + "File info" => "Informace o souboru", + "%s bytes" => "%s bytů", + "Folder is empty" => "Adresář je prázdný", + "Delete selected files and folders?" => "Vymazat označené soubory a adresáře?", + "Selected files and folder deleted" => "Označené soubory a adresáře byly vymazány", + "Create archive?" => "Vytvořit archiv?", ), ); From d5158310520d2663cfe21d9a5c27262e8225e6f6 Mon Sep 17 00:00:00 2001 From: twiedermann Date: Sat, 14 Oct 2017 07:33:43 +0200 Subject: [PATCH 3/4] User config improvements --- tinyfilemanager.php | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/tinyfilemanager.php b/tinyfilemanager.php index 586508a..83f811e 100644 --- a/tinyfilemanager.php +++ b/tinyfilemanager.php @@ -41,7 +41,7 @@ $send_mail = false; $toMailId = ""; //yourmailid@mail.com // Default timezone for date() and time() - http://php.net/manual/en/timezones.php -$default_timezone = 'Asia/Kolkata'; // UTC+5:30 +$default_timezone = 'Etc/UTC'; // UTC // Root path for file manager $root_path = $_SERVER['DOCUMENT_ROOT']; @@ -54,11 +54,16 @@ $root_url = ''; $http_host = $_SERVER['HTTP_HOST']; // input encoding for iconv -$iconv_input_encoding = 'CP1251'; +$iconv_input_encoding = 'UTF-8'; // date() format for file modification date $datetime_format = 'd.m.y H:i'; +// include user config php file +if (defined('FM_CONFIG') && is_files(FM_CONFIG) ) { + include(FM_CONFIG); +} + //--- EDIT BELOW CAREFULLY OR DO NOT EDIT AT ALL // if fm included From a1dc8df2e4ec738016556d0df7c050041ce3627c Mon Sep 17 00:00:00 2001 From: twiedermann Date: Sat, 14 Oct 2017 07:48:38 +0200 Subject: [PATCH 4/4] Typo fix --- tinyfilemanager.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tinyfilemanager.php b/tinyfilemanager.php index 83f811e..c179cf9 100644 --- a/tinyfilemanager.php +++ b/tinyfilemanager.php @@ -60,7 +60,7 @@ $iconv_input_encoding = 'UTF-8'; $datetime_format = 'd.m.y H:i'; // include user config php file -if (defined('FM_CONFIG') && is_files(FM_CONFIG) ) { +if (defined('FM_CONFIG') && is_file(FM_CONFIG) ) { include(FM_CONFIG); } @@ -2072,9 +2072,9 @@ function select_all(){var l=get_checkboxes();change_checkboxes(l,true);} function unselect_all(){var l=get_checkboxes();change_checkboxes(l,false);} function invert_all(){var l=get_checkboxes();change_checkboxes(l);} function mailto(p,f){var http=new XMLHttpRequest(); var params="path="+p+"&file="+f+"&type=mail&ajax=true"; http.open("POST", '', true);http.setRequestHeader("Content-type", "application/x-www-form-urlencoded");http.onreadystatechange=function(){if(http.readyState == 4 && http.status == 200){ alert(http.responseText);}} -http.send(params); +http.send(params); } -function showSearch(u){var http=new XMLHttpRequest();var params="path="+u+"&type=search&ajax=true";http.open("POST", '', true); http.setRequestHeader("Content-type", "application/x-www-form-urlencoded");http.onreadystatechange=function(){if(http.readyState == 4 && http.status == 200){ window.searchObj = http.responseText; document.getElementById('searchresultWrapper').innerHTML = "";window.location.hash="#searchResult"}} +function showSearch(u){var http=new XMLHttpRequest();var params="path="+u+"&type=search&ajax=true";http.open("POST", '', true); http.setRequestHeader("Content-type", "application/x-www-form-urlencoded");http.onreadystatechange=function(){if(http.readyState == 4 && http.status == 200){ window.searchObj = http.responseText; document.getElementById('searchresultWrapper').innerHTML = "";window.location.hash="#searchResult"}} http.send(params);} var searchEl = document.querySelector('input[type=search]');var timeout = null;searchEl.onkeyup = function(evt) {clearTimeout(timeout);var data = JSON.parse(window.searchObj);var searchTerms = document.querySelector('input[type=search]').value;timeout = setTimeout(function () {if(searchTerms.length>=2) {var res = getSearchResult(data,searchTerms);var f1='',f2='';res.folders.forEach(function (d){f1+='
  • '+d.name+'
  • '; });res.files.forEach(function (d){f2+='
  • '+d.name+'
  • ';});document.getElementById('searchresultWrapper').innerHTML = '
    '+f1+f2+'
    ';}},500);}; function getSearchResult(data,searchTerms) {var folders=[],files=[];data.forEach(function(d){if(d.type === 'folder') { getSearchResult(d.items,searchTerms);if(d.name.toLowerCase().match(searchTerms)) {folders.push(d);}} else if(d.type === 'file') {if(d.name.toLowerCase().match(searchTerms)) {files.push(d);} }}); return {folders: folders, files: files};}