From 54774aa8255cb507f9658d787a25dd28a140ba9b Mon Sep 17 00:00:00 2001 From: Dries Buytaert Date: Mon, 2 Jun 2003 20:54:37 +0000 Subject: - Removed the module field from the locale search form. It won't work and there is no easy replacement. - Wrapped the strings in htmlentities() such that one can see the HTML. --- modules/locale.module | 16 ++++++++-------- modules/locale/locale.module | 16 ++++++++-------- 2 files changed, 16 insertions(+), 16 deletions(-) (limited to 'modules') diff --git a/modules/locale.module b/modules/locale.module index 29e0c74f5..145f16228 100644 --- a/modules/locale.module +++ b/modules/locale.module @@ -102,8 +102,13 @@ function locale_edit($lid) { $result = db_query("SELECT * FROM locales WHERE lid = '$lid'"); if ($translation = db_fetch_object($result)) { - $form .= form_item(t("Original text"), "
". wordwrap($translation->string) ."
"); - foreach ($languages as $code=>$language) $form .= (strlen($translation->string) > 30) ? form_textarea($language, $code, $translation->$code, 50, 10) : form_textfield($language, $code, $translation->$code, 50, 128); + + $form .= form_item(t("Original text"), wordwrap(htmlentities($translation->string))); + + foreach ($languages as $code=>$language) { + $form .= (strlen($translation->string) > 30) ? form_textarea($language, $code, $translation->$code, 50, 10) : form_textfield($language, $code, $translation->$code, 50, 128); + } + $form .= form_submit(t("Save translations")); return form($form); @@ -154,10 +159,6 @@ function locale_seek() { } } - if ($edit["module"]) { - $query[] = "location LIKE '%mod=". (check_query($edit["module"]) != "all" ? check_query($edit["module"]) : "") ."%'"; - } - if ($edit["string"]) { $string_query[] = "string LIKE '%". check_query($edit["string"]) ."%'"; if ($edit["status"] != 2) { @@ -184,10 +185,9 @@ function locale_seek() { reset($languages); - $form .= form_textfield(t("String"), "string", $edit["string"], 30, 30, t("Leave blank to show all strings. This is treated as a regular expression.")); + $form .= form_textfield(t("Strings to search for"), "string", $edit["string"], 30, 30, t("Leave blank to show all strings.")); $form .= form_select(t("Language"), "language", ($edit["language"] ? $edit["language"] : key($languages)), array_merge(array("any" => t("Any language"), "all" => t("All languages")), $languages), t("In which language must the string be translated/untranslated (see status)?")); $form .= form_select(t("Status"), "status", $edit["status"], array(2 => t("Untranslated"), 1 => t("Translated"), 0 => t("All"))); - $form .= form_select(t("Module"), "module", $edit["module"], array_merge(array("0" => t("All modules + pages"), "all" => t("All modules")), module_list())); $form .= form_submit(t("Search")); $output .= form($form); diff --git a/modules/locale/locale.module b/modules/locale/locale.module index 29e0c74f5..145f16228 100644 --- a/modules/locale/locale.module +++ b/modules/locale/locale.module @@ -102,8 +102,13 @@ function locale_edit($lid) { $result = db_query("SELECT * FROM locales WHERE lid = '$lid'"); if ($translation = db_fetch_object($result)) { - $form .= form_item(t("Original text"), "
". wordwrap($translation->string) ."
"); - foreach ($languages as $code=>$language) $form .= (strlen($translation->string) > 30) ? form_textarea($language, $code, $translation->$code, 50, 10) : form_textfield($language, $code, $translation->$code, 50, 128); + + $form .= form_item(t("Original text"), wordwrap(htmlentities($translation->string))); + + foreach ($languages as $code=>$language) { + $form .= (strlen($translation->string) > 30) ? form_textarea($language, $code, $translation->$code, 50, 10) : form_textfield($language, $code, $translation->$code, 50, 128); + } + $form .= form_submit(t("Save translations")); return form($form); @@ -154,10 +159,6 @@ function locale_seek() { } } - if ($edit["module"]) { - $query[] = "location LIKE '%mod=". (check_query($edit["module"]) != "all" ? check_query($edit["module"]) : "") ."%'"; - } - if ($edit["string"]) { $string_query[] = "string LIKE '%". check_query($edit["string"]) ."%'"; if ($edit["status"] != 2) { @@ -184,10 +185,9 @@ function locale_seek() { reset($languages); - $form .= form_textfield(t("String"), "string", $edit["string"], 30, 30, t("Leave blank to show all strings. This is treated as a regular expression.")); + $form .= form_textfield(t("Strings to search for"), "string", $edit["string"], 30, 30, t("Leave blank to show all strings.")); $form .= form_select(t("Language"), "language", ($edit["language"] ? $edit["language"] : key($languages)), array_merge(array("any" => t("Any language"), "all" => t("All languages")), $languages), t("In which language must the string be translated/untranslated (see status)?")); $form .= form_select(t("Status"), "status", $edit["status"], array(2 => t("Untranslated"), 1 => t("Translated"), 0 => t("All"))); - $form .= form_select(t("Module"), "module", $edit["module"], array_merge(array("0" => t("All modules + pages"), "all" => t("All modules")), module_list())); $form .= form_submit(t("Search")); $output .= form($form); -- cgit v1.2.3