Display an error message when a medium download is not available

This commit is contained in:
Silvan Calarco 2014-12-29 15:57:23 +01:00
parent eb224e82f1
commit 0bd356ab10
4 changed files with 33 additions and 16 deletions

View File

@ -27,16 +27,26 @@ function openmamba_download_link($milestone, $medium, $currarch, $ext, $mlword,
$displaymilestone = "$milestone";
}
$currreleasetag=$releaseTag[$medium.'-'.$milestone.'-'.$lang.'-'.$currarch];
echo "<table style='border:0;margin:0;margin-bottom:5px;'><tr><td style='vertical-align:middle;padding:4px;border:0;margin:0;width:20px;align:center;'><img src=/wp-content/themes/openmamba/download.png /></td>";
echo "<td style='border:0;margin:0;padding:4px;'><h5 style='margin:1px;'><a href=\"/media/$milestone/$medium/$lang/openmamba-$medium-$lang-$currreleasetag.$currarch$ext\">";
echo "openmamba $displaymilestone $medium ";
echo _e('for','responsive')." $currarch ($mlword)</a>&nbsp;</h5>";
echo "<i>";
echo _e('File size:','responsive').' '.$sizeMedium[$medium.'-'.$currreleasetag.'-'.$lang.'-'.$currarch].'B; ';
echo _e('Date','responsive').': '.substr($builddateMedium[$medium.'-'.$currreleasetag.'-'.$lang.'-'.$currarch],
0, strpos($builddateMedium[$medium.'-'.$currreleasetag.'-'.$lang.'-'.$currarch], ' '));
echo "; Md5: " . $md5Medium[$medium.'-'.$currreleasetag.'-'.$lang.'-'.$currarch];
echo "</i></td></tr></table>";
if ("$currreleasetag" != "") {
echo "<table style='border:0;margin:0;margin-bottom:5px;'><tr><td style='vertical-align:middle;padding:4px;border:0;margin:0;width:20px;align:center;'><img src=/wp-content/themes/openmamba/download.png /></td>";
echo "<td style='border:0;margin:0;padding:4px;'><h5 style='margin:1px;'><a href=\"/media/$milestone/$medium/$lang/openmamba-$medium-$lang-$currreleasetag.$currarch$ext\">";
echo "openmamba $displaymilestone $medium ";
echo _e('for','responsive')." $currarch ($mlword)</a>&nbsp;</h5>";
echo "<i>";
echo _e('File size:','responsive').' '.$sizeMedium[$medium.'-'.$currreleasetag.'-'.$lang.'-'.$currarch].'B; ';
echo _e('Date','responsive').': '.substr($builddateMedium[$medium.'-'.$currreleasetag.'-'.$lang.'-'.$currarch],
0, strpos($builddateMedium[$medium.'-'.$currreleasetag.'-'.$lang.'-'.$currarch], ' '));
echo "; Md5: " . $md5Medium[$medium.'-'.$currreleasetag.'-'.$lang.'-'.$currarch];
echo "</i></td></tr></table>";
} else {
echo "<table style='border:0;margin:0;margin-bottom:5px;'><tr><td style='vertical-align:middle;padding:4px;border:0;margin:0;width:20px;align:center;'><img src=/wp-content/themes/openmamba/download.png /></td>";
echo "<td style='border:0;margin:0;padding:4px;'><h5 style='margin:1px;'>";
echo "openmamba $displaymilestone $medium ";
echo _e('for','responsive')." $currarch ($mlword)&nbsp;</h5>";
echo "<i><font color=red>";
echo _e('Sorry, download is temporary unavailable. If the problem persists please report the problem.','responsive');
echo "</font></i></td></tr></table>";
}
}
function openmamba_download_func( $atts ) {

View File

@ -4,7 +4,7 @@ Translation management:
xgettext --default-domain=responsive --language=PHP --keyword=__ --keyword=_e --sort-by-file --copyright-holder="Silvan Calarco" --package-name=openmamba --package-version=1.0 --msgid-bugs-address="bugs@openmamba.org" ../*.php
2)
msgmerge it.po responsive.pot -o it.new.po
msgmerge it.po responsive.po -o it.po
3)
msgcat it.po | msgfmt -o it.mo -

Binary file not shown.

View File

@ -6,8 +6,8 @@
msgid ""
msgstr ""
"Project-Id-Version: Responsive Theme\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2014-12-08 16:25+0100\n"
"Report-Msgid-Bugs-To: bugs@openmamba.org\n"
"POT-Creation-Date: 2014-12-29 14:26+0100\n"
"PO-Revision-Date: 2014-12-08 16:25+0100\n"
"Last-Translator: Silvan Calarco <silvan.calarco@mambasoft.it>\n"
"Language-Team: Italian, Italy\n"
@ -24,18 +24,25 @@ msgstr "Leggi di più &#8250;"
msgid "Pages:"
msgstr "Pagine:"
#: ../functions.php:33
#: ../functions.php:34 ../functions.php:45
msgid "for"
msgstr "per"
#: ../functions.php:35
#: ../functions.php:36
msgid "File size:"
msgstr "Dimensione file:"
#: ../functions.php:36
#: ../functions.php:37
msgid "Date"
msgstr "Data"
#: ../functions.php:47
msgid ""
"Sorry, download is temporary unavailable. If the problem persists please "
"report the problem."
msgstr "Il download non è temporaneamente disponibile. Se il problema persiste "
"ti ringraziamo se ci puoi segnalare il problema."
#: ../header-webbuild.php:87
msgid "&darr; Skip to Main Content"
msgstr "&darr; Salta al contenuto principale"