Index: trunk/extensions/Translate/README |
— | — | @@ -29,6 +29,9 @@ |
30 | 30 | http://translatewiki.net/docs/Translate/html/ |
31 | 31 | |
32 | 32 | == Change log == |
| 33 | +* 2011-10-03 |
| 34 | +- Fixed an error that sometimes prevented translating messages that had |
| 35 | + been renamed |
33 | 36 | * 2011-10-01 |
34 | 37 | - Changed index on translate_sections database table |
35 | 38 | - Fixed escaping in PythonSingleFFS parser |
Index: trunk/extensions/Translate/utils/TranslationHelpers.php |
— | — | @@ -888,12 +888,13 @@ |
889 | 889 | |
890 | 890 | $latestRevision = $definitionTitle->getLatestRevID(); |
891 | 891 | |
892 | | - $translationRevision = $db->selectField( 'revtag', 'rt_value', $conds, __METHOD__, $options ); |
| 892 | + $translationRevision = $db->selectField( 'revtag', 'rt_value', $conds, __METHOD__, $options ); |
893 | 893 | if ( $translationRevision === false ) { |
894 | 894 | return null; |
895 | 895 | } |
896 | 896 | |
897 | | - $oldtext = Revision::newFromTitle( $definitionTitle, $translationRevision )->getText(); |
| 897 | + // Using newFromId instead of newFromTitle, because the page might have been renamed |
| 898 | + $oldtext = Revision::newFromId( $translationRevision )->getText(); |
898 | 899 | $newtext = Revision::newFromTitle( $definitionTitle, $latestRevision )->getText(); |
899 | 900 | |
900 | 901 | if ( $oldtext === $newtext ) { |