#921: Create new privacy policy page, link to it and replace the old pages
[cacert-devel.git] / locale / make.php
1 #!/usr/bin/php -q
2 <?
3 $lang = array( "bg" => "bg_BG", "da" => "da_DK", "de" => "de_DE", "es" => "es_ES",
4 "fr" => "fr_FR", "fi" => "fi_FI", "he" => "he_IL", "hr" => "hr_HR",
5 "hu" => "hu_HU", "it" => "it_IT", "ja" => "ja_JP", "nl" => "nl_NL",
6 "pt" => "pt_PT", "ro" => "ro_RO", "ru" => "ru_RU", "fa" => "fa_IR",
7 "sv" => "sv_SE", "tr" => "tr_TR", "zh" => "zh_CN", "ar" => "ar_SY",
8 "el" => "el_GR", "tl" => "tl_PH", "pl" => "pl_PL", "cs" => "cs_CZ",
9 "ka" => "ka_GE", "is" => "is_IS", "ko" => "ko_KR", "nb" => "nb_NO");
10
11 if($argc > 1)
12 {
13 foreach($argv as $key)
14 {
15 $val = $lang[$key];
16 if($val != "")
17 {
18 $do = `wget -O $key.po "http://translingo.cacert.org/export2.php?pid=1&editlanguage=$val" 2>&1`;
19 echo $do;
20 echo `mkdir -p $key/LC_MESSAGES/`;
21 $do = `msgfmt -o $key/LC_MESSAGES/messages.mo $key.po 2>&1`;
22 echo $do;
23 }
24 }
25 } else {
26 foreach($lang as $key => $val)
27 {
28 $do = `wget -O $key.po "http://translingo.cacert.org/export2.php?pid=1&editlanguage=$val" 2>&1`;
29 echo $do;
30 echo `mkdir -p $key/LC_MESSAGES/`;
31 $do = `msgfmt -o $key/LC_MESSAGES/messages.mo $key.po 2>&1`;
32 echo $do;
33 }
34 }
35 ?>