Page MenuHomePhabricator

Special character extract problem of `phabricator/bin/i18n extract`
Closed, DuplicatePublic

Description

When using phabricator/bin/i18n to extract strings from source. If string in pht() contains special characters like \n, \342\234\230 Hidden need manually modify from '\342\234\230 Hidden' to "\342\234\230 Hidden" to make it available.

For example:
phabricator/bin/i18n extract phabricator/src/applications/transactions/controller/
will extract strings as following:

(Skip)
  // phabricator/src/applications/transactions/controller/PhabricatorEditEngineConfigurationLockController.php:78
  '\342\234\230 Hidden' => null,

  // phabricator/src/applications/transactions/controller/PhabricatorEditEngineConfigurationLockController.php:77
  '\360\237\224\222 Locked' => null,

this situation occurs in a lot of description strings.

'  - Configure [[ %s | %s ]] to change the SSH username.\n  - Configure [[ %s | %s ]] to change the SSH host.\n  - Configure [[ %s | %s ]] to change the SSH port.' => null,

will make translate more difficult.