@@ -35,7 +35,7 @@ public function export_headers()
35
35
}
36
36
$ poified = PO ::poify ($ header_string );
37
37
if ($ this ->comments_before_headers )
38
- $ before_headers = $ this -> prepend_each_line (rtrim ($ this ->comments_before_headers )."\n" , '# ' );
38
+ $ before_headers = PO :: prepend_each_line (rtrim ($ this ->comments_before_headers )."\n" , '# ' );
39
39
else
40
40
$ before_headers = '' ;
41
41
@@ -189,11 +189,11 @@ public static function prepend_each_line($string, $with)
189
189
* @param string $char character to denote a special PO comment,
190
190
* like :, default is a space
191
191
*/
192
- private function comment_block ($ text , $ char =' ' )
192
+ private static function comment_block ($ text , $ char =' ' )
193
193
{
194
- $ text = wordwrap ($ text , PO ::MAX_LINE_LEN - 3 );
194
+ $ text = wordwrap ($ text , self ::MAX_LINE_LEN - 3 );
195
195
196
- return PO ::prepend_each_line ($ text , "# $ char " );
196
+ return self ::prepend_each_line ($ text , "# $ char " );
197
197
}
198
198
199
199
/**
@@ -207,20 +207,20 @@ public static function export_entry(&$entry)
207
207
{
208
208
if (is_null ($ entry ->singular )) return false ;
209
209
$ po = array ();
210
- if (!empty ($ entry ->translator_comments )) $ po [] = PO ::comment_block ($ entry ->translator_comments );
211
- if (!empty ($ entry ->extracted_comments )) $ po [] = PO ::comment_block ($ entry ->extracted_comments , '. ' );
212
- if (!empty ($ entry ->references )) $ po [] = PO ::comment_block (implode (' ' , $ entry ->references ), ': ' );
213
- if (!empty ($ entry ->flags )) $ po [] = PO ::comment_block (implode (", " , $ entry ->flags ), ', ' );
214
- if (!is_null ($ entry ->context )) $ po [] = 'msgctxt ' .PO ::poify ($ entry ->context );
215
- $ po [] = 'msgid ' .PO ::poify ($ entry ->singular );
210
+ if (!empty ($ entry ->translator_comments )) $ po [] = self ::comment_block ($ entry ->translator_comments );
211
+ if (!empty ($ entry ->extracted_comments )) $ po [] = self ::comment_block ($ entry ->extracted_comments , '. ' );
212
+ if (!empty ($ entry ->references )) $ po [] = self ::comment_block (implode (' ' , $ entry ->references ), ': ' );
213
+ if (!empty ($ entry ->flags )) $ po [] = self ::comment_block (implode (", " , $ entry ->flags ), ', ' );
214
+ if (!is_null ($ entry ->context )) $ po [] = 'msgctxt ' .self ::poify ($ entry ->context );
215
+ $ po [] = 'msgid ' .self ::poify ($ entry ->singular );
216
216
if (!$ entry ->is_plural ) {
217
217
$ translation = empty ($ entry ->translations )? '' : $ entry ->translations [0 ];
218
- $ po [] = 'msgstr ' .PO ::poify ($ translation );
218
+ $ po [] = 'msgstr ' .self ::poify ($ translation );
219
219
} else {
220
- $ po [] = 'msgid_plural ' .PO ::poify ($ entry ->plural );
220
+ $ po [] = 'msgid_plural ' .self ::poify ($ entry ->plural );
221
221
$ translations = empty ($ entry ->translations )? array ('' , '' ) : $ entry ->translations ;
222
222
foreach ($ translations as $ i => $ translation ) {
223
- $ po [] = "msgstr[ $ i] " .PO ::poify ($ translation );
223
+ $ po [] = "msgstr[ $ i] " .self ::poify ($ translation );
224
224
}
225
225
}
226
226
@@ -359,7 +359,7 @@ public function read_entry($f, $lineno = 0)
359
359
return array ('entry ' => $ entry , 'lineno ' => $ lineno );
360
360
}
361
361
362
- public function read_line ($ f , $ action = 'read ' )
362
+ public static function read_line ($ f , $ action = 'read ' )
363
363
{
364
364
static $ last_line = '' ;
365
365
static $ use_last_line = false ;
0 commit comments