Skip to content

Commit 03594c9

Browse files
committed
Refactor HTML and JavaScript for internationalization support across the application. Update admin and index pages to utilize dynamic translation keys for various elements, enhancing accessibility for Russian and English users. Introduce new i18n JavaScript module for managing language settings and translations, improving user experience and localization capabilities.
1 parent 50faff6 commit 03594c9

9 files changed

Lines changed: 837 additions & 164 deletions

File tree

admin.html

Lines changed: 19 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,39 +1,37 @@
11
<!DOCTYPE html>
2-
<html lang="en" class="no-js">
2+
<html lang="ru" class="no-js">
33
<head>
44
<meta charset="UTF-8">
55
<meta name="viewport" content="width=device-width, initial-scale=1.0">
6-
<title>MB3R Lab — Pilot requests</title>
6+
<title data-i18n="admin.pageTitle"></title>
77
<link rel="icon" href="assets/img/favicon.ico" sizes="any">
88
<link rel="apple-touch-icon" href="assets/img/apple-touch-icon.png">
99
<link rel="stylesheet" href="assets/css/style.css">
1010
<script>document.documentElement.classList.remove('no-js');</script>
1111
</head>
1212
<body class="admin-body">
1313
<main class="admin-main">
14-
<h1>Pilot program requests</h1>
15-
<p class="admin-description">
16-
Monitor submissions collected on the landing page. Records persist in Supabase (Postgres).
17-
</p>
14+
<h1 data-i18n="admin.heading"></h1>
15+
<p class="admin-description" data-i18n="admin.description"></p>
1816
<div class="admin-actions">
19-
<button type="button" class="button button-primary" id="refresh-button">Refresh</button>
20-
<a class="button button-ghost" href="index.html">Home</a>
17+
<button type="button" class="button button-primary" id="refresh-button" data-i18n="admin.actions.refresh"></button>
18+
<a class="button button-ghost" href="index.html" data-i18n="admin.actions.home"></a>
2119
</div>
22-
<div class="table-wrapper" role="region" aria-live="polite" data-locked="true" data-overlay-message="Enter the administrator password to view requests.">
20+
<div class="table-wrapper" role="region" aria-live="polite" data-locked="true" data-overlay-message="" data-i18n-attr="data-overlay-message:admin.table.overlayLocked">
2321
<table class="admin-table">
2422
<thead>
2523
<tr>
26-
<th>ID</th>
27-
<th>Email</th>
28-
<th>Company</th>
29-
<th>Context</th>
30-
<th>Country</th>
31-
<th>Created</th>
24+
<th data-i18n="admin.table.headers.id"></th>
25+
<th data-i18n="admin.table.headers.email"></th>
26+
<th data-i18n="admin.table.headers.company"></th>
27+
<th data-i18n="admin.table.headers.context"></th>
28+
<th data-i18n="admin.table.headers.country"></th>
29+
<th data-i18n="admin.table.headers.created"></th>
3230
</tr>
3331
</thead>
3432
<tbody id="applications-body">
3533
<tr>
36-
<td colspan="6">Requests are not loaded yet.</td>
34+
<td colspan="6" data-i18n="admin.table.empty"></td>
3735
</tr>
3836
</tbody>
3937
</table>
@@ -43,20 +41,19 @@ <h1>Pilot program requests</h1>
4341
<div class="modal" id="admin-auth-modal" aria-hidden="true">
4442
<div class="modal-overlay"></div>
4543
<div class="modal-dialog" role="dialog" aria-modal="true" aria-labelledby="admin-auth-title">
46-
<h2 id="admin-auth-title">Enter administrator password</h2>
47-
<p class="modal-description">
48-
Passwords are managed on the server via the <code>ADMIN_PASSWORD</code> environment variable.
49-
</p>
44+
<h2 id="admin-auth-title" data-i18n="admin.modal.title"></h2>
45+
<p class="modal-description" data-i18n="admin.modal.description"></p>
5046
<form id="admin-auth-form" class="modal-form">
5147
<div class="form-group">
52-
<label for="admin-password">Password</label>
48+
<label for="admin-password" data-i18n="admin.modal.passwordLabel"></label>
5349
<input type="password" id="admin-password" name="password" autocomplete="current-password" required>
5450
</div>
55-
<button type="submit" class="button button-primary">Continue</button>
51+
<button type="submit" class="button button-primary" data-i18n="admin.modal.submit"></button>
5652
<p class="form-status" id="admin-auth-status" role="status" aria-live="polite"></p>
5753
</form>
5854
</div>
5955
</div>
56+
<script src="assets/js/i18n.js"></script>
6057
<script src="assets/js/config.js"></script>
6158
<script src="assets/js/storage.js"></script>
6259
<script src="assets/js/admin.js"></script>

