Hello,

The attached patch addresses several localization-related issues I
found while running Savane on puszcza.gnu.org.ua and preparing Ukrainian
and Polish localizations for it (I'll submit the localizations in a
separate message).  It also fixes some other minor inconsistensies/bugs.

The detailed ChangeLog entry follows.

Regards,
Sergey


2006-08-10  Sergey Poznyakoff  <[EMAIL PROTECTED]>

        * configure: Support for Slackware installations
        * frontend/php/include/exit.php: Bugfix - use 'uri=' instead of
        'return_to='

        * frontend/php/include/i18n.php: Provide a table of default
        territory codes for all ISO 639 languages (language code => ISO
        3166 country code mapping). Automatically determine if the
        requested translation is available. This removes the need to
        modify i18n.php after adding new translations, it suffices to drop
        the corresponding .mo files into the locale directory instead.
        (ngettext): Add plural rules for Polish and Ukrainian.
        
        * frontend/php/include/calendar.php (every_calendar_day_name): New
        function. It is incorrect to use 'every %s', where %s is a day
        name, since in many languages adjective 'every' must concord with
        the day name.
        * frontend/php/include/search/general.php: Fix typos in messages.
        * frontend/php/include/trackers/data.php: Do not pass
        $tracker_name verbatim to translated strings - this looks awkward
        and hurts readability in localized versions. Use artifact_name()
        to obtain a localized string.
        Fix typos in message ids.
        * frontend/php/include/trackers_run/admin/editqueryforms.php: Add
        missing _() markers
        * frontend/php/include/trackers_run/admin/field_values.php: Fix
        typos in messages.
        * frontend/php/include/trackers_run/browse.php: Add a I18N
        comment, helping translators to find appropriate translation, as
        ngettext cannot be used here.
        * frontend/php/news/index.php: Likewise
        * frontend/php/include/trackers_run/export.php: Use artifact_name
        instead of switch block.
        Use every_calendar_day_name() instead of translating 'every %s'
        (see commit message for frontend/php/include/calendar.php)
        Fix comments appropriately
        * frontend/php/include/trackers_run/index.php: Fix typos in messages.
        * frontend/php/include/trackers_run/mod.php: Fix typos in
        messages.
        * frontend/php/include/utils.php (artifact_name): New function.
        * frontend/php/include/vars.php: Use utils_get_content() to read
        in hashes.txt. This allows to get localized versions of
        $DEVEL_STATUS and (if necessary) $LICENSE_URL.
        Notice that it implies the need to add `global $LICENSE,
        $LICENSE_URL, $DEVEL_STATUS;' to hashes.txt (hashes.$lang.UTF-8)
        * frontend/php/index.php: Add missing _() markers.
        Use $project->getTypeMailingListFormat to obtain system name for
        the list, so that the configuration settings are honored
        * frontend/php/mail/index.php: Fix typos in messages. Add missing
        _() markers.
        * frontend/php/my/admin/editsshkeys.php: Reword the introductory
        paragraph for the authorized keys
        * frontend/php/my/admin/index.php: Fix typos in messages.
        * frontend/php/my/groups.php: Fix typos in messages.
        * frontend/php/news/approve.php: Use mysql_real_escape_string to
        protect from SQL injection
        * frontend/php/news/submit.php: Likewise
        * frontend/php/project/admin/editgroupinfo.php: Likewise


Index: configure
diff -pur -x po -x www -x update savane-1.4-orig/configure savane-1.4/configure
--- savane-1.4-orig/configure   2006-02-04 11:00:52.000000000 +0200
+++ savane-1.4/configure        2006-08-05 14:47:58.000000000 +0300
@@ -114,6 +114,9 @@ item="GNU/Linux distribution"
   elif [ -e "/etc/gentoo-release" ]; then
       DISTRO="gentoo-based"
       WWW_SERVER_USER="apache"
+  elif [ -e "/etc/slackware-version" ]; then
+      DISTRO="slackware-based"
+      WWW_SERVER_USER="nobody"
   else
       DISTRO="unable to guess"
   fi
Index: frontend/php/include/calendar.php
diff -pur -x po -x www -x update 
savane-1.4-orig/frontend/php/include/calendar.php 
savane-1.4/frontend/php/include/calendar.php
--- savane-1.4-orig/frontend/php/include/calendar.php   2006-02-04 
11:00:56.000000000 +0200
+++ savane-1.4/frontend/php/include/calendar.php        2006-08-05 
14:47:58.000000000 +0300
@@ -75,6 +75,29 @@ function calendar_day_name ($day)
 }
 
 
+function every_calendar_day_name ($day)
+{
+  # Start monday, not sunday...
+  switch ($day) 
+    {
+    case '1': 
+      return _("every Monday"); break;
+    case '2': 
+      return _("every Tuesday"); break;
+    case '3': 
+      return _("every Wednesday"); break;
+    case '4': 
+      return _("every Thursday"); break;
+    case '5': 
+      return _("every Friday"); break;
+    case '6': 
+      return _("every Saturday"); break;
+    case '7': 
+      return _("every Sunday"); break;
+    } 
+}
+
+
 function calendar_days_count ($month)
 {
   if ($month == '2')
Index: frontend/php/include/exit.php
diff -pur -x po -x www -x update savane-1.4-orig/frontend/php/include/exit.php 
savane-1.4/frontend/php/include/exit.php
--- savane-1.4-orig/frontend/php/include/exit.php       2006-02-04 
11:00:56.000000000 +0200
+++ savane-1.4/frontend/php/include/exit.php    2006-08-05 14:47:58.000000000 
+0300
@@ -58,11 +58,11 @@ function exit_not_logged_in() 
   
   if ($GLOBALS['sys_https_host'])
     {  
-      header('Location: 
https://'.$GLOBALS['sys_https_host'].$GLOBALS['sys_home'].'account/login.php?return_to='.urlencode($REQUEST_URI));
+      header('Location: 
https://'.$GLOBALS['sys_https_host'].$GLOBALS['sys_home'].'account/login.php?uri='.urlencode($REQUEST_URI));
     } 
   else 
     {
-      header ("Location: 
http://".$GLOBALS['sys_default_domain'].$GLOBALS['sys_home']."account/login.php?return_to=".urlencode($REQUEST_URI));
+      header ("Location: 
http://".$GLOBALS['sys_default_domain'].$GLOBALS['sys_home']."account/login.php?uri=".urlencode($REQUEST_URI));
     }
 }

Index: frontend/php/include/i18n.php: 
diff -pur -x po -x www -x update savane-1.4-orig/frontend/php/include/i18n.php 
savane-1.4/frontend/php/include/i18n.php
--- savane-1.4-orig/frontend/php/include/i18n.php       2006-02-04 
11:00:56.000000000 +0200
+++ savane-1.4/frontend/php/include/i18n.php    2006-08-06 10:34:16.000000000 
+0300
@@ -32,58 +32,296 @@
 $navigatorLanguages = explode(",",getenv("HTTP_ACCEPT_LANGUAGE"));
 
 # Set the default language :
-$locale = $GLOBALS['sys_default_locale'];
-
-
-# Table of supported languages :
-# "lang" => "associated prefered sublanguage"
-$supportedLanguages = array(
-                           "de"        => "DE.UTF-8",
-                           "de_DE"     => "DE.UTF-8",
-                           "en"        => "US.UTF-8",
-                           "fr"        => "FR.UTF-8",
-                           "fr_FR"     => "FR.UTF-8",
-                           "it"        => "IT.UTF-8",
-                           "it_IT"     => "IT.UTF-8",
-                           "ja"        => "JP.UTF-8",
-                           "ja_JP"     => "JP.UTF-8",
-                           "ko"        => "KR.UTF-8",
-                           "ko_KR"     => "KR.UTF-8",
-                           "pt"        => "BR.UTF-8",
-                           "pt_BR"     => "BR.UTF-8",
-                           "ru"        => "RU.UTF-8",
-                           "ru_RU"     => "RU.UTF-8"
-                           );
+if (isset ($GLOBALS['sys_default_locale']))
+  $locale = $GLOBALS['sys_default_locale'];
+else
+  $locale = "en_US.UTF-8";
+
+# Our text domain id
+$textdomain = 'savane';
+$domaindir = '';
+
+# Path to search for .mo files.
+# FIXME: If and when configuration suite is provided, this value will be 
determined
+# by it.
+# For the time being, adjust it when necessary
+$localepath = array('/usr/share/locale', '/usr/local/share/locale');
+
+# ISO 639 language code => ISO 3166 country code
+# The corresponding country codes where selected using the following
+# principles:
+#  1. If the language is spoken in only one country, this country code is used.
+#  2. If the language is spoken in more than one country, select the countre
+#     where it has official status is selected.
+#  3. If the language does not have official status, select the country with
+#     greater number of speakers
+#
+# The table does not list artificial languages (Esperanto, Ido, Interlingua,
+# etc), as the notion of a territory does not apply to them.
+#
+# If you find any inconsistency in this table, please let me know. 
<gray--at--gnu.org.ua>
+#
+$defterr = array(
+       "aa" => "ET", # Afar
+       "ab" => "GE", # Abkhazian
+       "ae" => "IR", # Avestan
+       "af" => "ZA", # Afrikaans
+       "ak" => "GH", # Akan # or ak_CI
+       "am" => "ET", # Amharic
+       "an" => "ES", # Aragonese
+       "ar" => "SA", # Arabic
+       "as" => "IN", # Assamese
+       "av" => "RU", # Avaric # Spoken mainly in Dagestan
+       "ay" => "BO", # Aymara
+       "az" => "AZ", # Azerbaijani
+
+       "ba" => "RU", # Bashkir
+       "be" => "BY", # Byelorussian; Belarusian
+       "bg" => "BG", # Bulgarian
+       "bh" => "IN", # Bihari
+       "bi" => "VU", # Bislama
+       "bm" => "ML", # Bambara
+       "bn" => "BD", # Bengali; Bangla
+       "bo" => "CN", # Tibetan
+       "br" => "FR", # Breton
+       "bs" => "BA", # Bosnian
+
+       "ca" => "ES", # Catalan
+       "ce" => "RU", # Chechen
+       "ch" => "GU", # Chamorro
+       "co" => "FR", # Corsican
+       "cr" => "CA", # Cree
+       "cs" => "CZ", # Czech
+       "cu" => "BG", # Church Slavic
+       "cv" => "RU", # Chuvash
+       "cy" => "GB", # Welsh
+
+       "da" => "DK", # Danish
+       "de" => "DE", # German
+       "dv" => "MV", # Divehi
+       "dz" => "BT", # Dzongkha; Bhutani
+
+       "ee" => "GH", # @'Ew@'e
+       "el" => "GR", # Greek
+       "en" => "US", # English
+       "es" => "ES", # Spanish
+       "et" => "EE", # Estonian
+       "eu" => "ES", # Basque
+
+       "fa" => "IR", # Persian
+       "ff" => "CM", # Fulah # Also NG, MR, and many others
+       "fi" => "FI", # Finnish
+       "fj" => "FJ", # Fijian; Fiji
+       "fo" => "FO", # Faroese
+       "fr" => "FR", # French
+       "fy" => "NL", # Frisian
+
+       "ga" => "IE", # Irish
+       "gd" => "GB", # Scots; Gaelic
+       "gl" => "ES", # Gallegan; Galician
+       "gn" => "PE", # Guarani
+       "gu" => "IN", # Gujarati
+       "gv" => "GB", # Manx
+
+       "ha" => "NG", # Hausa (?)
+       "he" => "IL", # Hebrew (formerly iw)
+       "hi" => "IN", # Hindi
+       "ho" => "PG", # Hiri Motu
+       "hr" => "HR", # Croatian
+       "ht" => "HT", # Haitian; Haitian Creole
+       "hu" => "HU", # Hungarian
+       "hy" => "AM", # Armenian
+       "hz" => "NA", # Herero
+
+       "id" => "ID", # Indonesian (formerly in)
+       "ig" => "NG", # Igbo
+       "ii" => "CN", # Sichuan Yi
+       "ik" => "CA", # Inupiak
+       "is" => "IS", # Icelandic
+       "it" => "IT", # Italian
+       "iu" => "CA", # Inuktitut
+
+       "ja" => "JP", # Japanese
+       "jv" => "ID", # Javanese
+
+       "ka" => "GE", # Georgian
+       "kg" => "CG", # Kongo # also CD and AO
+       "ki" => "KE", # Kikuyu
+       "kj" => "AO", # Kuanyama
+       "kk" => "KZ", # Kazakh
+       "kl" => "DK", # Kalaallisut; Greenlandic
+       "km" => "KH", # Khmer; Cambodian
+       "kn" => "IN", # Kannada
+       "ko" => "KR", # Korean
+       "kr" => "NG", # Kanuri
+       "ks" => "IN", # Kashmiri
+       "ku" => "IQ", # Kurdish
+       "kv" => "RU", # Komi
+       "kw" => "GB", # Cornish
+       "ky" => "KG", # Kirghiz
+
+       "la" => "VA", # Latin
+       "lb" => "LU", # Letzeburgesch
+       "lg" => "UG", # Ganda
+       "li" => "NL", # Limburgish; Limburger; Limburgan
+       "ln" => "CD", # Lingala
+       "lo" => "LA", # Lao; Laotian
+       "lt" => "LT", # Lithuanian
+       "lu" => "CD", # Luba-Katanga
+       "lv" => "LV", # Latvian; Lettish
+
+       "mg" => "MG", # Malagasy
+       "mh" => "MH", # Marshall
+       "mi" => "NZ", # Maori
+       "mk" => "MK", # Macedonian
+       "ml" => "IN", # Malayalam
+       "mn" => "MN", # Mongolian
+       "mo" => "MD", # Moldavian
+       "mr" => "IN", # Marathi
+       "ms" => "MY", # Malay
+       "mt" => "MT", # Maltese
+       "my" => "MM", # Burmese
+
+       "na" => "NR", # Nauru
+       "nb" => "NO", # Norwegian [EMAIL PROTECTED]
+       "nd" => "ZA", # Ndebele, North
+       "ne" => "NP", # Nepali
+       "ng" => "NA", # Ndonga
+       "nl" => "NL", # Dutch
+       "nn" => "NO", # Norwegian Nynorsk
+       "no" => "NO", # Norwegian
+       "nr" => "ZA", # Ndebele, South
+       "nv" => "US", # Navajo
+       "ny" => "MW", # Chichewa; Nyanja
+
+       "oc" => "FR", # Occitan; Proven@,{c}al
+       "oj" => "CA", # Ojibwa
+       "om" => "ET", # (Afan) Oromo
+       "or" => "IN", # Oriya
+       "os" => "RU", # Ossetian; Ossetic
+
+       "pa" => "IN", # Panjabi; Punjabi
+       "pi" => "IN", # Pali
+       "pl" => "PL", # Polish
+       "ps" => "AF", # Pashto, Pushto
+       "pt" => "PT", # Portuguese
+
+       "qu" => "PE", # Quechua
+
+       "rm" => "FR", # Rhaeto-Romance
+       "rn" => "BI", # Rundi; Kirundi
+       "ro" => "RO", # Romanian
+       "ru" => "RU", # Russian
+       "rw" => "RW", # Kinyarwanda
+
+       "sa" => "IN", # Sanskrit
+       "sc" => "IT", # Sardinian
+       "sd" => "PK", # Sindhi
+       "se" => "NO", # Northern Sami
+       "sg" => "CF", # Sango; Sangro
+       "si" => "LK", # Sinhalese
+       "sk" => "SK", # Slovak
+       "sl" => "SI", # Slovenian
+       "sm" => "WS", # Samoan
+       "sn" => "ZW", # Shona
+       "so" => "SO", # Somali
+       "sq" => "AL", # Albanian
+       "sr" => "CS", # Serbian
+       "ss" => "SZ", # Swati; Siswati
+       "st" => "LS", # Sesotho; Sotho, Southern
+       "su" => "ID", # Sundanese
+       "sv" => "SE", # Swedish
+       "sw" => "TZ", # Swahili # Also KE
+
+       "ta" => "IN", # Tamil
+       "te" => "IN", # Telugu
+       "tg" => "TJ", # Tajik
+       "th" => "TH", # Thai
+       "ti" => "ER", # Tigrinya
+       "tk" => "TM", # Turkmen
+       "tl" => "PH", # Tagalog
+       "tn" => "BW", # Tswana; Setswana
+       "to" => "ZM", # Tonga (?) # Also ZW ; MW
+       "tr" => "TR", # Turkish
+       "ts" => "MZ", # Tsonga # ZA SZ XW
+       "tt" => "RU", # Tatar
+       "tw" => "GH", # Twi
+       "ty" => "PF", # Tahitian
+
+       "ug" => "RU", # Uighur
+       "uk" => "UA", # Ukrainian
+       "ur" => "IN", # Urdu
+       "uz" => "UZ", # Uzbek
+
+       "ve" => "ZA", # Venda
+       "vi" => "VN", # Vietnamese
+
+       "wa" => "FR", # Walloon
+       "wo" => "SN", # Wolof
+
+       "xh" => "ZA", # Xhosa
+
+       "yi" => "IL", # Yiddish (formerly ji)
+       "yo" => "NG", # Yoruba
+
+       "za" => "CN", # Zhuang
+       "zh" => "CN", # Chinese
+       "zu" => "ZA"  # Zulu
+);
+
+# Is the $locale supported
+function is_supported_locale($locale, &$return_dir)
+{
+  global $localepath, $textdomain, $domaindir;
+
+  if ($locale == "en_US")
+    return 1;
+  foreach ($localepath as $dir) {
+    $name = $dir . '/' . $locale . '/LC_MESSAGES/' . $textdomain;
+    if (is_readable ($name . '.mo') || is_readable ($name . '.gmo')) {
+      $return_dir = $dir;
+      return 1;
+    }
+  }
+  return 0;
+}
 
 # Try to find the best supported language from user's navigator preferences :
 while (list(, $lng) = each ($navigatorLanguages)) {
-
   $lng = trim($lng);
   $curlocale = strtolower(substr($lng,0,2));
-  if  (substr($lng,2,1) == "-") {
-    $sublocale = $curlocale."_".strtoupper(substr($lng,3,2));
-    if ( isset($supportedLanguages[$sublocale] )) {
-      $locale = $curlocale."_".$supportedLanguages[$sublocale];
-      define(SV_LANG, $curlocale."-".$supportedLanguages[$sublocale]);
-      break;
-    }
+    
+  if (substr($lng,2,1) == "-") {
+    $terr = strtoupper(substr($lng,3,2));
+    $sublocale = $curlocale . "_" . $terr;
+  } else {
+    $sublocale = $curlocale;
+    if (isset($defterr[$curlocale]))
+      $terr = $defterr[$curlocale];
   }
-  if ( isset($supportedLanguages[$curlocale] )) {
-    $locale = $curlocale."_".$supportedLanguages[$curlocale];
-    define(SV_LANG, $curlocale."-".$supportedLanguages[$curlocale]);
+
+  if (is_supported_locale($sublocale, $domaindir)) { 
+    $locale = $curlocale . '_' . $terr . ".UTF-8";
     break;
-  }
+  } 
+}
 
+# Default to English
+if (!isset($locale)) {
+  $locale = 'en_US.UTF-8';
 }
 
+# SV_LANG is used to produce valid <?xml> header
+define(SV_LANG, preg_replace("/_/", "-", $locale, 1));
+
 # Set the locale used by gettext() and strftime() functions :
 setlocale(LC_ALL, $locale);
 
 # Gettext (i18n) configs :
-textdomain('savane');
-
+bindtextdomain($textdomain, $domaindir);
+textdomain($textdomain);
 
-#print "[".$locale.",".setlocale(LC_ALL,0)."]"; //debug
+# print "[".$locale.",".setlocale(LC_ALL,0)."]"; //debug
 
 # this provides a custom ngettext() function for PHP versions < 4.2
 # it should have the same functionality, but note that there is the
@@ -91,6 +329,8 @@ textdomain('savane');
 if (!function_exists("ngettext")) {
   function ngettext($string1, $string2, $n)
   {
+    global $domaindir;
+
     $locale = setlocale(LC_ALL, 0);
     # strip possible charset extension from the locale (e.g. "de_DE.UTF-8")
     $locale = array_shift(explode(".", $locale));
@@ -105,21 +345,8 @@ if (!function_exists("ngettext")) {
         $msgstr = $string1;
       }
 
-    # FIXME: This should not be hardcoded, but taken from the configure
-    # script input somehow.
-    $mo_file = "/usr/share/locale/".$locale."/LC_MESSAGES/savane.mo";
-    $alternative[] = "/usr/share/locale/".substr($locale, 0, 
2)."/LC_MESSAGES/savane.mo";
-    $alternative[] = 
"/usr/local/share/locale/".$locale."/LC_MESSAGES/savane.mo";
-    $alternative[] = "/usr/local/share/locale/".substr($locale, 0, 
2)."/LC_MESSAGES/savane.mo";
-
-    foreach ($alternative as $location)
-      {
-        if (is_readable($location))
-          {
-            $mo_file = $location;
-            break;
-          }
-      }
+    # $domaindir has been determined at the startup
+    $mo_file = $domaindir . $locale . "/LC_MESSAGES/" . $textdomain . ".mo";
 
     # fallback, also used for English
     if (!is_readable($mo_file))
@@ -193,18 +420,26 @@ if (!function_exists("ngettext")) {
     $plural_rule["ko_KR"] = 0;
     $plural_rule["pt_BR"] = ($n > 1);
     $plural_rule["ru_RU"] = ($n%10 == 1 && $n%100 != 11 ? 0 : ($n%10 >= 2 && 
$n%10 <= 4 && ($n%100 < 10 || $n%100 >= 20) ? 1 : 2));
+    $plural_rule["uk_UA"] = ($n%10 == 1 && $n%100 != 11 ? 0 : ($n%10 >= 2 && 
$n%10 <= 4 && ($n%100 < 10 || $n%100 >= 20) ? 1 : 2));
+    $plural_rule["pl_PL"] = ($n==1 ? 0 : ($n%10>=2 && $n%10<=4 && ($n%100<10 
|| $n%100>=20) ? 1 : 2)); 
 
     # if there's no plural rule defined, use a generic one
-    if (!isset($plural_rule[$locale]))
+    if (isset($plural_rule[$locale]))
+        $prule = $plural_rule[$locale];
+    else 
       {
-        $plural_rule[$locale] = 0;
+        $lang = array_shift(explode("_", $locale));
+        if (isset($plural_rule[$lang]))
+          $prule = $plural_rule[$locale] = $plural_rule[$lang];
+        else
+          $prule = $plural_rule[$locale] = 0;
       }
 
     # split the msgstr into the different plural forms
     $plural = preg_split("/\\x00/", $msgstr);
 
     # finally, find the msgstr that's wanted ...
-    $msgstr = $plural[$plural_rule[$locale]];
+    $msgstr = $plural[$prule];
 
     fclose($mo);

Index: frontend/php/include/search/general.php
diff -pur -x po -x www -x update 
savane-1.4-orig/frontend/php/include/search/general.php 
savane-1.4/frontend/php/include/search/general.php
--- savane-1.4-orig/frontend/php/include/search/general.php     2006-02-04 
11:00:56.000000000 +0200
+++ savane-1.4/frontend/php/include/search/general.php  2006-08-05 
14:47:58.000000000 +0300
@@ -166,12 +166,12 @@ function search_box ($searched_words='',
       unset($text);
       if (!$group_id || 
          ($is_small && $group_id && $project->Uses("patch")))
-       { $text = _("Patchs");  }
+       { $text = _("Patches"); }
       else
        { 
          if ($project->Uses("patch"))
            {
-             $text = sprintf(_("%s Patchs"), $group_realname); 
+             $text = sprintf(_("%s Patches"), $group_realname); 
            }
           
        }
Index: frontend/php/include/trackers/data.php
diff -pur -x po -x www -x update 
savane-1.4-orig/frontend/php/include/trackers/data.php 
savane-1.4/frontend/php/include/trackers/data.php
--- savane-1.4-orig/frontend/php/include/trackers/data.php      2006-02-04 
11:00:56.000000000 +0200
+++ savane-1.4/frontend/php/include/trackers/data.php   2006-08-05 
14:47:58.000000000 +0300
@@ -185,7 +185,8 @@ function trackers_data_show_notification
       if ($grtrsettings['nb_categories'] > 0) {
        if ($show_intro_msg != 0) {
          print '
-         '.sprintf(_("As a project administrator you must decide if the list 
of persons to be systematically notified on new %s submissions (and possibly 
updates) depend on the categories or not and you must provide the corresponding 
email addresses (comma separated list)."), $tracker_name).'<br /><br />';
+         '.sprintf(_("As a project administrator you must decide if the list 
of persons to be systematically notified on new %s submissions (and possibly 
updates) depend on the categories or not and you must provide the corresponding 
email addresses (comma separated list)."),
+                   artifact_name ($tracker_name)).'<br /><br />';
 
        }
        print '
@@ -211,7 +212,8 @@ function trackers_data_show_notification
       } else {
        if ($show_intro_msg != 0) {
          print '
-         '.sprintf(_("As a project administrator you must decide if the list 
of persons to be systematically notified on new %s submissions (and possibly 
updates) depend on the categories or not and you must provide the corresponding 
email addresses (comma separated list)."), $tracker_name).'<br /><br />';
+         '.sprintf(_("As a project administrator you must decide if the list 
of persons to be systematically notified on new %s submissions (and possibly 
updates) depend on the categories or not and you must provide the corresponding 
email addresses (comma separated list)."),
+                   artifact_name ($tracker_name)).'<br /><br />';
        }
       }
       print '<span class="preinput">'._("Global List:").'</span><br 
/>&nbsp;&nbsp;<INPUT TYPE="TEXT" NAME="'.$tracker_name.'_new_item_address" 
VALUE="'.$grtrsettings['glnewad'].'" SIZE="50" MAXLENGTH="255" />
@@ -1994,7 +1996,7 @@ function trackers_data_update_dependent_
       $result=db_query($sql);
       if (!$result)
        {
-         fb(_("Error inserting dependancy"), 1);
+         fb(_("Error inserting dependency"), 1);
        }
       else
        {
Index: frontend/php/include/trackers_run/admin/editqueryforms.php
diff -pur -x po -x www -x update 
savane-1.4-orig/frontend/php/include/trackers_run/admin/editqueryforms.php 
savane-1.4/frontend/php/include/trackers_run/admin/editqueryforms.php
--- savane-1.4-orig/frontend/php/include/trackers_run/admin/editqueryforms.php  
2006-02-04 11:00:56.000000000 +0200
+++ savane-1.4/frontend/php/include/trackers_run/admin/editqueryforms.php       
2006-08-05 14:47:58.000000000 +0300
@@ -223,7 +223,7 @@ if ($new_report)
       $i++;
     }
   print '</table>'.
-    '<p><center><input type="submit" name="submit" 
value="SUBMIT"></center></p>'.
+    '<p><center><input type="submit" name="submit" 
value="'._('Submit').'"></center></p>'.
     '</form>';
 
 } else if ($show_report)
Index: frontend/php/include/trackers_run/admin/field_values.php
diff -pur -x po -x www -x update 
savane-1.4-orig/frontend/php/include/trackers_run/admin/field_values.php 
savane-1.4/frontend/php/include/trackers_run/admin/field_values.php
--- savane-1.4-orig/frontend/php/include/trackers_run/admin/field_values.php    
2006-02-04 11:00:56.000000000 +0200
+++ savane-1.4/frontend/php/include/trackers_run/admin/field_values.php 
2006-08-05 14:47:58.000000000 +0300
@@ -815,7 +815,7 @@ if ($group_id && user_ismember($group_id
 # Now the special canned response field
       print '<tr class="'. utils_get_alt_row_color($i) .'">';
       print "<td><a 
href=\"$PHP_SELF?group_id=$group_id&amp;create_canned=1\">"._("Canned 
Responses").'</a></td>';
-      print "\n<td>"._("Create or Change generic quick response messages for 
this issue tracker. Theses pre-written messages can then be used to quickly 
reply to item submission.").' </td>';
+      print "\n<td>"._("Create or Change generic quick response messages for 
this issue tracker. These pre-written messages can then be used to quickly 
reply to item submissions.").' </td>';
       print "\n<td>"._("Project").'</td></tr>';
       print '</table>';
     }
Index: frontend/php/include/trackers_run/browse.php
diff -pur -x po -x www -x update 
savane-1.4-orig/frontend/php/include/trackers_run/browse.php 
savane-1.4/frontend/php/include/trackers_run/browse.php
--- savane-1.4-orig/frontend/php/include/trackers_run/browse.php        
2006-02-04 11:00:56.000000000 +0200
+++ savane-1.4/frontend/php/include/trackers_run/browse.php     2006-08-05 
14:47:58.000000000 +0300
@@ -1087,6 +1087,8 @@ if (!$sober)
 {
   if (!$printer)
     {
+      # I18N
+      # %s in this message is an input field, so it is impossible to use 
ngettext.         
       $form .= '<p class="smaller">'.sprintf(_("Show %s items at once."), 
'<input type="text" name="chunksz" size="3" maxlength="5" '.
                                             'value="'.$chunksz.'" />').'</p>';
     }
Index: frontend/php/include/trackers_run/export.php
diff -pur -x po -x www -x update 
savane-1.4-orig/frontend/php/include/trackers_run/export.php 
savane-1.4/frontend/php/include/trackers_run/export.php
--- savane-1.4-orig/frontend/php/include/trackers_run/export.php        
2006-02-04 11:00:56.000000000 +0200
+++ savane-1.4/frontend/php/include/trackers_run/export.php     2006-08-05 
14:47:58.000000000 +0300
@@ -414,23 +414,15 @@ else
         $export_url = 
$GLOBALS['sys_https_url'].$GLOBALS['sys_home']."export/$group_name/".user_getname()."/".db_result($res_export,
 $i, 'export_id').".xml";
         print '<br />'.sprintf(_("URL: %s"), utils_link($export_url, 
$export_url));
 
-        unset($type);
-        switch (db_result($res_export, $i, 'artifact'))
-          {
-          case 'cookbook': $type = _("recipes"); break;
-          case 'bugs': $type = _("bugs"); break;
-          case 'task': $type = _("tasks"); break;
-          case 'patch': $type = _("patches"); break;
-          case 'support': $type = _("support requests"); break;
-          }
+        $type = artifact_name (db_result($res_export, $i, 'artifact'));
 
         if (db_result($res_export, $i, 'frequency_day'))
           {
             # I18N
-            # First string is the weekday, second the time of day
+            # First string is 'every weekday', second the time of day
             # Example: "every Wednesday at 16:45 hours"
-            $date = sprintf(_("every %s at %s hours"),
-                            calendar_day_name(db_result($res_export, $i, 
'frequency_day')),
+            $date = sprintf(_("%s at %s hours"),
+                            every_calendar_day_name(db_result($res_export, $i, 
'frequency_day')),
                             db_result($res_export, $i, 'frequency_hour'));
           }
         else
@@ -673,16 +665,16 @@ else
       # priority is to have this working)
       $valid_days = array();
       for ($day = 1; $day <= 7; $day++)
-       { $valid_days[] = calendar_day_name($day); }
+       { $valid_days[] = every_calendar_day_name($day); }
 
       print '&nbsp;&nbsp;&nbsp;'.form_input("radio", "date_mainchoice", 
"frequent").' '.
         # I18N
-        # First string is the weekday, second the time of day,
+        # First string is 'every weekday', second the time of day,
        # third is the timezone
         # Example: "every Wednesday at 16:45 hours GMT"
        # Note that the GMT string may not be set, so dont put it beween 
        # parenthesis.
-       sprintf(_("every %s at %s hours %s"),
+       sprintf(_("%s at %s hours %s"),
                html_build_select_box_from_array($valid_days,
                                                 "date_frequent_day"),
                html_build_select_box_from_array($valid_hours,
Index: frontend/php/include/trackers_run/index.php
diff -pur -x po -x www -x update 
savane-1.4-orig/frontend/php/include/trackers_run/index.php 
savane-1.4/frontend/php/include/trackers_run/index.php
--- savane-1.4-orig/frontend/php/include/trackers_run/index.php 2006-02-04 
11:00:56.000000000 +0200
+++ savane-1.4/frontend/php/include/trackers_run/index.php      2006-08-05 
14:47:58.000000000 +0300
@@ -249,7 +249,7 @@ if ($group_id)
              {
                if ($depends_search)
                  {
-                   fb(_("You provided search words to get a list of items this 
one may depends on. Below, in the section \"Dependencies\", you can now select 
the appropriate one(s) and submit the form."));
+                   fb(_("You provided search words to get a list of items this 
one may depend on. Below, in the section \"Dependencies\", you can now select 
the appropriate one(s) and submit the form."));
                  }
                if ($reassign_change_project_search)
                  {
Index: frontend/php/include/trackers_run/mod.php
diff -pur -x po -x www -x update 
savane-1.4-orig/frontend/php/include/trackers_run/mod.php 
savane-1.4/frontend/php/include/trackers_run/mod.php
--- savane-1.4-orig/frontend/php/include/trackers_run/mod.php   2006-02-04 
11:00:56.000000000 +0200
+++ savane-1.4/frontend/php/include/trackers_run/mod.php        2006-08-05 
14:47:58.000000000 +0300
@@ -486,7 +486,7 @@ if (db_numrows($result) > 0)
   if ($depends_search)
     {
       print '</p><p><span class="preinput">';
-      printf (_("Please select a dependancy to add in the result of your 
search of '%s' in the database:"), $depends_search);
+      printf (_("Please select a dependency to add in the result of your 
search of '%s' in the database:"), $depends_search);
       print '</span>';
 
       unset($success);
Index: frontend/php/include/utils.php
diff -pur -x po -x www -x update savane-1.4-orig/frontend/php/include/utils.php 
savane-1.4/frontend/php/include/utils.php
--- savane-1.4-orig/frontend/php/include/utils.php      2006-02-04 
11:00:56.000000000 +0200
+++ savane-1.4/frontend/php/include/utils.php   2006-08-05 14:47:58.000000000 
+0300
@@ -1094,4 +1094,34 @@ function help ($text, $explanation_array
   return $text;
 }
 
+function artifact_name ($artifact)
+{
+  switch ($artifact)
+    {
+    case 'cookbook':
+      $name = _("recipes");
+      break;
+      
+    case 'bugs':
+      $name = _("bugs");
+      break;
+
+    case 'task':
+      $name = _("tasks");
+      break;
+      
+    case 'patch':
+      $name = _("patches");
+      break;
+      
+    case 'support':
+      $name = _("support requests");
+      break;
+      
+    default:
+      $name = $artifact;
+    }
+  return $name;
+}
+
 ?>
Index: frontend/php/include/vars.php
diff -pur -x po -x www -x update savane-1.4-orig/frontend/php/include/vars.php 
savane-1.4/frontend/php/include/vars.php
--- savane-1.4-orig/frontend/php/include/vars.php       2006-02-04 
11:00:56.000000000 +0200
+++ savane-1.4/frontend/php/include/vars.php    2006-08-05 14:47:58.000000000 
+0300
@@ -37,7 +37,8 @@ if ($_GET['sys_incdir'] ||
     $_REQUEST['sys_incdir'])
 { exit(); }
 
-require($GLOBALS['sys_incdir'].'/hashes.txt');
+#require($GLOBALS['sys_incdir'].'/hashes.txt');
+utils_get_content('hashes');
 
 $SHELLS = array();
 $SHELLS[1] = '/bin/bash';
Index: frontend/php/index.php
diff -pur -x po -x www -x update savane-1.4-orig/frontend/php/index.php 
savane-1.4/frontend/php/index.php
--- savane-1.4-orig/frontend/php/index.php      2006-02-04 11:00:57.000000000 
+0200
+++ savane-1.4/frontend/php/index.php   2006-08-05 14:47:58.000000000 +0300
@@ -36,7 +36,7 @@ require "include/features_boxes.php";
 # translate.
 if (!$GLOBALS['sys_unix_group_name'])
 {
-  fb(_("Configuration serious problem: sys_unix_group_name is not set"), 1);   
+  fb(_("Serious configuration problem: sys_unix_group_name is not set"), 1);   
   if (!$GLOBALS['sys_name'])
     {
       fb(_("Configuration problem: sys_name is not set"), 1);
Index: frontend/php/mail/admin/index.php
diff -pur -x po -x www -x update 
savane-1.4-orig/frontend/php/mail/admin/index.php 
savane-1.4/frontend/php/mail/admin/index.php
--- savane-1.4-orig/frontend/php/mail/admin/index.php   2006-02-04 
11:00:55.000000000 +0200
+++ savane-1.4/frontend/php/mail/admin/index.php        2006-08-05 
14:47:58.000000000 +0300
@@ -45,12 +45,14 @@ if ($group_id && user_ismember($group_id
   $grp=project_get_object($group_id);
 
   # FIXME: GNU specific
-  if ($project->getTypeName() == 'GNU' || $project->getTypeName() == 
'www.gnu.org' && $GLOBALS[sys_default_domain] == "savannah.gnu.org")
+  if ($project->getTypeName() == 'GNU'
+      || $project->getTypeName() == 'Software'
+      || $project->getTypeName() == 'www.gnu.org'
+        && $GLOBALS[sys_default_domain] == "savannah.gnu.org")
     { $isgnu = true; }
   else
     { $isgnu=false; }
 
-
   if ($post_changes)
     {
       /***********************************************************
@@ -65,13 +67,13 @@ if ($group_id && user_ismember($group_id
 
          # Defines the list name
          if ($type != "0" && $type!="1" && $type!="2" && $type!="3" && 
$isgnu==true)
-           { exit_error('Error','Radio button not checked'); }
+           { exit_error(_('Error'), _('Radio button not checked')); }
 
          if ($type=="0" && ($list_name=="help" || $list_name=="info" || 
$list_name=="bug") && $isgnu==true)
-           { exit_error('Error','Invalid list name'); }
+           { exit_error(_('Error'),_('Invalid list name')); }
 
          if ((($isgnu == true && $type == "0") || $isgnu == false) && 
(!$list_name || strlen($list_name) < 2))
-           { exit_error('Error','Must Provide List Name That Is 2 or More 
Characters Long'); }
+           { exit_error(_('Error'),_('Must Provide List Name That Is 2 or More 
Characters Long')); }
 
          if ( $isgnu == true )
            {
@@ -97,7 +99,7 @@ if ($group_id && user_ismember($group_id
          else
            {
              # FIXME name convention
-             
$new_list_name=strtolower(group_getunixname($group_id).'-'.$list_name);
+             $new_list_name = $project->getTypeMailingListFormat($list_name);
            }
 
          # Check on the list_name: must not be equal to a user account,
@@ -105,7 +107,7 @@ if ($group_id && user_ismember($group_id
          if (db_numrows(db_query("SELECT user_id FROM user WHERE "
                                  . "user_name LIKE 
'".addslashes($list_name)."'")) > 0)
            {
-             exit_error('Error', _("That list name is reserved, to avoid 
conflicts with user accounts."));
+             exit_error(_('Error'), _("That list name is reserved, to avoid 
conflicts with user accounts."));
            }
 
 
@@ -124,7 +126,7 @@ if ($group_id && user_ismember($group_id
              $file = fopen("$site","r");
              if (!$file)
                {
-                 fb("Unable to open remote file, try again later.", 1);
+                 fb(_("Unable to open remote file, try again later."), 1);
                  site_project_footer(array());
                  exit;
                }
@@ -195,7 +198,7 @@ if ($group_id && user_ismember($group_id
 
                      if (db_numrows($res_email) < 1)
                        {
-                         exit_error("Invalid userid","Does not compute.");
+                         exit_error(_("Invalid userid"),_("Does not 
compute."));
                        }
                      $row_email = db_fetch_array($res_email);
 
@@ -305,7 +308,7 @@ if ($group_id && user_ismember($group_id
       $result = db_query("SELECT list_name,group_list_id FROM mail_group_list 
WHERE group_id='$group_id'");
       $rows=db_numrows($result);
 
-      print '<h3>Mailing Lists already in use</h3>';
+      print '<h3>'._('Mailing Lists already in use').'</h3>';
       for ($k=0; $k < $rows; $k++)
        {
          echo '<div 
class="'.utils_get_alt_row_color($k).'">'.db_result($result, $k, 
"list_name").'</div>';
@@ -317,7 +320,7 @@ if ($group_id && user_ismember($group_id
                        <input type="hidden" name="post_changes" value="y">
                        <input type="hidden" name="add_list" value="y">
                        <input type="hidden" name="group_id" 
value="'.$group_id.'">
-                       <h3>Mailing List Name:</h3> ';
+                       <h3>'._('Mailing List Name:').'</h3> ';
 
       if ($isgnu == true)
        { print '<INPUT TYPE="radio" NAME="type" VALUE="0" CHECKED>'; }
@@ -336,13 +339,13 @@ if ($group_id && user_ismember($group_id
 
       print '
                        <P></P>
-                       <h3>Is Public ?</h3> (visible for non-developers)<BR>
+                       <h3>'._('Is Public?').'</h3> '._('(visible for 
non-developers)').'<BR>
                        <INPUT TYPE="RADIO" NAME="is_public" VALUE="1" CHECKED> 
Yes<BR>
                        <INPUT TYPE="RADIO" NAME="is_public" VALUE="0"> 
No<P></P>
-                       <B>Description:</B><BR>
+                       <B>'._('Description:').'</B><BR>
                        <INPUT TYPE="TEXT" NAME="description" VALUE="" 
SIZE="40" MAXLENGTH="80"><BR>
                        <P></P>
-                       <INPUT TYPE="SUBMIT" NAME="SUBMIT" VALUE="Add This 
List">
+                       <INPUT TYPE="SUBMIT" NAME="SUBMIT" VALUE="'._('Add This 
List').'">
                        </FORM>';
 
       site_project_footer(array());
@@ -364,9 +367,9 @@ if ($group_id && user_ismember($group_id
     if (!$result || $rows < 1)
       {
        print '
-                               <H2>No Lists Found</H2>
+                               <H2>'._('No Lists Found').'</H2>
                                <P>
-                               None found for this project';
+                               '._('None found for this project');
        print db_error();
       }
     else
@@ -443,7 +446,7 @@ if ($group_id && user_ismember($group_id
        {
 
          $site = $project->getTypeMailingListListinfoUrl();
-         $site .= '../sfverify?list=';
+         $site .= '/../sfverify?list=';
          #$site = "http://mail.gnu.org/mailman/sfverify?list=";;
          $site .= urlencode($list);
          $site .= "&password=";
@@ -451,7 +454,7 @@ if ($group_id && user_ismember($group_id
          $file = fopen("$site","r");
        if (!$file)
          {
-           print "<p>Unable to open remote file.\n";
+           print "<p>Unable to open remote file $site.\n";
            site_project_footer(array());
            exit;
          }
Index: frontend/php/mail/index.php
diff -pur -x po -x www -x update savane-1.4-orig/frontend/php/mail/index.php 
savane-1.4/frontend/php/mail/index.php
--- savane-1.4-orig/frontend/php/mail/index.php 2006-02-04 11:00:55.000000000 
+0200
+++ savane-1.4/frontend/php/mail/index.php      2006-08-05 14:47:58.000000000 
+0300
@@ -80,7 +80,7 @@ if ($group_id) 
       if (!$is_public && $project->getTypeMailingListArchivesPrivateUrl($list) 
&& $project->getTypeMailingListArchivesPrivateUrl($list) != "http://";)
        {
          # Pointer to archives
-         print '<br />'.sprintf(_("To see the collection of prior posting to 
the list, visit the %s%s archives%s"),'<a 
href="'.$project->getTypeMailingListArchivesPrivateUrl($list).'">', $list, 
'</a> (authorization required).');
+         print '<br />'.sprintf(_("To see the collection of prior postings to 
the list, visit the %s%s archives%s"),'<a 
href="'.$project->getTypeMailingListArchivesPrivateUrl($list).'">', $list, 
'</a> ' . _('(authorization required)') . '.');
        }
 
       if ($project->getTypeMailingListAddress($list))
Index: frontend/php/my/admin/editsshkeys.php
diff -pur -x po -x www -x update 
savane-1.4-orig/frontend/php/my/admin/editsshkeys.php 
savane-1.4/frontend/php/my/admin/editsshkeys.php
--- savane-1.4-orig/frontend/php/my/admin/editsshkeys.php       2006-02-04 
11:00:52.000000000 +0200
+++ savane-1.4/frontend/php/my/admin/editsshkeys.php    2006-08-05 
14:47:58.000000000 +0300
@@ -102,7 +102,7 @@ print '<form action="editsshkeys.php" me
 
 print '<h3>'._("Authorized keys:").'</h3>';
   
-print '<p>'._("Copy each the public key of each key you want to register in a 
text field. After submitting, verify that the number of keys registered is what 
you expected.").'</p>';
+print '<p>'._("Fill the text fields below with the public keys for each key 
you want to register. After submitting, verify that the number of keys 
registered is what you expected.").'</p>';
 
 # Key limit is set to 25
 # By default, show only 6 fields
Index: frontend/php/my/admin/index.php
diff -pur -x po -x www -x update 
savane-1.4-orig/frontend/php/my/admin/index.php 
savane-1.4/frontend/php/my/admin/index.php
--- savane-1.4-orig/frontend/php/my/admin/index.php     2006-02-04 
11:00:52.000000000 +0200
+++ savane-1.4/frontend/php/my/admin/index.php  2006-08-05 14:47:58.000000000 
+0300
@@ -167,7 +167,7 @@ print '<p class="text">'._("Note: themes
 
 if (!theme_guidelines_check(SV_THEME))
 {
-  print '<p class="text"><font class="warn">'._("The theme you are currently 
using does not follow the latest Savane CSS guidelines. As result, page layout 
may be more or less severely broken. It is not advised to use this theme.").' ';
+  print '<p class="text"><font class="warn">'._("The theme you are currently 
using does not follow the latest Savane CSS guidelines. As a result, page 
layout may be more or less severely broken. It is not advised to use this 
theme.").' ';
   # If the non-valid theme is the default one, tell users they should fill
   # a support request
   if (SV_THEME == $GLOBALS['sys_themedefault'])
@@ -238,7 +238,7 @@ print '<p class="text">'._("Set to").' <
 $i++;
 print $HTML->box_nextitem(utils_get_alt_row_color($i));
 print '<a href="resume.php">'._("Edit Resume and Skills").'</a>';
-print '<p class="text">'._("Details about your experience and skills may be of 
interest to others users or visitors.").'</p>';
+print '<p class="text">'._("Details about your experience and skills may be of 
interest to other users or visitors.").'</p>';
 
 $i++;
 print $HTML->box_nextitem(utils_get_alt_row_color($i));
Index: frontend/php/my/groups.php
diff -pur -x po -x www -x update savane-1.4-orig/frontend/php/my/groups.php 
savane-1.4/frontend/php/my/groups.php
--- savane-1.4-orig/frontend/php/my/groups.php  2006-02-04 11:00:52.000000000 
+0200
+++ savane-1.4/frontend/php/my/groups.php       2006-08-05 14:47:58.000000000 
+0300
@@ -339,7 +339,7 @@ if ($words)
       # This tool is to search groups for inclusion, not to look around
       # to get information about groups.
       print '<p class="text">';
-      print _("To request inclusion in one or several groups, check the 
correspondant boxes, write a meaningful message for the project administrator 
who will approve or disapprove the request, and submit the form.");
+      print _("To request inclusion in one or several groups, check the 
correspondent boxes, write a meaningful message for the project administrator 
who will approve or disapprove the request, and submit the form.");
 
       print '</p>'.form_header($PHP_SELF);

Index: frontend/php/news/approve.php
diff -pur -x po -x www -x update savane-1.4-orig/frontend/php/news/approve.php 
savane-1.4/frontend/php/news/approve.php
--- savane-1.4-orig/frontend/php/news/approve.php       2006-02-04 
11:00:55.000000000 +0200
+++ savane-1.4/frontend/php/news/approve.php    2006-08-05 14:47:58.000000000 
+0300
@@ -127,19 +127,19 @@ if ($group_id && member_check(0, $group_
          $group_id == $GLOBALS['sys_group_id'])
        {
          $sql="UPDATE news_bytes SET is_approved='".$status."', 
date='".time()."', ".
-            
"summary='".htmlspecialchars($summary)."',details='".htmlspecialchars($details)."'
  WHERE id='$id' AND group_id='$for_group_id'";
+            
"summary='".htmlspecialchars($summary)."',details='".mysql_real_escape_string(htmlspecialchars($details))."'
  WHERE id='$id' AND group_id='$for_group_id'";
        }
       else
        {
          if ($status == 0)
            {
              $sql="UPDATE news_bytes SET is_approved='0', 
summary='".htmlspecialchars($summary)."', ".
-                "details='".htmlspecialchars($details)."' WHERE id='$id' AND 
group_id='$group_id'";
+                
"details='".mysql_real_escape_string(htmlspecialchars($details))."' WHERE 
id='$id' AND group_id='$group_id'";
            }
          elseif ($status == 4)
            {
              $sql="UPDATE news_bytes SET is_approved='4', 
summary='".htmlspecialchars($summary)."', ".
-                "details='".htmlspecialchars($details)."' WHERE id='$id' AND 
group_id='$group_id'";
+                
"details='".mysql_real_escape_string(htmlspecialchars($details))."' WHERE 
id='$id' AND group_id='$group_id'";
            }
        }

Index: frontend/php/news/index.php
diff -pur -x po -x www -x update savane-1.4-orig/frontend/php/news/index.php 
savane-1.4/frontend/php/news/index.php
--- savane-1.4-orig/frontend/php/news/index.php 2006-02-04 11:00:55.000000000 
+0200
+++ savane-1.4/frontend/php/news/index.php      2006-08-05 14:47:58.000000000 
+0300
@@ -87,6 +87,8 @@ site_project_header(array('group'=>$grou
 /* permit to the user to specify something */
 
 $form_opening = '<form action="'. $PHP_SELF .'#options" method="get">';
+# I18N
+# %s is an input field.
 $form = sprintf(_("Print summaries for the %s latest news."), '<input 
type="text" name="limit" size="4" value="'.$limit.'" />');
 if ($group_name)
 { $form .= '<input type="hidden" name="group" value="'.$group_name.'" />'; }
Index: frontend/php/news/submit.php
diff -pur -x po -x www -x update savane-1.4-orig/frontend/php/news/submit.php 
savane-1.4/frontend/php/news/submit.php
--- savane-1.4-orig/frontend/php/news/submit.php        2006-02-04 
11:00:55.000000000 +0200
+++ savane-1.4/frontend/php/news/submit.php     2006-08-05 14:47:58.000000000 
+0300
@@ -80,7 +80,7 @@ if ($update)
     {
       $new_id=forum_create_forum($group_id,$summary,1,0);
       $sql="INSERT INTO news_bytes 
(group_id,submitted_by,is_approved,date,forum_id,summary,details) ".
-        " VALUES 
('$group_id','".user_getid()."','5','".time()."','$new_id','".htmlspecialchars($summary)."','".htmlspecialchars($details)."')";
+        " VALUES 
('$group_id','".user_getid()."','5','".time()."','$new_id','".mysql_real_escape_string(htmlspecialchars($summary))."','".mysql_real_escape_string(htmlspecialchars($details))."')";
       $result=db_query($sql);
     }

Index: frontend/php/project/admin/editgroupinfo.php
diff -pur -x po -x www -x update 
savane-1.4-orig/frontend/php/project/admin/editgroupinfo.php 
savane-1.4/frontend/php/project/admin/editgroupinfo.php
--- savane-1.4-orig/frontend/php/project/admin/editgroupinfo.php        
2006-02-04 11:00:55.000000000 +0200
+++ savane-1.4/frontend/php/project/admin/editgroupinfo.php     2006-08-05 
14:47:58.000000000 +0300
@@ -37,8 +37,8 @@ if ($update)
 
   $result=db_query('UPDATE groups SET '
                   ."group_name='".htmlspecialchars($form_group_name)."',"
-                  ."short_description='".htmlspecialchars($form_shortdesc)."',"
-                  ."long_description='".$form_longdesc."',"
+                  
."short_description='".mysql_escape_string(htmlentities($form_shortdesc))."',"
+                  
."long_description='".mysql_escape_string($form_longdesc)."',"
 
                   ."devel_status='$form_devel_status' "
                   ."WHERE group_id=$group_id");
        
_______________________________________________
Savane-dev mailing list
[email protected]
https://mail.gna.org/listinfo/savane-dev

Reply via email to