mirror of
https://git.code.sf.net/p/seeddms/code
synced 2025-05-31 05:57:34 +00:00
add function for listing missing languages at end of page
also check if turned on
This commit is contained in:
parent
3a0dc14e87
commit
2c4ce681ef
|
@ -91,6 +91,9 @@ background-image: linear-gradient(to bottom, #882222, #111111);;
|
|||
|
||||
function htmlEndPage() { /* {{{ */
|
||||
$this->footNote();
|
||||
if($this->params['showmissingtranslations']) {
|
||||
$this->missingḺanguageKeys();
|
||||
}
|
||||
echo '<script src="../styles/'.$this->theme.'/bootstrap/js/bootstrap.min.js"></script>'."\n";
|
||||
echo '<script src="../styles/'.$this->theme.'/datepicker/js/bootstrap-datepicker.js"></script>'."\n";
|
||||
foreach(array('de', 'es', 'ca', 'nl', 'fi', 'cs', 'it', 'fr', 'sv', 'sl', 'pt-BR', 'zh-CN', 'zh-TW') as $lang)
|
||||
|
@ -100,6 +103,33 @@ background-image: linear-gradient(to bottom, #882222, #111111);;
|
|||
echo "</body>\n</html>\n";
|
||||
} /* }}} */
|
||||
|
||||
function missingḺanguageKeys() { /* {{{ */
|
||||
global $MISSING_LANG, $LANG;
|
||||
if($MISSING_LANG) {
|
||||
echo '<div class="alert alert-error">'."\n";
|
||||
echo "<p><strong>This page contains missing translations in the selected language. Please help to improve SeedDMS and provide the translation.</strong></p>";
|
||||
echo "</div>";
|
||||
echo "<table class=\"table table-condensed\">";
|
||||
echo "<tr><th>Key</th><th>engl. Text</th><th>Your translation</th></tr>\n";
|
||||
foreach($MISSING_LANG as $key=>$lang) {
|
||||
echo "<tr><td>".$key."</td><td>".$LANG['en_GB'][$key]."</td><td><div class=\"input-append send-missing-translation\"><input name=\"missing-lang-key\" type=\"hidden\" value=\"".$key."\" /><input name=\"missing-lang-lang\" type=\"hidden\" value=\"".$lang."\" /><input type=\"text\" class=\"input-xxlarge\" name=\"missing-lang-translation\" placeholder=\"Your translation in '".$lang."'\"/><a class=\"btn\">Submit</a></div></td></tr>";
|
||||
}
|
||||
echo "</table>";
|
||||
?>
|
||||
<script>
|
||||
noty({
|
||||
text: '<b>There are missing translations on this page!</b><br />Please check the bottom of the page.',
|
||||
type: 'error',
|
||||
dismissQueue: true,
|
||||
layout: 'topRight',
|
||||
theme: 'defaultTheme',
|
||||
timeout: 5500,
|
||||
});
|
||||
</script>
|
||||
<?php
|
||||
}
|
||||
} /* }}} */
|
||||
|
||||
function footNote() { /* {{{ */
|
||||
echo '<div class="row-fluid" style="padding-top: 20px;">'."\n";
|
||||
echo '<div class="span12">'."\n";
|
||||
|
|
Loading…
Reference in New Issue
Block a user