assets/css/style.css

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -145,6 +145,13 @@ ul {
145145
[data-theme="dark"] .theme-toggle .feather-sun { display: block; }
146146
[data-theme="dark"] .theme-toggle .feather-moon { display: none; }
147147

148+
.lang-toggle {
149+
padding: 0.45rem 0.85rem;
150+
font-size: 0.85rem;
151+
letter-spacing: 0.02em;
152+
text-transform: uppercase;
153+
}
154+
148155

149156
/* Home Section */
150157
.home {

assets/i18n/en.json

Lines changed: 231 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,231 @@
1+
{
2+
"meta": {
3+
"title": "MB3R Lab — Model-Based Robustness, Reliability & Resilience",
4+
"description": "MB3R Lab is a research group focused on model discovery, simulation-based what-if analysis, and causal resilience for distributed systems.",
5+
"ogTitle": "MB3R Lab — Model-Based Robustness, Reliability & Resilience",
6+
"ogDescription": "Research & Development in model discovery, simulation-based what-if analysis, and causal resilience.",
7+
"twitterTitle": "MB3R Lab — Model-Based Robustness, Reliability & Resilience",
8+
"twitterDescription": "Research & Development in model discovery, simulation-based what-if analysis, and causal resilience.",
9+
"locale": "en-US"
10+
},
11+
"schema": {
12+
"@context": "https://schema.org",
13+
"@type": "Organization",
14+
"name": "MB3R Lab",
15+
"url": "https://mb3r-lab.github.io/",
16+
"logo": "https://mb3r-lab.github.io/assets/img/logo.svg",
17+
"contactPoint": {
18+
"@type": "ContactPoint",
19+
"email": "contact@mb3r-lab.org",
20+
"contactType": "customer support"
21+
}
22+
},
23+
"brand": {
24+
"name": "MB3R Lab"
25+
},
26+
"common": {
27+
"placeholder": ""
28+
},
29+
"nav": {
30+
"logoAlt": "MB3R Lab Logo",
31+
"links": {
32+
"whatWeDo": "What we do",
33+
"projects": "Projects",
34+
"publications": "Publications",
35+
"updates": "Updates",
36+
"roadmap": "Roadmap",
37+
"contact": "Contact"
38+
},
39+
"requestPilot": "Request a pilot",
40+
"themeToggleAria": "Toggle light and dark mode",
41+
"langToggleLabel": "RU",
42+
"langToggleAria": "Switch to Russian"
43+
},
44+
"home": {
45+
"subtitle": "Model-Based Robustness, Reliability & Resilience",
46+
"description": "Research & Development in model discovery, simulation-based “what-if” analysis, and formal causal inference.",
47+
"cta": "Request pilot access",
48+
"followLinkedIn": "Follow on LinkedIn",
49+
"followTelegram": "Follow on Telegram",
50+
"exploreGithub": "Explore code on GitHub"
51+
},
52+
"whatWeDo": {
53+
"title": "What we do",
54+
"intro": "MB3R Lab is an R&D group working on automatic model discovery and simulation-driven resilience analysis for distributed systems (e.g., microservices).",
55+
"items": {
56+
"modelDiscovery": {
57+
"title": "Model Discovery",
58+
"text": "synthesize system dependency models from configuration, traces, and telemetry."
59+
},
60+
"whatIf": {
61+
"title": "What-if Simulation",
62+
"text": "run Monte-Carlo failure scenarios on the discovered model without touching production."
63+
},
64+
"causalResilience": {
65+
"title": "Causal Resilience",
66+
"text": "sheaf-theoretic analysis and Effective Information (EI) to identify macro-structures that improve predictability and control."
67+
}
68+
}
69+
},
70+
"projects": {
71+
"title": "Projects",
72+
"cards": {
73+
"bering": {
74+
"title": "Bering — Model Discovery",
75+
"text": "Automatically derive a live dependency model of your information system from configs and traces; run what-if failure simulations offline."
76+
},
77+
"sheaft": {
78+
"title": "Sheaft — Simulation-based chaos engineering & causal analysis",
79+
"text": "Run simulation-first chaos experiments and quantify causal emergence with sheaf-theoretic EI to find resilient macro-structures."
80+
}
81+
},
82+
"links": {
83+
"repoPrivate": "Repo: Private / coming soon",
84+
"paper": "Paper",
85+
"theory": "Theory article"
86+
}
87+
},
88+
"publications": {
89+
"title": "Publications",
90+
"items": {
91+
"uncertainty": {
92+
"title": "Measuring Uncertainty in Transformer Circuits with Effective Information Consistency",
93+
"text": "This paper introduces the Effective-Information Consistency Score to quantify uncertainty in Transformer Circuits. This white-box, single-pass metric helps attribute uncertainty to specific mechanisms within LLMs."
94+
},
95+
"modelDiscovery": {
96+
"title": "Model Discovery and Graph Simulation: A Lightweight Gateway to Chaos Engineering",
97+
"text": "Offline resilience estimation from a dependency graph; compares simulations to live failure injection on a microservice benchmark."
98+
},
99+
"sheaf": {
100+
"title": "Sheaf-Theoretic Causal Emergence for Resilience Analysis in Distributed Systems",
101+
"text": "Unifies sheaves, flow simulation, and EI for multi-level causal analysis."
102+
}
103+
}
104+
},
105+
"updates": {
106+
"title": "Updates",
107+
"items": {
108+
"icse": {
109+
"date": "December 2025",
110+
"title": "ICSE 2026 NIER acceptance",
111+
"text": "Our paper “Model Discovery and Graph Simulation: A Lightweight Gateway to Chaos Engineering” was accepted to the ICSE 2026 NIER track, which recognizes our commitment to safer, simulation-driven resilience."
112+
},
113+
"causalAi": {
114+
"date": "September 2025",
115+
"title": "Causal AI publication",
116+
"text": "Documented Effective-Information metrics for transformer circuits and published the results."
117+
},
118+
"landing": {
119+
"date": "July 2025",
120+
"title": "Public landing launched",
121+
"text": "Released mb3r-lab.github.io with a pilot intake flow and project overview."
122+
},
123+
"benchmark": {
124+
"date": "June 2025",
125+
"title": "Bering benchmark",
126+
"text": "Reproduced Bering simulations on a microservice benchmark to validate offline chaos runs."
127+
},
128+
"sheaft": {
129+
"date": "March 2025",
130+
"title": "Sheaft framework",
131+
"text": "Introduced the theoretical foundation for sheaf-based causal analysis in distributed systems."
132+
}
133+
}
134+
},
135+
"roadmap": {
136+
"title": "Roadmap",
137+
"iconAlt": "Roadmap icon",
138+
"imageAlt": "MB3R Lab roadmap"
139+
},
140+
"contact": {
141+
"title": "Contact",
142+
"github": "GitHub",
143+
"linkedin": "LinkedIn",
144+
"email": "contact@mb3r-lab.org"
145+
},
146+
"footer": {
147+
"copyright": "© 2025 MB3R Lab. All rights reserved."
148+
},
149+
"imageZoom": {
150+
"closeAria": "Close zoomed image",
151+
"alt": "Zoomed image"
152+
},
153+
"modal": {
154+
"closeAria": "Close form",
155+
"title": "Request a pilot with MB3R Lab",
156+
"description": "Share your details and we will follow up with pilot onboarding steps and a target integration plan."
157+
},
158+
"form": {
159+
"emailLabel": "Work email *",
160+
"emailPlaceholder": "you@company.com",
161+
"companyLabel": "Company *",
162+
"companyPlaceholder": "Company name",
163+
"commentLabel": "Context (optional)",
164+
"commentPlaceholder": "Key systems, desired outcomes, timelines",
165+
"note": "We will send a confirmation email after the request is delivered.",
166+
"submit": "Submit request",
167+
"status": {
168+
"sending": "Sending your request...",
169+
"success": "All set! We just confirmed via email.",
170+
"savedOffline": "No backend connection. Saved locally for now.",
171+
"savedMissingEndpoint": "API endpoint missing. Saved locally for now.",
172+
"submitFailed": "Unable to submit the request."
173+
},
174+
"errors": {
175+
"apiNotConfigured": "API endpoint is not configured.",
176+
"submitFailed": "Unable to submit the request."
177+
}
178+
},
179+
"console": {
180+
"apiNotConfigured": "[mb3r] API endpoint is not configured. Set window.__MB3R_API_ENDPOINT__ (or __MB3R_API_BASE__)."
181+
},
182+
"admin": {
183+
"pageTitle": "MB3R Lab — Pilot requests",
184+
"heading": "Pilot program requests",
185+
"description": "Monitor submissions collected on the landing page. Records persist in Supabase (Postgres).",
186+
"actions": {
187+
"refresh": "Refresh",
188+
"home": "Home"
189+
},
190+
"table": {
191+
"overlayLocked": "Enter the administrator password to view requests.",
192+
"headers": {
193+
"id": "ID",
194+
"email": "Email",
195+
"company": "Company",
196+
"context": "Context",
197+
"country": "Country",
198+
"created": "Created"
199+
},
200+
"empty": "Requests are not loaded yet."
201+
},
202+
"modal": {
203+
"title": "Enter administrator password",
204+
"description": "Passwords are managed on the server via the ADMIN_PASSWORD environment variable.",
205+
"passwordLabel": "Password",
206+
"submit": "Continue"
207+
},
208+
"status": {
209+
"noRequests": "No requests yet.",
210+
"passwordRequired": "Password is required.",
211+
"apiNotConfigured": "API endpoint is not configured.",
212+
"loadFailed": "Unable to load requests.",
213+
"backendUnreachable": "Backend is unreachable.",
214+
"enterPassword": "Enter the password.",
215+
"refreshing": "Refreshing request list...",
216+
"incorrectPassword": "Incorrect password. Try again.",
217+
"apiUnavailable": "API unavailable. Unable to load requests right now.",
218+
"apiUnavailableLater": "API unavailable. Try again later.",
219+
"showingCached": "API unavailable. Showing cached requests.",
220+
"validating": "Validating...",
221+
"accessGranted": "Access granted.",
222+
"apiNotConfiguredHint": "API endpoint is not configured. Update assets/js/config.js."
223+
},
224+
"errors": {
225+
"passwordRequired": "Password is required.",
226+
"apiNotConfigured": "API endpoint is not configured.",
227+
"loadFailed": "Unable to load requests.",
228+
"backendUnreachable": "Backend is unreachable."
229+
}
230+
}
231+
}

0 commit comments

Comments
 (0)