summaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
authorDries Buytaert <dries@buytaert.net>2003-06-02 20:54:37 +0000
committerDries Buytaert <dries@buytaert.net>2003-06-02 20:54:37 +0000
commit54774aa8255cb507f9658d787a25dd28a140ba9b (patch)
treec01bf7d803bd0e0bf095ecdde9eb663599c0f903 /modules
parent1839f42c59c88003ac8877c1863d4d0c41808fa7 (diff)
downloadbrdo-54774aa8255cb507f9658d787a25dd28a140ba9b.tar.gz
brdo-54774aa8255cb507f9658d787a25dd28a140ba9b.tar.bz2
- 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.
Diffstat (limited to 'modules')
-rw-r--r--modules/locale.module16
-rw-r--r--modules/locale/locale.module16
2 files changed, 16 insertions, 16 deletions
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"), "<pre>". wordwrap($translation->string) ."</pre>");
- 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"), "<pre>". wordwrap($translation->string) ."</pre>");
- 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);