[Blackout] Added/Fixed translation #824
2
.gitignore
vendored
2
.gitignore
vendored
|
@ -22,3 +22,5 @@ report/
|
|||
|
||||
#ignore smarty cache
|
||||
/view/smarty3/compiled/
|
||||
|
||||
\.idea/
|
||||
|
|
|
@ -94,26 +94,26 @@ function blackout_redirect ($a, $b) {
|
|||
|
||||
function blackout_addon_admin(&$a, &$o) {
|
||||
$mystart = Config::get('blackout','begindate');
|
||||
if (! is_string($mystart)) { $mystart = "YYYY-MM-DD:hhmm"; }
|
||||
if (! is_string($mystart)) { $mystart = "YYYY-MM-DD hh:mm"; }
|
||||
$myend = Config::get('blackout','enddate');
|
||||
if (! is_string($myend)) { $myend = "YYYY-MM-DD:hhmm"; }
|
||||
if (! is_string($myend)) { $myend = "YYYY-MM-DD hh:mm"; }
|
||||
$myurl = Config::get('blackout','url');
|
||||
if (! is_string($myurl)) { $myurl = "http://www.example.com"; }
|
||||
$t = Renderer::getMarkupTemplate( "admin.tpl", "addon/blackout/" );
|
||||
|
||||
$o = Renderer::replaceMacros($t, [
|
||||
'$submit' => L10n::t('Save Settings'),
|
||||
'$rurl' => ["rurl", "Redirect URL", $myurl, "all your visitors from the web will be redirected to this URL"],
|
||||
'$startdate' => ["startdate", "Begin of the Blackout<br />(YYYY-MM-DD hh:mm)", $mystart, "format is <em>YYYY</em> year, <em>MM</em> month, <em>DD</em> day, <em>hh</em> hour and <em>mm</em> minute"],
|
||||
'$enddate' => ["enddate", "End of the Blackout<br />(YYYY-MM-DD hh:mm)", $myend, ""],
|
||||
'$rurl' => ["rurl", L10n::t("Redirect URL"), $myurl, L10n::t("all your visitors from the web will be redirected to this URL")],
|
||||
'$startdate' => ["startdate", L10n::t("Begin of the Blackout<br />(YYYY-MM-DD hh:mm)"), $mystart, L10n::t("format is <em>YYYY</em> year, <em>MM</em> month, <em>DD</em> day, <em>hh</em> hour and <em>mm</em> minute")],
|
||||
'$enddate' => ["enddate", L10n::t("End of the Blackout<br />(YYYY-MM-DD hh:mm)"), $myend, ""],
|
||||
|
||||
]);
|
||||
$date1 = DateTime::createFromFormat('Y-m-d G:i', $mystart);
|
||||
$date2 = DateTime::createFromFormat('Y-m-d G:i', $myend);
|
||||
if ($date2 < $date1) {
|
||||
$o = "<div style='border: 2px solid #f00; bakckground: #b00; text-align: center; padding: 10px; margin: 30px;'>The end-date is prior to the start-date of the blackout, you should fix this.</div>" . $o;
|
||||
$o = L10n::t("<div style='border: 2px solid #f00; bakckground: #b00; text-align: center; padding: 10px; margin: 30px;'>The end-date is prior to the start-date of the blackout, you should fix this.</div>") . $o;
|
||||
} else {
|
||||
$o = '<p>Please double check that the current settings for the blackout. Begin will be <strong>'.$mystart.'</strong> and it will end <strong>'.$myend.'</strong>.</p>' . $o;
|
||||
$o = L10n::t('<p>Please double check that the current settings for the blackout. Begin will be <strong>'.$mystart.'</strong> and it will end <strong>'.$myend.'</strong>.</p>') . $o;
|
||||
}
|
||||
}
|
||||
function blackout_addon_admin_post (&$a) {
|
||||
|
|
|
@ -8,7 +8,7 @@ msgid ""
|
|||
msgstr ""
|
||||
"Project-Id-Version: \n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2014-06-22 13:18+0200\n"
|
||||
"POT-Creation-Date: 2019-03-12 14:53+0100\n"
|
||||
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
||||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"Language-Team: LANGUAGE <LL@li.org>\n"
|
||||
|
@ -17,33 +17,41 @@ msgstr ""
|
|||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
|
||||
#: blackout.php:99
|
||||
#: blackout.php:105
|
||||
msgid "Save Settings"
|
||||
msgstr ""
|
||||
|
||||
#: blackout.php:100
|
||||
#: blackout.php:106
|
||||
msgid "Redirect URL"
|
||||
msgstr ""
|
||||
|
||||
#: blackout.php:100
|
||||
#: blackout.php:106
|
||||
msgid "all your visitors from the web will be redirected to this URL"
|
||||
msgstr ""
|
||||
|
||||
#: blackout.php:101
|
||||
msgid "Begin of the Blackout"
|
||||
#: blackout.php:107
|
||||
msgid "Begin of the Blackout<br />(YYYY-MM-DD hh:mm)"
|
||||
msgstr ""
|
||||
|
||||
#: blackout.php:101
|
||||
#: blackout.php:107
|
||||
msgid ""
|
||||
"format is <em>YYYY</em> year, <em>MM</em> month, <em>DD</em> day, <em>hh</"
|
||||
"em> hour and <em>mm</em> minute"
|
||||
msgstr ""
|
||||
|
||||
#: blackout.php:102
|
||||
msgid "End of the Blackout"
|
||||
#: blackout.php:108
|
||||
msgid "End of the Blackout<br />(YYYY-MM-DD hh:mm)"
|
||||
msgstr ""
|
||||
|
||||
#: blackout.php:108
|
||||
#: blackout.php:114
|
||||
msgid ""
|
||||
"The end-date is prior to the start-date of the blackout, you should fix this."
|
||||
"<div style='border: 2px solid #f00; bakckground: #b00; text-align: center; "
|
||||
"padding: 10px; margin: 30px;'>The end-date is prior to the start-date of the "
|
||||
"blackout, you should fix this.</div>"
|
||||
msgstr ""
|
||||
|
||||
#: blackout.php:116
|
||||
msgid ""
|
||||
"<p>Please double check that the current settings for the blackout. Begin "
|
||||
"will be <strong>"
|
||||
msgstr ""
|
||||
|
|
Loading…
Reference in a new issue