Page MenuHomePhabricator

Add missing Translations
Closed, DuplicatePublic

Description

Trying to translate Phabricator into German I found a few string that are not translatable:

Dates

Dates in very many locations aren't translatable:

  • Relative dates like Today in Feed (Dashboard and app) see: phabricator_relative_date returns a not translated string
  • Calendar:
    • Months (Full Name)
    • Days in the Day View (left)
    • Also Dates in the Day View
    • All Days in the calendar Preview of Conpherence (Preview removed, see T8834)
    • not missing, but Event generation uses %s created %s in Feed, while the most apps use %s created %s.

Image Preview

  • the Image Preview is generated by java code and therefore can't be translated. (Image # of #) see: webroot/rsrc/js/core/behavior-lightbox-attachments.js, line 136

Date Picker

(also java)

  • The Day Chars and Months should be translatable (like pht('SMTWTFS') also if 2 chars per Day were supported would be good. It is more common in some languages)

Batch Editor

  • The status of the Batch Editor is not translatable. (Shift-Click to Select Tasks, # Selected Tasks)

Missing pht()

  • src/applications/maniphest/controller/ManiphestTaskDetailController.php:93 'Created a subtask of <strong>%s</strong>.'

Bad pht-Strings

  • Some pht-strings include word wraps in the source file
  • Cases in languages:

%s changed the visibility of this %s from "%s" to "%s".
•src/applications/transactions/storage/PhabricatorApplicationTransaction.php

%s changed the edit policy of this %s from "%s" to "%s".
•src/applications/transactions/storage/PhabricatorApplicationTransaction.php

This will work fine in English, but won't work well in other languages.

German:
...the visibility of this Maniphest Task... > ... die Sichtbarkeit dieser Maniphest Aufgabe...
...the visibility of this Event... > ...die Sichtbarkeit dieses Termins...

To avoid these issues, provide complete sentences for translation. This almost always takes the form of writing out alternatives in full.

Solution can be:

  • use a different pht String for each case
  • allow someting like:
'%s changed the visibility of this %s={Maniphest Task} from "%s" to "%s".' => '...',
'%s changed the visibility of this %s={Event} from "%s" to "%s".' => '...(something else)'

search result of grep -r "this %s":

src/applications/auth/controller/PhabricatorAuthConfirmLinkController.php: 'Confirm the link with this %s account. This account will be '.
src/applications/flag/controller/PhabricatorFlagEditController.php: 'You can flag this %s if you want to remember to look '.
src/applications/transactions/storage/PhabricatorApplicationTransaction.php: 'All users are already subscribed to this %s.',
src/applications/transactions/storage/PhabricatorApplicationTransaction.php: '%s changed the visibility of this %s from "%s" to "%s".',
src/applications/transactions/storage/PhabricatorApplicationTransaction.php: '%s changed the edit policy of this %s from "%s" to "%s".',
src/applications/transactions/storage/PhabricatorApplicationTransaction.php: '%s changed the join policy of this %s from "%s" to "%s".',
src/applications/transactions/storage/PhabricatorApplicationTransaction.php: '%s edited this %s.',
src/applications/transactions/editor/PhabricatorApplicationTransactionEditor.php: 'You can not select this %s policy, because you would no longer '.

Event Timeline

aHa raised the priority of this task from to Needs Triage.
aHa updated the task description. (Show Details)
aHa added a project: Localization.
aHa added a subscriber: aHa.

I wrote a gettext translator plugin for Phabricator (you can take a look here):

https://github.com/schlaile

Probably you can use my message catalog (I managed to translate roughly 22% of all strings):

https://github.com/schlaile/phabricator/blob/master/resources/internationalization/po/de.po

It's in gettext format, but shouldn't be too hard to convert to php arrays and might spare you some boring hours translating the strings...

Regards,
Peter

I would note that Calendar is a prototype, and probably shouldn't be on this list (as we don't consider apps "production-ready" as a prototype). https://secure.phabricator.com/book/phabricator/article/prototypes/

Extended Task to include Batch Editor

I'm going to merge this into T5267, which discusses a larger-scale effort to translate Phabricator in the relatively near term. We'll be interested in feedback like this once that's a little further along.