From 8b7644089694705045af07dcff115db4217f9800 Mon Sep 17 00:00:00 2001 From: Frederic Marchal Date: Mon, 14 Apr 2014 13:06:00 +0200 Subject: [PATCH] May fix some errors in sarg-php Sarg-php was in a sorry state but as Jose Vicente Mondejar kindly provided a translation, I felt obliged to try to improve things a bit. I can't test it on my computer. I hope I didn't broke it more than it was. --- sarg-php/INSTALL | 4 +- sarg-php/LANGUAGES | 5 +- sarg-php/config.php.inc | 13 +++ sarg-php/language.php | 63 ------------ sarg-php/locale/en_EN/LC_MESSAGES/messages.po | 52 +++++++--- sarg-php/locale/es/LC_MESSAGES/messages.mo | Bin 0 -> 842 bytes sarg-php/locale/es/LC_MESSAGES/messages.po | 74 ++++++++++++++ sarg-php/locale/fr/LC_MESSAGES/messages.po | 65 +++++++++---- sarg-php/locale/pt_BR/LC_MESSAGES/messages.po | 65 +++++++++---- sarg-php/locale/ru/LC_MESSAGES/messages.po | 65 +++++++++---- sarg-php/sarg-block-it.php | 19 ++-- sarg-php/sarg-squidguard-block.php | 28 ++++-- sarg-php/sarg-squidguard-block2.php | 35 +++++-- sarg-php/translate.this | 90 +++++++++--------- sarg-php/update-mo.sh | 8 ++ sarg-php/update-po.sh | 9 ++ 16 files changed, 390 insertions(+), 205 deletions(-) create mode 100644 sarg-php/config.php.inc delete mode 100755 sarg-php/language.php create mode 100644 sarg-php/locale/es/LC_MESSAGES/messages.mo create mode 100644 sarg-php/locale/es/LC_MESSAGES/messages.po create mode 100644 sarg-php/update-mo.sh create mode 100644 sarg-php/update-po.sh diff --git a/sarg-php/INSTALL b/sarg-php/INSTALL index e3e887b..2e7f45b 100644 --- a/sarg-php/INSTALL +++ b/sarg-php/INSTALL @@ -1,9 +1,7 @@ * To use sarg-squidGuard you need to change: -1. These two variables on sarg-squidguard-block.php file: -$SargConf = "/usr/local/sarg/sarg.conf"; -$squidGuardConf = "/usr/local/squidGuard/squidGuard.conf"; +1. These the variables in config.php.inc file: 2.change the squidGuard db file to the same httpd process owner: chown apache /var/www/html/sarg-php diff --git a/sarg-php/LANGUAGES b/sarg-php/LANGUAGES index 3037923..6008097 100644 --- a/sarg-php/LANGUAGES +++ b/sarg-php/LANGUAGES @@ -1,9 +1,10 @@ This PHP modules is under i18n. Available languages: - English Pedro Orso + English Pedro Orso Brazilian_Portuguese Pedro Orso - French Jacques GRILLOT + French Jacques GRILLOT + Spanish Jose Vicente Mondejar Russian Michael Stepanenko Thank you, my friends. diff --git a/sarg-php/config.php.inc b/sarg-php/config.php.inc new file mode 100644 index 0000000..cc03867 --- /dev/null +++ b/sarg-php/config.php.inc @@ -0,0 +1,13 @@ + diff --git a/sarg-php/language.php b/sarg-php/language.php deleted file mode 100755 index 51d469a..0000000 --- a/sarg-php/language.php +++ /dev/null @@ -1,63 +0,0 @@ - diff --git a/sarg-php/locale/en_EN/LC_MESSAGES/messages.po b/sarg-php/locale/en_EN/LC_MESSAGES/messages.po index 1f23a04..6f5ff42 100755 --- a/sarg-php/locale/en_EN/LC_MESSAGES/messages.po +++ b/sarg-php/locale/en_EN/LC_MESSAGES/messages.po @@ -8,42 +8,64 @@ msgid "" msgstr "" "Project-Id-Version: sarg-squidGuard 1.0\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2004-08-12 11:14-0300\n" +"POT-Creation-Date: 2014-04-14 12:46+0200\n" "PO-Revision-Date: 2004-08-12 11:14-0400\n" "Last-Translator: Pedro Lineu Orso \n" "Language-Team: English\n" +"Language: \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=ISO-8859-1\n" "Content-Transfer-Encoding: 8bit\n" -#: sarg-squidguard-block2.php:10 -msgid "Could not open the file" +#: sarg-block-it.php:32 +msgid "No URL passed as argument" msgstr "" -#: sarg-squidguard-block2.php:19 +#: sarg-block-it.php:40 sarg-squidguard-block2.php:62 +#, php-format +msgid "Could not open file: %s" +msgstr "" + +#: sarg-block-it.php:47 sarg-squidguard-block2.php:69 msgid "Write error" msgstr "" -#: sarg-squidguard-block2.php:23 +#: sarg-block-it.php:50 sarg-squidguard-block2.php:72 msgid "Done!" msgstr "" -#: sarg-squidguard-block2.php:27 -msgid "Return" +#: sarg-block-it.php:52 sarg-squidguard-block2.php:74 +#, php-format +msgid "Return to Sarg." msgstr "" -#: sarg-squidguard-block2.php:30 -msgid " to Sarg." +#: sarg-squidguard-block2.php:32 +msgid "No file passed as argument" msgstr "" -#: sarg-squidguard-block.php:29 -msgid "Sarg-SquidGuard - URL Blocking" +#: sarg-squidguard-block2.php:38 +msgid "No url passed as argument" +msgstr "" + +#: sarg-squidguard-block2.php:52 +#, php-format +msgid "Invalid locale %s" msgstr "" -#: sarg-squidguard-block.php:33 -msgid "Choose the rule set where" +#: sarg-squidguard-block.php:37 +#, php-format +msgid "Invalid locale: %s" +msgstr "" + +#: sarg-squidguard-block.php:48 +msgid "No URL to block" +msgstr "" + +#: sarg-squidguard-block.php:66 +msgid "Sarg-SquidGuard - URL Blocking" msgstr "" -#: sarg-squidguard-block.php:36 -msgid "will by added" +#: sarg-squidguard-block.php:69 +#, php-format +msgid "Choose the rule set where %s will be added" msgstr "" diff --git a/sarg-php/locale/es/LC_MESSAGES/messages.mo b/sarg-php/locale/es/LC_MESSAGES/messages.mo new file mode 100644 index 0000000000000000000000000000000000000000..1618b3af145503912edf92ba9b22dc080fd6aa30 GIT binary patch literal 842 zc-n1|&2AGh5XapQ3IxHS7lioG6fOwlvRjIjZULdD5dLoYFVOX5zIo0Rf#O zCyq^?L+=EX)~LmqX3OkgdF)@4+c@fyT&67%=NDB?uf#v|kZ%`5lTWxPJg+qfTbWu>WnkX@&& z&s89oz)SMuQ`k2tS{|WAR*z2y%E99S4axQ#KFfy67>SyDXh&w%0;vBxkfG=b{5Y4U+d*>Vyu uFzwTd*r)sm-G97gUk?kM^kkd8sF%i;EA%NlT{tB?y77BZ<4;N(P2x9o1l#oh literal 0 Hc-jL100001 diff --git a/sarg-php/locale/es/LC_MESSAGES/messages.po b/sarg-php/locale/es/LC_MESSAGES/messages.po new file mode 100644 index 0000000..a9a7624 --- /dev/null +++ b/sarg-php/locale/es/LC_MESSAGES/messages.po @@ -0,0 +1,74 @@ +msgid "" +msgstr "" +"Project-Id-Version: sarg-squidGuard 1.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2014-04-14 12:46+0200\n" +"PO-Revision-Date: 2014-04-14 11:19+0200\n" +"Last-Translator: José Vicente Mondéjar \n" +"Language-Team: Spanish\n" +"Language: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=charset=ISO-8859-1\n" +"Content-Transfer-Encoding: 8bit\n" + +#: sarg-block-it.php:32 +msgid "No URL passed as argument" +msgstr "" + +#: sarg-block-it.php:40 sarg-squidguard-block2.php:62 +#, fuzzy, php-format +msgid "Could not open file: %s" +msgstr "No se pudo abrir el fichero" + +#: sarg-block-it.php:47 sarg-squidguard-block2.php:69 +msgid "Write error" +msgstr "Error de escritura" + +#: sarg-block-it.php:50 sarg-squidguard-block2.php:72 +msgid "Done!" +msgstr "Hecho!" + +#: sarg-block-it.php:52 sarg-squidguard-block2.php:74 +#, php-format +msgid "Return to Sarg." +msgstr "" + +#: sarg-squidguard-block2.php:32 +msgid "No file passed as argument" +msgstr "" + +#: sarg-squidguard-block2.php:38 +msgid "No url passed as argument" +msgstr "" + +#: sarg-squidguard-block2.php:52 +#, php-format +msgid "Invalid locale %s" +msgstr "" + +#: sarg-squidguard-block.php:37 +#, php-format +msgid "Invalid locale: %s" +msgstr "" + +#: sarg-squidguard-block.php:48 +msgid "No URL to block" +msgstr "" + +#: sarg-squidguard-block.php:66 +msgid "Sarg-SquidGuard - URL Blocking" +msgstr "Sarg-SquidGuard - Bloqueo de URLs" + +#: sarg-squidguard-block.php:69 +#, fuzzy, php-format +msgid "Choose the rule set where %s will be added" +msgstr "Elegir el conjunto de reglas donde" + +#~ msgid "Return" +#~ msgstr "Volver" + +#~ msgid " to Sarg." +#~ msgstr " a Sarg." + +#~ msgid "will by added" +#~ msgstr "será añadido" diff --git a/sarg-php/locale/fr/LC_MESSAGES/messages.po b/sarg-php/locale/fr/LC_MESSAGES/messages.po index 0cf5405..5a59d78 100755 --- a/sarg-php/locale/fr/LC_MESSAGES/messages.po +++ b/sarg-php/locale/fr/LC_MESSAGES/messages.po @@ -2,42 +2,73 @@ msgid "" msgstr "" "Project-Id-Version: sarg-squidGuard 1.0\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2005-02-10 09:30-0300\n" +"POT-Creation-Date: 2014-04-14 12:46+0200\n" "PO-Revision-Date: 2005-02-10 09:30-0300\n" "Last-Translator: Jacques Grillot \n" "Language-Team: French\n" +"Language: \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=ISO-8859-1\n" "Content-Transfer-Encoding: 8bit\n" -#: sarg-squidguard-block2.php:10 -msgid "Could not open the file" +#: sarg-block-it.php:32 +msgid "No URL passed as argument" +msgstr "" + +#: sarg-block-it.php:40 sarg-squidguard-block2.php:62 +#, fuzzy, php-format +msgid "Could not open file: %s" msgstr "Ne peut pas ouvrir le fichier" -#: sarg-squidguard-block2.php:19 +#: sarg-block-it.php:47 sarg-squidguard-block2.php:69 msgid "Write error" msgstr "Erreur d'ecriture" -#: sarg-squidguard-block2.php:23 +#: sarg-block-it.php:50 sarg-squidguard-block2.php:72 msgid "Done!" msgstr "Fait!" -#: sarg-squidguard-block2.php:27 -msgid "Return" -msgstr "revenir" +#: sarg-block-it.php:52 sarg-squidguard-block2.php:74 +#, php-format +msgid "Return to Sarg." +msgstr "" + +#: sarg-squidguard-block2.php:32 +msgid "No file passed as argument" +msgstr "" + +#: sarg-squidguard-block2.php:38 +msgid "No url passed as argument" +msgstr "" + +#: sarg-squidguard-block2.php:52 +#, php-format +msgid "Invalid locale %s" +msgstr "" -#: sarg-squidguard-block2.php:30 -msgid " to Sarg." -msgstr " a Sarg" +#: sarg-squidguard-block.php:37 +#, php-format +msgid "Invalid locale: %s" +msgstr "" -#: sarg-squidguard-block.php:29 +#: sarg-squidguard-block.php:48 +msgid "No URL to block" +msgstr "" + +#: sarg-squidguard-block.php:66 msgid "Sarg-SquidGuard - URL Blocking" msgstr "Sarg-SquidGuard - Blocage d'URL" -#: sarg-squidguard-block.php:33 -msgid "Choose the rule set where" +#: sarg-squidguard-block.php:69 +#, fuzzy, php-format +msgid "Choose the rule set where %s will be added" msgstr "Choisissez la regle qui" -#: sarg-squidguard-block.php:36 -msgid "will by added" -msgstr "sera ajoutee" +#~ msgid "Return" +#~ msgstr "revenir" + +#~ msgid " to Sarg." +#~ msgstr " a Sarg" + +#~ msgid "will by added" +#~ msgstr "sera ajoutee" diff --git a/sarg-php/locale/pt_BR/LC_MESSAGES/messages.po b/sarg-php/locale/pt_BR/LC_MESSAGES/messages.po index aa9bda0..923d47d 100755 --- a/sarg-php/locale/pt_BR/LC_MESSAGES/messages.po +++ b/sarg-php/locale/pt_BR/LC_MESSAGES/messages.po @@ -8,42 +8,73 @@ msgid "" msgstr "" "Project-Id-Version: sarg-squidGuard 1.0\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2004-08-12 11:14-0300\n" +"POT-Creation-Date: 2014-04-14 12:46+0200\n" "PO-Revision-Date: 2004-08-12 11:14-0300\n" "Last-Translator: Pedro Lineu Orso \n" "Language-Team: Brazilian_Portuguese\n" +"Language: \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=ISO-8859-1\n" "Content-Transfer-Encoding: 8bit\n" -#: sarg-squidguard-block2.php:10 -msgid "Could not open the file" +#: sarg-block-it.php:32 +msgid "No URL passed as argument" +msgstr "" + +#: sarg-block-it.php:40 sarg-squidguard-block2.php:62 +#, fuzzy, php-format +msgid "Could not open file: %s" msgstr "Não pode abrir o arquivo" -#: sarg-squidguard-block2.php:19 +#: sarg-block-it.php:47 sarg-squidguard-block2.php:69 msgid "Write error" msgstr "Erro na escrita do arquivo" -#: sarg-squidguard-block2.php:23 +#: sarg-block-it.php:50 sarg-squidguard-block2.php:72 msgid "Done!" msgstr "Feito!" -#: sarg-squidguard-block2.php:27 -msgid "Return" -msgstr "Retorna" +#: sarg-block-it.php:52 sarg-squidguard-block2.php:74 +#, php-format +msgid "Return to Sarg." +msgstr "" + +#: sarg-squidguard-block2.php:32 +msgid "No file passed as argument" +msgstr "" + +#: sarg-squidguard-block2.php:38 +msgid "No url passed as argument" +msgstr "" + +#: sarg-squidguard-block2.php:52 +#, php-format +msgid "Invalid locale %s" +msgstr "" -#: sarg-squidguard-block2.php:30 -msgid " to Sarg." -msgstr "ao Sarg" +#: sarg-squidguard-block.php:37 +#, php-format +msgid "Invalid locale: %s" +msgstr "" -#: sarg-squidguard-block.php:29 +#: sarg-squidguard-block.php:48 +msgid "No URL to block" +msgstr "" + +#: sarg-squidguard-block.php:66 msgid "Sarg-SquidGuard - URL Blocking" msgstr "Sarg-SquidGuard - Bloqueio de URL" -#: sarg-squidguard-block.php:33 -msgid "Choose the rule set where" +#: sarg-squidguard-block.php:69 +#, fuzzy, php-format +msgid "Choose the rule set where %s will be added" msgstr "Escolha uma regra onde a URL" -#: sarg-squidguard-block.php:36 -msgid "will by added" -msgstr "será incluida" +#~ msgid "Return" +#~ msgstr "Retorna" + +#~ msgid " to Sarg." +#~ msgstr "ao Sarg" + +#~ msgid "will by added" +#~ msgstr "será incluida" diff --git a/sarg-php/locale/ru/LC_MESSAGES/messages.po b/sarg-php/locale/ru/LC_MESSAGES/messages.po index 9580353..8118d32 100755 --- a/sarg-php/locale/ru/LC_MESSAGES/messages.po +++ b/sarg-php/locale/ru/LC_MESSAGES/messages.po @@ -8,42 +8,73 @@ msgid "" msgstr "" "Project-Id-Version: sarg-squidGuard 1.0\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2004-08-12 11:14-0300\n" +"POT-Creation-Date: 2014-04-14 12:46+0200\n" "PO-Revision-Date: 2004-11-18 17:31+0300\n" "Last-Translator: Michael Stepanenko \n" "Language-Team: Russian\n" +"Language: \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=koi8-r\n" "Content-Transfer-Encoding: 8bit\n" -#: sarg-squidguard-block2.php:10 -msgid "Could not open the file" +#: sarg-block-it.php:32 +msgid "No URL passed as argument" +msgstr "" + +#: sarg-block-it.php:40 sarg-squidguard-block2.php:62 +#, fuzzy, php-format +msgid "Could not open file: %s" msgstr "îÅ×ÏÚÍÏÖÎÏ ÏÔËÒÙÔØ ÆÁÊÌ" -#: sarg-squidguard-block2.php:19 +#: sarg-block-it.php:47 sarg-squidguard-block2.php:69 msgid "Write error" msgstr "ïÛÉÂËÁ ÚÁÐÉÓÉ" -#: sarg-squidguard-block2.php:23 +#: sarg-block-it.php:50 sarg-squidguard-block2.php:72 msgid "Done!" msgstr "çÏÔÏ×Ï!" -#: sarg-squidguard-block2.php:27 -msgid "Return" -msgstr "÷ÅÒÎÕÔØÓÑ" +#: sarg-block-it.php:52 sarg-squidguard-block2.php:74 +#, php-format +msgid "Return to Sarg." +msgstr "" + +#: sarg-squidguard-block2.php:32 +msgid "No file passed as argument" +msgstr "" + +#: sarg-squidguard-block2.php:38 +msgid "No url passed as argument" +msgstr "" + +#: sarg-squidguard-block2.php:52 +#, php-format +msgid "Invalid locale %s" +msgstr "" -#: sarg-squidguard-block2.php:30 -msgid " to Sarg." -msgstr " × Sarg" +#: sarg-squidguard-block.php:37 +#, php-format +msgid "Invalid locale: %s" +msgstr "" -#: sarg-squidguard-block.php:29 +#: sarg-squidguard-block.php:48 +msgid "No URL to block" +msgstr "" + +#: sarg-squidguard-block.php:66 msgid "Sarg-SquidGuard - URL Blocking" msgstr "Sarg-SquidGuard - ÂÌÏËÉÒÏ×ËÁ URL" -#: sarg-squidguard-block.php:33 -msgid "Choose the rule set where" +#: sarg-squidguard-block.php:69 +#, fuzzy, php-format +msgid "Choose the rule set where %s will be added" msgstr "÷ÙÂÅÒÅÔÅ ÎÁÂÏÒ ÐÒÁ×ÉÌ ËÕÄÁ URL" -#: sarg-squidguard-block.php:36 -msgid "will by added" -msgstr "ÂÕÄÅÔ ÄÏÂÁ×ÌÅÎ" +#~ msgid "Return" +#~ msgstr "÷ÅÒÎÕÔØÓÑ" + +#~ msgid " to Sarg." +#~ msgstr " × Sarg" + +#~ msgid "will by added" +#~ msgstr "ÂÕÄÅÔ ÄÏÂÁ×ÌÅÎ" diff --git a/sarg-php/sarg-block-it.php b/sarg-php/sarg-block-it.php index 20efb9a..4c5844a 100755 --- a/sarg-php/sarg-block-it.php +++ b/sarg-php/sarg-block-it.php @@ -25,15 +25,19 @@ * */ -$filename = "/usr/local/squid/etc/block.txt"; +require_once "config.php.inc"; +if (!isset($_GET['url'])) +{ + echo "

