Commit c8b28009 authored by Dries's avatar Dries

- Made sure all menu items can be translated.  Path by Goba.
parent 949a7014
......@@ -137,7 +137,7 @@ function menu_tree($parent = "") {
$style = ($_list[$item]["children"] ? (menu_in_active_trail($item) ? "expanded" : "collapsed") : "leaf");
$output .= "<li class=\"$style\">";
$output .= _render_item($item);
if (menu_in_active_trail($item, $trail)) {
if (menu_in_active_trail($item)) {
$output .= menu_tree($item);
}
$output .= "</li>\n";
......
......@@ -108,12 +108,12 @@ function import_link($type) {
if ($type == "system") {
if (user_access("administer news feeds")) {
menu("admin/node/syndication", "syndication", NULL, NULL, 5);
menu("admin/node/syndication/news", "feeds", "import_admin", import_help("admin/node/syndication/news") );
menu("admin/node/syndication/news/add/feed", "new feed", "import_admin", import_help("admin/node/syndication/news/add/feed"), 2);
menu("admin/node/syndication/news/add/bundle", "new bundle", "import_admin", import_help("admin/node/syndication/news/add/bundle"), 3);
menu("admin/node/syndication/news/tag", "tag items", "import_admin", import_help("admin/node/syndication/news/tag"), 4);
menu("admin/node/syndication/news/help", "help", "import_help", NULL, 9);
menu("admin/node/syndication", t("syndication"), NULL, NULL, 5);
menu("admin/node/syndication/news", t("feeds"), "import_admin", import_help("admin/node/syndication/news") );
menu("admin/node/syndication/news/add/feed", t("new feed"), "import_admin", import_help("admin/node/syndication/news/add/feed"), 2);
menu("admin/node/syndication/news/add/bundle", t("new bundle"), "import_admin", import_help("admin/node/syndication/news/add/bundle"), 3);
menu("admin/node/syndication/news/tag", t("tag items"), "import_admin", import_help("admin/node/syndication/news/tag"), 4);
menu("admin/node/syndication/news/help", t("help"), "import_help", NULL, 9);
}
}
......
......@@ -108,12 +108,12 @@ function import_link($type) {
if ($type == "system") {
if (user_access("administer news feeds")) {
menu("admin/node/syndication", "syndication", NULL, NULL, 5);
menu("admin/node/syndication/news", "feeds", "import_admin", import_help("admin/node/syndication/news") );
menu("admin/node/syndication/news/add/feed", "new feed", "import_admin", import_help("admin/node/syndication/news/add/feed"), 2);
menu("admin/node/syndication/news/add/bundle", "new bundle", "import_admin", import_help("admin/node/syndication/news/add/bundle"), 3);
menu("admin/node/syndication/news/tag", "tag items", "import_admin", import_help("admin/node/syndication/news/tag"), 4);
menu("admin/node/syndication/news/help", "help", "import_help", NULL, 9);
menu("admin/node/syndication", t("syndication"), NULL, NULL, 5);
menu("admin/node/syndication/news", t("feeds"), "import_admin", import_help("admin/node/syndication/news") );
menu("admin/node/syndication/news/add/feed", t("new feed"), "import_admin", import_help("admin/node/syndication/news/add/feed"), 2);
menu("admin/node/syndication/news/add/bundle", t("new bundle"), "import_admin", import_help("admin/node/syndication/news/add/bundle"), 3);
menu("admin/node/syndication/news/tag", t("tag items"), "import_admin", import_help("admin/node/syndication/news/tag"), 4);
menu("admin/node/syndication/news/help", t("help"), "import_help", NULL, 9);
}
}
......
......@@ -816,21 +816,21 @@ function comment_link($type, $node = 0, $main = 0) {
if ($type == "system") {
if (user_access("administer comments")) {
menu("admin/comment", "comments", "comment_admin", comment_help("admin/comment"), 1);
menu("admin/comment/comments", "overview",NULL, comment_help("admin/comment/comments"), 2);
menu("admin/comment/comments/0", "new/updated", "comment_admin", comment_help("admin/comment/comments/0"), 1);
menu("admin/comment/comments/1", "approval queue", "comment_admin", comment_help("admin/comment/comments/1"), 2);
menu("admin/comment/search", "search", "comment_admin", comment_help("admin/comment/search"), 8);
menu("admin/comment/help", "help", "comment_help", NULL, 9);
menu("admin/comment/edit", "edit comment", "comment_admin", NULL, 0, 1);
menu("admin/comment", t("comments"), "comment_admin", comment_help("admin/comment"), 1);
menu("admin/comment/comments", t("overview"), NULL, comment_help("admin/comment/comments"), 2);
menu("admin/comment/comments/0", t("new/updated"), "comment_admin", comment_help("admin/comment/comments/0"), 1);
menu("admin/comment/comments/1", t("approval queue"), "comment_admin", comment_help("admin/comment/comments/1"), 2);
menu("admin/comment/search", t("search"), "comment_admin", comment_help("admin/comment/search"), 8);
menu("admin/comment/help", t("help"), "comment_help", NULL, 9);
menu("admin/comment/edit", t("edit comment"), "comment_admin", NULL, 0, 1);
// comment settings:
if (user_access("administer moderation")) {
menu("admin/comment/moderation", "moderation", NULL, comment_help("admin/comment/moderation"), 3);
menu("admin/comment/moderation/votes", "votes", "comment_admin", comment_help("admin/comment/moderation/votes"));
menu("admin/comment/moderation/matrix", "matrix", "comment_admin", comment_help("admin/comment/moderation/matrix"));
menu("admin/comment/moderation/filters", "thresholds", "comment_admin", comment_help("admin/comment/moderation/filters"));
menu("admin/comment/moderation/roles", "initial scores", "comment_admin", comment_help("admin/comment/roles"), 6);
menu("admin/comment/moderation", t("moderation"), NULL, comment_help("admin/comment/moderation"), 3);
menu("admin/comment/moderation/votes", t("votes"), "comment_admin", comment_help("admin/comment/moderation/votes"));
menu("admin/comment/moderation/matrix", t("matrix"), "comment_admin", comment_help("admin/comment/moderation/matrix"));
menu("admin/comment/moderation/filters", t("thresholds"), "comment_admin", comment_help("admin/comment/moderation/filters"));
menu("admin/comment/moderation/roles", t("initial scores"), "comment_admin", comment_help("admin/comment/roles"), 6);
}
}
}
......
......@@ -816,21 +816,21 @@ function comment_link($type, $node = 0, $main = 0) {
if ($type == "system") {
if (user_access("administer comments")) {
menu("admin/comment", "comments", "comment_admin", comment_help("admin/comment"), 1);
menu("admin/comment/comments", "overview",NULL, comment_help("admin/comment/comments"), 2);
menu("admin/comment/comments/0", "new/updated", "comment_admin", comment_help("admin/comment/comments/0"), 1);
menu("admin/comment/comments/1", "approval queue", "comment_admin", comment_help("admin/comment/comments/1"), 2);
menu("admin/comment/search", "search", "comment_admin", comment_help("admin/comment/search"), 8);
menu("admin/comment/help", "help", "comment_help", NULL, 9);
menu("admin/comment/edit", "edit comment", "comment_admin", NULL, 0, 1);
menu("admin/comment", t("comments"), "comment_admin", comment_help("admin/comment"), 1);
menu("admin/comment/comments", t("overview"), NULL, comment_help("admin/comment/comments"), 2);
menu("admin/comment/comments/0", t("new/updated"), "comment_admin", comment_help("admin/comment/comments/0"), 1);
menu("admin/comment/comments/1", t("approval queue"), "comment_admin", comment_help("admin/comment/comments/1"), 2);
menu("admin/comment/search", t("search"), "comment_admin", comment_help("admin/comment/search"), 8);
menu("admin/comment/help", t("help"), "comment_help", NULL, 9);
menu("admin/comment/edit", t("edit comment"), "comment_admin", NULL, 0, 1);
// comment settings:
if (user_access("administer moderation")) {
menu("admin/comment/moderation", "moderation", NULL, comment_help("admin/comment/moderation"), 3);
menu("admin/comment/moderation/votes", "votes", "comment_admin", comment_help("admin/comment/moderation/votes"));
menu("admin/comment/moderation/matrix", "matrix", "comment_admin", comment_help("admin/comment/moderation/matrix"));
menu("admin/comment/moderation/filters", "thresholds", "comment_admin", comment_help("admin/comment/moderation/filters"));
menu("admin/comment/moderation/roles", "initial scores", "comment_admin", comment_help("admin/comment/roles"), 6);
menu("admin/comment/moderation", t("moderation"), NULL, comment_help("admin/comment/moderation"), 3);
menu("admin/comment/moderation/votes", t("votes"), "comment_admin", comment_help("admin/comment/moderation/votes"));
menu("admin/comment/moderation/matrix", t("matrix"), "comment_admin", comment_help("admin/comment/moderation/matrix"));
menu("admin/comment/moderation/filters", t("thresholds"), "comment_admin", comment_help("admin/comment/moderation/filters"));
menu("admin/comment/moderation/roles", t("initial scores"), "comment_admin", comment_help("admin/comment/roles"), 6);
}
}
}
......
......@@ -108,12 +108,12 @@ function import_link($type) {
if ($type == "system") {
if (user_access("administer news feeds")) {
menu("admin/node/syndication", "syndication", NULL, NULL, 5);
menu("admin/node/syndication/news", "feeds", "import_admin", import_help("admin/node/syndication/news") );
menu("admin/node/syndication/news/add/feed", "new feed", "import_admin", import_help("admin/node/syndication/news/add/feed"), 2);
menu("admin/node/syndication/news/add/bundle", "new bundle", "import_admin", import_help("admin/node/syndication/news/add/bundle"), 3);
menu("admin/node/syndication/news/tag", "tag items", "import_admin", import_help("admin/node/syndication/news/tag"), 4);
menu("admin/node/syndication/news/help", "help", "import_help", NULL, 9);
menu("admin/node/syndication", t("syndication"), NULL, NULL, 5);
menu("admin/node/syndication/news", t("feeds"), "import_admin", import_help("admin/node/syndication/news") );
menu("admin/node/syndication/news/add/feed", t("new feed"), "import_admin", import_help("admin/node/syndication/news/add/feed"), 2);
menu("admin/node/syndication/news/add/bundle", t("new bundle"), "import_admin", import_help("admin/node/syndication/news/add/bundle"), 3);
menu("admin/node/syndication/news/tag", t("tag items"), "import_admin", import_help("admin/node/syndication/news/tag"), 4);
menu("admin/node/syndication/news/help", t("help"), "import_help", NULL, 9);
}
}
......
......@@ -72,16 +72,16 @@ function locale_link($type) {
if ($type == "system") {
if (user_access("administer locales")) {
menu("admin/locale", "localization", NULL, locale_help("admin/locale"), 5);
menu("admin/locale/search", "search string", "locale_admin", locale_help("admin/locale/search"), 8);
menu("admin/locale/help", "help", "locale_help", NULL, 9);
menu("admin/locale/edit", "edit string", "locale_admin", NULL, 0, 1); // hidden menu
menu("admin/locale/delete", "delete string", "locale_admin", NULL, 0, 1); // hidden menu
menu("admin/locale", t("localization"), NULL, locale_help("admin/locale"), 5);
menu("admin/locale/search", t("search string"), "locale_admin", locale_help("admin/locale/search"), 8);
menu("admin/locale/help", t("help"), "locale_help", NULL, 9);
menu("admin/locale/edit", t("edit string"), "locale_admin", NULL, 0, 1); // hidden menu
menu("admin/locale/delete", t("delete string"), "locale_admin", NULL, 0, 1); // hidden menu
foreach ($languages as $key => $value) {
menu("admin/locale/$key", "$value", NULL, locale_help("admin/locale"));
menu("admin/locale/$key/translated", "translated strings", "locale_admin", locale_help("admin/locale/translated"));
menu("admin/locale/$key/untranslated", "untranslated strings", "locale_admin", locale_help("admin/locale/untranslated"));
menu("admin/locale/$key/translated", t("translated strings"), "locale_admin", locale_help("admin/locale/translated"));
menu("admin/locale/$key/untranslated", t("untranslated strings"), "locale_admin", locale_help("admin/locale/untranslated"));
}
}
}
......
......@@ -72,16 +72,16 @@ function locale_link($type) {
if ($type == "system") {
if (user_access("administer locales")) {
menu("admin/locale", "localization", NULL, locale_help("admin/locale"), 5);
menu("admin/locale/search", "search string", "locale_admin", locale_help("admin/locale/search"), 8);
menu("admin/locale/help", "help", "locale_help", NULL, 9);
menu("admin/locale/edit", "edit string", "locale_admin", NULL, 0, 1); // hidden menu
menu("admin/locale/delete", "delete string", "locale_admin", NULL, 0, 1); // hidden menu
menu("admin/locale", t("localization"), NULL, locale_help("admin/locale"), 5);
menu("admin/locale/search", t("search string"), "locale_admin", locale_help("admin/locale/search"), 8);
menu("admin/locale/help", t("help"), "locale_help", NULL, 9);
menu("admin/locale/edit", t("edit string"), "locale_admin", NULL, 0, 1); // hidden menu
menu("admin/locale/delete", t("delete string"), "locale_admin", NULL, 0, 1); // hidden menu
foreach ($languages as $key => $value) {
menu("admin/locale/$key", "$value", NULL, locale_help("admin/locale"));
menu("admin/locale/$key/translated", "translated strings", "locale_admin", locale_help("admin/locale/translated"));
menu("admin/locale/$key/untranslated", "untranslated strings", "locale_admin", locale_help("admin/locale/untranslated"));
menu("admin/locale/$key/translated", t("translated strings"), "locale_admin", locale_help("admin/locale/translated"));
menu("admin/locale/$key/untranslated", t("untranslated strings"), "locale_admin", locale_help("admin/locale/untranslated"));
}
}
}
......
......@@ -573,11 +573,11 @@ function node_link($type, $node = 0, $main = 0) {
if ($type == "system") {
menu("node/add", t("create content"), NULL, NULL, 1);
if (user_access("administer nodes")) {
menu("admin/node", "content", "node_admin", node_help("admin/node"));
menu("admin/node/search", "search", "node_admin", node_help("admin/node/search"), 8);
menu("admin/node/help", "help", "node_help", NULL, 9);
menu("admin/node/edit", "edit node", "node_admin", NULL, 0, 1);
menu("admin/node/settings", "settings", "node_admin", node_help("admin/node/settings"), 8);
menu("admin/node", t("content"), "node_admin", node_help("admin/node"));
menu("admin/node/search", t("search"), "node_admin", node_help("admin/node/search"), 8);
menu("admin/node/help", t("help"), "node_help", NULL, 9);
menu("admin/node/edit", t("edit node"), "node_admin", NULL, 0, 1);
menu("admin/node/settings", t("settings"), "node_admin", node_help("admin/node/settings"), 8);
}
}
......
......@@ -573,11 +573,11 @@ function node_link($type, $node = 0, $main = 0) {
if ($type == "system") {
menu("node/add", t("create content"), NULL, NULL, 1);
if (user_access("administer nodes")) {
menu("admin/node", "content", "node_admin", node_help("admin/node"));
menu("admin/node/search", "search", "node_admin", node_help("admin/node/search"), 8);
menu("admin/node/help", "help", "node_help", NULL, 9);
menu("admin/node/edit", "edit node", "node_admin", NULL, 0, 1);
menu("admin/node/settings", "settings", "node_admin", node_help("admin/node/settings"), 8);
menu("admin/node", t("content"), "node_admin", node_help("admin/node"));
menu("admin/node/search", t("search"), "node_admin", node_help("admin/node/search"), 8);
menu("admin/node/help", t("help"), "node_help", NULL, 9);
menu("admin/node/edit", t("edit node"), "node_admin", NULL, 0, 1);
menu("admin/node/settings", t("settings"), "node_admin", node_help("admin/node/settings"), 8);
}
}
......
......@@ -117,20 +117,20 @@ function statistics_link($type, $node = 0, $main = 0) {
if ($type == "system") {
if ((user_access("administer statistics module") || (user_access("administer statistics")))) {
menu("admin/statistics", "statistics", "statistics_admin", statistics_help("admin/statistics"), 6);
menu("admin/statistics/referrers", "referrer log", "statistics_admin", statistics_help("admin/statistics/referrers") );
menu("admin/statistics/referrers/internal", "internal referrers only", "statistics_admin", statistics_help("admin/statistics/referrers/internal") );
menu("admin/statistics/referrers/external", "external referrers only", "statistics_admin", statistics_help("admin/statistics/referrers/external") );
menu("admin/statistics/log", "access log", "statistics_admin", statistics_help("admin/statistics/log") );
menu("admin/statistics/log/node", "track node", "statistics_admin", statistics_help("admin/statistics/log/node"), 0, 1); //hidden
menu("admin/statistics/log/user", "track user", "statistics_admin", statistics_help("admin/statistics/log/user"), 0, 1); //hidden
menu("admin/statistics/log/host", "track host", "statistics_admin", statistics_help("admin/statistics/log/host"), 0, 1); //hidden
menu("admin/statistics/top nodes page", "configure 'top nodes' page", "statistics_admin", statistics_help("admin/statistics/top nodes page"), 5);
menu("admin/statistics/help", "help", "statistics_help", NULL, 9);
menu("admin/statistics", t("statistics"), "statistics_admin", statistics_help("admin/statistics"), 6);
menu("admin/statistics/referrers", t("referrer log"), "statistics_admin", statistics_help("admin/statistics/referrers") );
menu("admin/statistics/referrers/internal", t("internal referrers only"), "statistics_admin", statistics_help("admin/statistics/referrers/internal") );
menu("admin/statistics/referrers/external", t("external referrers only"), "statistics_admin", statistics_help("admin/statistics/referrers/external") );
menu("admin/statistics/log", t("access log"), "statistics_admin", statistics_help("admin/statistics/log") );
menu("admin/statistics/log/node", t("track node"), "statistics_admin", statistics_help("admin/statistics/log/node"), 0, 1); //hidden
menu("admin/statistics/log/user", t("track user"), "statistics_admin", statistics_help("admin/statistics/log/user"), 0, 1); //hidden
menu("admin/statistics/log/host", t("track host"), "statistics_admin", statistics_help("admin/statistics/log/host"), 0, 1); //hidden
menu("admin/statistics/top nodes page", t("configure 'top nodes' page"), "statistics_admin", statistics_help("admin/statistics/top nodes page"), 5);
menu("admin/statistics/help", t("help"), "statistics_help", NULL, 9);
// block configuration:
menu("admin/system/block/top nodes block", "configure 'top nodes' block", "statistics_admin", statistics_help("admin/system/block/top nodes/block"), 5);
menu("admin/system/block/whos online block", "configure 'who is online' block", "statistics_admin", statistics_help("admin/system/block/whos online block"), 5);
menu("admin/system/block/top nodes block", t("configure 'top nodes' block"), "statistics_admin", statistics_help("admin/system/block/top nodes/block"), 5);
menu("admin/system/block/whos online block", t("configure 'who is online' block"), "statistics_admin", statistics_help("admin/system/block/whos online block"), 5);
}
}
......
......@@ -117,20 +117,20 @@ function statistics_link($type, $node = 0, $main = 0) {
if ($type == "system") {
if ((user_access("administer statistics module") || (user_access("administer statistics")))) {
menu("admin/statistics", "statistics", "statistics_admin", statistics_help("admin/statistics"), 6);
menu("admin/statistics/referrers", "referrer log", "statistics_admin", statistics_help("admin/statistics/referrers") );
menu("admin/statistics/referrers/internal", "internal referrers only", "statistics_admin", statistics_help("admin/statistics/referrers/internal") );
menu("admin/statistics/referrers/external", "external referrers only", "statistics_admin", statistics_help("admin/statistics/referrers/external") );
menu("admin/statistics/log", "access log", "statistics_admin", statistics_help("admin/statistics/log") );
menu("admin/statistics/log/node", "track node", "statistics_admin", statistics_help("admin/statistics/log/node"), 0, 1); //hidden
menu("admin/statistics/log/user", "track user", "statistics_admin", statistics_help("admin/statistics/log/user"), 0, 1); //hidden
menu("admin/statistics/log/host", "track host", "statistics_admin", statistics_help("admin/statistics/log/host"), 0, 1); //hidden
menu("admin/statistics/top nodes page", "configure 'top nodes' page", "statistics_admin", statistics_help("admin/statistics/top nodes page"), 5);
menu("admin/statistics/help", "help", "statistics_help", NULL, 9);
menu("admin/statistics", t("statistics"), "statistics_admin", statistics_help("admin/statistics"), 6);
menu("admin/statistics/referrers", t("referrer log"), "statistics_admin", statistics_help("admin/statistics/referrers") );
menu("admin/statistics/referrers/internal", t("internal referrers only"), "statistics_admin", statistics_help("admin/statistics/referrers/internal") );
menu("admin/statistics/referrers/external", t("external referrers only"), "statistics_admin", statistics_help("admin/statistics/referrers/external") );
menu("admin/statistics/log", t("access log"), "statistics_admin", statistics_help("admin/statistics/log") );
menu("admin/statistics/log/node", t("track node"), "statistics_admin", statistics_help("admin/statistics/log/node"), 0, 1); //hidden
menu("admin/statistics/log/user", t("track user"), "statistics_admin", statistics_help("admin/statistics/log/user"), 0, 1); //hidden
menu("admin/statistics/log/host", t("track host"), "statistics_admin", statistics_help("admin/statistics/log/host"), 0, 1); //hidden
menu("admin/statistics/top nodes page", t("configure 'top nodes' page"), "statistics_admin", statistics_help("admin/statistics/top nodes page"), 5);
menu("admin/statistics/help", t("help"), "statistics_help", NULL, 9);
// block configuration:
menu("admin/system/block/top nodes block", "configure 'top nodes' block", "statistics_admin", statistics_help("admin/system/block/top nodes/block"), 5);
menu("admin/system/block/whos online block", "configure 'who is online' block", "statistics_admin", statistics_help("admin/system/block/whos online block"), 5);
menu("admin/system/block/top nodes block", t("configure 'top nodes' block"), "statistics_admin", statistics_help("admin/system/block/top nodes/block"), 5);
menu("admin/system/block/whos online block", t("configure 'who is online' block"), "statistics_admin", statistics_help("admin/system/block/whos online block"), 5);
}
}
......
......@@ -59,8 +59,8 @@ function system_link($type) {
$help["modules"] = t("Modules are plugins for Drupal that extend its core functionality. Here you can select which modules are enabled. On the left hand side click on the name of the module for their individual configurations. Once a module is enabled, you will need to grant permissions to users in user management.");
$help["filters"] = t("Filters fit between the raw text in a node and the HTML output. They allow you to replace text selectively. Uses include automatic conversion of emoticons into graphics and filtering HTML content from users' submissions.");
menu("admin/system", "configuration", "system_admin", system_help("admin/system"), 3);
menu("admin/system/themes", "themes", "system_admin", system_help("admin/system/themes"), 2);
menu("admin/system", t("configuration"), "system_admin", system_help("admin/system"), 3);
menu("admin/system/themes", t("themes"), "system_admin", system_help("admin/system/themes"), 2);
foreach (theme_list(1) as $theme) {
// NOTE: refresh the list because some themes might have been enabled/disabled.
......@@ -71,15 +71,15 @@ function system_link($type) {
}
}
menu("admin/system/modules", "modules", "system_admin", system_help("admin/system/modules"), 3);
menu("admin/system/modules", t("modules"), "system_admin", system_help("admin/system/modules"), 3);
foreach (module_list(1) as $name) {
// NOTE: refresh the list because some modules might have been enabled/disabled.
if (module_hook($name, "settings")) {
menu("admin/system/modules/$name", $name, "system_admin", module_invoke($name, "system", "admin_help"));
}
}
menu("admin/system/filters", "filters", "system_admin", system_help("admin/system/filters"), 4);
menu("admin/system/help", "help", "system_help", NULL, 9);
menu("admin/system/filters", t("filters"), "system_admin", system_help("admin/system/filters"), 4);
menu("admin/system/help", t("help"), "system_help", NULL, 9);
}
}
}
......
......@@ -59,8 +59,8 @@ function system_link($type) {
$help["modules"] = t("Modules are plugins for Drupal that extend its core functionality. Here you can select which modules are enabled. On the left hand side click on the name of the module for their individual configurations. Once a module is enabled, you will need to grant permissions to users in user management.");
$help["filters"] = t("Filters fit between the raw text in a node and the HTML output. They allow you to replace text selectively. Uses include automatic conversion of emoticons into graphics and filtering HTML content from users' submissions.");
menu("admin/system", "configuration", "system_admin", system_help("admin/system"), 3);
menu("admin/system/themes", "themes", "system_admin", system_help("admin/system/themes"), 2);
menu("admin/system", t("configuration"), "system_admin", system_help("admin/system"), 3);
menu("admin/system/themes", t("themes"), "system_admin", system_help("admin/system/themes"), 2);
foreach (theme_list(1) as $theme) {
// NOTE: refresh the list because some themes might have been enabled/disabled.
......@@ -71,15 +71,15 @@ function system_link($type) {
}
}
menu("admin/system/modules", "modules", "system_admin", system_help("admin/system/modules"), 3);
menu("admin/system/modules", t("modules"), "system_admin", system_help("admin/system/modules"), 3);
foreach (module_list(1) as $name) {
// NOTE: refresh the list because some modules might have been enabled/disabled.
if (module_hook($name, "settings")) {
menu("admin/system/modules/$name", $name, "system_admin", module_invoke($name, "system", "admin_help"));
}
}
menu("admin/system/filters", "filters", "system_admin", system_help("admin/system/filters"), 4);
menu("admin/system/help", "help", "system_help", NULL, 9);
menu("admin/system/filters", t("filters"), "system_admin", system_help("admin/system/filters"), 4);
menu("admin/system/help", t("help"), "system_help", NULL, 9);
}
}
}
......
......@@ -29,9 +29,9 @@ function taxonomy_perm() {
function taxonomy_link($type, $node = NULL) {
if ($type == "system") {
if (user_access("administer taxonomy")) {
menu("admin/taxonomy", "taxonomy", "taxonomy_admin", taxonomy_help("admin/taxonomy"), 3);
menu("admin/taxonomy/add/vocabulary", "create new vocabulary", "taxonomy_admin", taxonomy_help("admin/taxonomy/add/vocabulary"));
menu("admin/taxonomy/help", "help", "taxonomy_admin", NULL, 9);
menu("admin/taxonomy", t("taxonomy"), "taxonomy_admin", taxonomy_help("admin/taxonomy"), 3);
menu("admin/taxonomy/add/vocabulary", t("create new vocabulary"), "taxonomy_admin", taxonomy_help("admin/taxonomy/add/vocabulary"));
menu("admin/taxonomy/help", t("help"), "taxonomy_admin", NULL, 9);
}
}
else if ($type == "taxonomy terms" && $node != NULL) {
......
......@@ -29,9 +29,9 @@ function taxonomy_perm() {
function taxonomy_link($type, $node = NULL) {
if ($type == "system") {
if (user_access("administer taxonomy")) {
menu("admin/taxonomy", "taxonomy", "taxonomy_admin", taxonomy_help("admin/taxonomy"), 3);
menu("admin/taxonomy/add/vocabulary", "create new vocabulary", "taxonomy_admin", taxonomy_help("admin/taxonomy/add/vocabulary"));
menu("admin/taxonomy/help", "help", "taxonomy_admin", NULL, 9);
menu("admin/taxonomy", t("taxonomy"), "taxonomy_admin", taxonomy_help("admin/taxonomy"), 3);
menu("admin/taxonomy/add/vocabulary", t("create new vocabulary"), "taxonomy_admin", taxonomy_help("admin/taxonomy/add/vocabulary"));
menu("admin/taxonomy/help", t("help"), "taxonomy_admin", NULL, 9);
}
}
else if ($type == "taxonomy terms" && $node != NULL) {
......
......@@ -470,7 +470,7 @@ function user_link($type) {
menu("user/logout", t("log out"), NULL, NULL, 10);
}
if (user_access("administer users")) {
menu("admin/user", "accounts", "user_admin", user_help("admin/user"), 2);
menu("admin/user", t("accounts"), "user_admin", user_help("admin/user"), 2);
menu("admin/user/create", t("new user"), "user_admin", user_help("admin/user/create"), 1);
menu("admin/user/account", t("users"), "user_admin", user_help("admin/user/account"), 2);
menu("admin/user/access", t("access rules"), NULL, user_help("admin/user/access"), 3);
......@@ -485,7 +485,7 @@ function user_link($type) {
$i = 2;
foreach (user_roles(1) as $key => $value) {
menu("admin/user/account/". $i++, "users with role '$value'", "user_admin", NULL, 4);
menu("admin/user/account/". $i++, t("users with role '%role'", array("%role" => $value)), "user_admin", NULL, 4);
}
}
}
......
......@@ -470,7 +470,7 @@ function user_link($type) {
menu("user/logout", t("log out"), NULL, NULL, 10);
}
if (user_access("administer users")) {
menu("admin/user", "accounts", "user_admin", user_help("admin/user"), 2);
menu("admin/user", t("accounts"), "user_admin", user_help("admin/user"), 2);
menu("admin/user/create", t("new user"), "user_admin", user_help("admin/user/create"), 1);
menu("admin/user/account", t("users"), "user_admin", user_help("admin/user/account"), 2);
menu("admin/user/access", t("access rules"), NULL, user_help("admin/user/access"), 3);
......@@ -485,7 +485,7 @@ function user_link($type) {
$i = 2;
foreach (user_roles(1) as $key => $value) {
menu("admin/user/account/". $i++, "users with role '$value'", "user_admin", NULL, 4);
menu("admin/user/account/". $i++, t("users with role '%role'", array("%role" => $value)), "user_admin", NULL, 4);
}
}
}
......
......@@ -47,14 +47,14 @@ function watchdog_perm() {
function watchdog_link($type) {
if ($type == "system") {
if (user_access("administer watchdog")) {
menu("admin/watchdog", "messages", "watchdog_admin", watchdog_help("admin/watchdog"), 6);
menu("admin/watchdog/user", "user", "watchdog_admin", watchdog_help("admin/watchdog/user"));
menu("admin/watchdog/regular", "regular", "watchdog_admin", watchdog_help("admin/watchdog/regular"));
menu("admin/watchdog/special", "special", "watchdog_admin", watchdog_help("admin/watchdog/special"));
menu("admin/watchdog/warning", "warning", "watchdog_admin", watchdog_help("admin/watchdog/warning"));
menu("admin/watchdog/error", "error", "watchdog_admin", watchdog_help("admin/watchdog/error"));
menu("admin/watchdog/httpd", "httpd", "watchdog_admin", watchdog_help("admin/watchdog/httpd"));
menu("admin/watchdog/view", "view details", "watchdog_admin", NULL, 0, 1); // hidden menu
menu("admin/watchdog", t("messages"), "watchdog_admin", watchdog_help("admin/watchdog"), 6);
menu("admin/watchdog/user", t("user"), "watchdog_admin", watchdog_help("admin/watchdog/user"));
menu("admin/watchdog/regular", t("regular"), "watchdog_admin", watchdog_help("admin/watchdog/regular"));
menu("admin/watchdog/special", t("special"), "watchdog_admin", watchdog_help("admin/watchdog/special"));
menu("admin/watchdog/warning", t("warning"), "watchdog_admin", watchdog_help("admin/watchdog/warning"));
menu("admin/watchdog/error", t("error"), "watchdog_admin", watchdog_help("admin/watchdog/error"));
menu("admin/watchdog/httpd", t("httpd"), "watchdog_admin", watchdog_help("admin/watchdog/httpd"));
menu("admin/watchdog/view", t("view details"), "watchdog_admin", NULL, 0, 1); // hidden menu
}
}
}
......
......@@ -47,14 +47,14 @@ function watchdog_perm() {
function watchdog_link($type) {
if ($type == "system") {
if (user_access("administer watchdog")) {
menu("admin/watchdog", "messages", "watchdog_admin", watchdog_help("admin/watchdog"), 6);
menu("admin/watchdog/user", "user", "watchdog_admin", watchdog_help("admin/watchdog/user"));
menu("admin/watchdog/regular", "regular", "watchdog_admin", watchdog_help("admin/watchdog/regular"));
menu("admin/watchdog/special", "special", "watchdog_admin", watchdog_help("admin/watchdog/special"));
menu("admin/watchdog/warning", "warning", "watchdog_admin", watchdog_help("admin/watchdog/warning"));
menu("admin/watchdog/error", "error", "watchdog_admin", watchdog_help("admin/watchdog/error"));
menu("admin/watchdog/httpd", "httpd", "watchdog_admin", watchdog_help("admin/watchdog/httpd"));
menu("admin/watchdog/view", "view details", "watchdog_admin", NULL, 0, 1); // hidden menu
menu("admin/watchdog", t("messages"), "watchdog_admin", watchdog_help("admin/watchdog"), 6);
menu("admin/watchdog/user", t("user"), "watchdog_admin", watchdog_help("admin/watchdog/user"));
menu("admin/watchdog/regular", t("regular"), "watchdog_admin", watchdog_help("admin/watchdog/regular"));
menu("admin/watchdog/special", t("special"), "watchdog_admin", watchdog_help("admin/watchdog/special"));
menu("admin/watchdog/warning", t("warning"), "watchdog_admin", watchdog_help("admin/watchdog/warning"));
menu("admin/watchdog/error", t("error"), "watchdog_admin", watchdog_help("admin/watchdog/error"));
menu("admin/watchdog/httpd", t("httpd"), "watchdog_admin", watchdog_help("admin/watchdog/httpd"));
menu("admin/watchdog/view", t("view details"), "watchdog_admin", NULL, 0, 1); // hidden menu
}
}
}
......
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