Global variables
ci/woodpecker/push/woodpecker Pipeline was successful Details

Signed-off-by: Skylar "The Cobra" Widulski <cobra@vern.cc>
This commit is contained in:
Skylar "The Cobra" Widulski 2023-12-02 01:01:00 -05:00
parent e1c7edf32a
commit d2b35b30d5
Signed by: cobra
GPG Key ID: 4FD8F812083FF6F9
1 changed files with 3 additions and 3 deletions

View File

@ -16,11 +16,11 @@
</head>
<body>
<?php
$const = 300;
$langs = array();
global $const = 300;
global $langs = array();
$langs['pt-BR'] = array("Brazilian Portuguese", "Português Brasileiro");
function style($tl) {
global 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>";
}