icingaweb2/bin/refresh-translations.php

32 lines
628 B
PHP
Raw Normal View History

2013-06-03 17:05:59 +02:00
#!/usr/bin/php
<?php
// {{{ICINGA_LICENSE_HEADER}}}
// {{{ICINGA_LICENSE_HEADER}}}
2013-06-03 17:05:59 +02:00
require_once dirname(__FILE__) . '/../library/Icinga/Application/Cli.php';
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();