2013-06-03 17:05:59 +02:00
|
|
|
#!/usr/bin/php
|
|
|
|
<?php
|
2013-06-07 13:29:11 +02:00
|
|
|
// {{{ICINGA_LICENSE_HEADER}}}
|
|
|
|
// {{{ICINGA_LICENSE_HEADER}}}
|
2013-06-03 17:05:59 +02:00
|
|
|
|
|
|
|
require_once dirname(__FILE__) . '/../library/Icinga/Application/Cli.php';
|
2013-06-07 13:29:11 +02:00
|
|
|
|
|
|
|
use Icinga\Application\Cli;
|
|
|
|
use Icinga\Application\TranslationHelper;
|
|
|
|
|
2013-06-03 17:05:59 +02:00
|
|
|
$bootstrap = Cli::start();
|
|
|
|
|
|
|
|
if (count($argv) < 2) {
|
|
|
|
die(sprintf(
|
|
|
|
"Usage: ./%s lc_LC [module]\n",
|
|
|
|
basename($argv[0])
|
|
|
|
));
|
|
|
|
}
|
|
|
|
|
|
|
|
$locale = $argv[1];
|
|
|
|
if (array_key_exists(2, $argv)) {
|
|
|
|
$module = $argv[2];
|
|
|
|
} else {
|
|
|
|
$module = null;
|
|
|
|
}
|
|
|
|
|
|
|
|
$translation = new TranslationHelper($bootstrap, $locale, $module);
|
|
|
|
$translation->createTemporaryFileList()
|
|
|
|
->extractTexts();
|
|
|
|
|
|
|
|
|