Skip to content

Commit

Permalink
initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
roborourke committed Aug 14, 2017
0 parents commit 51c5423
Show file tree
Hide file tree
Showing 8 changed files with 662 additions and 0 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/vendor/
57 changes: 57 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
Modern Translation File Generator for WordPress
===============================================

Previously WordPress developers needed to use `makepot.php` to generate .po files
necessary for translation.

This updated WP CLI command allows you to generate files


[--type=<string>]
: The output file type.
---
default: po
options:
- csv
- csvdict
- json
- jsondict
- mo
- php
- po
- jed
- xliff
- yaml
- yamldict
---

[--locale=<string>]
: The language the original strings are in.
---
default: en_US
---
*
[--locales=<array>]
: A list of comma separated locale codes to generate translation ready files for.
Alternatively can be a text file containing locales on separate lines.
---
default: en_US
---
*
[--domain=<string>]
: The text domain to extract strings for.
---
default: 'default'
---
*
[--extract-from=<string>]
: The path to extract from, defaults to the entire wp-content directory.
Defaults to WP_CONTENT_DIR
*
[--extract-to=<string>]
: The full or relative path to a directory to save files to.
Defaults to a directory in languages folder named after the textdomain.
eg. WP_CONTENT_DIR . '/languages/default/'
*
[--verbose]
: Verbose logging output.
15 changes: 15 additions & 0 deletions composer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"name": "roborourke/wp-l10n-gen",
"description": "Modern translation file generator for WordPress",
"type": "project",
"require": {
"gettext/gettext": "^4.4"
},
"license": "GPL-3.0",
"authors": [
{
"name": "Robert O'Rourke",
"email": "[email protected]"
}
]
}
141 changes: 141 additions & 0 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 51c5423

Please sign in to comment.