https://github.com/phacility/translatewiki
Phabricator/Translatewiki Bindings
https://github.com/phacility/translatewiki
Last synced: 9 months ago
JSON representation
Phabricator/Translatewiki Bindings
- Host: GitHub
- URL: https://github.com/phacility/translatewiki
- Owner: phacility
- Created: 2016-11-07T15:10:11.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2016-11-23T19:48:09.000Z (about 9 years ago)
- Last Synced: 2025-04-12T03:14:58.546Z (9 months ago)
- Language: PHP
- Size: 2.91 MB
- Stars: 7
- Watchers: 4
- Forks: 9
- Open Issues: 0
-
Metadata Files:
- Readme: README
Awesome Lists containing this project
README
Utilities for importing and exporting translation strings between phutil
libraries (including Phabricator) and Translatewiki.
Setup
=====
Install Phabricator, then check this out next to it. Your directory should look
like this:
```
$ ls
arcanist/
libphutil/
phabricator/
translatewiki/
```
Exporting Strings
=================
This repository already has exported data, so you can just use the files
located in `projects/` if you don't need to regenerate up-to-date strings.
To export up-to-date strings from Phabricator, run:
```
$ ./bin/translatewiki export path/to/phabricator/src/ --project phabricator
```
This will update `projects/phabricator/en.json` and related files.
Generating Translations
=======================
If you have a translated string file and want to convert it into a form that
Phabricator can read, do this:
```
$ ./bin/translatewiki generate \
--source path/to/your/strings.json \
--class YourLanguageTranslation \
--locale xx_YY \
--project phabricator \
--out path/to/YourLanguageTranslation.php
```
This will write a translation file to `path/to/YourLanguageTranslation.php`
that Phabricator can read.