From c02c7d58e96088774cd50edd754da7108be2d862 Mon Sep 17 00:00:00 2001 From: Alexander Ebert Date: Wed, 24 Jul 2013 14:22:27 +0200 Subject: [PATCH] Fixed relative time format --- com.woltlab.wcf/templates/headInclude.tpl | 1 + wcfsetup/install/files/acp/templates/header.tpl | 1 + wcfsetup/install/files/js/WCF.js | 2 +- wcfsetup/install/lang/de.xml | 3 ++- wcfsetup/install/lang/en.xml | 3 ++- 5 files changed, 7 insertions(+), 3 deletions(-) diff --git a/com.woltlab.wcf/templates/headInclude.tpl b/com.woltlab.wcf/templates/headInclude.tpl index 27c576d61f..8f0e5b9439 100644 --- a/com.woltlab.wcf/templates/headInclude.tpl +++ b/com.woltlab.wcf/templates/headInclude.tpl @@ -82,6 +82,7 @@ 'wcf.date.relative.pastDays': '{capture assign=relativePastDays}{lang}wcf.date.relative.pastDays{/lang}{/capture}{@$relativePastDays|encodeJS}', 'wcf.date.dateFormat': '{lang}wcf.date.dateFormat{/lang}', 'wcf.date.dateTimeFormat': '{lang}wcf.date.dateTimeFormat{/lang}', + 'wcf.date.shortDateTimeFormat': '{lang}wcf.date.shortDateTimeFormat{/lang}', 'wcf.date.hour': '{lang}wcf.date.hour{/lang}', 'wcf.date.minute': '{lang}wcf.date.minute{/lang}', 'wcf.date.timeFormat': '{lang}wcf.date.timeFormat{/lang}', diff --git a/wcfsetup/install/files/acp/templates/header.tpl b/wcfsetup/install/files/acp/templates/header.tpl index 6e240d6fd1..2ddb3d63de 100644 --- a/wcfsetup/install/files/acp/templates/header.tpl +++ b/wcfsetup/install/files/acp/templates/header.tpl @@ -53,6 +53,7 @@ 'wcf.date.relative.pastDays': '{capture assign=relativePastDays}{lang}wcf.date.relative.pastDays{/lang}{/capture}{@$relativePastDays|encodeJS}', 'wcf.date.dateFormat': '{lang}wcf.date.dateFormat{/lang}', 'wcf.date.dateTimeFormat': '{lang}wcf.date.dateTimeFormat{/lang}', + 'wcf.date.shortDateTimeFormat': '{lang}wcf.date.shortDateTimeFormat{/lang}', 'wcf.date.hour': '{lang}wcf.date.hour{/lang}', 'wcf.date.minute': '{lang}wcf.date.minute{/lang}', 'wcf.date.timeFormat': '{lang}wcf.date.timeFormat{/lang}', diff --git a/wcfsetup/install/files/js/WCF.js b/wcfsetup/install/files/js/WCF.js index 1df4699399..b66e44fbf2 100755 --- a/wcfsetup/install/files/js/WCF.js +++ b/wcfsetup/install/files/js/WCF.js @@ -2908,7 +2908,7 @@ WCF.Date.Time = Class.extend({ } // timestamp is between ~700 million years BC and last week else { - var $string = WCF.Language.get('wcf.date.dateTimeFormat'); + var $string = WCF.Language.get('wcf.date.shortDateTimeFormat'); $element.text($string.replace(/\%date\%/, $date).replace(/\%time\%/, $time)); } } diff --git a/wcfsetup/install/lang/de.xml b/wcfsetup/install/lang/de.xml index 237a7a4388..cc525e8817 100644 --- a/wcfsetup/install/lang/de.xml +++ b/wcfsetup/install/lang/de.xml @@ -1418,7 +1418,8 @@ Erlaubte Dateiendungen: {', '|implode:$attachmentHandler->getAllowedExtensions() - + + 1}{#$days} Tagen{else}einem Tag{/if}]]> 1}{#$years} Jahren{else}einem Jahr{/if}{/if}{if $months}{if $firstElement != 'months'}{if $lastElement == 'months'} und {else}, {/if}{/if}{if $months > 1}{#$months} Monaten{else}einem Monat{/if}{/if}{if $weeks}{if $firstElement != 'weeks'}{if $lastElement == 'weeks'} und {else}, {/if}{/if}{if $weeks > 1}{#$weeks} Wochen{else}einer Woche{/if}{/if}{if $days}{if $firstElement != 'days'}{if $lastElement == 'days'} und {else}, {/if}{/if}{if $days > 1}{#$days} Tagen{else}einem Tag{/if}{/if}{if $hours}{if $firstElement != 'hours'}{if $lastElement == 'hours'} und {else}, {/if}{/if}{if $hours > 1}{#$hours} Stunden{else}einer Stunde{/if}{/if}{if $minutes}{if $firstElement != 'minutes' && $lastElement == 'minutes'} und {/if}{if $minutes > 1}{#$minutes} Minuten{else}einer Minute{/if}{/if}]]> diff --git a/wcfsetup/install/lang/en.xml b/wcfsetup/install/lang/en.xml index b85ee58438..cadc06f4d9 100644 --- a/wcfsetup/install/lang/en.xml +++ b/wcfsetup/install/lang/en.xml @@ -1416,7 +1416,8 @@ Allowed extensions: {', '|implode:$attachmentHandler->getAllowedExtensions()}]]> - + + 1}{#$days} days{else}A day{/if} ago]]> 1}{#$years} years{else}A year{/if}{/if}{if $months}{if $firstElement != 'months'}{if $firstElement != 'months'}{if $lastElement == 'months'} and {else}, {/if}{/if}{#$months} months{else}{if $firstElement == 'months'}A{else}a{/if} month{/if}{/if}{if $weeks}{if $firstElement != 'weeks'}{if $lastElement == 'weeks'} and {else}, {/if}{/if}{if $weeks > 1}{#$weeks} weeks{else}{if $firstElement == 'weeks'}A{else}a{/if} week{/if}{/if}{if $days}{if $firstElement != 'days'}{if $lastElement == 'days'} and {else}, {/if}{/if}{if $days > 1}{#$days} days{else}{if $firstElement == 'days'}A{else}a{/if} day{/if}{/if}{if $hours}{if $firstElement != 'hours'}{if $lastElement == 'hours'} and {else}, {/if}{/if}{if $hours > 1}{#$hours} hours{else}{if $firstElement == 'hours'}An{else}an{/if} hour{/if}{/if}{if $minutes}{if $firstElement != 'minutes' && $lastElement == 'minutes'} and {/if}{if $minutes > 1}{#$minutes} minutes{else}{if $firstElement == 'minutes'}A{else}a{/if} minute{/if}{/if} ago]]> -- 2.20.1