Fix bug: wrong date displayed by strftime (#178)

This commit is contained in:
Frédéric Guillot 2014-07-26 09:02:30 -04:00
parent 74b59e3111
commit bff39f59a0
12 changed files with 52 additions and 53 deletions

View File

@ -141,7 +141,6 @@ class Translator
if (strtoupper(substr(PHP_OS, 0, 3)) === 'WIN') {
$format = str_replace('%e', '%d', $format);
$format = str_replace('%G', '%Y', $format);
$format = str_replace('%k', '%H', $format);
}

View File

@ -111,7 +111,7 @@ return array(
'Open a task' => 'Öffne eine Aufgabe',
'Do you really want to open this task: "%s"?' => 'Soll diese Aufgabe wirklich wieder geöffnet werden: "%s"?',
'Back to the board' => 'Zurück zur Pinnwand',
'Created on %B %e, %G at %k:%M %p' => 'Erstellt am %d.%m.%Y um %H:%M',
'Created on %B %e, %Y at %k:%M %p' => 'Erstellt am %d.%m.%Y um %H:%M',
'There is nobody assigned' => 'Die Aufgabe wurde niemandem zugewiesen',
'Column on the board:' => 'Spalte:',
'Status is open' => 'Status ist geöffnet',
@ -173,8 +173,8 @@ return array(
'Work in progress' => 'In Arbeit',
'Done' => 'Erledigt',
'Application version:' => 'Version:',
'Completed on %B %e, %G at %k:%M %p' => 'Abgeschlossen am %d.%m.%Y um %H:%M',
'%B %e, %G at %k:%M %p' => '%d.%m.%Y um %H:%M',
'Completed on %B %e, %Y at %k:%M %p' => 'Abgeschlossen am %d.%m.%Y um %H:%M',
'%B %e, %Y at %k:%M %p' => '%d.%m.%Y um %H:%M',
'Date created' => 'Erstellt am',
'Date completed' => 'Abgeschlossen am',
'Id' => 'ID',
@ -220,8 +220,8 @@ return array(
'm/d/Y' => 'd.m.Y', // Date format parsed with php
'month/day/year' => 'TT.MM.JJJJ', // Help shown to the user
'Invalid date' => 'Ungültiges Datum',
'Must be done before %B %e, %G' => 'Muss vor dem %d.%m.%Y erledigt werden',
'%B %e, %G' => '%d.%m.%Y',
'Must be done before %B %e, %Y' => 'Muss vor dem %d.%m.%Y erledigt werden',
'%B %e, %Y' => '%d.%m.%Y',
'Automatic actions' => 'Automatische Aktionen',
'Your automatic action have been created successfully.' => 'Die Automatische Aktion wurde erfolgreich erstellt.',
'Unable to create your automatic action.' => 'Erstellen der automatischen Aktion nicht möglich.',
@ -386,7 +386,7 @@ return array(
'Link my GitHub Account' => 'Mit meinem GitHub Account verbinden',
'Unlink my GitHub Account' => 'Verbindung mit meinem GitHub Account trennen',
'Created by %s' => 'Erstellt durch %s',
'Last modified on %B %e, %G at %k:%M %p' => 'Letzte Änderung am %d.%m.%Y um %H:%M',
'Last modified on %B %e, %Y at %k:%M %p' => 'Letzte Änderung am %d.%m.%Y um %H:%M',
'Tasks Export' => 'Aufgaben exportieren',
'Tasks exportation for "%s"' => 'Aufgaben exportieren für "%s"',
'Start Date' => 'Anfangsdatum',

View File

@ -110,7 +110,7 @@ return array(
'Open a task' => 'Abrir una tarea',
'Do you really want to open this task: "%s"?' => '¿Realmente desea abrir esta tarea: « %s » ?',
'Back to the board' => 'Volver al tablero',
'Created on %B %e, %G at %k:%M %p' => 'Creado el %d/%m/%Y a las %H:%M',
'Created on %B %e, %Y at %k:%M %p' => 'Creado el %d/%m/%Y a las %H:%M',
'There is nobody assigned' => 'No hay nadie asignado a esta tarea',
'Column on the board:' => 'Columna en el tablero: ',
'Status is open' => 'Estado abierto',
@ -172,8 +172,8 @@ return array(
'Work in progress' => 'En curso',
'Done' => 'Terminado',
'Application version:' => 'Versión de la aplicación:',
'Completed on %B %e, %G at %k:%M %p' => 'Completado el %d/%m/%Y a las %H:%M',
'%B %e, %G at %k:%M %p' => '%d/%m/%Y a las %H:%M',
'Completed on %B %e, %Y at %k:%M %p' => 'Completado el %d/%m/%Y a las %H:%M',
'%B %e, %Y at %k:%M %p' => '%d/%m/%Y a las %H:%M',
'Date created' => 'Fecha de creación',
'Date completed' => 'Fecha de terminación',
'Id' => 'Identificador',
@ -219,8 +219,8 @@ return array(
'm/d/Y' => 'd/m/Y', // Date format parsed with php
'month/day/year' => 'día/mes/año', // Help shown to the user
'Invalid date' => 'Fecha no válida',
'Must be done before %B %e, %G' => 'Debe de estar hecho antes del %d/%m/%Y',
'%B %e, %G' => '%d/%m/%Y',
'Must be done before %B %e, %Y' => 'Debe de estar hecho antes del %d/%m/%Y',
'%B %e, %Y' => '%d/%m/%Y',
'Automatic actions' => 'Acciones automatizadas',
'Your automatic action have been created successfully.' => 'La acción automatizada ha sido creada correctamente.',
'Unable to create your automatic action.' => 'No se puede crear esta acción automatizada.',
@ -385,7 +385,7 @@ return array(
// 'Link my GitHub Account' => '',
// 'Unlink my GitHub Account' => '',
// 'Created by %s' => 'Créé par %s',
// 'Last modified on %B %e, %G at %k:%M %p' => '',
// 'Last modified on %B %e, %Y at %k:%M %p' => '',
// 'Tasks Export' => '',
// 'Tasks exportation for "%s"' => '',
// 'Start Date' => '',

View File

@ -110,7 +110,7 @@ return array(
'Open a task' => 'Ouvrir une tâche',
'Do you really want to open this task: "%s"?' => 'Voulez-vous vraiment ouvrir cette tâche : « %s » ?',
'Back to the board' => 'Retour au tableau',
'Created on %B %e, %G at %k:%M %p' => 'Créé le %d/%m/%Y à %H:%M',
'Created on %B %e, %Y at %k:%M %p' => 'Créé le %d/%m/%Y à %H:%M',
'There is nobody assigned' => 'Il n\'y a personne d\'assigné à cette tâche',
'Column on the board:' => 'Colonne sur le tableau : ',
'Status is open' => 'État ouvert',
@ -172,8 +172,8 @@ return array(
'Work in progress' => 'En cours',
'Done' => 'Terminé',
'Application version:' => 'Version de l\'application :',
'Completed on %B %e, %G at %k:%M %p' => 'Terminé le %d/%m/%Y à %H:%M',
'%B %e, %G at %k:%M %p' => '%d/%m/%Y à %H:%M',
'Completed on %B %e, %Y at %k:%M %p' => 'Terminé le %d/%m/%Y à %H:%M',
'%B %e, %Y at %k:%M %p' => '%d/%m/%Y à %H:%M',
'Date created' => 'Date de création',
'Date completed' => 'Date de clôture',
'Id' => 'Identifiant',
@ -219,8 +219,8 @@ return array(
'm/d/Y' => 'd/m/Y', // Date format parsed with php
'month/day/year' => 'jour/mois/année', // Help shown to the user
'Invalid date' => 'Date invalide',
'Must be done before %B %e, %G' => 'Doit être fait avant le %d/%m/%Y',
'%B %e, %G' => '%d/%m/%Y',
'Must be done before %B %e, %Y' => 'Doit être fait avant le %d/%m/%Y',
'%B %e, %Y' => '%d/%m/%Y',
'Automatic actions' => 'Actions automatisées',
'Your automatic action have been created successfully.' => 'Votre action automatisée a été ajouté avec succès.',
'Unable to create your automatic action.' => 'Impossible de créer votre action automatisée.',
@ -383,7 +383,7 @@ return array(
'Link my GitHub Account' => 'Lier mon compte Github',
'Unlink my GitHub Account' => 'Ne plus utiliser mon compte Github',
'Created by %s' => 'Créé par %s',
'Last modified on %B %e, %G at %k:%M %p' => 'Modifié le %d/%m/%Y à %H:%M',
'Last modified on %B %e, %Y at %k:%M %p' => 'Modifié le %d/%m/%Y à %H:%M',
'Tasks Export' => 'Exportation des tâches',
'Tasks exportation for "%s"' => 'Exportation des tâches pour « %s »',
'Start Date' => 'Date de début',

View File

@ -109,7 +109,7 @@ return array(
'Open a task' => 'Otwórz zadanie',
'Do you really want to open this task: "%s"?' => 'Na pewno chcesz otworzyć zadanie: "%s"?',
'Back to the board' => 'Powrót do tablicy',
'Created on %B %e, %G at %k:%M %p' => 'Utworzono dnia %e %B %G o %k:%M',
'Created on %B %e, %Y at %k:%M %p' => 'Utworzono dnia %e %B %Y o %k:%M',
'There is nobody assigned' => 'Nikt nie jest przypisany',
'Column on the board:' => 'Kolumna na tablicy:',
'Status is open' => 'Status otwarty',
@ -171,8 +171,8 @@ return array(
'Work in progress' => 'W trakcie',
'Done' => 'Zakończone',
'Application version:' => 'Wersja aplikacji:',
'Completed on %B %e, %G at %k:%M %p' => 'Zakończono dnia %e %B %G o %k:%M',
'%B %e, %G at %k:%M %p' => '%e %B %G o %k:%M',
'Completed on %B %e, %Y at %k:%M %p' => 'Zakończono dnia %e %B %Y o %k:%M',
'%B %e, %Y at %k:%M %p' => '%e %B %Y o %k:%M',
'Date created' => 'Data utworzenia',
'Date completed' => 'Data zakończenia',
'Id' => 'Ident',
@ -220,8 +220,8 @@ return array(
'm/d/Y' => 'd/m/Y', // Date format parsed with php
'month/day/year' => 'dzień/miesiąc/rok', // Help shown to the user
'Invalid date' => 'Błędna data',
'Must be done before %B %e, %G' => 'Termin do %e %B %G',
'%B %e, %G' => '%e %B %G',
'Must be done before %B %e, %Y' => 'Termin do %e %B %Y',
'%B %e, %Y' => '%e %B %Y',
'Automatic actions' => 'Akcje automatyczne',
'Your automatic action have been created successfully.' => 'Twoja akcja została dodana',
'Unable to create your automatic action.' => 'Nie udało się utworzyć akcji',
@ -386,7 +386,7 @@ return array(
// 'Link my GitHub Account' => '',
// 'Unlink my GitHub Account' => '',
// 'Created by %s' => 'Créé par %s',
// 'Last modified on %B %e, %G at %k:%M %p' => '',
// 'Last modified on %B %e, %Y at %k:%M %p' => '',
// 'Tasks Export' => '',
// 'Tasks exportation for "%s"' => '',
// 'Start Date' => '',

View File

@ -109,7 +109,7 @@ return array(
'Open a task' => 'Abrir uma tarefa',
'Do you really want to open this task: "%s"?' => 'Quer realmente abrir esta tarefa: "%s"?',
'Back to the board' => 'Voltar ao quadro',
'Created on %B %e, %G at %k:%M %p' => 'Criado em %d %B %G às %H:%M',
'Created on %B %e, %Y at %k:%M %p' => 'Criado em %d %B %Y às %H:%M',
'There is nobody assigned' => 'Não há ninguém designado',
'Column on the board:' => 'Coluna no quadro:',
'Status is open' => 'Status está aberto',
@ -171,8 +171,8 @@ return array(
'Work in progress' => 'Em andamento',
'Done' => 'Encerrado',
'Application version:' => 'Versão da aplicação:',
'Completed on %B %e, %G at %k:%M %p' => 'Encerrado em %d %B %G às %H:%M',
'%B %e, %G at %k:%M %p' => '%d %B %G às %H:%M',
'Completed on %B %e, %Y at %k:%M %p' => 'Encerrado em %d %B %Y às %H:%M',
'%B %e, %Y at %k:%M %p' => '%d %B %Y às %H:%M',
'Date created' => 'Data de criação',
'Date completed' => 'Data de encerramento',
'Id' => 'Id',
@ -218,8 +218,8 @@ return array(
'm/d/Y' => 'd/m/Y', // Date format parsed with php
'month/day/year' => 'dia/mês/ano', // Help shown to the user
'Invalid date' => 'Data inválida',
'Must be done before %B %e, %G' => 'Deve ser feito antes de %d %B %G',
'%B %e, %G' => '%d %B %G',
'Must be done before %B %e, %Y' => 'Deve ser feito antes de %d %B %Y',
'%B %e, %Y' => '%d %B %Y',
'Automatic actions' => 'Ações automáticas',
'Your automatic action have been created successfully.' => 'Sua ação automética foi criada com sucesso.',
'Unable to create your automatic action.' => 'Impossível criar sua ação automática.',
@ -383,7 +383,7 @@ return array(
// 'Link my GitHub Account' => '',
// 'Unlink my GitHub Account' => '',
// 'Created by %s' => 'Créé par %s',
// 'Last modified on %B %e, %G at %k:%M %p' => '',
// 'Last modified on %B %e, %Y at %k:%M %p' => '',
// 'Tasks Export' => '',
// 'Tasks exportation for "%s"' => '',
// 'Start Date' => '',

View File

@ -110,7 +110,7 @@ return array(
'Open a task' => 'Öppna en uppgift',
'Do you really want to open this task: "%s"?' => 'Vill du verkligen öppna denna uppgift: "%s"?',
'Back to the board' => 'Tillbaka till tavlan',
'Created on %B %e, %G at %k:%M %p' => 'Skapad %d %B %G kl %H:%M',
'Created on %B %e, %Y at %k:%M %p' => 'Skapad %d %B %Y kl %H:%M',
'There is nobody assigned' => 'Det finns ingen tilldelad',
'Column on the board:' => 'Kolumn på tavlan:',
'Status is open' => 'Statusen är öppen',
@ -172,8 +172,8 @@ return array(
'Work in progress' => 'Pågående',
'Done' => 'Klart',
'Application version:' => 'Version:',
'Completed on %B %e, %G at %k:%M %p' => 'Slutfört %d %B %G kl %H:%M',
'%B %e, %G at %k:%M %p' => '%d %B %G kl %H:%M',
'Completed on %B %e, %Y at %k:%M %p' => 'Slutfört %d %B %Y kl %H:%M',
'%B %e, %Y at %k:%M %p' => '%d %B %Y kl %H:%M',
'Date created' => 'Skapat datum',
'Date completed' => 'Slutfört datum',
'Id' => 'ID',
@ -205,7 +205,7 @@ return array(
'User' => 'Användare',
'Everybody have access to this project.' => 'Alla har tillgång till detta projekt.',
'You are not allowed to access to this project.' => 'Du har inte tillgång till detta projekt.',
'%B %e, %G at %k:%M %p' => '%d %B %G kl %H:%M',
'%B %e, %Y at %k:%M %p' => '%d %B %Y kl %H:%M',
'Comments' => 'Kommentarer',
'Post comment' => 'Ladda upp kommentar',
'Write your text in Markdown' => 'Exempelsyntax för text',
@ -220,8 +220,8 @@ return array(
'm/d/Y' => 'd/m/Y', // Date format parsed with php
'month/day/year' => 'dag/månad/år', // Help shown to the user
'Invalid date' => 'Ej tillåtet datum',
'Must be done before %B %e, %G' => 'Måste vara klart innan %B %e, %G',
'%B %e, %G' => '%d %B %G',
'Must be done before %B %e, %Y' => 'Måste vara klart innan %B %e, %Y',
'%B %e, %Y' => '%d %B %Y',
'Automatic actions' => 'Automatiska åtgärder',
'Your automatic action have been created successfully.' => 'Din automatiska åtgärd har skapats.',
'Unable to create your automatic action.' => 'Kunde inte skapa din automatiska åtgärd.',
@ -385,7 +385,7 @@ return array(
'Link my GitHub Account' => 'Anslut mitt GitHub-konto',
'Unlink my GitHub Account' => 'Koppla ifrån mitt GitHub-konto',
'Created by %s' => 'Skapad av %s',
'Last modified on %B %e, %G at %k:%M %p' => 'Senaste ändring %B %e, %G kl %k:%M %p',
'Last modified on %B %e, %Y at %k:%M %p' => 'Senaste ändring %B %e, %Y kl %k:%M %p',
// 'Tasks Export' => '',
// 'Tasks exportation for "%s"' => '',
// 'Start Date' => '',

View File

@ -113,7 +113,7 @@ return array(
'Open a task' => '开一个项目',
'Do you really want to open this task: "%s"?' => '你确定要开这个项目吗?"%s"',
'Back to the board' => '回到看板',
'Created on %B %e, %G at %k:%M %p' => '在%d/%m/%Y %H:%M创建',
'Created on %B %e, %Y at %k:%M %p' => '在%d/%m/%Y %H:%M创建',
'There is nobody assigned' => '无人负责',
'Column on the board:' => '看板上的栏目:',
'Status is open' => '开放状态',
@ -175,8 +175,8 @@ return array(
'Work in progress' => '工作进行中',
'Done' => '完成',
'Application version:' => '应用程序版本',
'Completed on %B %e, %G at %k:%M %p' => '于%Y年%m月%d日%H时%M分完成',
'%B %e, %G at %k:%M %p' => '%Y年%m月%d日%H时%M分',
'Completed on %B %e, %Y at %k:%M %p' => '于%Y年%m月%d日%H时%M分完成',
'%B %e, %Y at %k:%M %p' => '%Y年%m月%d日%H时%M分',
'Date created' => '创建时间',
'Date completed' => '完成时间',
'Id' => '昵称',
@ -222,8 +222,8 @@ return array(
'm/d/Y' => 'Y/m/d', // Date format parsed with php
'month/day/year' => '年/月/日', // Help shown to the user
'Invalid date' => '无效日期',
'Must be done before %B %e, %G' => '必须在%Y年%m月%d日前完成',
'%B %e, %G' => '%Y/%m/%d',
'Must be done before %B %e, %Y' => '必须在%Y年%m月%d日前完成',
'%B %e, %Y' => '%Y/%m/%d',
'Automatic actions' => '自动行为',
'Add an action' => '添加一个行为',
'Assign automatically a color based on a category' => '基于一个分类自动指派颜色',
@ -391,7 +391,7 @@ return array(
// 'Link my GitHub Account' => '',
// 'Unlink my GitHub Account' => '',
// 'Created by %s' => 'Créé par %s',
// 'Last modified on %B %e, %G at %k:%M %p' => '',
// 'Last modified on %B %e, %Y at %k:%M %p' => '',
// 'Tasks Export' => '',
// 'Tasks exportation for "%s"' => '',
// 'Start Date' => '',

View File

@ -55,7 +55,7 @@
<?php if (! empty($task['date_due'])): ?>
<div class="task-board-date <?= time() > $task['date_due'] ? 'task-board-date-overdue' : '' ?>">
<?= dt('%B %e, %G', $task['date_due']) ?>
<?= dt('%B %e, %Y', $task['date_due']) ?>
</div>
<?php endif ?>

View File

@ -1,7 +1,7 @@
<div class="comment <?= isset($preview) ? 'comment-preview' : '' ?>" id="comment-<?= $comment['id'] ?>">
<p class="comment-title">
<span class="comment-username"><?= Helper\escape($comment['username']) ?></span> @ <span class="comment-date"><?= dt('%B %e, %G at %k:%M %p', $comment['date']) ?></span>
<span class="comment-username"><?= Helper\escape($comment['username']) ?></span> @ <span class="comment-date"><?= dt('%B %e, %Y at %k:%M %p', $comment['date']) ?></span>
</p>
<div class="comment-inner">

View File

@ -5,21 +5,21 @@
<?php endif ?>
<ul>
<li>
<?= dt('Created on %B %e, %G at %k:%M %p', $task['date_creation']) ?>
<?= dt('Created on %B %e, %Y at %k:%M %p', $task['date_creation']) ?>
</li>
<?php if ($task['date_modification']): ?>
<li>
<?= dt('Last modified on %B %e, %G at %k:%M %p', $task['date_modification']) ?>
<?= dt('Last modified on %B %e, %Y at %k:%M %p', $task['date_modification']) ?>
</li>
<?php endif ?>
<?php if ($task['date_completed']): ?>
<li>
<?= dt('Completed on %B %e, %G at %k:%M %p', $task['date_completed']) ?>
<?= dt('Completed on %B %e, %Y at %k:%M %p', $task['date_completed']) ?>
</li>
<?php endif ?>
<?php if ($task['date_due']): ?>
<li>
<strong><?= dt('Must be done before %B %e, %G', $task['date_due']) ?></strong>
<strong><?= dt('Must be done before %B %e, %Y', $task['date_due']) ?></strong>
</li>
<?php endif ?>
<?php if ($task['creator_username']): ?>

View File

@ -32,14 +32,14 @@
<?php endif ?>
</td>
<td>
<?= dt('%B %e, %G', $task['date_due']) ?>
<?= dt('%B %e, %Y', $task['date_due']) ?>
</td>
<td>
<?= dt('%B %e, %G at %k:%M %p', $task['date_creation']) ?>
<?= dt('%B %e, %Y at %k:%M %p', $task['date_creation']) ?>
</td>
<td>
<?php if ($task['date_completed']): ?>
<?= dt('%B %e, %G at %k:%M %p', $task['date_completed']) ?>
<?= dt('%B %e, %Y at %k:%M %p', $task['date_completed']) ?>
<?php endif ?>
</td>
<td>