CurrentTranslationAid.php
Go to the documentation of this file.00001 <?php
00017 class CurrentTranslationAid extends TranslationAid {
00018 public function getData() {
00019 $translation = null;
00020
00021 $title = $this->handle->getTitle();
00022 $translation = TranslateUtils::getMessageContent(
00023 $this->handle->getKey(),
00024 $this->handle->getCode(),
00025 $title->getNamespace()
00026 );
00027
00028 wfRunHooks( 'TranslatePrefillTranslation', array( &$translation, $this->handle ) );
00029 $fuzzy = TranslateEditAddons::hasFuzzyString( $translation );
00030 $fuzzy = $fuzzy || TranslateEditAddons::isFuzzy( $title );
00031 $translation = str_replace( TRANSLATE_FUZZY, '', $translation );
00032
00033 return array(
00034 'language' => $this->handle->getCode(),
00035 'fuzzy' => $fuzzy,
00036 'value' => $translation,
00037 );
00038 }
00039 }