TimeTrex/tools/i18n/mergelocales.sh

38 lines
771 B
Bash
Raw Permalink Normal View History

2022-12-13 07:10:06 +01:00
#!/usr/bin/php
<?php
/*$License$*/
/*
* File Contributed By: Open Source Consulting, S.A. San Jose, Costa Rica.
* http://osc.co.cr
*/
// Merges new strings from messages.pot into messages.po for all
// locales. Also compiles message.mo file, and calculates stats.
$cwd = getcwd();
$path="../../interface/locale/";
$directory = dir($path);
$invalid_dir = array('CVS' => 1, '..' => 2, '.' => 3);
$locales = array();
$index = 0;
while ($arch = $directory->read())
{
if (!isset($invalid_dir[$arch]) && is_dir($path.$arch)){
$locales[$index] = $arch;
$index ++;
}
}
$directory->close();
asort($locales);
foreach ($locales as $locale){
echo $locale;
$cmd = "./mergelocale.sh $locale";
exec($cmd);
}
exec( "php ./calc_l10n_stats.php" );
?>