",gettext("No URL passed as argument"),"

\n"; + exit; +} $url = $_GET['url']; $url = $url."\n"; -$ha = fopen($filename, 'a'); -if ($filename == false) { - print (gettext ("Could not open the filename")); - echo ' '.$filename; +$ha = fopen($DefaultSquidBlock, 'a'); +if ($ha == false) { + printf(gettext("Could not open file: %s"),$DefaultSquidBlock); exit; } else { @@ -45,8 +49,5 @@ else { } print (gettext ("Done!")); echo "

\n"; - echo ""; - print (gettext("Return")); - echo " "; - print (gettext (" to Sarg.")); + printf(gettext("Return to Sarg."),"javascript:history.go(-1)"); } diff --git a/sarg-php/sarg-squidguard-block.php b/sarg-php/sarg-squidguard-block.php index c403a0d..e28deca 100755 --- a/sarg-php/sarg-squidguard-block.php +++ b/sarg-php/sarg-squidguard-block.php @@ -25,19 +25,31 @@ * */ -// Change to squidGuard and sarg config file paths -$SargConf = "/usr/local/sarg/sarg.conf"; -$squidGuardConf = "/usr/local/squidGuard/squidGuard.conf"; +require_once "config.php.inc"; global $SargConf; global $dbhome; -global $language; -include_once("language.php"); +putenv("LANG=$language"); +if (!setlocale(LC_ALL, $language)) +{ + echo "

