BUG 0000 Translation for plugins with incorrect value

Translation for plugins with incorrect value
This commit is contained in:
Brayan Osmar Pereyra Suxo
2013-06-28 11:04:46 -04:00
parent b3f653959d
commit ec80baf0a7

View File

@@ -260,6 +260,7 @@ class Translation extends BaseTranslation
$POFile = new i18n_PO( $languageFile ); $POFile = new i18n_PO( $languageFile );
$POFile->readInit(); $POFile->readInit();
while ($rowTranslation = $POFile->getTranslation()) { while ($rowTranslation = $POFile->getTranslation()) {
$context = '';
foreach ($POFile->translatorComments as $a => $aux) { foreach ($POFile->translatorComments as $a => $aux) {
$aux = trim( $aux ); $aux = trim( $aux );
if ($aux == 'TRANSLATION') { if ($aux == 'TRANSLATION') {
@@ -281,7 +282,7 @@ class Translation extends BaseTranslation
} }
} }
} }
if ($identifier == 'TRANSLATION') { if ($identifier == 'TRANSLATION' && $context != '') {
list ($category, $id) = explode( '/', $context ); list ($category, $id) = explode( '/', $context );
$translation[$id] = $rowTranslation['msgstr'] ; $translation[$id] = $rowTranslation['msgstr'] ;
} }