Changeset 1858:f25143c53d03
- Timestamp:
- 09/14/13 22:24:01 (12 years ago)
- Branch:
- default
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
build-tools/make-l10n.php
r1179 r1858 29 29 echo "l10n file ".$dest.": "; 30 30 31 $l = l10n::getPoFile($f); 32 33 $fcontent = 34 "<?php\n". 35 $license_block. 36 "#\n#\n#\n". 37 "# DOT NOT MODIFY THIS FILE !\n\n\n\n\n"; 38 39 foreach (l10n::getPoFile($f) as $vo => $tr) { 40 $vo = str_replace("'","\\'",$vo); 41 $tr = str_replace("'","\\'",$tr); 42 $fcontent .= '$GLOBALS[\'__l10n\'][\''.$vo.'\'] = \''.$tr.'\';'."\n"; 43 } 44 45 $fcontent .= "?>"; 46 47 echo $dest.' : '; 48 if (($fp = fopen($dest,'w')) !== false) { 49 fwrite($fp,$fcontent,strlen($fcontent)); 50 fclose($fp); 31 if (l10n::generatePhpFileFromPo(dirname($f).'/'.basename($f,'.po'))) { 51 32 echo 'OK'; 52 33 } else {
Note: See TracChangeset
for help on using the changeset viewer.