"; + printf(gettext("Invalid locale: %s"),$language); + echo "

\n"; + exit; +} +$domain = 'messages'; +bindtextdomain($domain, "./locale"); +textdomain($domain); include_once("style.php"); +if (!isset($_GET['url'])) +{ + echo "

",gettext("No URL to block"),"

\n"; + exit; +} + $url = $_GET['url']; -$squidGuard_conf = '/usr/local/squidGuard/squidGuard.conf'; function parse_config($line,$clave) { if (preg_match("/dbhome/i", $line)) { @@ -54,9 +66,7 @@ echo ""; print(gettext ("Sarg-SquidGuard - URL Blocking")); echo "\n"; echo ""; -print(gettext ("Choose the rule set where")); -echo " $url "; -print(gettext ("will by added")); +printf(gettext("Choose the rule set where %s will be added"),"$url "); echo "\n"; echo "\n"; echo "\n"; diff --git a/sarg-php/sarg-squidguard-block2.php b/sarg-php/sarg-squidguard-block2.php index dac7e1f..e717e03 100755 --- a/sarg-php/sarg-squidguard-block2.php +++ b/sarg-php/sarg-squidguard-block2.php @@ -25,21 +25,41 @@ * */ +require_once "config.php.inc"; + +if (!isset($_GET['file'])) +{ + echo "

