r113756 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r113755‎ | r113756 | r113757 >
Date:20:16, 13 March 2012
Author:siebrand
Status:resolved (Comments)
Tags:i18nreview 
Comment:
Follow-up r113594: Update export.php so that when using gettext post processing switch ppgettext, definitionFile is no longer required.
Modified paths:
  • /trunk/extensions/Translate/scripts/export.php (modified) (history)
  • /trunk/translatewiki/Mwlib/Mwlibrl.yaml (modified) (history)

Diff [purge]

Index: trunk/translatewiki/Mwlib/Mwlibrl.yaml
@@ -10,7 +10,6 @@
1111 FILES:
1212 class: GettextFFS
1313 sourcePattern: %GROUPROOT%/mwlib.rl/mwlib/rl/locale/%CODE%/LC_MESSAGES/mwlib.rl.po
14 - definitionFile: %GROUPROOT%/mwlib.rl/mwlib/rl/locale/en/LC_MESSAGES/mwlib.rl.po
1514 targetPattern: mwlib.rl/mwlib/rl/locale/%CODE%/LC_MESSAGES/mwlib.rl.po
1615 codeMap:
1716 pt-br: pt_BR
Index: trunk/extensions/Translate/scripts/export.php
@@ -28,8 +28,8 @@
2929 --help This help message
3030 --threshold Do not export under this percentage translated
3131 --ppgettext Group root path for checkout of product. "msgmerge" will post
32 - process on the export result based on the current definitionFile
33 - in that location
 32+ process on the export result based on the current source file
 33+ in that location (from sourcePattern or definitionFile)
3434 --no-location Only used combined with "ppgettext". This option will rebuild
3535 the gettext file without location information.
3636 --no-fuzzy Do not include any messages marked as fuzzy/outdated.
@@ -149,7 +149,7 @@
150150 $wgMaxShellMemory = 402400;
151151
152152 $conf = $group->getConfiguration();
153 - $definitionFile = str_replace( '%GROUPROOT%', $options['ppgettext'], $conf['FILES']['definitionFile'] );
 153+ $definitionFile = str_replace( '%GROUPROOT%', $options['ppgettext'], $group->getSourceFilePath( $group->getSourceLanguage() ) );
154154 }
155155
156156 foreach ( $langs as $lang ) {

Follow-up revisions

RevisionCommit summaryAuthorDate
r113943Follow-up r113756: Use $wgTranslateGroupRoot instead of '%GROUPROOT%', since ...siebrand18:15, 15 March 2012

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r113594Add definitionFile to work with export.php's ppgettext.siebrand22:06, 11 March 2012

Comments

#Comment by Nikerabbit (talk | contribs)   16:43, 14 March 2012

Now that I think about it, getSourceFilePath might not be useful after all, since it will already replace %GROUPROOT% with $wgTranslateGroupRoot :(

Status & tagging log