summaryrefslogtreecommitdiff
path: root/includes/navigation.inc
diff options
context:
space:
mode:
Diffstat (limited to 'includes/navigation.inc')
-rw-r--r--includes/navigation.inc167
1 files changed, 109 insertions, 58 deletions
diff --git a/includes/navigation.inc b/includes/navigation.inc
index 8e6e8cd..bdafe99 100644
--- a/includes/navigation.inc
+++ b/includes/navigation.inc
@@ -14,10 +14,11 @@ $raindrops_subsystemsNotMember = array_values(array_filter($subsystems2, functio
global $navigation;
global $toplevel;
+global $lang; global $pages;
$navigation_admin = [
"admin" => true,
- "name" => "Administrator",
+ "name" => $lang["navigation"]["admin"],
"icon" => "/assets/icons/admin.svg",
"invert" => true,
"items" => [
@@ -26,21 +27,21 @@ $navigation_admin = [
"minimal" => true,
"items" => [
[
- "name" => $pages["emergency"]["name"],
+ "name" => $pages["emergency"]["name"][$lang["_name"]],
"icon" => "/assets/icons/emergency.svg",
"invert" => false,
"link" => "/-/emergency",
"stepped" => "rgb(220,53,69)"
],
[
- "name" => $pages["wakeup"]["name"],
+ "name" => $pages["wakeup"]["name"][$lang["_name"]],
"icon" => "/assets/icons/wakeup.svg",
"invert" => false,
"link" => "/-/wakeup",
"stepped" => "rgb(13,202,240)"
],
[
- "name" => $pages["pleasure"]["name"],
+ "name" => $pages["pleasure"]["name"][$lang["_name"]],
"icon" => "/assets/icons/pleasure.svg",
"invert" => false,
"link" => "/-/pleasure",
@@ -49,102 +50,109 @@ $navigation_admin = [
]
],
"apps" => [
- "name" => "Applications",
+ "name" => $lang["navigation"]["apps"],
"minimal" => false,
"items" => [
[
- "name" => $pages["dashboard"]["name"],
+ "name" => $pages["dashboard"]["name"][$lang["_name"]],
"icon" => "/assets/icons/dashboard.svg",
"invert" => true,
"link" => "/-/dashboard",
"stepped" => null
],
[
- "name" => $pages["about"]["name"],
+ "name" => $pages["about"]["name"][$lang["_name"]],
"icon" => "/assets/icons/about.svg",
"invert" => true,
"link" => "/-/about",
"stepped" => null
],
[
- "name" => $pages["fronting"]["name"],
+ "name" => $pages["fronting"]["name"][$lang["_name"]],
"icon" => "/assets/icons/fronting.svg",
"invert" => true,
"link" => "/-/fronting",
"stepped" => null
],
[
- "name" => $pages["actions"]["name"],
+ "name" => $pages["profiles"]["name"][$lang["_name"]],
+ "icon" => "/assets/icons/profiles.svg",
+ "invert" => true,
+ "link" => "/-/profiles",
+ "stepped" => null
+ ],
+ [
+ "name" => $pages["actions"]["name"][$lang["_name"]],
"icon" => "/assets/icons/actions.svg",
"invert" => true,
"link" => "/-/actions",
"stepped" => null
],
[
- "name" => $pages["rules-old"]["name"],
+ "name" => $pages["rules-old"]["name"][$lang["_name"]],
"icon" => "/assets/icons/rules-old.svg",
"invert" => true,
"link" => "/-/rules-old",
"stepped" => null
],
[
- "name" => $pages["docs"]["name"],
+ "name" => $pages["docs"]["name"][$lang["_name"]],
"icon" => "/assets/icons/docs.svg",
"invert" => true,
"link" => "/-/docs",
"stepped" => null
],
[
- "name" => $pages["computers"]["name"],
+ "name" => $pages["computers"]["name"][$lang["_name"]],
"icon" => "/assets/icons/computers.svg",
"invert" => true,
"link" => "/-/computers",
"stepped" => null
],
[
- "name" => $pages["nicknames"]["name"],
+ "name" => $pages["nicknames"]["name"][$lang["_name"]],
"icon" => "/assets/icons/nicknames.svg",
"invert" => true,
"link" => "/-/nicknames",
"stepped" => null
],
[
- "name" => $pages["together"]["name"],
+ "name" => $pages["together"]["name"][$lang["_name"]],
"icon" => "/assets/icons/together.svg",
"invert" => true,
"link" => "/-/together",
"stepped" => null
],
[
- "name" => $pages["splitting"]["name"],
+ "name" => $pages["splitting"]["name"][$lang["_name"]],
"icon" => "/assets/icons/splitting.svg",
"invert" => true,
"link" => "/-/splitting",
"stepped" => null
],
[
- "name" => $pages["byfront"]["name"],
+ "name" => $pages["byfront"]["name"][$lang["_name"]],
"icon" => "/assets/icons/byfront.svg",
"invert" => true,
"link" => "/-/byfront",
"stepped" => null
],
[
- "name" => $pages["travelling"]["name"],
+ "name" => $pages["travelling"]["name"][$lang["_name"]],
"icon" => "/assets/icons/travelling.svg",
"invert" => true,
"link" => "/-/travelling",
"stepped" => null
],
[
- "name" => $pages["stats"]["name"],
+ "name" => $pages["stats"]["name"][$lang["_name"]],
"icon" => "/assets/icons/stats.svg",
"invert" => true,
"link" => "/-/stats",
"stepped" => null
],
[
- "name" => $pages["toys"]["name"],
+ "name" => $pages["toys"]["name"][$lang["_name"]],
"icon" => "/assets/icons/toys.svg",
"invert" => true,
"link" => "/-/toys",
@@ -153,32 +161,32 @@ $navigation_admin = [
]
],
"debug" => [
- "name" => "Debugging",
+ "name" => $lang["navigation"]["debug"],
"minimal" => false,
"items" => [
[
- "name" => $pages["debug"]["name"],
+ "name" => $pages["debug"]["name"][$lang["_name"]],
"icon" => "/assets/icons/debug.svg",
"invert" => true,
"link" => "/-/debug",
"stepped" => null
],
[
- "name" => $pages["bitset"]["name"],
+ "name" => $pages["bitset"]["name"][$lang["_name"]],
"icon" => "/assets/icons/bitset.svg",
"invert" => true,
"link" => "/-/bitset",
"stepped" => null
],
[
- "name" => $pages["score"]["name"],
+ "name" => $pages["score"]["name"][$lang["_name"]],
"icon" => "/assets/icons/score.svg",
"invert" => true,
"link" => "/-/score",
"stepped" => null
],
[
- "name" => $pages["logout"]["name"],
+ "name" => $pages["logout"]["name"][$lang["_name"]],
"icon" => "/assets/icons/logout.svg",
"invert" => true,
"link" => "/-/logout",
@@ -190,7 +198,7 @@ $navigation_admin = [
];
$navigation_global = [
"admin" => false,
- "name" => "Global",
+ "name" => $lang["navigation"]["general"],
"icon" => "/assets/icons/global.svg",
"invert" => true,
"items" => [
@@ -199,66 +207,53 @@ $navigation_global = [
"minimal" => false,
"items" => [
[
- "name" => $pages["home"]["name"],
+ "name" => $pages["home"]["name"][$lang["_name"]],
"icon" => "/assets/icons/home.svg",
"invert" => true,
"link" => "/",
"stepped" => null
],
[
- "name" => $pages["disclaimers"]["name"],
+ "name" => $pages["disclaimers"]["name"][$lang["_name"]],
"icon" => "/assets/icons/disclaimers.svg",
"invert" => true,
"link" => "/-/disclaimers",
"stepped" => null
],
[
- "name" => $pages["relations"]["name"],
+ "name" => $pages["relations"]["name"][$lang["_name"]],
"icon" => "/assets/icons/relations.svg",
"invert" => true,
"link" => "/-/relations",
"stepped" => null
],
- [
- "name" => $pages["government"]["name"],
+ ($_SERVER['HTTP_HOST'] !== "fr.equestria.horse" ? [
+ "name" => $pages["government"]["name"][$lang["_name"]],
"icon" => "/assets/icons/government.svg",
"invert" => true,
"link" => "/-/government",
"stepped" => null
- ],
- [
- "name" => $pages["terminology"]["name"],
- "icon" => "/assets/icons/terminology.svg",
- "invert" => true,
- "link" => "/-/terminology",
- "stepped" => null
- ]
- ]
- ],
- /*"tools" => [
- "name" => "Tools",
- "minimal" => false,
- "items" => [
+ ] : null),
[
- "name" => $pages["parser"]["name"],
- "icon" => "/assets/icons/parser.svg",
+ "name" => $pages["alphabet"]["name"][$lang["_name"]],
+ "icon" => "/assets/icons/alphabet.svg",
"invert" => true,
- "link" => "/-/parser",
+ "link" => "/-/alphabet",
"stepped" => null
],
[
- "name" => $pages["prefix"]["name"],
- "icon" => "/assets/icons/prefix.svg",
+ "name" => $pages["terminology"]["name"][$lang["_name"]],
+ "icon" => "/assets/icons/terminology.svg",
"invert" => true,
- "link" => "/-/prefix",
+ "link" => "/-/terminology",
"stepped" => null
]
]
- ]*/
+ ]
]
];
$navigation_cloudburst = [
- "admin" => false,
+ "admin" => $_SERVER['HTTP_HOST'] === "fr.equestria.horse",
"name" => "Cloudburst System",
"icon" => getAsset("ynmuc"),
"invert" => false,
@@ -268,16 +263,44 @@ $navigation_cloudburst = [
"minimal" => false,
"items" => [
[
- "name" => "About us",
+ "name" => $lang["navigation"]["about"],
"icon" => "/assets/icons/about.svg",
"invert" => true,
"link" => "/cloudburst",
"stepped" => null
+ ],
+ [
+ "name" => $pages["s:history"]["name"][$lang["_name"]],
+ "icon" => "/assets/icons/history.svg",
+ "invert" => true,
+ "link" => "/cloudburst/-/history",
+ "stepped" => null
+ ],
+ [
+ "name" => $pages["s:compare"]["name"][$lang["_name"]],
+ "icon" => "/assets/icons/compare.svg",
+ "invert" => true,
+ "link" => "/cloudburst/-/compare",
+ "stepped" => null
+ ],
+ [
+ "name" => $pages["s:tree"]["name"][$lang["_name"]],
+ "icon" => "/assets/icons/tree.svg",
+ "invert" => true,
+ "link" => "/cloudburst/-/tree",
+ "stepped" => null
+ ],
+ [
+ "name" => $pages["s:species"]["name"][$lang["_name"]],
+ "icon" => "/assets/icons/species.svg",
+ "invert" => true,
+ "link" => "/cloudburst/-/species",
+ "stepped" => null
]
]
],
"subsystems" => [
- "name" => "Subsystems",
+ "name" => $lang["navigation"]["subsystems"],
"minimal" => false,
"items" => array_map(function ($subsystem) {
$ssData = json_decode(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/data/subsystems/ynmuc-" . $subsystem['source'] . ".json"), true);
@@ -292,7 +315,7 @@ $navigation_cloudburst = [
}, $cloudburst_subsystemsNotMember)
],
"members" => [
- "name" => "Members",
+ "name" => $lang["navigation"]["members"],
"minimal" => false,
"items" => array_map(function ($member) {
return [
@@ -319,16 +342,44 @@ $navigation_raindrops = [
"minimal" => false,
"items" => [
[
- "name" => "About us",
+ "name" => $lang["navigation"]["about"],
"icon" => "/assets/icons/about.svg",
"invert" => true,
"link" => "/raindrops",
"stepped" => null
+ ],
+ [
+ "name" => $pages["s:history"]["name"][$lang["_name"]],
+ "icon" => "/assets/icons/history.svg",
+ "invert" => true,
+ "link" => "/raindrops/-/history",
+ "stepped" => null
+ ],
+ [
+ "name" => $pages["s:compare"]["name"][$lang["_name"]],
+ "icon" => "/assets/icons/compare.svg",
+ "invert" => true,
+ "link" => "/raindrops/-/compare",
+ "stepped" => null
+ ],
+ [
+ "name" => $pages["s:tree"]["name"][$lang["_name"]],
+ "icon" => "/assets/icons/tree.svg",
+ "invert" => true,
+ "link" => "/raindrops/-/tree",
+ "stepped" => null
+ ],
+ [
+ "name" => $pages["s:species"]["name"][$lang["_name"]],
+ "icon" => "/assets/icons/species.svg",
+ "invert" => true,
+ "link" => "/raindrops/-/species",
+ "stepped" => null
]
]
],
"subsystems" => [
- "name" => "Subsystems",
+ "name" => $lang["navigation"]["subsystems"],
"minimal" => false,
"items" => array_map(function ($subsystem) {
$ssData = json_decode(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/data/subsystems/gdapd-" . $subsystem['source'] . ".json"), true);
@@ -343,7 +394,7 @@ $navigation_raindrops = [
}, $raindrops_subsystemsNotMember)
],
"members" => [
- "name" => "Members",
+ "name" => $lang["navigation"]["members"],
"minimal" => false,
"items" => array_map(function ($member) {
return [