Initial translations.php creation
ci/woodpecker/push/woodpecker Pipeline was successful
Details
ci/woodpecker/push/woodpecker Pipeline was successful
Details
Signed-off-by: Skylar "The Cobra" Widulski <cobra@vern.cc>
This commit is contained in:
parent
3e58f00774
commit
8798ed1132
|
@ -0,0 +1,35 @@
|
|||
<!DOCTYPE html>
|
||||
<!--
|
||||
This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Affero General Public License along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
-->
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width">
|
||||
<meta name="description" content="Status of ~vern translations">
|
||||
<link rel="stylesheet" href="//gcdn.vern.cc/vernsite/style.css">
|
||||
<title>Translations | ~vern</title>
|
||||
</head>
|
||||
<body>
|
||||
<?php
|
||||
$const = 300;
|
||||
$langs = array();
|
||||
$langs['pt-BR'] = array("Brazilian Portuguese", "Português Brasileiro");
|
||||
|
||||
function style($tl) {
|
||||
$sum = shell_exec('cd /var/www/website; $(($(diff 2>/dev/null -y --suppress-common-lines en/ '.$tl.'/ | grep "|" | wc -l)+$(diff 2>/dev/null -y --suppress-common-lines en/ '.$tl.'/ | grep "^Only in en/" | awk '."'".'{print $NF}'."'".' | while read -r line; do wc -l < en/"$line";printf "+"; done)0))')
|
||||
return "<li>" . $langs[$tl][0] . "(" . $langs[$tl][1] . ", <code>" . $tl . "</code>)" . "</li>\n<br>\n<progress max=$const value=" . $sum . ">" . intdiv(($sum * 100) / $const) . "%</progress><br><br>"
|
||||
}
|
||||
?>
|
||||
<!--#include file="nav.php" -->
|
||||
<div class=h><h1 id=translations>Translations</h1> <a aria-hidden=true href=#translations>#translations</a></div>
|
||||
<ul>
|
||||
<li><?php echo style('pt-BR') ?><li>
|
||||
</ul>
|
||||
<!--#include file="footer.cgi" -->
|
||||
</body>
|
||||
</html>
|
Loading…
Reference in New Issue