Translation in Calendar

#1

Observed Behavior:
Translation of the shortcuts of the month names do not work.
Like "Mar": "Mär".

Expected Behavior:
What Phabricator should be doing.
Phabricator should be provide a Translation.
Solution:
See: https://github.com/phacility/phabricator/blob/master/src/applications/calendar/query/PhabricatorCalendarEventSearchEngine.php#L401

I Fixed it with:

// i18n:
$month = pht($from->format('F'));
$year = $from->format('Y');
$monthyear = "$month $year";

$crumbs = array();
$crumbs[] = id(new PHUICrumbView())
  ->setName($monthyear);

$header = id(new PHUIHeaderView())
  ->setProfileHeader(true)
  ->setHeader($monthyear);

Phabricator Version:
Master

Reproduction Steps:

  • Create a translation json`mytrans.json
  • add { "Mar": "Mär" }
  • load the translation with commandline ./bin/config set "translation.override" --stdin < mytrans.json .
  • go to calendar the translation has no effect.
#2

Also in https://github.com/phacility/phabricator/blob/master/src/view/phui/calendar/PHUICalendarWeekView.php#L114

Fixed with $title = pht($box_start_time->format('l'));