root/modules/branches/2.9/languagestatus/functions.inc.php

Revision 11827, 1.1 kB (checked in by mickecarlsson, 2 years ago)

New module, need more work, uploaded so that I have it on another place than my virtualmachine, will add feature for wikiformatting

Line 
1 <?php
2 // Copyright (C) 2011 Mikael Carlsson (mickecarlsson at gmail dot com)
3 //
4 // This program is free software; you can redistribute it and/or
5 // modify it under the terms of the GNU General Public License
6 // as published by the Free Software Foundation, version 2
7 // of the License.
8 //
9 // This program is distributed in the hope that it will be useful,
10 // but WITHOUT ANY WARRANTY; without even the implied warranty of
11 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12 // GNU General Public License for more details.
13
14 // This function calls msgattrib twice, once for getting the total strings in the .pot file
15 // and once for getting the translated strings in the .po fro the module
16 function check_translate_status($language_path, $language, $module)
17 {
18 $totalmsgcmd        = "msgattrib --stringtable-output ".$language_path.$module.".pot | grep \"^\\\"\" | wc -l";
19 $translatedmsgcmd   = "msgattrib --stringtable-output --translated ".$language_path.$language."/LC_MESSAGES/".$module.".po | grep \"^\\\"\" | wc -l";
20 exec($totalmsgcmd, $total);
21 exec($translatedmsgcmd, $total);
22 return($total);
23 }
24 ?>
25
Note: See TracBrowser for help on using the browser.