controllers/actions/DialogAction.php
public function run()
    {
        $languageSource = LanguageSource::find()->where([
            'category' => Yii::$app->request->post('category', ''),
            'MD5(message)' => Yii::$app->request->post('hash', ''),
        ])->one();

        if (!$languageSource) {
            return '<div id="translate-manager-error">' . Yii::t('language', 'Text not found in database! Please run project scan before translating!') . '</div>';
        }

        return $this->controller->renderPartial('dialog', [
            'languageSource' => $languageSource,
            'languageTranslate' => $this->_getTranslation($languageSource),
        ]);
    }
public function run()
    {
        $languageSource = LanguageSource::find()->where([
            'category' => Yii::$app->request->post('category', ''),
            'MD5(message)' => Yii::$app->request->post('hash', ''),
        ])->one();

        if (!$languageSource) {
            return '<div id="translate-manager-error">' . Yii::t('language', 'Text not found in database! Please run project scan before translating!') . '</div>';
        }

        return $this->controller->renderPartial('dialog', [
            'languageSource' => $languageSource,
            'languageTranslate' => $this->_getTranslation($languageSource),
        ]);
    }
public function run ( ) { $ languageSource = LanguageSource :: find ( ) -> where ( [ 'category' => Yii :: $ app -> request -> post ( 'category' , '' ) , 'MD5(message)' => Yii :: $ app -> request -> post ( 'hash' , '' ) , ] ) -> one ( ) ; if ( ! $ languageSource ) { return '<div id="translate-manager-error">' . Yii :: t ( 'language' , 'Text not found in database! Please run project scan before translating!' ) . '</div>' ; } return $ this -> controller -> renderPartial ( 'dialog' , [ 'languageSource' => $ languageSource , 'languageTranslate' => $ this -> _getTranslation ( $ languageSource ) , ] ) ; }
Creating dialogue box.

@return string
Creating dialogue box .