Dates localization
This commit is contained in:
parent
b7ff480e17
commit
d0a46ee8ab
17 changed files with 35 additions and 106 deletions
|
|
@ -32,8 +32,8 @@
|
|||
|
||||
<tr>
|
||||
<th><?php Lang::out('duration'); ?></th>
|
||||
<td style="text-align: right" class="build-duration duration" data-duration="<?php print $build->getDuration(); ?>">
|
||||
|
||||
<td style="text-align: right" class="build-duration duration">
|
||||
<?php print $build->getDuration(); ?> <?= Lang::get('seconds'); ?>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
|
@ -89,20 +89,22 @@
|
|||
<table class="table">
|
||||
<tr>
|
||||
<th><?php Lang::out('created'); ?></th>
|
||||
<td style="text-align: right" class="build-created datetime" data-date="<?php print $build->getCreated() ? $build->getCreated()->format('Y-m-d H:i:s') : ''; ?>">
|
||||
<td style="text-align: right" class="build-created datetime">
|
||||
<?php print $build->getCreated() ? $build->getCreated()->format('Y-m-d H:i:s') : ''; ?>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<th><?php Lang::out('started'); ?></th>
|
||||
<td style="text-align: right" class="build-started datetime" data-date="<?php print $build->getStarted() ? $build->getStarted()->format('Y-m-d H:i:s') : ''; ?>">
|
||||
<td style="text-align: right" class="build-started datetime">
|
||||
<?php print $build->getStarted() ? $build->getStarted()->format('Y-m-d H:i:s') : ''; ?>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<th><?php Lang::out('finished'); ?></th>
|
||||
<td style="text-align: right" class="build-finished datetime" data-date="<?php print $build->getFinished() ? $build->getFinished()->format('Y-m-d H:i:s') : ''; ?>">
|
||||
|
||||
<td style="text-align: right" class="build-finished datetime">
|
||||
<?php print $build->getFinished() ? $build->getFinished()->format('Y-m-d H:i:s') : ''; ?>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
|
@ -170,7 +172,7 @@
|
|||
|
||||
<?php
|
||||
foreach ($plugins as $plugin) {
|
||||
print '<script src="'.APP_URL.'assets/js/build-plugins/' . $plugin . '"></script>' . PHP_EOL;
|
||||
print '<script src="' . APP_URL . 'assets/js/build-plugins/' . $plugin . '"></script>' . PHP_EOL;
|
||||
}
|
||||
?>
|
||||
|
||||
|
|
|
|||
|
|
@ -18,7 +18,6 @@
|
|||
<script src="<?php print APP_URL; ?>assets/vendor/admin-lte/plugins/jQuery/jquery-2.2.3.min.js"></script>
|
||||
<script src="<?php print APP_URL; ?>assets/js/class.js"></script>
|
||||
<script src="<?php print APP_URL; ?>assets/vendor/sprintf-js/dist/sprintf.min.js"></script>
|
||||
<script src="<?php print APP_URL; ?>assets/vendor/moment/min/moment-with-locales.min.js"></script>
|
||||
<script src="<?php print APP_URL; ?>assets/js/app.js" type="text/javascript"></script>
|
||||
</head>
|
||||
<body class="hold-transition skin-black layout-top-nav">
|
||||
|
|
|
|||
|
|
@ -39,12 +39,12 @@ if (count($builds)) {
|
|||
break;
|
||||
case 2:
|
||||
$statuses[] = 'ok';
|
||||
$success = is_null($success) && !is_null($build->getFinished()) ? Lang::formatDateTime($build->getFinished()) : $success;
|
||||
$success = is_null($success) && !is_null($build->getFinished()) ? $build->getFinished()->format('Y-m-d H:i:s') : $success;
|
||||
break;
|
||||
case 3:
|
||||
$failures++;
|
||||
$statuses[] = 'failed';
|
||||
$failure = is_null($failure) && !is_null($build->getFinished()) ? Lang::formatDateTime($build->getFinished()) : $failure;
|
||||
$failure = is_null($failure) && !is_null($build->getFinished()) ? $build->getFinished()->format('Y-m-d H:i:s') : $failure;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
@ -62,7 +62,7 @@ if ($buildCount > 0) {
|
|||
$message = Lang::get('x_of_x_failed', $failures, $buildCount);
|
||||
|
||||
if (!is_null($lastSuccess) && !is_null($lastSuccess->getFinished())) {
|
||||
$message .= Lang::get('last_successful_build', Lang::formatDateTime($lastSuccess->getFinished()));
|
||||
$message .= Lang::get('last_successful_build', $lastSuccess->getFinished()->format('Y-m-d H:i:s'));
|
||||
} else {
|
||||
$message .= Lang::get('never_built_successfully');
|
||||
}
|
||||
|
|
@ -71,7 +71,7 @@ if ($buildCount > 0) {
|
|||
$shortMessage = Lang::get('all_builds_passed_short', $buildCount, $buildCount);
|
||||
|
||||
if (!is_null($lastFailure) && !is_null($lastFailure->getFinished())) {
|
||||
$message .= Lang::get('last_failed_build', Lang::formatDateTime($lastFailure->getFinished()));
|
||||
$message .= Lang::get('last_failed_build', $lastFailure->getFinished()->format('Y-m-d H:i:s'));
|
||||
} else {
|
||||
$message .= Lang::get('never_failed_build');
|
||||
}
|
||||
|
|
|
|||
|
|
@ -38,7 +38,7 @@
|
|||
?>
|
||||
<li class="time-label">
|
||||
<span class="bg-gray">
|
||||
<?php print Lang::formatDateTime($last, 'll'); ?>
|
||||
<?= $last->format('Y-m-d'); ?>
|
||||
</span>
|
||||
</li>
|
||||
<?php endif; ?>
|
||||
|
|
@ -48,7 +48,7 @@
|
|||
<li>
|
||||
<i class="fa fa-<?php print $build->getProject()->getIcon(); ?> bg-<?php print $color; ?>"></i>
|
||||
<div class="timeline-item">
|
||||
<span class="time"><i class="fa fa-clock-o"></i> <?php print Lang::formatDateTime($updated, 'LT'); ?></span>
|
||||
<span class="time"><i class="fa fa-clock-o"></i> <?= $updated->format('H:i:s'); ?></span>
|
||||
<h3 class="timeline-header">
|
||||
<a href="<?php print APP_URL; ?>project/view/<?php print $build->getProjectId(); ?>">
|
||||
<?php print $build->getProject()->getTitle(); ?>
|
||||
|
|
|
|||
|
|
@ -40,12 +40,12 @@ foreach($projects as $project):
|
|||
break;
|
||||
case 2:
|
||||
$statuses[] = 'ok';
|
||||
$success = is_null($success) && !is_null($build->getFinished()) ? Lang::formatDateTime($build->getFinished()) : $success;
|
||||
$success = is_null($success) && !is_null($build->getFinished()) ? $build->getFinished()->format('Y-m-d H:i:s') : $success;
|
||||
break;
|
||||
case 3:
|
||||
$failures++;
|
||||
$statuses[] = 'failed';
|
||||
$failure = is_null($failure) && !is_null($build->getFinished()) ? Lang::formatDateTime($build->getFinished()) : $failure;
|
||||
$failure = is_null($failure) && !is_null($build->getFinished()) ? $build->getFinished()->format('Y-m-d H:i:s') : $failure;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
@ -63,7 +63,7 @@ foreach($projects as $project):
|
|||
$message = Lang::get('x_of_x_failed', $failures, $buildCount);
|
||||
|
||||
if (!is_null($lastSuccess) && !is_null($lastSuccess->getFinished())) {
|
||||
$message .= Lang::get('last_successful_build', Lang::formatDateTime($lastSuccess->getFinished()));
|
||||
$message .= Lang::get('last_successful_build', $lastSuccess->getFinished()->format('Y-m-d H:i:s'));
|
||||
} else {
|
||||
$message .= Lang::get('never_built_successfully');
|
||||
}
|
||||
|
|
@ -72,7 +72,7 @@ foreach($projects as $project):
|
|||
$shortMessage = Lang::get('all_builds_passed_short', $buildCount, $buildCount);
|
||||
|
||||
if (!is_null($lastFailure) && !is_null($lastFailure->getFinished())) {
|
||||
$message .= Lang::get('last_failed_build', Lang::formatDateTime($lastFailure->getFinished()));
|
||||
$message .= Lang::get('last_failed_build', $lastFailure->getFinished()->format('Y-m-d H:i:s'));
|
||||
} else {
|
||||
$message .= Lang::get('never_failed_build');
|
||||
}
|
||||
|
|
|
|||
|
|
@ -64,7 +64,7 @@
|
|||
?>
|
||||
<li class="time-label">
|
||||
<span class="bg-gray">
|
||||
<?php print Lang::formatDateTime($last, 'll'); ?>
|
||||
<?= $last->format('Y-m-d'); ?>
|
||||
</span>
|
||||
</li>
|
||||
<?php endif; ?>
|
||||
|
|
@ -74,7 +74,7 @@
|
|||
<li>
|
||||
<i class="fa fa-<?php print $build->getProject()->getIcon(); ?> bg-<?php print $color; ?>"></i>
|
||||
<div class="timeline-item">
|
||||
<span class="time"><i class="fa fa-clock-o"></i> <?php print Lang::formatDateTime($updated, 'LT'); ?></span>
|
||||
<span class="time"><i class="fa fa-clock-o"></i> <?= $updated->format('H:i:s'); ?></span>
|
||||
<h3 class="timeline-header">
|
||||
<a href="<?php print APP_URL; ?>project/view/<?php print $build->getProjectId(); ?>">
|
||||
<?php print $build->getProject()->getTitle(); ?>
|
||||
|
|
|
|||
|
|
@ -30,7 +30,6 @@
|
|||
<script src="<?php print APP_URL; ?>assets/vendor/admin-lte/plugins/jQuery/jquery-2.2.3.min.js"></script>
|
||||
<script src="<?php print APP_URL; ?>assets/js/class.js"></script>
|
||||
<script src="<?php print APP_URL; ?>assets/vendor/sprintf-js/dist/sprintf.min.js"></script>
|
||||
<script src="<?php print APP_URL; ?>assets/vendor/moment/min/moment-with-locales.min.js"></script>
|
||||
<script src="<?php print APP_URL; ?>assets/js/app.js" type="text/javascript"></script>
|
||||
|
||||
</head>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue