@recaptime-dev's working patches + fork for Phorge, a community fork of Phabricator. (Upstream dev and stable branches are at upstream/main and upstream/stable respectively.) hq.recaptime.dev/wiki/Phorge
phorge phabricator
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Revert "Revert "Mark date and time format translatable""

This reverts commit 24a025becbf6780389d24b0a8bccb4ad68317c45.

+6 -6
+6 -6
src/view/viewutils.php
··· 54 54 return phabricator_format_local_time( 55 55 $epoch, 56 56 $user, 57 - 'g:i A'); 57 + pht('g:i A')); 58 58 } 59 59 60 - function phabricator_datetime($epoch, $user) { 60 + function phabricator_datetime($epoch, $user) { 61 61 return phabricator_format_local_time( 62 62 $epoch, 63 63 $user, 64 - _phabricator_date_format($epoch).', g:i A'); 64 + pht('%s, g:i A', _phabricator_date_format($epoch))); 65 65 } 66 66 67 67 function _phabricator_date_format($epoch) { 68 - $format = 'M j Y'; 68 + $format = pht('M j Y'); 69 69 $now = time(); 70 70 if ($epoch <= $now && $epoch > $now - 30 * 24 * 60 * 60) { 71 - $format = 'D, M j'; 71 + $format = pht('D, M j'); 72 72 } 73 73 return $format; 74 74 } ··· 115 115 116 116 $date->setTimeZone($zone); 117 117 118 - return $date->format($format); 118 + return PhutilTranslator::getInstance()->translateDate($format, $date); 119 119 } 120 120 121 121 function phabricator_format_relative_time($duration) {