",gettext("No file passed as argument"),"

\n"; + exit; +} $file = $_GET['file']; +if (!isset($_GET['url'])) +{ + echo "

",gettext("No url passed as argument"),"

\n"; + exit; +} $url = $_GET['url']; -$language = $_GET['lang']; $url = $url."\n"; +if (isset($_GET['lang'])) +{ + $language = $_GET['lang']; +} putenv("LANG=$language"); -setlocale(LC_ALL, $language); +if (!setlocale(LC_ALL, $language)) +{ + echo "

"; + printf(gettext("Invalid locale %s"),$language); + echo "

\n"; + exit; +} $domain = 'messages'; bindtextdomain($domain, "./locale"); textdomain($domain); $ha = fopen($file, 'a'); -if ($file == false) { - print (gettext ("Could not open the file")); - echo ' '.$file; +if ($ha == false) { + printf(gettext("Could not open file: %s"),$file); exit; } else { @@ -51,8 +71,5 @@ else { } print (gettext ("Done!")); echo "

\n"; - echo ""; - print (gettext("Return")); - echo " "; - print (gettext (" to Sarg.")); + printf(gettext("Return to Sarg."),"javascript:history.go(-2)"); } diff --git a/sarg-php/translate.this b/sarg-php/translate.this index 9d699d7..4cd495a 100644 --- a/sarg-php/translate.this +++ b/sarg-php/translate.this @@ -1,69 +1,71 @@ -/* - * SARG Squid Analysis Report Generator http://sarg.sourceforge.net - * 1998, 2010 - * - * SARG donations: - * please look at http://sarg.sourceforge.net/donations.php - * Support: - * http://sourceforge.net/projects/sarg/forums/forum/363374 - * --------------------------------------------------------------------- - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111, USA. - * - */ - +# SOME DESCRIPTIVE TITLE. +# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER +# This file is distributed under the same license as the PACKAGE package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy msgid "" msgstr "" -"Project-Id-Version: sarg-squidGuard 1.0\n" +"Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2004-08-12 11:14-0300\n" +"POT-Creation-Date: 2014-04-14 12:57+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" -"Language-Team: LANGUAGE\n" +"Language-Team: LANGUAGE \n" +"Language: \n" "MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=charset=ISO-8859-1\n" +"Content-Type: text/plain; charset=CHARSET\n" "Content-Transfer-Encoding: 8bit\n" -#: sarg-squidguard-block2.php:10 -msgid "Could not open the file" +#: sarg-block-it.php:32 +msgid "No URL passed as argument" +msgstr "" + +#: sarg-block-it.php:40 sarg-squidguard-block2.php:62 +#, php-format +msgid "Could not open file: %s" msgstr "" -#: sarg-squidguard-block2.php:19 +#: sarg-block-it.php:47 sarg-squidguard-block2.php:69 msgid "Write error" msgstr "" -#: sarg-squidguard-block2.php:23 +#: sarg-block-it.php:50 sarg-squidguard-block2.php:72 msgid "Done!" msgstr "" -#: sarg-squidguard-block2.php:27 -msgid "Return" +#: sarg-block-it.php:52 sarg-squidguard-block2.php:74 +#, php-format +msgid "Return to Sarg." msgstr "" -#: sarg-squidguard-block2.php:30 -msgid " to Sarg." +#: sarg-squidguard-block2.php:32 +msgid "No file passed as argument" msgstr "" -#: sarg-squidguard-block.php:29 -msgid "Sarg-SquidGuard - URL Blocking" +#: sarg-squidguard-block2.php:38 +msgid "No url passed as argument" +msgstr "" + +#: sarg-squidguard-block2.php:52 +#, php-format +msgid "Invalid locale %s" msgstr "" -#: sarg-squidguard-block.php:33 -msgid "Choose the rule set where" +#: sarg-squidguard-block.php:37 +#, php-format +msgid "Invalid locale: %s" +msgstr "" + +#: sarg-squidguard-block.php:48 +msgid "No URL to block" +msgstr "" + +#: sarg-squidguard-block.php:66 +msgid "Sarg-SquidGuard - URL Blocking" msgstr "" -#: sarg-squidguard-block.php:36 -msgid "will by added" +#: sarg-squidguard-block.php:69 +#, php-format +msgid "Choose the rule set where %s will be added" msgstr "" diff --git a/sarg-php/update-mo.sh b/sarg-php/update-mo.sh new file mode 100644 index 0000000..3650833 --- /dev/null +++ b/sarg-php/update-mo.sh @@ -0,0 +1,8 @@ +#!/bin/sh + +# quick and non portable hack to update the mo files from bash +for f in locale/*/LC_MESSAGES/messages.po +do + echo "Updating $f" + msgfmt --check --statistics -o "${f%.po}.mo" "$f" +done diff --git a/sarg-php/update-po.sh b/sarg-php/update-po.sh new file mode 100644 index 0000000..81fb42a --- /dev/null +++ b/sarg-php/update-po.sh @@ -0,0 +1,9 @@ +#!/bin/sh + +# quick and non portable hack to update the po files from bash +xgettext -o translate.this *.php +for f in locale/*/LC_MESSAGES/messages.po +do + echo "Updating $f" + msgmerge --update "$f" translate.this +done -- 2.39.2