Index: trunk/extensions/Translate/MessageGroups.php |
— | — | @@ -491,6 +491,8 @@ |
492 | 492 | public function getPrefix() { return $this->prefix; } |
493 | 493 | public function setPrefix( $value ) { $this->prefix = $value; } |
494 | 494 | |
| 495 | + public $filePattern = '%CODE%.po'; |
| 496 | + |
495 | 497 | public function getMessageFile( $code ) { |
496 | 498 | if ( $code == 'en' ) { |
497 | 499 | return $this->getPotFile(); |
— | — | @@ -498,10 +500,14 @@ |
499 | 501 | if ( isset( $this->codeMap[$code] ) ) { |
500 | 502 | $code = $this->codeMap[$code]; |
501 | 503 | } |
502 | | - return "$code.po"; |
| 504 | + return $this->replaceVariables( $this->filePattern, $code ); |
503 | 505 | } |
504 | 506 | } |
505 | 507 | |
| 508 | + public function replaceVariables( $string, $code ) { |
| 509 | + return str_replace( '%CODE%', $code, $string ); |
| 510 | + } |
| 511 | + |
506 | 512 | public static function factory( $label, $id ) { |
507 | 513 | $group = new GettextMessageGroup; |
508 | 514 | $group->setLabel( $label ); |