From 9f95ce0d1b04790a2ef3addd60de3da22869acdb Mon Sep 17 00:00:00 2001 From: Mantas Vilčinskas Date: Sat, 12 Dec 2020 12:29:32 +0200 Subject: Add Tagalog by @TheWhackFactory from #153 --- static/admin/config.yml | 1 + 1 file changed, 1 insertion(+) (limited to 'static/admin/config.yml') diff --git a/static/admin/config.yml b/static/admin/config.yml index 9ce91d9..afd0e17 100644 --- a/static/admin/config.yml +++ b/static/admin/config.yml @@ -130,6 +130,7 @@ collections: - { label: "🇫🇷 French", value: "fr" } - { label: "🇧🇷 Portuguese", value: "pt"} - { label: "🇲🇰 Македонски", value: "mk" } + - { label: "🏳️ Tagalog", value: "tl" } - label: 'Site language in code for html[lang]' hint: 'Use the ISO 639-1 defined abbreviations. Examples: en, lt, de. Fully explained here: https://github.com/cstate/cstate/wiki/Customization#changing-site-language' name: 'languageCode' -- cgit v1.2.3-70-g09d2 From 1b0c7250efb89f8a021196cc8654e23ce2952441 Mon Sep 17 00:00:00 2001 From: Enrico204 Date: Fri, 22 Jan 2021 11:40:48 +0100 Subject: Add Italian into the Netlify CMS config file --- static/admin/config.yml | 1 + 1 file changed, 1 insertion(+) (limited to 'static/admin/config.yml') diff --git a/static/admin/config.yml b/static/admin/config.yml index afd0e17..c3d0832 100644 --- a/static/admin/config.yml +++ b/static/admin/config.yml @@ -128,6 +128,7 @@ collections: - { label: "🇩🇪 Deutsch", value: "de" } - { label: "🇳🇱 Dutch", value: "nl" } - { label: "🇫🇷 French", value: "fr" } + - { label: "🇮🇹 Italiano", value: "it" } - { label: "🇧🇷 Portuguese", value: "pt"} - { label: "🇲🇰 Македонски", value: "mk" } - { label: "🏳️ Tagalog", value: "tl" } -- cgit v1.2.3-70-g09d2 From d9837b19e357f0a85580e2a7cd7e28666d994b11 Mon Sep 17 00:00:00 2001 From: Mantas Vilčinskas Date: Sat, 20 Feb 2021 23:30:29 +0200 Subject: explain BaseURL on NCMS --- static/admin/config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'static/admin/config.yml') diff --git a/static/admin/config.yml b/static/admin/config.yml index c3d0832..4fb01ae 100644 --- a/static/admin/config.yml +++ b/static/admin/config.yml @@ -140,7 +140,7 @@ collections: - label: 'Base URL / Hostname' name: 'baseURL' widget: 'string' - hint: 'Where is the site hosted? What is the hostname or path to the root? Slash forces relative links but may not work in all setups.' + hint: 'Where is the site hosted? Hostname (and path) to the root. Prior to version 3, a slash was used which now works in local testing, but breaks certain features of cState like RSS feeds, so a correct example for production is: https://cstate.mnts.lt' default: '/' # PARAMS - label: "Params" -- cgit v1.2.3-70-g09d2 From 925027e85b74a77e06448be5baa6053f1222fb78 Mon Sep 17 00:00:00 2001 From: Mantas Vilčinskas Date: Wed, 24 Feb 2021 13:48:14 +0200 Subject: Doc updates, bugfixes, add rel time to NCMS --- exampleSite/config.yml | 35 ++++- .../issues/2019-10-08-testing-new-pipeline.md | 2 +- .../issues/2020-06-13-maintenance-window.md | 13 -- .../issues/2021-02-13-maintenance-window.md | 14 ++ i18n/tl.yaml | 159 +++++++++++++++++++++ i18n/tl.yml | 159 --------------------- layouts/index.json | 4 +- layouts/issues/small.html | 9 +- layouts/partials/js.html | 18 ++- layouts/partials/meta.html | 2 +- static/admin/config.yml | 22 ++- static/admin/index.html | 2 +- 12 files changed, 239 insertions(+), 200 deletions(-) delete mode 100644 exampleSite/content/issues/2020-06-13-maintenance-window.md create mode 100644 exampleSite/content/issues/2021-02-13-maintenance-window.md create mode 100644 i18n/tl.yaml delete mode 100644 i18n/tl.yml (limited to 'static/admin/config.yml') diff --git a/exampleSite/config.yml b/exampleSite/config.yml index 49faaee..7dc5972 100644 --- a/exampleSite/config.yml +++ b/exampleSite/config.yml @@ -161,17 +161,44 @@ params: # # dateFormat Default: "January 2, 2006 at 3:04 PM" # shortDateFormat Default: "15:04 — Jan 2" - dateFormat: January 2, 2006 at 3:04 PM - shortDateFormat: 15:04 — Jan 2 + dateFormat: January 2, 2006 at 3:04 PM UTC + shortDateFormat: 15:04 UTC — Jan 2 - # If enabled, will display relative times for incident history and summaries instead of using dateFormat. + # Should relative time (x min ago) be used? + # + # IMPORTANT: In the frontmatter, the dates MUST be in + # the UTC time zone for this to work preperly. If you + # use Netlify CMS, all good — the CMS picks UTC time + # by default. Otherwise, there may be very inaccurate + # times if multiple time zones are in your issue files. + # + # FOR YOUR CONSIDERATION: This feature was introduced in + # v5. It may be a breaking change in the case when you + # wish to use relative time but old issues do not have + # UTC time (and therefore are out of sync by ±24 hours) + # + # Read the wiki for more: + # https://github.com/cstate/cstate/wiki/Customization#time + # + # If enabled, will display relative times in places like + # the incident history and summaries instead of using + # dateFormat and shortDateFormat (except for if you use + # the old shortcode). # # Default: `true` + # BOOLEAN; `true`, `false` useRelativeTime: true - + # If enabled, doesn't show seconds on relative times. # + # With option ON (true): + # "Last checked <1 min ago" + # + # With option OFF (false; default): + # "Last checked 20s ago" + # # Default: `false` + # BOOLEAN; `true`, `false` skipSeconds: false # What header design should we use? diff --git a/exampleSite/content/issues/2019-10-08-testing-new-pipeline.md b/exampleSite/content/issues/2019-10-08-testing-new-pipeline.md index 4f139de..4e9da4f 100644 --- a/exampleSite/content/issues/2019-10-08-testing-new-pipeline.md +++ b/exampleSite/content/issues/2019-10-08-testing-new-pipeline.md @@ -1,7 +1,7 @@ --- title: New Pipeline Rollout date: 2019-10-05 16:24:00 -resolved: false +resolved: true resolvedWhen: 2019-10-05 16:58:00 # Possible severity levels: down, disrupted, notice severity: disrupted diff --git a/exampleSite/content/issues/2020-06-13-maintenance-window.md b/exampleSite/content/issues/2020-06-13-maintenance-window.md deleted file mode 100644 index 404ccc4..0000000 --- a/exampleSite/content/issues/2020-06-13-maintenance-window.md +++ /dev/null @@ -1,13 +0,0 @@ ---- -title: Maintenance Window -date: 2020-06-13 15:54:00 -resolved: true -resolvedWhen: 2020-06-13 16:54:00 -# Possible severity levels: down, disrupted, notice -severity: disrupted -affected: - - API -section: issue ---- - -*Just began* - We're currently shutting down the network. {{< track "2018-06-13 15:54:00" >}} diff --git a/exampleSite/content/issues/2021-02-13-maintenance-window.md b/exampleSite/content/issues/2021-02-13-maintenance-window.md new file mode 100644 index 0000000..00b4765 --- /dev/null +++ b/exampleSite/content/issues/2021-02-13-maintenance-window.md @@ -0,0 +1,14 @@ +--- +title: Maintenance Window +#date: 24 Feb 21 12:35 +0200 +date: 2021-02-24 10:35:00 +resolved: false +resolvedWhen: 2021-02-24 12:10:00 +# Possible severity levels: down, disrupted, notice +severity: disrupted +affected: + - API +section: issue +--- + +*Just began* - We're currently shutting down the network. {{< track "2018-06-13 12:54:00" >}} diff --git a/i18n/tl.yaml b/i18n/tl.yaml new file mode 100644 index 0000000..1600abc --- /dev/null +++ b/i18n/tl.yaml @@ -0,0 +1,159 @@ +# Tagalog language file for cState +# Version 4.4 + +- id: languageCode + translation: tl +- id: languageName + translation: Tagalog +- id: languageNameShort + translation: TGL + +## +## INDEX.HTML +## + +# Summary status message +- id: isDown + translation: Nakakaranas ng malaking isyu +- id: isDisrupted + translation: Nakakaranas ng pagkagambala +- id: isNotice + translation: Pakiusap paki-basa ang anunsyo +- id: isOk + translation: Lahat ng sistema ay gumagana + +# No JS warning +- id: noScriptingIntro + translation: Ay! Mukhang naka-diseybol ang Javascript mo. Pakiusap +- id: noScriptingLink + translation: i-eneybol ang skripting +- id: noScriptingOutro + translation: para mas maganda ang iyong eksperyensha sa websayt na ito. +- id: thisIsDown + translation: Hindi gumagana +- id: thisIsDisrupted + translation: May pagkagambala +- id: thisIsNotice + translation: Pagpapanatili +- id: thisIsOk + translation: Gumagana + +# "Last checked" + "just now" +- id: lastChecked + translation: Huling na-chek +- id: justNow + translation: ngayon lamang +- id: someTimeAgo + translation: nakaraan + +# Example usage: `5` + `years` +# Final result: 'Last checked 5 years ago' +# Number goes before string +# Use short variants until months +- id: yearsAgo + translation: mga taon +- id: monthsAgo + translation: mga buwan +- id: daysAgo + translation: a +- id: hoursAgo + translation: o +- id: minsAgo + translation: min +- id: secondsAgo + translation: s + +- id: autoRefreshNotice + translation: Susubukan naming mag-refresh bawat 5 min + +# Incidents +- id: incidents + translation: Mga insidente +- id: incidentHistory + translation: Kasaysayan ng mga insidente + +- id: resolved + translation: Na-resolba # if it's less than a min +- id: inUnderAMinute + translation: sa ilalim ng isang minuto # continuing the last string +- id: resolvedAfter + translation: Na-resolba pagkatapos ng # + 19 min +- id: ofDowntime + translation: ng dawntaym + +- id: downtimeOngoing + translation: Ang isyung ito ay hindi pa na-reresolba + + +- id: calmBeforeTheStorm + translation: Ito ba ang katahimikan bago ang bagyo? +- id: noIncidentsDesc + translation: Ang status peyg na ito ay walang na-itala na insidente. This status page has no logged incidents. This may be because the status page owner (or owners) have recently set up their status page, have had no downtime, or have not logged any downtime. + + +- id: continueReading + translation: Ipagpatuloy ang pagbabasa +- id: prev + translation: Dati +- id: next + translation: Susunod + +## +## OTHER +## + +- id: goBack + translation: Bumalik sa +- id: backToTop + translation: Bumalik sa ibabaw +- id: poweredBy + translation: Pinapatakbo ng + +- id: notFound + translation: Walang dito. +- id: notFoundText + translation: Ito'y maaaring problema sa amin. Maaring may nilipat kami na resors at ngayon ay nawala na ito. Posible din na ang resors na nais mong makita ay walang laman. Pero, ayos lang ba sa iyo ang dobol-check sa link? + +- id: rss + translation: Mag-subskrayb sa pamamagitan ng RSS +- id: toAllUpdates + translation: sa lahat ng mga updeyt +- id: or + translation: o +- id: onlyThisFeed + translation: sa feed lamang na ito + +## +## v3 +## +- id: entries + translation: mga entri +- id: newestToOldest + translation: mula sa pinaka-bago hanggang sa pinaka-luma + +## +## v4 +## +- id: notFoundAffected + translation: Mukang ang sistemang ito ay hindi na nag-eesist o di kailan mang nagkaroon ng na-rekord na dawntaym. + +## +## v4.1 +## + +- id: averageSystemsDowntime + translation: Kamakailan, base sa iyong average na data, mukang ang sistemang ito ay nag-dawn ng mga +- id: averageSystemsDowntimeSecondPart + translation: minuto nang paisa-isa. + + +## +## v4.4 +## + +- id: in + translation: sa +- id: weeksAgo + translation: " l" +- id: yearAgo + translation: " taon" diff --git a/i18n/tl.yml b/i18n/tl.yml deleted file mode 100644 index 1600abc..0000000 --- a/i18n/tl.yml +++ /dev/null @@ -1,159 +0,0 @@ -# Tagalog language file for cState -# Version 4.4 - -- id: languageCode - translation: tl -- id: languageName - translation: Tagalog -- id: languageNameShort - translation: TGL - -## -## INDEX.HTML -## - -# Summary status message -- id: isDown - translation: Nakakaranas ng malaking isyu -- id: isDisrupted - translation: Nakakaranas ng pagkagambala -- id: isNotice - translation: Pakiusap paki-basa ang anunsyo -- id: isOk - translation: Lahat ng sistema ay gumagana - -# No JS warning -- id: noScriptingIntro - translation: Ay! Mukhang naka-diseybol ang Javascript mo. Pakiusap -- id: noScriptingLink - translation: i-eneybol ang skripting -- id: noScriptingOutro - translation: para mas maganda ang iyong eksperyensha sa websayt na ito. -- id: thisIsDown - translation: Hindi gumagana -- id: thisIsDisrupted - translation: May pagkagambala -- id: thisIsNotice - translation: Pagpapanatili -- id: thisIsOk - translation: Gumagana - -# "Last checked" + "just now" -- id: lastChecked - translation: Huling na-chek -- id: justNow - translation: ngayon lamang -- id: someTimeAgo - translation: nakaraan - -# Example usage: `5` + `years` -# Final result: 'Last checked 5 years ago' -# Number goes before string -# Use short variants until months -- id: yearsAgo - translation: mga taon -- id: monthsAgo - translation: mga buwan -- id: daysAgo - translation: a -- id: hoursAgo - translation: o -- id: minsAgo - translation: min -- id: secondsAgo - translation: s - -- id: autoRefreshNotice - translation: Susubukan naming mag-refresh bawat 5 min - -# Incidents -- id: incidents - translation: Mga insidente -- id: incidentHistory - translation: Kasaysayan ng mga insidente - -- id: resolved - translation: Na-resolba # if it's less than a min -- id: inUnderAMinute - translation: sa ilalim ng isang minuto # continuing the last string -- id: resolvedAfter - translation: Na-resolba pagkatapos ng # + 19 min -- id: ofDowntime - translation: ng dawntaym - -- id: downtimeOngoing - translation: Ang isyung ito ay hindi pa na-reresolba - - -- id: calmBeforeTheStorm - translation: Ito ba ang katahimikan bago ang bagyo? -- id: noIncidentsDesc - translation: Ang status peyg na ito ay walang na-itala na insidente. This status page has no logged incidents. This may be because the status page owner (or owners) have recently set up their status page, have had no downtime, or have not logged any downtime. - - -- id: continueReading - translation: Ipagpatuloy ang pagbabasa -- id: prev - translation: Dati -- id: next - translation: Susunod - -## -## OTHER -## - -- id: goBack - translation: Bumalik sa -- id: backToTop - translation: Bumalik sa ibabaw -- id: poweredBy - translation: Pinapatakbo ng - -- id: notFound - translation: Walang dito. -- id: notFoundText - translation: Ito'y maaaring problema sa amin. Maaring may nilipat kami na resors at ngayon ay nawala na ito. Posible din na ang resors na nais mong makita ay walang laman. Pero, ayos lang ba sa iyo ang dobol-check sa link? - -- id: rss - translation: Mag-subskrayb sa pamamagitan ng RSS -- id: toAllUpdates - translation: sa lahat ng mga updeyt -- id: or - translation: o -- id: onlyThisFeed - translation: sa feed lamang na ito - -## -## v3 -## -- id: entries - translation: mga entri -- id: newestToOldest - translation: mula sa pinaka-bago hanggang sa pinaka-luma - -## -## v4 -## -- id: notFoundAffected - translation: Mukang ang sistemang ito ay hindi na nag-eesist o di kailan mang nagkaroon ng na-rekord na dawntaym. - -## -## v4.1 -## - -- id: averageSystemsDowntime - translation: Kamakailan, base sa iyong average na data, mukang ang sistemang ito ay nag-dawn ng mga -- id: averageSystemsDowntimeSecondPart - translation: minuto nang paisa-isa. - - -## -## v4.4 -## - -- id: in - translation: sa -- id: weeksAgo - translation: " l" -- id: yearAgo - translation: " taon" diff --git a/layouts/index.json b/layouts/index.json index 5c47558..b37af7a 100644 --- a/layouts/index.json +++ b/layouts/index.json @@ -5,8 +5,8 @@ {{ $isDown := where $active "Params.severity" "=" "down" }} { "is": "index", - "cStateVersion": "4.4", - "apiVersion": "1.0.0", + "cStateVersion": "5.0", + "apiVersion": "2.0", "title": "{{ .Site.Title }}", "languageCodeHTML": "{{ .Site.LanguageCode }}", "languageCode": "{{ T "languageCode" }}", diff --git a/layouts/issues/small.html b/layouts/issues/small.html index 79db524..531b47b 100644 --- a/layouts/issues/small.html +++ b/layouts/issues/small.html @@ -8,7 +8,7 @@ {{ if .Params.informational }} - + {{ if .Site.Params.dateFormat }} {{ .Date.Format .Site.Params.dateFormat }} {{ else }} @@ -23,7 +23,7 @@ {{ else if .Params.Resolved }} - + {{ if .Site.Params.dateFormat }} {{ .Date.Format .Site.Params.dateFormat }} {{ else }} @@ -65,9 +65,10 @@ {{ end }} {{ end }} - {{ else }} - + {{ else }} + + {{ if .Site.Params.dateFormat }} {{ .Date.Format .Site.Params.dateFormat }} {{ else }} diff --git a/layouts/partials/js.html b/layouts/partials/js.html index 8465483..d966643 100644 --- a/layouts/partials/js.html +++ b/layouts/partials/js.html @@ -3,11 +3,11 @@ * Dev toolset */ - console.log('cState v4.4 - https://github.com/cstate/cstate'); + console.log('cState v5 Dev - https://github.com/cstate/cstate'); document.getElementsByTagName('html')[0].className = 'js'; /** - * Make theme color pretty + * Change header color based on status */ if (document.body.className === 'change-header-color') { @@ -43,6 +43,7 @@ /** * Returns a relative date string for the given date. */ + function timeSince(date) { var seconds = Math.floor((new Date() - date) / 1000); @@ -78,6 +79,7 @@ * Changes elements with the class 'relative-time' into relative times and * moves the timestamp to a title attribute tooltip. */ + function updateRelativeTimes() { var elements = document.querySelectorAll('.relative-time'); for (var i = 0; i < elements.length; i++) { @@ -95,21 +97,17 @@ element.innerHTML = html.trim(); } } + updateRelativeTimes(); - setInterval(updateRelativeTimes, 5000); - /** - * Reload homepage after 290 seconds. - */ - if (document.querySelector('body.status-homepage')) { - setTimeout(location.reload, 290000) - } + // Update "time since" feature every 5s + setInterval(updateRelativeTimes, 5000); {{ if ne .Site.Params.googleAnalytics "UA-00000000-1" }} - + +