User tests: Successful: Unsuccessful:
This adds a command to export language files to a given directory.
The purpose is to create a "backup repository" for language files that are handled on Transifex.
I'm not sure about the structure, so I replicated the one we have in the source code but I could imagine a more "flat" structure, like on Transifex.
The current structure would make it possible to just "copy and paste" the language files over the source code.
Of course this could also be tweaked to export the languages separately and zip the files up - aka "creating language packs"
Trying to test it on VM, but get directory does not exist. Here is the command line I am using:php tracker.php export langfiles -o=/vagrant/logs
How should I specify directory correctly?
Sorry I missed this.. lotsa noise lately ;)
Several things:
First, when specifying parameters using short args, Joomla! does not support the = sign, so it must be:-o /path/to/dir (separated by a space..)
Second, I am using JInput::getPath() here but it seems I don't fully understand it :(
I am not very good with regular expressions, but I believe this regex does not count for a leading slash, so it wont work with UNIX style full paths...
Can someone confirm this ?
Still the same error. Trying:php tracker.php export langfiles -o /vagrant/logs
andphp tracker.php export langfiles -o vagrant/logs
| Status | New | ⇒ | Closed |
| Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2014-02-01 19:40:08 |
| Status | Closed | ⇒ | New |
I get this:
-o vagrant/logs
ERROR: The output directory does not exist.
-o /vagrant/logs
ERROR: Please specify an output directory using 'outputdir' ('o')
If you debug this you will notice that in the second example the value is actually empty :(
Now "hacking" the framework here and putting something like this
$pattern = '/^\/?[A-Za-z0-9_-]+[A-Za-z0-9_\.-]*([\\\\\/][A-Za-z0-9_-]+[A-Za-z0-9_\.-]*)*$/';
in, it works like a charm - so ... what am I missing ?
I also not good in regex :(
OK, here is a workaround - please test again and thanks for your patience ;)
I'll test it tomorrow, going to sleep now :)
Best regards,
Dmitry
----- Reply message -----
From: "Nikolai Plath" notifications@github.com
To: "joomla/jissues" jissues@noreply.github.com
Subject: [jissues] Add command export langfiles (#288)
Date: Sat, Feb 1, 2014 23:27
OK, here is a workaround - please test again and thanks for your patience ;)
—
Reply to this email directly or view it on GitHub.
| Status | New | ⇒ | Closed |
| Closed_Date | 2014-02-01 19:40:08 | ⇒ | 2014-02-02 06:58:17 |
Tested - it works with php tracker.php export langfiles -o /vagrant/logs
Here is a test repo: https://github.com/elkuku/jtracker-g11n
And the first import replacing the Transifex generated language files with our hand crafted: elkuku/jtracker-g11n@f8ae72b