diff --git a/site/i18n.yml b/site/i18n.yml index d653aa4a..2561366a 100644 --- a/site/i18n.yml +++ b/site/i18n.yml @@ -1 +1,24 @@ activeIncidents: Active Incidents +allSystemsOperational: All systems are operational +incidentReport: Incident report → +activeIncidentSummary: Opened at $DATE with $POSTS posts +incidentTitle: Incident $NUMBER Details +incidentDetails: Incident Details +incidentFixed: Fixed +incidentOngoing: Ongoing +incidentOpenedAt: Opened at +incidentClosedAt: Closed at +incidentSubscribe: Subscribe to Updates +incidentViewOnGitHub: View on GitHub +incidentCommentSummary: Posted at $DATE by $AUTHOR +incidentBack: ← Back to all incidents +pastIncidents: Past Incidents +pastIncidentsResolved: Resolved in $MINUTES minuted with $POSTS posts +liveStatus: Live Status +overallUptime: Overall uptime $UPTIME% +averageResponseTime: Average response time $TIMEms +loading: Loading +navStatus: Status +navAbout: About +navGitHub: GitHub +footer: This page is [open source]($REPO), powered by [Upptime](https://upptime.js.org) diff --git a/site/src/components/ActiveIncidents.svelte b/site/src/components/ActiveIncidents.svelte index a9904c16..8d7c0039 100644 --- a/site/src/components/ActiveIncidents.svelte +++ b/site/src/components/ActiveIncidents.svelte @@ -49,7 +49,7 @@ {#if !incidents.length && !loading} -
✅   All systems are operational
+
✅   {config.i18n.allSystemsOperational}
{/if}
@@ -57,18 +57,22 @@ {:else if incidents.length} {#each incidents as incident} -

Active Incidents

+

{config.i18n.activeIncidents}

{incident.title.replace('🛑', '').replace('⚠️', '').trim()}

- Opened at {new Date(incident.created_at).toLocaleString()} with {incident.comments} - posts + {config.i18n.activeIncidentSummary + .replace( + /\$DATE/g, + new Date(incident.created_at).toLocaleString() + ) + .replace(/\$POSTS/g, incident.comments)}
diff --git a/site/src/components/Incident.svelte b/site/src/components/Incident.svelte index 1a3fb58e..1b8d92b7 100644 --- a/site/src/components/Incident.svelte +++ b/site/src/components/Incident.svelte @@ -83,16 +83,16 @@ - Incident #{number} Details + {config.i18n.incidentTitle.replace('$NUMBER', number)}

{#if loadingIncident} - Incident Details + {config.i18n.incidentDetails} {:else} {incident.title} - {incident.state === 'closed' ? 'Fixed' : 'Ongoing'} + {incident.state === 'closed' ? config.i18n.incidentFixed : config.i18n.incidentOngoing} {/if}

@@ -103,10 +103,10 @@ {:else}
-
Opened at
+
{config.i18n.incidentOpenedAt}
{new Date(incident.created_at).toLocaleString()}
{#if incident.closed_at} -
Closed at
+
{config.i18n.incidentClosedAt}
{new Date(incident.closed_at).toLocaleString()}
{/if}
@@ -114,13 +114,13 @@

- Subscribe to Updates + {config.i18n.incidentSubscribe}

- View on GitHub + {config.i18n.incidentViewOnGitHub}

@@ -131,12 +131,17 @@ {@html md(comment.body)}

- Posted at - - {new Date(comment.created_at).toLocaleString()} - - by - @{comment.user.login} + {@html config.i18n.incidentCommentSummary + .replace( + /\$DATE/, + `${new Date( + comment.created_at + ).toLocaleString()}` + ) + .replace( + /\$AUTHOR/, + `@${comment.user.login}` + )}
{/each} @@ -144,5 +149,5 @@
diff --git a/site/src/components/Incidents.svelte b/site/src/components/Incidents.svelte index ba6d8e1a..d3926d1e 100644 --- a/site/src/components/Incidents.svelte +++ b/site/src/components/Incidents.svelte @@ -35,7 +35,7 @@ }); -

Past Incidents

+

{config.i18n.pastIncidents}

{#if loading} @@ -50,12 +50,20 @@

{incident.title.replace('🛑', '').replace('⚠️', '').trim()}

- Resolved in {((new Date(incident.closed_at).getTime() - new Date(incident.created_at).getTime()) / 60000).toFixed(0)} - minutes with {incident.comments} posts + {@html config.i18n.pastIncidentsResolved + .replace( + /\$MINUTES/g, + ( + (new Date(incident.closed_at).getTime() - + new Date(incident.created_at).getTime()) / + 60000 + ).toFixed(0) + ) + .replace(/\$POSTS/g, incident.comments)}
- Incident report → + {config.i18n.incidentReport}
diff --git a/site/src/components/LiveStatus.svelte b/site/src/components/LiveStatus.svelte index f9748acb..a1732b75 100644 --- a/site/src/components/LiveStatus.svelte +++ b/site/src/components/LiveStatus.svelte @@ -36,7 +36,7 @@ } -

Live Status

+

{config.i18n.liveStatus}

{#if loading} @@ -46,8 +46,12 @@ class={site.status} style={`background-image: url("https://raw.githubusercontent.com/koj-co/upptime/master/graphs/${site.slug}.png`}>

{site.name}

-
Overall uptime: {site.uptime}%
-
Average response time: {site.time}ms
+
+ {@html config.i18n.overallUptime.replace(/\$UPTIME/g, site.uptime)} +
+
+ {@html config.i18n.averageResponseTime.replace(/\$TIME/g, site.time)} +
{/each} {/if} diff --git a/site/src/components/Loading.svelte b/site/src/components/Loading.svelte index d1774a4f..c6f22426 100644 --- a/site/src/components/Loading.svelte +++ b/site/src/components/Loading.svelte @@ -1,3 +1,7 @@ + +
- + diff --git a/site/src/components/Nav.svelte b/site/src/components/Nav.svelte index 706a9ac2..af9c2f1f 100644 --- a/site/src/components/Nav.svelte +++ b/site/src/components/Nav.svelte @@ -64,18 +64,20 @@
diff --git a/site/src/routes/_layout.svelte b/site/src/routes/_layout.svelte index 0661473a..1c67720e 100644 --- a/site/src/routes/_layout.svelte +++ b/site/src/routes/_layout.svelte @@ -1,6 +1,7 @@ @@ -20,11 +21,6 @@