language Success

User tests: Successful: Unsuccessful:

avatar elkuku
elkuku
23 Jan 2014

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" ? ?

avatar elkuku elkuku - open - 23 Jan 2014
avatar elkuku
elkuku - comment - 23 Jan 2014

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

avatar b2z
b2z - comment - 30 Jan 2014

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?

avatar elkuku
elkuku - comment - 1 Feb 2014

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 ?

avatar b2z
b2z - comment - 1 Feb 2014

Still the same error. Trying:
php tracker.php export langfiles -o /vagrant/logs
and
php tracker.php export langfiles -o vagrant/logs

avatar b2z b2z - change - 1 Feb 2014
Status New Closed
Closed_Date 0000-00-00 00:00:00 2014-02-01 19:40:08
avatar b2z b2z - close - 1 Feb 2014
avatar b2z b2z - close - 1 Feb 2014
avatar b2z b2z - change - 1 Feb 2014
Status Closed New
avatar b2z b2z - reopen - 1 Feb 2014
avatar b2z b2z - reopen - 1 Feb 2014
avatar elkuku
elkuku - comment - 1 Feb 2014

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 ?

avatar b2z
b2z - comment - 1 Feb 2014

I also not good in regex :(

avatar elkuku
elkuku - comment - 1 Feb 2014

OK, here is a workaround - please test again and thanks for your patience ;)

avatar b2z
b2z - comment - 1 Feb 2014

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.

avatar b2z b2z - close - 2 Feb 2014
avatar b2z b2z - reference | - 2 Feb 14
avatar b2z b2z - merge - 2 Feb 2014
avatar b2z b2z - close - 2 Feb 2014
avatar b2z b2z - change - 2 Feb 2014
Status New Closed
Closed_Date 2014-02-01 19:40:08 2014-02-02 06:58:17
avatar b2z
b2z - comment - 2 Feb 2014

Tested - it works with php tracker.php export langfiles -o /vagrant/logs

avatar elkuku elkuku - head_ref_deleted - 22 Jul 2014

Add a Comment

Login with GitHub to post a comment