diff options
-rw-r--r-- | modules/forum.module | 2 | ||||
-rw-r--r-- | modules/forum/forum.module | 2 | ||||
-rw-r--r-- | modules/locale.module | 60 | ||||
-rw-r--r-- | modules/locale/locale.module | 60 | ||||
-rw-r--r-- | modules/statistics.module | 6 | ||||
-rw-r--r-- | modules/statistics/statistics.module | 6 | ||||
-rw-r--r-- | modules/taxonomy.module | 22 | ||||
-rw-r--r-- | modules/taxonomy/taxonomy.module | 22 | ||||
-rw-r--r-- | themes/chameleon/default.css | 1 | ||||
-rw-r--r-- | themes/xtemplate/xtemplate.theme | 2 |
10 files changed, 79 insertions, 104 deletions
diff --git a/modules/forum.module b/modules/forum.module index 516da7df5..8e0f5c601 100644 --- a/modules/forum.module +++ b/modules/forum.module @@ -72,7 +72,7 @@ function forum_settings() { $group .= form_radios(t("Default order"), "forum_order", variable_get("forum_order", "1"), $forder, t("The default display order for topics.")); $output .= form_group(t('Forum viewing options'), $group); - $group = form_textfield(t("Number of topics in block"), "forum_block_num", variable_get("forum_block_num", "5"), 5, 5, t("The number of topics to show in the \"Forum topics\" block. To enable the block, click ". l("here", "admin/system/block") .".")); + $group = form_textfield(t("Number of topics in block"), "forum_block_num", variable_get("forum_block_num", "5"), 5, 5, t("The number of topics to show in the \"Forum topics\" block. To enable the block, go to the <a href=\"%block-administration\">block administration</a> page.", array("%block-administration" => url("admin/system/block")))); $output .= form_group(t('"Forum topic" block settings'), $group); } } diff --git a/modules/forum/forum.module b/modules/forum/forum.module index 516da7df5..8e0f5c601 100644 --- a/modules/forum/forum.module +++ b/modules/forum/forum.module @@ -72,7 +72,7 @@ function forum_settings() { $group .= form_radios(t("Default order"), "forum_order", variable_get("forum_order", "1"), $forder, t("The default display order for topics.")); $output .= form_group(t('Forum viewing options'), $group); - $group = form_textfield(t("Number of topics in block"), "forum_block_num", variable_get("forum_block_num", "5"), 5, 5, t("The number of topics to show in the \"Forum topics\" block. To enable the block, click ". l("here", "admin/system/block") .".")); + $group = form_textfield(t("Number of topics in block"), "forum_block_num", variable_get("forum_block_num", "5"), 5, 5, t("The number of topics to show in the \"Forum topics\" block. To enable the block, go to the <a href=\"%block-administration\">block administration</a> page.", array("%block-administration" => url("admin/system/block")))); $output .= form_group(t('"Forum topic" block settings'), $group); } } diff --git a/modules/locale.module b/modules/locale.module index 3b3826c2d..efc4f576b 100644 --- a/modules/locale.module +++ b/modules/locale.module @@ -2,12 +2,10 @@ // $Id$ function locale_help($section = "admin/help#locale") { - global $languages; - $output = ""; switch ($section) { case 'admin/help#locale': - $output .= t(" + return t(" <p>Most programs are written and documented in English, and use English to interact with users. This is also true for a great deal of web sites. However, most people are less comfortable with English than with their native language, and would prefer to use their mother tongue as much as possible. Many people love see their web site showing a lot less English, and far more of their own language.</p> <p>Therefore Drupal provides a framework to setup a multi-lingual web site, or to overwrite the default English texts. We explored the various alternatives to support internationalization (I18N) and decided to design the framework in such a way that the impact of internationalization on drupal's sources is minimized, modular and doesn't require a HTML or PHP wizard to maintain translations. Maintaining translations had to be simple so it became as easy as filling out forms on the administration page.</p> <h3>How to translate texts</h3> @@ -36,32 +34,28 @@ function locale_help($section = "admin/help#locale") { </pre>", array("%overview" => url("admin/locale"))); break; case 'admin/system/modules#description': - $output = t("Enables the translation of the user interface to languages other than English."); - break; + return t('Enables the translation of the user interface to languages other than English.'); case 'admin/locale': - $output = t("The locale module handles translations into new languages. It also enables you to add jargon, slang or other special language as fits the web site. For each language you want to support, a line needs to be added to your configuration file."); - break; + return t('The locale module handles translations into new languages. It also enables you to add jargon, slang or other special language as fits the web site. For each language you want to support, a line needs to be added to your configuration file.'); case 'admin/locale/search': - $output = t("Search the localization database. ('*' can be used as a wildcard)"); - break; + return t("Search the localization database. ('*' can be used as a wildcard)"); } - return $output; } function locale_help_page() { - print theme("page", locale_help()); + print theme('page', locale_help()); } function locale_perm() { - return array("administer locales"); + return array('administer locales'); } function locale_link($type) { global $languages; if ($type == "system") { - if (user_access("administer locales")) { + if (user_access('administer locales')) { menu("admin/locale", t("localization"), "locale_admin", 5); menu("admin/locale/search", t("search string"), "locale_admin", 8); @@ -81,7 +75,7 @@ function locale_link($type) { function locale_user($type, &$edit, &$user) { global $languages; if ($type == "edit_form" && count($languages) > 1) { - $output = form_radios(t("Language"), "language", $user->language, $languages, t("Selecting a different language will change the language of the site.")); + $output = form_radios(t("Language"), 'language', $user->language, $languages, t("Selecting a different language will change the language of the site.")); } return $output; } @@ -138,7 +132,7 @@ function locale_edit($lid) { $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")); + $form .= form_submit(t('Save translations')); return form($form); } @@ -155,7 +149,7 @@ function locale_languages($translation) { } function locale_seek_query() { - $fields = array("string", "language", "status"); + $fields = array("string", 'language', 'status'); if (is_array($_REQUEST["edit"])) { foreach ($_REQUEST["edit"] as $key => $value) { if (!empty($value) && in_array($key, $fields)) { @@ -244,15 +238,15 @@ function locale_seek_form() { $edit =& $_POST["edit"]; $form .= form_textfield(t("Strings to search for"), "string", $edit["string"], 30, 30, t("Leave blank to show all strings.")); if (count($languages) > 1) { - $form .= form_radios(t("Language"), "language", ($edit["language"] ? $edit["language"] : "all"), 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_radios(t("Language"), 'language', ($edit['language'] ? $edit['language'] : "all"), array_merge(array("any" => t("Any language"), "all" => t("All languages")), $languages), t("In which language must the string be translated/untranslated (see status)?")); } else { foreach ($languages as $key => $value) { - $form .= form_hidden("language", $key); + $form .= form_hidden('language', $key); } } - $form .= form_radios(t("Status"), "status", $edit["status"], array(2 => t("Untranslated"), 1 => t("Translated"), 0 => t("All"))); - $form .= form_submit(t("Search")); + $form .= form_radios(t('Status'), 'status', $edit['status'], array(2 => t('Untranslated'), 1 => t('Translated'), 0 => t('All'))); + $form .= form_submit(t('Search')); $output .= form($form); @@ -263,7 +257,7 @@ function locale_admin() { $op = $_POST["op"]; $edit =& $_POST["edit"]; - if (user_access("administer locales")) { + if (user_access('administer locales')) { locale_admin_initialize(); if (empty($op)) { @@ -271,44 +265,44 @@ function locale_admin() { } switch ($op) { - case "delete": + case 'delete': $output .= locale_delete(check_query(arg(3))); $output .= locale_seek(); break; - case "edit": + case 'edit': $output .= locale_edit(check_query(arg(3))); $output .= locale_seek(); break; - case "search": + case 'search': if (locale_seek_query()) { $output = locale_seek(); } $output .= locale_seek_form(); break; - case t("Search"): + case t('Search'): $output = locale_seek(); $output .= locale_seek_form(); break; - case t("Save translations"): + case t('Save translations'): $output .= locale_save(check_query(arg(3))); $output .= locale_seek_form(); break; default: - if (arg(3) == "translated") { - $edit["status"] = 1; - $edit["language"] = arg(2); + if (arg(3) == 'translated') { + $edit['status'] = 1; + $edit['language'] = arg(2); } else { - $edit["status"] = 2; - $edit["language"] = arg(2); + $edit['status'] = 2; + $edit['language'] = arg(2); } $output = locale_seek(); $output .= locale_seek_form(); } - print theme("page", $output); + print theme('page', $output); } else { - print theme("page", message_access()); + print theme('page', message_access()); } } diff --git a/modules/locale/locale.module b/modules/locale/locale.module index 3b3826c2d..efc4f576b 100644 --- a/modules/locale/locale.module +++ b/modules/locale/locale.module @@ -2,12 +2,10 @@ // $Id$ function locale_help($section = "admin/help#locale") { - global $languages; - $output = ""; switch ($section) { case 'admin/help#locale': - $output .= t(" + return t(" <p>Most programs are written and documented in English, and use English to interact with users. This is also true for a great deal of web sites. However, most people are less comfortable with English than with their native language, and would prefer to use their mother tongue as much as possible. Many people love see their web site showing a lot less English, and far more of their own language.</p> <p>Therefore Drupal provides a framework to setup a multi-lingual web site, or to overwrite the default English texts. We explored the various alternatives to support internationalization (I18N) and decided to design the framework in such a way that the impact of internationalization on drupal's sources is minimized, modular and doesn't require a HTML or PHP wizard to maintain translations. Maintaining translations had to be simple so it became as easy as filling out forms on the administration page.</p> <h3>How to translate texts</h3> @@ -36,32 +34,28 @@ function locale_help($section = "admin/help#locale") { </pre>", array("%overview" => url("admin/locale"))); break; case 'admin/system/modules#description': - $output = t("Enables the translation of the user interface to languages other than English."); - break; + return t('Enables the translation of the user interface to languages other than English.'); case 'admin/locale': - $output = t("The locale module handles translations into new languages. It also enables you to add jargon, slang or other special language as fits the web site. For each language you want to support, a line needs to be added to your configuration file."); - break; + return t('The locale module handles translations into new languages. It also enables you to add jargon, slang or other special language as fits the web site. For each language you want to support, a line needs to be added to your configuration file.'); case 'admin/locale/search': - $output = t("Search the localization database. ('*' can be used as a wildcard)"); - break; + return t("Search the localization database. ('*' can be used as a wildcard)"); } - return $output; } function locale_help_page() { - print theme("page", locale_help()); + print theme('page', locale_help()); } function locale_perm() { - return array("administer locales"); + return array('administer locales'); } function locale_link($type) { global $languages; if ($type == "system") { - if (user_access("administer locales")) { + if (user_access('administer locales')) { menu("admin/locale", t("localization"), "locale_admin", 5); menu("admin/locale/search", t("search string"), "locale_admin", 8); @@ -81,7 +75,7 @@ function locale_link($type) { function locale_user($type, &$edit, &$user) { global $languages; if ($type == "edit_form" && count($languages) > 1) { - $output = form_radios(t("Language"), "language", $user->language, $languages, t("Selecting a different language will change the language of the site.")); + $output = form_radios(t("Language"), 'language', $user->language, $languages, t("Selecting a different language will change the language of the site.")); } return $output; } @@ -138,7 +132,7 @@ function locale_edit($lid) { $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")); + $form .= form_submit(t('Save translations')); return form($form); } @@ -155,7 +149,7 @@ function locale_languages($translation) { } function locale_seek_query() { - $fields = array("string", "language", "status"); + $fields = array("string", 'language', 'status'); if (is_array($_REQUEST["edit"])) { foreach ($_REQUEST["edit"] as $key => $value) { if (!empty($value) && in_array($key, $fields)) { @@ -244,15 +238,15 @@ function locale_seek_form() { $edit =& $_POST["edit"]; $form .= form_textfield(t("Strings to search for"), "string", $edit["string"], 30, 30, t("Leave blank to show all strings.")); if (count($languages) > 1) { - $form .= form_radios(t("Language"), "language", ($edit["language"] ? $edit["language"] : "all"), 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_radios(t("Language"), 'language', ($edit['language'] ? $edit['language'] : "all"), array_merge(array("any" => t("Any language"), "all" => t("All languages")), $languages), t("In which language must the string be translated/untranslated (see status)?")); } else { foreach ($languages as $key => $value) { - $form .= form_hidden("language", $key); + $form .= form_hidden('language', $key); } } - $form .= form_radios(t("Status"), "status", $edit["status"], array(2 => t("Untranslated"), 1 => t("Translated"), 0 => t("All"))); - $form .= form_submit(t("Search")); + $form .= form_radios(t('Status'), 'status', $edit['status'], array(2 => t('Untranslated'), 1 => t('Translated'), 0 => t('All'))); + $form .= form_submit(t('Search')); $output .= form($form); @@ -263,7 +257,7 @@ function locale_admin() { $op = $_POST["op"]; $edit =& $_POST["edit"]; - if (user_access("administer locales")) { + if (user_access('administer locales')) { locale_admin_initialize(); if (empty($op)) { @@ -271,44 +265,44 @@ function locale_admin() { } switch ($op) { - case "delete": + case 'delete': $output .= locale_delete(check_query(arg(3))); $output .= locale_seek(); break; - case "edit": + case 'edit': $output .= locale_edit(check_query(arg(3))); $output .= locale_seek(); break; - case "search": + case 'search': if (locale_seek_query()) { $output = locale_seek(); } $output .= locale_seek_form(); break; - case t("Search"): + case t('Search'): $output = locale_seek(); $output .= locale_seek_form(); break; - case t("Save translations"): + case t('Save translations'): $output .= locale_save(check_query(arg(3))); $output .= locale_seek_form(); break; default: - if (arg(3) == "translated") { - $edit["status"] = 1; - $edit["language"] = arg(2); + if (arg(3) == 'translated') { + $edit['status'] = 1; + $edit['language'] = arg(2); } else { - $edit["status"] = 2; - $edit["language"] = arg(2); + $edit['status'] = 2; + $edit['language'] = arg(2); } $output = locale_seek(); $output .= locale_seek_form(); } - print theme("page", $output); + print theme('page', $output); } else { - print theme("page", message_access()); + print theme('page', message_access()); } } diff --git a/modules/statistics.module b/modules/statistics.module index 625f7c64e..f25f87542 100644 --- a/modules/statistics.module +++ b/modules/statistics.module @@ -311,16 +311,16 @@ function statistics_top_refer() { elseif ($view == "internal") { $query = "SELECT url, MAX(timestamp) AS last_view, COUNT(url) AS count FROM {accesslog} WHERE url LIKE '%". check_query($_SERVER["HTTP_HOST"]) ."%' GROUP BY url"; $query_cnt = "SELECT COUNT(DISTINCT(url)) FROM {accesslog} WHERE url <> '' AND url LIKE '%". check_query($_SERVER["HTTP_HOST"]) ."%'"; - $describe = "internal "; + $describe = t("Top internal referrers of the past %interval"); } else { /* default to external */ $query = "SELECT url, MAX(timestamp) AS last_view, COUNT(url) AS count FROM {accesslog} WHERE url NOT LIKE '%". check_query($_SERVER["HTTP_HOST"]) ."%' AND url <> '' GROUP BY url"; $query_cnt = "SELECT COUNT(DISTINCT(url)) FROM {accesslog} WHERE url <> '' AND url NOT LIKE '%". check_query($_SERVER["HTTP_HOST"]) ."%'"; - $describe = "external "; + $describe = t("Top external referrers of the past %interval"); } - $output = "<h3>". t("Top $describe referrers of the past %interval", array("%interval" => format_interval(variable_get("statistics_flush_accesslog_timer", 259200)))) ."</h3>"; + $output = "<h3>". strtr($describe, array("%interval" => format_interval(variable_get("statistics_flush_accesslog_timer", 259200)))) ."</h3>"; $header = array( array("data" => t("URL"), "field" => "url"), diff --git a/modules/statistics/statistics.module b/modules/statistics/statistics.module index 625f7c64e..f25f87542 100644 --- a/modules/statistics/statistics.module +++ b/modules/statistics/statistics.module @@ -311,16 +311,16 @@ function statistics_top_refer() { elseif ($view == "internal") { $query = "SELECT url, MAX(timestamp) AS last_view, COUNT(url) AS count FROM {accesslog} WHERE url LIKE '%". check_query($_SERVER["HTTP_HOST"]) ."%' GROUP BY url"; $query_cnt = "SELECT COUNT(DISTINCT(url)) FROM {accesslog} WHERE url <> '' AND url LIKE '%". check_query($_SERVER["HTTP_HOST"]) ."%'"; - $describe = "internal "; + $describe = t("Top internal referrers of the past %interval"); } else { /* default to external */ $query = "SELECT url, MAX(timestamp) AS last_view, COUNT(url) AS count FROM {accesslog} WHERE url NOT LIKE '%". check_query($_SERVER["HTTP_HOST"]) ."%' AND url <> '' GROUP BY url"; $query_cnt = "SELECT COUNT(DISTINCT(url)) FROM {accesslog} WHERE url <> '' AND url NOT LIKE '%". check_query($_SERVER["HTTP_HOST"]) ."%'"; - $describe = "external "; + $describe = t("Top external referrers of the past %interval"); } - $output = "<h3>". t("Top $describe referrers of the past %interval", array("%interval" => format_interval(variable_get("statistics_flush_accesslog_timer", 259200)))) ."</h3>"; + $output = "<h3>". strtr($describe, array("%interval" => format_interval(variable_get("statistics_flush_accesslog_timer", 259200)))) ."</h3>"; $header = array( array("data" => t("URL"), "field" => "url"), diff --git a/modules/taxonomy.module b/modules/taxonomy.module index 0a2c01827..245e1ba54 100644 --- a/modules/taxonomy.module +++ b/modules/taxonomy.module @@ -72,8 +72,8 @@ function taxonomy_form_vocabulary($edit = array()) { $form .= form_textfield(t("Vocabulary name"), "name", $edit["name"], 50, 64, t("Required") .". ". t("The name for this vocabulary. Example: 'Topic'") ."."); $form .= form_textarea(t("Description"), "description", $edit["description"], 60, 5, t("Optional") .". ". t("Description of the vocabulary, can be used by modules.")); $form .= form_select(t("Types"), "nodes", explode(",", $edit["nodes"]), $nodetypes, t("Required") .". ". t("A list of node types you want to associate this vocabulary with."), "", 1); - $form .= form_checkbox(t("Related terms"), "relations", 1, $edit["relations"], t("Optional") .". ". t("Allows ". l("related terms", "admin/taxonomy/help", NULL, NULL, "related-terms") ." in this vocabulary.")); - $form .= form_radios(t("Hierarchy"), "hierarchy", $edit["hierarchy"], array(t("Disabled"), t("Single"), t("Multiple")), t("Optional") .". ". t("Allows ". l("a tree-like hierarchy", "admin/taxonomy/help", NULL, NULL, "hierarchy") ." between terms of this vocabulary."), "", 0); + $form .= form_checkbox(t("Related terms"), "relations", 1, $edit["relations"], t("Optional") .". ". t("Allows <a href=\"%help-url\">related terms</a> in this vocabulary.", array("%help-url" => url("admin/taxonomy/help", NULL, NULL, "related-terms")))); + $form .= form_radios(t("Hierarchy"), "hierarchy", $edit["hierarchy"], array(t("Disabled"), t("Single"), t("Multiple")), t("Optional") .". ". t("Allows <a href=\"%help-url\">a tree-like hierarchy</a> between terms of this vocabulary.", array("%help-url" => url("admin/taxonomy/help", NULL, NULL, "hierarchy"))), "", 0); $form .= form_checkbox(t("Multiple select"), "multiple", 1, $edit["multiple"], t("Optional") .". ". t("Allows nodes to have more than one term in this vocabulary.")); $form .= form_checkbox(t("Required"), "required", 1, $edit["required"], t("If enabled every node <strong>must</strong> have at least one term in this vocabulary")); $form .= form_weight(t("Weight"), "weight", $edit["weight"], 10, t("Optional. In listings, the heavier vocabularies will sink and the lighter vocabularies will be positioned nearer the top.")); @@ -171,7 +171,7 @@ function taxonomy_form_term($edit = array()) { $form .= _taxonomy_term_select(t("Related terms"), "relations", array_keys(taxonomy_get_related($edit["tid"])), $vocabulary_id, t("Optional") .". ", 1, "<". t("none") .">", array($edit["tid"])); } - $form .= form_textarea(t("Synonyms"), "synonyms", implode("\n", taxonomy_get_synonyms($edit["tid"])), 30, 5, t("Optional") . ". ". t(l("Synonyms", "admin/taxonomy/help", NULL, NULL, "synonyms") ." of this term, one synonym per line.")); + $form .= form_textarea(t("Synonyms"), "synonyms", implode("\n", taxonomy_get_synonyms($edit["tid"])), 30, 5, t("Optional") . ". ". t("<a href=\"%help-url\">Synonyms</a> of this term, one synonym per line.", array("%help-url" => url("admin/taxonomy/help", NULL, NULL, "synonyms")))); $form .= form_weight(t("Weight"), "weight", $edit["weight"], 10, t("Optional. In listings, the heavier terms will sink and the lighter terms will be positioned nearer the top.")); $form .= form_hidden("vid", $vocabulary->vid); $form .= form_submit(t("Submit")); @@ -302,23 +302,17 @@ function taxonomy_overview() { function taxonomy_form($vocabulary_id, $value = 0) { $vocabulary = taxonomy_get_vocabulary($vocabulary_id); if ($vocabulary->required) { - $verb = "must"; + $descriptions = array(t("You must choose one term for this node."), t("You must choose one or more terms for this node.")); $blank = 0; } else { - $verb = "can"; + $descriptions = array(t("You can choose one term for this node."), t("You can choose one or more terms for this node.")); $blank = "<". t("none") .">"; } - if ($vocabulary->multiple) { - $description = t("You $verb choose one or more terms for this node."); - $multiple = 1; - } - else { - $description = t("You $verb choose one term for this node."); - $multiple = 0; - } - return _taxonomy_term_select($vocabulary->name, "taxonomy", $value, $vocabulary_id, $description, $multiple, $blank); + $multiple = intval($vocabulary->multiple); + + return _taxonomy_term_select($vocabulary->name, "taxonomy", $value, $vocabulary_id, $descriptions[$multiple], $multiple, $blank); } /* diff --git a/modules/taxonomy/taxonomy.module b/modules/taxonomy/taxonomy.module index 0a2c01827..245e1ba54 100644 --- a/modules/taxonomy/taxonomy.module +++ b/modules/taxonomy/taxonomy.module @@ -72,8 +72,8 @@ function taxonomy_form_vocabulary($edit = array()) { $form .= form_textfield(t("Vocabulary name"), "name", $edit["name"], 50, 64, t("Required") .". ". t("The name for this vocabulary. Example: 'Topic'") ."."); $form .= form_textarea(t("Description"), "description", $edit["description"], 60, 5, t("Optional") .". ". t("Description of the vocabulary, can be used by modules.")); $form .= form_select(t("Types"), "nodes", explode(",", $edit["nodes"]), $nodetypes, t("Required") .". ". t("A list of node types you want to associate this vocabulary with."), "", 1); - $form .= form_checkbox(t("Related terms"), "relations", 1, $edit["relations"], t("Optional") .". ". t("Allows ". l("related terms", "admin/taxonomy/help", NULL, NULL, "related-terms") ." in this vocabulary.")); - $form .= form_radios(t("Hierarchy"), "hierarchy", $edit["hierarchy"], array(t("Disabled"), t("Single"), t("Multiple")), t("Optional") .". ". t("Allows ". l("a tree-like hierarchy", "admin/taxonomy/help", NULL, NULL, "hierarchy") ." between terms of this vocabulary."), "", 0); + $form .= form_checkbox(t("Related terms"), "relations", 1, $edit["relations"], t("Optional") .". ". t("Allows <a href=\"%help-url\">related terms</a> in this vocabulary.", array("%help-url" => url("admin/taxonomy/help", NULL, NULL, "related-terms")))); + $form .= form_radios(t("Hierarchy"), "hierarchy", $edit["hierarchy"], array(t("Disabled"), t("Single"), t("Multiple")), t("Optional") .". ". t("Allows <a href=\"%help-url\">a tree-like hierarchy</a> between terms of this vocabulary.", array("%help-url" => url("admin/taxonomy/help", NULL, NULL, "hierarchy"))), "", 0); $form .= form_checkbox(t("Multiple select"), "multiple", 1, $edit["multiple"], t("Optional") .". ". t("Allows nodes to have more than one term in this vocabulary.")); $form .= form_checkbox(t("Required"), "required", 1, $edit["required"], t("If enabled every node <strong>must</strong> have at least one term in this vocabulary")); $form .= form_weight(t("Weight"), "weight", $edit["weight"], 10, t("Optional. In listings, the heavier vocabularies will sink and the lighter vocabularies will be positioned nearer the top.")); @@ -171,7 +171,7 @@ function taxonomy_form_term($edit = array()) { $form .= _taxonomy_term_select(t("Related terms"), "relations", array_keys(taxonomy_get_related($edit["tid"])), $vocabulary_id, t("Optional") .". ", 1, "<". t("none") .">", array($edit["tid"])); } - $form .= form_textarea(t("Synonyms"), "synonyms", implode("\n", taxonomy_get_synonyms($edit["tid"])), 30, 5, t("Optional") . ". ". t(l("Synonyms", "admin/taxonomy/help", NULL, NULL, "synonyms") ." of this term, one synonym per line.")); + $form .= form_textarea(t("Synonyms"), "synonyms", implode("\n", taxonomy_get_synonyms($edit["tid"])), 30, 5, t("Optional") . ". ". t("<a href=\"%help-url\">Synonyms</a> of this term, one synonym per line.", array("%help-url" => url("admin/taxonomy/help", NULL, NULL, "synonyms")))); $form .= form_weight(t("Weight"), "weight", $edit["weight"], 10, t("Optional. In listings, the heavier terms will sink and the lighter terms will be positioned nearer the top.")); $form .= form_hidden("vid", $vocabulary->vid); $form .= form_submit(t("Submit")); @@ -302,23 +302,17 @@ function taxonomy_overview() { function taxonomy_form($vocabulary_id, $value = 0) { $vocabulary = taxonomy_get_vocabulary($vocabulary_id); if ($vocabulary->required) { - $verb = "must"; + $descriptions = array(t("You must choose one term for this node."), t("You must choose one or more terms for this node.")); $blank = 0; } else { - $verb = "can"; + $descriptions = array(t("You can choose one term for this node."), t("You can choose one or more terms for this node.")); $blank = "<". t("none") .">"; } - if ($vocabulary->multiple) { - $description = t("You $verb choose one or more terms for this node."); - $multiple = 1; - } - else { - $description = t("You $verb choose one term for this node."); - $multiple = 0; - } - return _taxonomy_term_select($vocabulary->name, "taxonomy", $value, $vocabulary_id, $description, $multiple, $blank); + $multiple = intval($vocabulary->multiple); + + return _taxonomy_term_select($vocabulary->name, "taxonomy", $value, $vocabulary_id, $descriptions[$multiple], $multiple, $blank); } /* diff --git a/themes/chameleon/default.css b/themes/chameleon/default.css index c33c46f12..8c3d36926 100644 --- a/themes/chameleon/default.css +++ b/themes/chameleon/default.css @@ -90,4 +90,3 @@ br { .form-item textarea { font-size: 1em; } - diff --git a/themes/xtemplate/xtemplate.theme b/themes/xtemplate/xtemplate.theme index cfba361d0..62d67efa2 100644 --- a/themes/xtemplate/xtemplate.theme +++ b/themes/xtemplate/xtemplate.theme @@ -11,7 +11,7 @@ $GLOBALS["xtemplate"]->template->SetNullBlock(" "); // "" doesnt work! function xtemplate_settings() { $output .= form_textarea(t("Message on front page"), "xtemplate_mission", variable_get("xtemplate_mission", "edit mission"), 70, 6, t("This text will be displayed on the front page. It can be used to display a mission statement, announcement or site description..")); $output .= form_textfield(t("Stylesheet URL"), "xtemplate_stylesheet", variable_get("xtemplate_stylesheet", "themes/xtemplate/xtemplate.css"), 70, 300, t("The URL for your theme's cascading stylesheet.")); - $output .= form_textarea(t("Logo"), "xtemplate_logo", variable_get("xtemplate_logo", "<img src=\"themes/xtemplate/images/druplicon.gif\" alt=\"Druplicon\" />"), 70, 4, t("The HTML code for displaying the logo.")); + $output .= form_textarea(t("Logo"), "xtemplate_logo", variable_get("xtemplate_logo", "<img src=\"themes/xtemplate/images/druplicon.gif\" alt=\"Druplicon - Drupal logo\" />"), 70, 4, t("The HTML code for displaying the logo.")); $output .= form_textarea(t("Primary links"), "xtemplate_primary_links", variable_get("xtemplate_primary_links", l("edit primary links", "admin/system/themes/xtemplate")), 70, 8, t("The HTML code for the primary links.")); $output .= form_textarea(t("Secondary links"), "xtemplate_secondary_links", variable_get("xtemplate_secondary_links", l("edit secondary links", "admin/system/themes/xtemplate")), 70, 8, t("The HTML code for the secondary links.")); $output .= form_radios(t("Search box"), "xtemplate_search_box", variable_get("xtemplate_search_box", 0), array(t("Disabled"), t("Enabled")), t("Show a search box in the upper right corner.")); |