fix(locale): replace outdated localization page with redirect to weblate

This commit is contained in:
Ash Monty 2022-11-13 13:22:09 +01:00
parent 09b43df6ac
commit 67c4dfaf90
No known key found for this signature in database
GPG Key ID: 740B7C88251D49B6
3 changed files with 1 additions and 37 deletions

View File

@ -1,8 +0,0 @@
/* eslint-disable no-undef */
const form = document.querySelector('.localization-form');
form.addEventListener('submit', (e) => {
e.preventDefault();
e.stopPropagation();
window.location.href=`https://pretendo-locale-tester.herokuapp.com/?url=${e.target[0].value}`;
});

View File

@ -2,7 +2,7 @@ const { Router } = require('express');
const router = new Router();
router.get('/', async (request, response) => {
response.render('localization');
response.redirect('https://hosted.weblate.org/projects/pretendonetwork/');
});
module.exports = router;

View File

@ -1,28 +0,0 @@
<link rel="stylesheet" href="/assets/css/localization.css" />
{{> header}}
<div class="wrapper">
<div class="localization-wrapper">
<div class="localization-widget">
<h1 class="title dot">{{ locale.localizationPage.title }}</h1>
<p class="caption">{{ locale.localizationPage.description }}</p>
<a href="https://github.com/PretendoNetwork/Pretendo/blob/master/CONTRIBUTING.md#localization" target="_blank" class="localization-instr">
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="var(--accent-shade-2)" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round" class="feather feather-arrow-right"><line x1="5" y1="12" x2="19" y2="12"></line><polyline points="12 5 19 12 12 19"></polyline></svg>
{{ locale.localizationPage.instructions }}
</a>
<form class="localization-form" autocomplete="off">
<label for="url">{{ locale.localizationPage.fileInput }}</label>
<div class="input-wrapper">
<input type="url" id="url" placeholder="{{ locale.localizationPage.filePlaceholder }}" required />
<button type="submit" class="submit-btn">{{ locale.localizationPage.button }}</button>
</div>
</form>
</div>
</div>
</div>
{{> footer }}
<script src="/assets/js/locale-tester-handler.js" />