Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

use Translate Manager module with postgresql. #11

Closed
emptimd opened this issue Feb 23, 2015 · 1 comment
Closed

use Translate Manager module with postgresql. #11

emptimd opened this issue Feb 23, 2015 · 1 comment

Comments

@emptimd
Copy link

emptimd commented Feb 23, 2015

Hi. I'm using your great module on postgresql db. And it's all good except 2 places where table params are escaping with mysql quotes ( ` ).

Those are in Language model getGridStatistic action:

 $languages = Language::find()
                    ->select('language_id, COUNT( `lt`.`id` ) AS `status`')
                    ->leftJoin(LanguageTranslate::tableName() . ' AS `lt`', '`language`.`language_id` = `lt`.`language`')
                    ->groupBy('language_id')
                    ->all();

And namespace lajax\translatemanager\services; class Generator

 private function _getLanguageItems() {
        $this->_languageItems = LanguageSource::find()->joinWith([
                'languageTranslate' => function ($query) {
                        $query->where('language_translate.language = :language', [':language' => $this->_languageId]);
                    }
                ])->where('`category` = :category', [':category' => 'javascript'])->all();
    }

For postgresql usage, those quotes can be removed or use some Yii functionality ( I'm noob so i can't make pull request sorry).

Thanks in advance.
Great module.

@lajax
Copy link
Owner

lajax commented Feb 23, 2015

Hi!

Thanks for letting me know.
I'll fix this today.

Best Regards,
Lajax

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants