*
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
This PHP modules is under i18n.
Available languages:
- English Pedro Orso <pedro.orso@gmail.com>
+ English Pedro Orso <pedro.orso@gmail.com>
Brazilian_Portuguese Pedro Orso <pedro.orso@gmail.com>
- French Jacques GRILLOT <Jacques.Grillot@grouperdi.com>
+ French Jacques GRILLOT <Jacques.Grillot@grouperdi.com>
+ Spanish Jose Vicente Mondejar <jomonbre@gmail.com>
Russian Michael Stepanenko <mistic@ecolines.ru>
Thank you, my friends.
--- /dev/null
+<?php
+
+// Change to squidGuard and sarg config file paths
+$SargConf = "/usr/local/sarg/sarg.conf";
+$squidGuardConf = "/usr/local/squidGuard/squidGuard.conf";
+
+// File where URL to block will be appended
+$DefaultSquidBlock = "/usr/local/squid/etc/block.txt";
+
+// Choose the locale you want to use to display messages (it must exist on your system)
+$language = "fr_BE.utf-8";
+
+?>
+++ /dev/null
-<?php
-
-/*
- * 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.
- *
- */
-
-global $language;
-global $SargConf;
-
-function sarg_config($line,$clave) {
- if ( 0 == strncmp("#", $line, 1))
- return;
- if (preg_match("/language/i", $line)) {
- global $language;
- $l = explode(' ', $line);
- list(, $lang) = $l;
- $lang=preg_replace('/\s+/','',$lang);
- if ( 0 == strcmp("English", $lang))
- $language = "en-EN";
- else if ( 0 == strcmp("Portuguese", $lang))
- $language = "pt_BR";
- else if ( 0 == strcmp("French", $lang))
- $language = "fr";
- else if ( 0 == strcmp("Russian", $lang))
- $language = "ru";
- return;
- }
-}
-
-
-$lines=file($SargConf);
-array_walk($lines,'sarg_config');
-
-putenv("LANG=$language");
-setlocale(LC_ALL, $language);
-$domain = 'messages';
-bindtextdomain($domain, "./locale");
-textdomain($domain);
-return;
-
-?>
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 <orso@brturbo.com>\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 "<a href=\"%s\">Return</a> 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 ""
--- /dev/null
+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 <jomonbre@gmail.com>\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 "<a href=\"%s\">Return</a> 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"
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 <Jacques.Grillot@grouperdi.com>\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 "<a href=\"%s\">Return</a> 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"
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 <pedro.orso@gmail.com>\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 "<a href=\"%s\">Return</a> 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"
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 <mistic@yandex.ru>\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 "<a href=\"%s\">Return</a> 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 "ÂÕÄÅÔ ÄÏÂÁ×ÌÅÎ"
*
*/
-$filename = "/usr/local/squid/etc/block.txt";
+require_once "config.php.inc";
+if (!isset($_GET['url']))
+{
+ echo "<p>",gettext("No URL passed as argument"),"</p>\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 {
}
print (gettext ("Done!"));
echo "<br><br>\n";
- echo "<a href=\"javascript:history.go(-1)\">";
- print (gettext("Return"));
- echo "</a> ";
- print (gettext (" to Sarg."));
+ printf(gettext("<a href=\"%s\">Return</a> to Sarg."),"javascript:history.go(-1)");
}
*
*/
-// 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 "<p>";
+ printf(gettext("Invalid locale: %s"),$language);
+ echo "</p>\n";
+ exit;
+}
+$domain = 'messages';
+bindtextdomain($domain, "./locale");
+textdomain($domain);
include_once("style.php");
+if (!isset($_GET['url']))
+{
+ echo "<p>",gettext("No URL to block"),"</p>\n";
+ exit;
+}
+
$url = $_GET['url'];
-$squidGuard_conf = '/usr/local/squidGuard/squidGuard.conf';
function parse_config($line,$clave) {
if (preg_match("/dbhome/i", $line)) {
print(gettext ("Sarg-SquidGuard - URL Blocking"));
echo "</td></tr>\n";
echo "<tr><td class=\"header2\">";
-print(gettext ("Choose the rule set where"));
-echo "<a href=\"http://$url\"> $url</a> ";
-print(gettext ("will by added"));
+printf(gettext("Choose the rule set where %s will be added"),"<a href=\"http://$url\">$url</a> ");
echo "</td></tr>\n";
echo "</table>\n";
echo "<table>\n";
*
*/
+require_once "config.php.inc";
+
+if (!isset($_GET['file']))
+{
+ echo "<p>",gettext("No file passed as argument"),"</p>\n";
+ exit;
+}
$file = $_GET['file'];
+if (!isset($_GET['url']))
+{
+ echo "<p>",gettext("No url passed as argument"),"</p>\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 "<p>";
+ printf(gettext("Invalid locale %s"),$language);
+ echo "</p>\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 {
}
print (gettext ("Done!"));
echo "<br><br>\n";
- echo "<a href=\"javascript:history.go(-2)\">";
- print (gettext("Return"));
- echo "</a> ";
- print (gettext (" to Sarg."));
+ printf(gettext("<a href=\"%s\">Return</a> to Sarg."),"javascript:history.go(-2)");
}
-/*
- * 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 <EMAIL@ADDRESS>, 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 <EMAIL@ADDRESS>\n"
-"Language-Team: LANGUAGE\n"
+"Language-Team: LANGUAGE <LL@li.org>\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 "<a href=\"%s\">Return</a> 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 ""
--- /dev/null
+#!/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
--- /dev/null
+#!/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