Commit ccba91d6 authored by Dries's avatar Dries

- Fixed two small bugs in the locale module:

  1. The locale admin menu items 'untranslated "langcode" strings'
     'translated "langcode" strings' were not properly localized.

  2. When inserting new locale strings the uri which generated the
     new string was not properly set (the 'location' field in
     locale table).

  Patch by Ori.
parent 3dbccfa7
......@@ -107,10 +107,10 @@ function locale_links($translation) {
foreach ($languages as $key=>$value) {
if ($translation) {
$output .= la(t("translated '$key' strings"), array("mod" => "locale", "op" => "translated", "language" => $key)) ." | ";
$output .= la(t("translated '%langcode' strings", array("%langcode" => $key)), array("mod" => "locale", "op" => "translated", "language" => $key)) ." | ";
}
else {
$output .= la(t("untranslated '$key' strings"), array("mod" => "locale", "op" => "untranslated", "language" => $key)) ." | ";
$output .= la(t("untranslated '%langcode' strings", array("%langcode" => $key)), array("mod" => "locale", "op" => "untranslated", "language" => $key)) ." | ";
}
}
......@@ -290,7 +290,7 @@ function locale($string) {
else {
$result = db_query("SELECT lid, $locale FROM locales WHERE string = '%s'", $string);
if (!db_fetch_object($result)) {
db_query("INSERT INTO locales (string, location) VALUES ('%s', '%s')", $string, getenv("PATH_INFO"));
db_query("INSERT INTO locales (string, location) VALUES ('%s', '%s')", $string, request_uri());
}
}
......
......@@ -107,10 +107,10 @@ function locale_links($translation) {
foreach ($languages as $key=>$value) {
if ($translation) {
$output .= la(t("translated '$key' strings"), array("mod" => "locale", "op" => "translated", "language" => $key)) ." | ";
$output .= la(t("translated '%langcode' strings", array("%langcode" => $key)), array("mod" => "locale", "op" => "translated", "language" => $key)) ." | ";
}
else {
$output .= la(t("untranslated '$key' strings"), array("mod" => "locale", "op" => "untranslated", "language" => $key)) ." | ";
$output .= la(t("untranslated '%langcode' strings", array("%langcode" => $key)), array("mod" => "locale", "op" => "untranslated", "language" => $key)) ." | ";
}
}
......@@ -290,7 +290,7 @@ function locale($string) {
else {
$result = db_query("SELECT lid, $locale FROM locales WHERE string = '%s'", $string);
if (!db_fetch_object($result)) {
db_query("INSERT INTO locales (string, location) VALUES ('%s', '%s')", $string, getenv("PATH_INFO"));
db_query("INSERT INTO locales (string, location) VALUES ('%s', '%s')", $string, request_uri());
}
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment