forked from getodk/central
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
2d95a61
commit 8e0a278
Showing
3 changed files
with
92 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
{ | ||
"heading": { | ||
"en": "You're using a significantly outdated version of ODK Central", | ||
"fr": "Vous utilisez une version de ODK Central considérablement obsolète", | ||
"es": "Estás usando una versión significativamente desactualizada de ODK Central", | ||
"cs": "Používáte výrazně zastaralou verzi ODK Central", | ||
"de": "Sie verwenden eine deutlich veraltete Version von ODK Central", | ||
"id": "Anda menggunakan versi ODK Central yang sangat usang", | ||
"it": "Stai usando una versione di ODK Central significativamente obsoleta", | ||
"ja": "ODK Central の大幅に古いバージョンを使用しています", | ||
"sw": "Unatumia toleo la ODK Central ambalo limepitwa sana na wakati", | ||
"zh": "您正在使用一个明显过时的 ODK Central 版本" | ||
}, | ||
"sentence1": { | ||
"en": "Upgrade now to protect your data and take advantage of the latest features.", | ||
"fr": "Mettez à jour maintenant pour protéger vos données et profiter des dernières fonctionnalités.", | ||
"es": "Actualiza ahora para proteger tus datos y aprovechar las últimas funciones.", | ||
"cs": "Aktualizujte nyní, abyste ochránili svá data a využili nejnovější funkce.", | ||
"de": "Aktualisieren Sie jetzt, um Ihre Daten zu schützen und die neuesten Funktionen zu nutzen.", | ||
"id": "Perbarui sekarang untuk melindungi data Anda dan memanfaatkan fitur terbaru.", | ||
"it": "Aggiorna ora per proteggere i tuoi dati e sfruttare le ultime funzionalità.", | ||
"ja": "データを保護し、最新の機能を利用するために今すぐアップグレードしてください。", | ||
"sw": "Sasisha sasa ili kulinda data zako na kutumia vipengele vipya zaidi.", | ||
"zh": "立即升级以保护您的数据并利用最新功能。" | ||
}, | ||
"sentence2": { | ||
"en": "If you don't want to maintain Central, try {{OdkCloudLink}}", | ||
"fr": "Si vous ne voulez pas maintenir Central, essayez {{OdkCloudLink}}", | ||
"es": "Si no quieres mantener Central, prueba {{OdkCloudLink}}", | ||
"cs": "Pokud nechcete spravovat Central, vyzkoušejte {{OdkCloudLink}}", | ||
"de": "Wenn Sie Central nicht warten möchten, probieren Sie {{OdkCloudLink}} aus", | ||
"id": "Jika Anda tidak ingin memelihara Central, coba {{OdkCloudLink}}", | ||
"it": "Se non vuoi mantenere Central, prova {{OdkCloudLink}}", | ||
"ja": "Central を管理したくない場合は、{{OdkCloudLink}} を試してください。", | ||
"sw": "Kama hutaki kudumisha Central, jaribu {{OdkCloudLink}}", | ||
"zh": "如果您不想维护 Central,请尝试 {{OdkCloudLink}}" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<meta charset="utf-8"> | ||
<title>ODK Central</title> | ||
<link rel="stylesheet" href="style.css"> | ||
</head> | ||
<body> | ||
<!-- this page is rendered in an iframe of size 600x200 --> | ||
<div class="outdated-version" style="display: block;"> | ||
<h1 class="heading">You're using a significantly outdated version of ODK Central</h1> | ||
<p> | ||
<span class="sentence1">Upgrade now to protect your data and take advantage of the latest features.</span> | ||
<span class="sentence2">If you don't want to maintain Central, try<a href="https://getodk.org/#success-stories" target="_blank"> ODK Cloud.</a></span> | ||
</p> | ||
<script defer src='https://static.cloudflareinsights.com/beacon.min.js' data-cf-beacon='{"token": "81f288331d6e4638be205e0e63388165"}'></script> | ||
</div> | ||
|
||
<script> | ||
document.addEventListener('DOMContentLoaded', () => { | ||
const queryParams = new URLSearchParams(location.search); | ||
const lang = queryParams.get('lang'); | ||
const odkCloudLink = '<a href="https://getodk.org/#success-stories" target="_blank">ODK Cloud</a>'; | ||
|
||
fetch('./i18n.json').then(r => r.json()).then(i18n => { | ||
const localText = Object.keys(i18n).reduce((a, k) => {a.set(k, i18n[k][lang] ?? i18n[k]['en']); return a;}, new Map()); | ||
document.querySelector('.heading').textContent = localText.get('heading'); | ||
document.querySelector('.sentence1').textContent = localText.get('sentence1'); | ||
document.querySelector('.sentence2').innerHTML = localText.get('sentence2').replace('{{OdkCloudLink}}', odkCloudLink); | ||
}) | ||
}) | ||
</script> | ||
</body> | ||
</html> | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters