From 856334c75bf1c45a32a7c7f9b6d4d90a15334eff Mon Sep 17 00:00:00 2001 From: Vladislav Khorev Date: Fri, 5 Dec 2014 04:17:44 +0000 Subject: [PATCH] dictionary update --- yii/protected/messages/cn/app.php | 4 +- yii/protected/messages/cn/dict.php | 20 +- yii/protected/messages/en/dict.php | 22 +- yii/protected/messages/ru/dict.php | 22 +- yii/protected/models/DictionaryForm.php | 2 +- yii/protected/runtime/application.log | 286 ++++++++++++++++++ .../views/site/_dictionaryResultView.php | 4 +- yii/protected/views/site/dictionaryResult.php | 10 +- 8 files changed, 346 insertions(+), 24 deletions(-) diff --git a/yii/protected/messages/cn/app.php b/yii/protected/messages/cn/app.php index bf6b9b5..dfb4a84 100644 --- a/yii/protected/messages/cn/app.php +++ b/yii/protected/messages/cn/app.php @@ -32,8 +32,8 @@ return array( 'Published at: ' => '发表于: ', 'Hello China!' => '你好,中国!', - 'Dictionary' => '词典', - 'Please enter request:' => '请输入要求:', + 'Dictionary' => '字典', + 'Please enter request:' => '请输入搜索单词:', 'Search' => '搜索', diff --git a/yii/protected/messages/cn/dict.php b/yii/protected/messages/cn/dict.php index 846bfed..0c2ff90 100644 --- a/yii/protected/messages/cn/dict.php +++ b/yii/protected/messages/cn/dict.php @@ -6,19 +6,29 @@ return array( 'NGC_P1_NOMINATIVE_NC_SINGULAR_FEMALE' => '该单词本身即为单数第一格形式。 例句: Это одна {noun}', 'NGC_P1_NOMINATIVE_NC_SINGULAR_NEUTER' => '该单词本身即为单数第一格形式。 例句: Это одно {noun}', - 'NGC_P2_GENITIVE_NC_SINGULAR' => '该单词是单数第二格形式。 例句: Я возле одного {noun}', + 'NGC_P2_GENITIVE_NC_SINGULAR_MALE' => '该单词是单数第二格形式。 例句: Я возле одного {noun}', + 'NGC_P2_GENITIVE_NC_SINGULAR_FEMALE' => '该单词是单数第二格形式。 例句: Я возле одной {noun}', + 'NGC_P2_GENITIVE_NC_SINGULAR_NEUTER' => '该单词是单数第二格形式。 例句: Я возле одного {noun}', - 'NGC_P3_DATIVE_NC_SINGULAR' => '该单词是单数第三格形式。 例句: Я дарю подарок одному {noun}', + 'NGC_P3_DATIVE_NC_SINGULAR_MALE' => '该单词是单数第三格形式。 例句: Я дарю подарок одному {noun}', + 'NGC_P3_DATIVE_NC_SINGULAR_FEMALE' => '该单词是单数第三格形式。 例句: Я дарю подарок одной {noun}', + 'NGC_P3_DATIVE_NC_SINGULAR_NEUTER' => '该单词是单数第三格形式。 例句: Я дарю подарок одному {noun}', - 'NGC_P4_ACCUSATIVE_NC_SINGULAR_ANIMATE' => '该单词是单数第四格形式。 例句: Я не трогаю одного {noun}', + 'NGC_P4_ACCUSATIVE_NC_SINGULAR_ANIMATE_MALE' => '该单词是单数第四格形式。 例句: Я не трогаю одного {noun}', + 'NGC_P4_ACCUSATIVE_NC_SINGULAR_ANIMATE_FEMALE' => '该单词是单数第四格形式。 例句: Я не трогаю одну {noun}', + 'NGC_P4_ACCUSATIVE_NC_SINGULAR_ANIMATE_NEUTER' => '该单词是单数第四格形式。 例句: Я не трогаю одно {noun}', 'NGC_P4_ACCUSATIVE_NC_SINGULAR_INANIMATE_MALE' => '该单词是单数第四格形式。例句: Я не трогаю один {noun}', 'NGC_P4_ACCUSATIVE_NC_SINGULAR_INANIMATE_FEMALE' => '该单词是单数第四格形式。例句: Я не трогаю одну {noun}', 'NGC_P4_ACCUSATIVE_NC_SINGULAR_INANIMATE_NEUTER' => '该单词是单数第四格形式。例句: Я не трогаю одно {noun}', - 'NGC_P5_INSTRUMENTAL_NC_SINGULAR' => '该单词是单数第五格形式。 例句: Я с одним {noun}', + 'NGC_P5_INSTRUMENTAL_NC_SINGULAR_MALE' => '该单词是单数第五格形式。 例句: Я с одним {noun}', + 'NGC_P5_INSTRUMENTAL_NC_SINGULAR_FEMALE' => '该单词是单数第五格形式。 例句: Я с одной {noun}', + 'NGC_P5_INSTRUMENTAL_NC_SINGULAR_NEUTER' => '该单词是单数第五格形式。 例句: Я с одним {noun}', - 'NGC_P6_PREPOSITIONAL_NC_SINGULAR' => '该单词是单数第六格形式。 例句: Я разговариваю об одном {noun}', + 'NGC_P6_PREPOSITIONAL_NC_SINGULAR_MALE' => '该单词是单数第六格形式。 例句: Я разговариваю об одном {noun}', + 'NGC_P6_PREPOSITIONAL_NC_SINGULAR_FEMALE' => '该单词是单数第六格形式。 例句: Я разговариваю об одной {noun}', + 'NGC_P6_PREPOSITIONAL_NC_SINGULAR_NEUTER' => '该单词是单数第六格形式。 例句: Я разговариваю об одном {noun}', 'NGC_P1_NOMINATIVE_NC_PLURAL' => '该单词是复数第一格形式。 例句: Это разные {noun}', diff --git a/yii/protected/messages/en/dict.php b/yii/protected/messages/en/dict.php index 24c9b81..742dff2 100644 --- a/yii/protected/messages/en/dict.php +++ b/yii/protected/messages/en/dict.php @@ -7,22 +7,30 @@ return array( 'NGC_P1_NOMINATIVE_NC_SINGULAR_NEUTER' => 'This word is in nominative case, in the singular. For example: This is one {noun}', - 'NGC_P2_GENITIVE_NC_SINGULAR' => 'This word is in genitive case, in the singular. For example: I am near one {noun}', + 'NGC_P2_GENITIVE_NC_SINGULAR_MALE' => 'This word is in genitive case, in the singular. For example: I am near one {noun}', + 'NGC_P2_GENITIVE_NC_SINGULAR_FEMALE' => 'This word is in genitive case, in the singular. For example: I am near one {noun}', + 'NGC_P2_GENITIVE_NC_SINGULAR_NEUTER' => 'This word is in genitive case, in the singular. For example: I am near one {noun}', - 'NGC_P3_DATIVE_NC_SINGULAR' => 'This word is in dative case, in the singular. For example: I give gift to one {noun}', + 'NGC_P3_DATIVE_NC_SINGULAR_MALE' => 'This word is in dative case, in the singular. For example: I give gift to one {noun}', + 'NGC_P3_DATIVE_NC_SINGULAR_FEMALE' => 'This word is in dative case, in the singular. For example: I give gift to one {noun}', + 'NGC_P3_DATIVE_NC_SINGULAR_NEUTER' => 'This word is in dative case, in the singular. For example: I give gift to one {noun}', - 'NGC_P4_ACCUSATIVE_NC_SINGULAR_ANIMATE' => 'This word is in accusative case, in the singular. For example: I don\'t disturb one {noun}', - - 'NGC_P4_ACCUSATIVE_NC_SINGULAR_INANIMATE' => 'This word is in accusative case, in the singular. For example: I don\'t disturb one {noun}', + 'NGC_P4_ACCUSATIVE_NC_SINGULAR_ANIMATE_MALE' => 'This word is in accusative case, in the singular. For example: I don\'t disturb one {noun}', + 'NGC_P4_ACCUSATIVE_NC_SINGULAR_ANIMATE_FEMALE' => 'This word is in accusative case, in the singular. For example: I don\'t disturb one {noun}', + 'NGC_P4_ACCUSATIVE_NC_SINGULAR_ANIMATE_NEUTER' => 'This word is in accusative case, in the singular. For example: I don\'t disturb one {noun}', 'NGC_P4_ACCUSATIVE_NC_SINGULAR_INANIMATE_MALE' => 'This word is in accusative case, in the singular. For example: I don\'t disturb one {noun}', 'NGC_P4_ACCUSATIVE_NC_SINGULAR_INANIMATE_FEMALE' => 'This word is in accusative case, in the singular. For example: I don\'t disturb one {noun}', 'NGC_P4_ACCUSATIVE_NC_SINGULAR_INANIMATE_NEUTER' => 'This word is in accusative case, in the singular. For example: I don\'t disturb one {noun}', - 'NGC_P5_INSTRUMENTAL_NC_SINGULAR' => 'This word is in instrumental case, in the singular. For example: I am with one {noun}', + 'NGC_P5_INSTRUMENTAL_NC_SINGULAR_MALE' => 'This word is in instrumental case, in the singular. For example: I am with one {noun}', + 'NGC_P5_INSTRUMENTAL_NC_SINGULAR_FEMALE' => 'This word is in instrumental case, in the singular. For example: I am with one {noun}', + 'NGC_P5_INSTRUMENTAL_NC_SINGULAR_NEUTER' => 'This word is in instrumental case, in the singular. For example: I am with one {noun}', - 'NGC_P6_PREPOSITIONAL_NC_SINGULAR' => 'This word is in prepositional case, in the singular. For example: I talk about one {noun}', + 'NGC_P6_PREPOSITIONAL_NC_SINGULAR_MALE' => 'This word is in prepositional case, in the singular. For example: I talk about one {noun}', + 'NGC_P6_PREPOSITIONAL_NC_SINGULAR_FEMALE' => 'This word is in prepositional case, in the singular. For example: I talk about one {noun}', + 'NGC_P6_PREPOSITIONAL_NC_SINGULAR_NEUTER' => 'This word is in prepositional case, in the singular. For example: I talk about one {noun}', 'NGC_P1_NOMINATIVE_NC_PLURAL' => 'This word is in nominative case, in the plural. For example: There are many {noun}', diff --git a/yii/protected/messages/ru/dict.php b/yii/protected/messages/ru/dict.php index a0cb789..3db79ce 100644 --- a/yii/protected/messages/ru/dict.php +++ b/yii/protected/messages/ru/dict.php @@ -6,21 +6,31 @@ return array( 'NGC_P1_NOMINATIVE_NC_SINGULAR_FEMALE' => 'Это слово в именительном падеже в единственном числе. Например: Это одна {noun}', 'NGC_P1_NOMINATIVE_NC_SINGULAR_NEUTER' => 'Это слово в именительном падеже в единственном числе. Например: Это одно {noun}', - 'NGC_P2_GENITIVE_NC_SINGULAR' => 'Это слово в родительном падеже в единственном числе. Например: Я возле одного {noun}', + 'NGC_P2_GENITIVE_NC_SINGULAR_MALE' => 'Это слово в родительном падеже в единственном числе. Например: Я возле одного {noun}', + 'NGC_P2_GENITIVE_NC_SINGULAR_FEMALE' => 'Это слово в родительном падеже в единственном числе. Например: Я возле одной {noun}', + 'NGC_P2_GENITIVE_NC_SINGULAR_NEUTER' => 'Это слово в родительном падеже в единственном числе. Например: Я возле одного {noun}', - 'NGC_P3_DATIVE_NC_SINGULAR' => 'Это слово в дательном падеже в единственном числе. Например: Я дарю подарок одному {noun}', - 'NGC_P4_ACCUSATIVE_NC_SINGULAR_ANIMATE' => 'Это слово в винительном падеже в единственном числе. Например: Я не трогаю одного {noun}', + 'NGC_P3_DATIVE_NC_SINGULAR_MALE' => 'Это слово в дательном падеже в единственном числе. Например: Я дарю подарок одному {noun}', + 'NGC_P3_DATIVE_NC_SINGULAR_FEMALE' => 'Это слово в дательном падеже в единственном числе. Например: Я дарю подарок одной {noun}', + 'NGC_P3_DATIVE_NC_SINGULAR_NEUTER' => 'Это слово в дательном падеже в единственном числе. Например: Я дарю подарок одному {noun}', - 'NGC_P4_ACCUSATIVE_NC_SINGULAR_INANIMATE' => 'Это слово в винительном падеже в единственном числе. Например: Я не трогаю один {noun}', + + 'NGC_P4_ACCUSATIVE_NC_SINGULAR_ANIMATE_MALE' => 'Это слово в винительном падеже в единственном числе. Например: Я не трогаю одного {noun}', + 'NGC_P4_ACCUSATIVE_NC_SINGULAR_ANIMATE_FEMALE' => 'Это слово в винительном падеже в единственном числе. Например: Я не трогаю одну {noun}', + 'NGC_P4_ACCUSATIVE_NC_SINGULAR_ANIMATE_NEUTER' => 'Это слово в винительном падеже в единственном числе. Например: Я не трогаю одно {noun}', 'NGC_P4_ACCUSATIVE_NC_SINGULAR_INANIMATE_MALE' => 'Это слово в винительном падеже в единственном числе. Например: Я не трогаю один {noun}', 'NGC_P4_ACCUSATIVE_NC_SINGULAR_INANIMATE_FEMALE' => 'Это слово в винительном падеже в единственном числе. Например: Я не трогаю одну {noun}', 'NGC_P4_ACCUSATIVE_NC_SINGULAR_INANIMATE_NEUTER' => 'Это слово в винительном падеже в единственном числе. Например: Я не трогаю одно {noun}', - 'NGC_P5_INSTRUMENTAL_NC_SINGULAR' => 'Это слово в творительном падеже в единственном числе. Например: Я с одним {noun}', + 'NGC_P5_INSTRUMENTAL_NC_SINGULAR_MALE' => 'Это слово в творительном падеже в единственном числе. Например: Я с одним {noun}', + 'NGC_P5_INSTRUMENTAL_NC_SINGULAR_FEMALE' => 'Это слово в творительном падеже в единственном числе. Например: Я с одной {noun}', + 'NGC_P5_INSTRUMENTAL_NC_SINGULAR_NEUTER' => 'Это слово в творительном падеже в единственном числе. Например: Я с одним {noun}', - 'NGC_P6_PREPOSITIONAL_NC_SINGULAR' => 'Это слово в предложном падеже в единственном числе. Например: Я разговариваю об одном {noun}', + 'NGC_P6_PREPOSITIONAL_NC_SINGULAR_MALE' => 'Это слово в предложном падеже в единственном числе. Например: Я разговариваю об одном {noun}', + 'NGC_P6_PREPOSITIONAL_NC_SINGULAR_FEMALE' => 'Это слово в предложном падеже в единственном числе. Например: Я разговариваю об одной {noun}', + 'NGC_P6_PREPOSITIONAL_NC_SINGULAR_NEUTER' => 'Это слово в предложном падеже в единственном числе. Например: Я разговариваю об одном {noun}', 'NGC_P1_NOMINATIVE_NC_PLURAL' => 'Это слово в именительном падеже в множественном числе. Например: Это разные {noun}', diff --git a/yii/protected/models/DictionaryForm.php b/yii/protected/models/DictionaryForm.php index 74d6cd1..28fe644 100644 --- a/yii/protected/models/DictionaryForm.php +++ b/yii/protected/models/DictionaryForm.php @@ -52,7 +52,7 @@ class DictionaryForm extends CFormModel public function resultExists() { - return ($this->response['nouns'] !== ""); + return ($this->serverIsWorking) && ($this->response) && ($this->response['nouns'] !== ""); } public function getDataProvider() diff --git a/yii/protected/runtime/application.log b/yii/protected/runtime/application.log index 767a6f1..b86d56b 100644 --- a/yii/protected/runtime/application.log +++ b/yii/protected/runtime/application.log @@ -1110,3 +1110,289 @@ Stack trace: #16 C:\Workplace\yii1.1.15\framework\base\CApplication.php(180): CWebApplication->processRequest() #17 C:\Workplace\Apache2.4\htdocs\cj\index.php(25): CWebApplication->run() REQUEST_URI=/cj/index.php?r=site/dictionary +2014/12/01 10:42:24 [error] [php] array_slice() expects parameter 1 to be array, null given (C:\Workplace\yii1.1.15\framework\web\CArrayDataProvider.php:95) +Stack trace: +#0 C:\Workplace\yii1.1.15\framework\web\CDataProvider.php(212): CArrayDataProvider->getData() +#1 C:\Workplace\yii1.1.15\framework\base\CComponent.php(111): CArrayDataProvider->getItemCount() +#2 C:\Workplace\Apache2.4\htdocs\cj\protected\views\site\dictionaryResult.php(10): CArrayDataProvider->__get() +#3 C:\Workplace\yii1.1.15\framework\web\CBaseController.php(126): require() +#4 C:\Workplace\yii1.1.15\framework\web\CBaseController.php(95): SiteController->renderInternal() +#5 C:\Workplace\yii1.1.15\framework\web\CController.php(869): SiteController->renderFile() +#6 C:\Workplace\yii1.1.15\framework\web\CController.php(782): SiteController->renderPartial() +#7 C:\Workplace\Apache2.4\htdocs\cj\protected\controllers\SiteController.php(69): SiteController->render() +#8 C:\Workplace\yii1.1.15\framework\web\actions\CInlineAction.php(49): SiteController->actionDictionary() +#9 C:\Workplace\yii1.1.15\framework\web\CController.php(308): CInlineAction->runWithParams() +#10 C:\Workplace\yii1.1.15\framework\web\CController.php(286): SiteController->runAction() +#11 C:\Workplace\yii1.1.15\framework\web\CController.php(265): SiteController->runActionWithFilters() +#12 C:\Workplace\yii1.1.15\framework\web\CWebApplication.php(282): SiteController->run() +#13 C:\Workplace\yii1.1.15\framework\web\CWebApplication.php(141): CWebApplication->runController() +#14 C:\Workplace\yii1.1.15\framework\base\CApplication.php(180): CWebApplication->processRequest() +#15 C:\Workplace\Apache2.4\htdocs\cj\index.php(25): CWebApplication->run() +REQUEST_URI=/cj/index.php?r=site/dictionary +in C:\Workplace\Apache2.4\htdocs\cj\protected\views\site\dictionaryResult.php (10) +in C:\Workplace\Apache2.4\htdocs\cj\protected\controllers\SiteController.php (69) +in C:\Workplace\Apache2.4\htdocs\cj\index.php (25) +2014/12/02 00:55:08 [error] [php] array_slice() expects parameter 1 to be array, string given (C:\Workplace\yii1.1.15\framework\web\CArrayDataProvider.php:95) +Stack trace: +#0 C:\Workplace\yii1.1.15\framework\web\CDataProvider.php(212): CArrayDataProvider->getData() +#1 C:\Workplace\yii1.1.15\framework\base\CComponent.php(111): CArrayDataProvider->getItemCount() +#2 C:\Workplace\Apache2.4\htdocs\cj\protected\views\site\dictionaryResult.php(10): CArrayDataProvider->__get() +#3 C:\Workplace\yii1.1.15\framework\web\CBaseController.php(126): require() +#4 C:\Workplace\yii1.1.15\framework\web\CBaseController.php(95): SiteController->renderInternal() +#5 C:\Workplace\yii1.1.15\framework\web\CController.php(869): SiteController->renderFile() +#6 C:\Workplace\yii1.1.15\framework\web\CController.php(782): SiteController->renderPartial() +#7 C:\Workplace\Apache2.4\htdocs\cj\protected\controllers\SiteController.php(69): SiteController->render() +#8 C:\Workplace\yii1.1.15\framework\web\actions\CInlineAction.php(49): SiteController->actionDictionary() +#9 C:\Workplace\yii1.1.15\framework\web\CController.php(308): CInlineAction->runWithParams() +#10 C:\Workplace\yii1.1.15\framework\web\CController.php(286): SiteController->runAction() +#11 C:\Workplace\yii1.1.15\framework\web\CController.php(265): SiteController->runActionWithFilters() +#12 C:\Workplace\yii1.1.15\framework\web\CWebApplication.php(282): SiteController->run() +#13 C:\Workplace\yii1.1.15\framework\web\CWebApplication.php(141): CWebApplication->runController() +#14 C:\Workplace\yii1.1.15\framework\base\CApplication.php(180): CWebApplication->processRequest() +#15 C:\Workplace\Apache2.4\htdocs\cj\index.php(25): CWebApplication->run() +REQUEST_URI=/cj/index.php?r=site/dictionary +in C:\Workplace\Apache2.4\htdocs\cj\protected\views\site\dictionaryResult.php (10) +in C:\Workplace\Apache2.4\htdocs\cj\protected\controllers\SiteController.php (69) +in C:\Workplace\Apache2.4\htdocs\cj\index.php (25) +2014/12/02 00:58:48 [error] [php] array_slice() expects parameter 1 to be array, string given (C:\Workplace\yii1.1.15\framework\web\CArrayDataProvider.php:95) +Stack trace: +#0 C:\Workplace\yii1.1.15\framework\web\CDataProvider.php(212): CArrayDataProvider->getData() +#1 C:\Workplace\yii1.1.15\framework\base\CComponent.php(111): CArrayDataProvider->getItemCount() +#2 C:\Workplace\Apache2.4\htdocs\cj\protected\views\site\dictionaryResult.php(10): CArrayDataProvider->__get() +#3 C:\Workplace\yii1.1.15\framework\web\CBaseController.php(126): require() +#4 C:\Workplace\yii1.1.15\framework\web\CBaseController.php(95): SiteController->renderInternal() +#5 C:\Workplace\yii1.1.15\framework\web\CController.php(869): SiteController->renderFile() +#6 C:\Workplace\yii1.1.15\framework\web\CController.php(782): SiteController->renderPartial() +#7 C:\Workplace\Apache2.4\htdocs\cj\protected\controllers\SiteController.php(69): SiteController->render() +#8 C:\Workplace\yii1.1.15\framework\web\actions\CInlineAction.php(49): SiteController->actionDictionary() +#9 C:\Workplace\yii1.1.15\framework\web\CController.php(308): CInlineAction->runWithParams() +#10 C:\Workplace\yii1.1.15\framework\web\CController.php(286): SiteController->runAction() +#11 C:\Workplace\yii1.1.15\framework\web\CController.php(265): SiteController->runActionWithFilters() +#12 C:\Workplace\yii1.1.15\framework\web\CWebApplication.php(282): SiteController->run() +#13 C:\Workplace\yii1.1.15\framework\web\CWebApplication.php(141): CWebApplication->runController() +#14 C:\Workplace\yii1.1.15\framework\base\CApplication.php(180): CWebApplication->processRequest() +#15 C:\Workplace\Apache2.4\htdocs\cj\index.php(25): CWebApplication->run() +REQUEST_URI=/cj/index.php?r=site/dictionary +in C:\Workplace\Apache2.4\htdocs\cj\protected\views\site\dictionaryResult.php (10) +in C:\Workplace\Apache2.4\htdocs\cj\protected\controllers\SiteController.php (69) +in C:\Workplace\Apache2.4\htdocs\cj\index.php (25) +2014/12/02 01:07:11 [error] [php] array_slice() expects parameter 1 to be array, string given (C:\Workplace\yii1.1.15\framework\web\CArrayDataProvider.php:95) +Stack trace: +#0 C:\Workplace\yii1.1.15\framework\web\CDataProvider.php(212): CArrayDataProvider->getData() +#1 C:\Workplace\yii1.1.15\framework\base\CComponent.php(111): CArrayDataProvider->getItemCount() +#2 C:\Workplace\Apache2.4\htdocs\cj\protected\views\site\dictionaryResult.php(10): CArrayDataProvider->__get() +#3 C:\Workplace\yii1.1.15\framework\web\CBaseController.php(126): require() +#4 C:\Workplace\yii1.1.15\framework\web\CBaseController.php(95): SiteController->renderInternal() +#5 C:\Workplace\yii1.1.15\framework\web\CController.php(869): SiteController->renderFile() +#6 C:\Workplace\yii1.1.15\framework\web\CController.php(782): SiteController->renderPartial() +#7 C:\Workplace\Apache2.4\htdocs\cj\protected\controllers\SiteController.php(69): SiteController->render() +#8 C:\Workplace\yii1.1.15\framework\web\actions\CInlineAction.php(49): SiteController->actionDictionary() +#9 C:\Workplace\yii1.1.15\framework\web\CController.php(308): CInlineAction->runWithParams() +#10 C:\Workplace\yii1.1.15\framework\web\CController.php(286): SiteController->runAction() +#11 C:\Workplace\yii1.1.15\framework\web\CController.php(265): SiteController->runActionWithFilters() +#12 C:\Workplace\yii1.1.15\framework\web\CWebApplication.php(282): SiteController->run() +#13 C:\Workplace\yii1.1.15\framework\web\CWebApplication.php(141): CWebApplication->runController() +#14 C:\Workplace\yii1.1.15\framework\base\CApplication.php(180): CWebApplication->processRequest() +#15 C:\Workplace\Apache2.4\htdocs\cj\index.php(25): CWebApplication->run() +REQUEST_URI=/cj/index.php?r=site/dictionary +in C:\Workplace\Apache2.4\htdocs\cj\protected\views\site\dictionaryResult.php (10) +in C:\Workplace\Apache2.4\htdocs\cj\protected\controllers\SiteController.php (69) +in C:\Workplace\Apache2.4\htdocs\cj\index.php (25) +2014/12/02 01:40:00 [error] [php] array_slice() expects parameter 1 to be array, string given (C:\Workplace\yii1.1.15\framework\web\CArrayDataProvider.php:95) +Stack trace: +#0 C:\Workplace\yii1.1.15\framework\web\CDataProvider.php(212): CArrayDataProvider->getData() +#1 C:\Workplace\yii1.1.15\framework\base\CComponent.php(111): CArrayDataProvider->getItemCount() +#2 C:\Workplace\Apache2.4\htdocs\cj\protected\views\site\dictionaryResult.php(10): CArrayDataProvider->__get() +#3 C:\Workplace\yii1.1.15\framework\web\CBaseController.php(126): require() +#4 C:\Workplace\yii1.1.15\framework\web\CBaseController.php(95): SiteController->renderInternal() +#5 C:\Workplace\yii1.1.15\framework\web\CController.php(869): SiteController->renderFile() +#6 C:\Workplace\yii1.1.15\framework\web\CController.php(782): SiteController->renderPartial() +#7 C:\Workplace\Apache2.4\htdocs\cj\protected\controllers\SiteController.php(69): SiteController->render() +#8 C:\Workplace\yii1.1.15\framework\web\actions\CInlineAction.php(49): SiteController->actionDictionary() +#9 C:\Workplace\yii1.1.15\framework\web\CController.php(308): CInlineAction->runWithParams() +#10 C:\Workplace\yii1.1.15\framework\web\CController.php(286): SiteController->runAction() +#11 C:\Workplace\yii1.1.15\framework\web\CController.php(265): SiteController->runActionWithFilters() +#12 C:\Workplace\yii1.1.15\framework\web\CWebApplication.php(282): SiteController->run() +#13 C:\Workplace\yii1.1.15\framework\web\CWebApplication.php(141): CWebApplication->runController() +#14 C:\Workplace\yii1.1.15\framework\base\CApplication.php(180): CWebApplication->processRequest() +#15 C:\Workplace\Apache2.4\htdocs\cj\index.php(25): CWebApplication->run() +REQUEST_URI=/cj/index.php?r=site/dictionary +in C:\Workplace\Apache2.4\htdocs\cj\protected\views\site\dictionaryResult.php (10) +in C:\Workplace\Apache2.4\htdocs\cj\protected\controllers\SiteController.php (69) +in C:\Workplace\Apache2.4\htdocs\cj\index.php (25) +2014/12/02 02:36:20 [error] [php] array_slice() expects parameter 1 to be array, null given (C:\Workplace\yii1.1.15\framework\web\CArrayDataProvider.php:95) +Stack trace: +#0 C:\Workplace\yii1.1.15\framework\web\CDataProvider.php(212): CArrayDataProvider->getData() +#1 C:\Workplace\yii1.1.15\framework\base\CComponent.php(111): CArrayDataProvider->getItemCount() +#2 C:\Workplace\Apache2.4\htdocs\cj\protected\views\site\dictionaryResult.php(10): CArrayDataProvider->__get() +#3 C:\Workplace\yii1.1.15\framework\web\CBaseController.php(126): require() +#4 C:\Workplace\yii1.1.15\framework\web\CBaseController.php(95): SiteController->renderInternal() +#5 C:\Workplace\yii1.1.15\framework\web\CController.php(869): SiteController->renderFile() +#6 C:\Workplace\yii1.1.15\framework\web\CController.php(782): SiteController->renderPartial() +#7 C:\Workplace\Apache2.4\htdocs\cj\protected\controllers\SiteController.php(69): SiteController->render() +#8 C:\Workplace\yii1.1.15\framework\web\actions\CInlineAction.php(49): SiteController->actionDictionary() +#9 C:\Workplace\yii1.1.15\framework\web\CController.php(308): CInlineAction->runWithParams() +#10 C:\Workplace\yii1.1.15\framework\web\CController.php(286): SiteController->runAction() +#11 C:\Workplace\yii1.1.15\framework\web\CController.php(265): SiteController->runActionWithFilters() +#12 C:\Workplace\yii1.1.15\framework\web\CWebApplication.php(282): SiteController->run() +#13 C:\Workplace\yii1.1.15\framework\web\CWebApplication.php(141): CWebApplication->runController() +#14 C:\Workplace\yii1.1.15\framework\base\CApplication.php(180): CWebApplication->processRequest() +#15 C:\Workplace\Apache2.4\htdocs\cj\index.php(25): CWebApplication->run() +REQUEST_URI=/cj/index.php?r=site/dictionary +in C:\Workplace\Apache2.4\htdocs\cj\protected\views\site\dictionaryResult.php (10) +in C:\Workplace\Apache2.4\htdocs\cj\protected\controllers\SiteController.php (69) +in C:\Workplace\Apache2.4\htdocs\cj\index.php (25) +2014/12/02 02:55:40 [error] [php] array_slice() expects parameter 1 to be array, string given (C:\Workplace\yii1.1.15\framework\web\CArrayDataProvider.php:95) +Stack trace: +#0 C:\Workplace\yii1.1.15\framework\web\CDataProvider.php(212): CArrayDataProvider->getData() +#1 C:\Workplace\yii1.1.15\framework\base\CComponent.php(111): CArrayDataProvider->getItemCount() +#2 C:\Workplace\Apache2.4\htdocs\cj\protected\views\site\dictionaryResult.php(10): CArrayDataProvider->__get() +#3 C:\Workplace\yii1.1.15\framework\web\CBaseController.php(126): require() +#4 C:\Workplace\yii1.1.15\framework\web\CBaseController.php(95): SiteController->renderInternal() +#5 C:\Workplace\yii1.1.15\framework\web\CController.php(869): SiteController->renderFile() +#6 C:\Workplace\yii1.1.15\framework\web\CController.php(782): SiteController->renderPartial() +#7 C:\Workplace\Apache2.4\htdocs\cj\protected\controllers\SiteController.php(69): SiteController->render() +#8 C:\Workplace\yii1.1.15\framework\web\actions\CInlineAction.php(49): SiteController->actionDictionary() +#9 C:\Workplace\yii1.1.15\framework\web\CController.php(308): CInlineAction->runWithParams() +#10 C:\Workplace\yii1.1.15\framework\web\CController.php(286): SiteController->runAction() +#11 C:\Workplace\yii1.1.15\framework\web\CController.php(265): SiteController->runActionWithFilters() +#12 C:\Workplace\yii1.1.15\framework\web\CWebApplication.php(282): SiteController->run() +#13 C:\Workplace\yii1.1.15\framework\web\CWebApplication.php(141): CWebApplication->runController() +#14 C:\Workplace\yii1.1.15\framework\base\CApplication.php(180): CWebApplication->processRequest() +#15 C:\Workplace\Apache2.4\htdocs\cj\index.php(25): CWebApplication->run() +REQUEST_URI=/cj/index.php?r=site/dictionary +in C:\Workplace\Apache2.4\htdocs\cj\protected\views\site\dictionaryResult.php (10) +in C:\Workplace\Apache2.4\htdocs\cj\protected\controllers\SiteController.php (69) +in C:\Workplace\Apache2.4\htdocs\cj\index.php (25) +2014/12/02 06:07:25 [error] [php] array_slice() expects parameter 1 to be array, string given (C:\Workplace\yii1.1.15\framework\web\CArrayDataProvider.php:95) +Stack trace: +#0 C:\Workplace\yii1.1.15\framework\web\CDataProvider.php(212): CArrayDataProvider->getData() +#1 C:\Workplace\yii1.1.15\framework\base\CComponent.php(111): CArrayDataProvider->getItemCount() +#2 C:\Workplace\Apache2.4\htdocs\cj\protected\views\site\dictionaryResult.php(10): CArrayDataProvider->__get() +#3 C:\Workplace\yii1.1.15\framework\web\CBaseController.php(126): require() +#4 C:\Workplace\yii1.1.15\framework\web\CBaseController.php(95): SiteController->renderInternal() +#5 C:\Workplace\yii1.1.15\framework\web\CController.php(869): SiteController->renderFile() +#6 C:\Workplace\yii1.1.15\framework\web\CController.php(782): SiteController->renderPartial() +#7 C:\Workplace\Apache2.4\htdocs\cj\protected\controllers\SiteController.php(69): SiteController->render() +#8 C:\Workplace\yii1.1.15\framework\web\actions\CInlineAction.php(49): SiteController->actionDictionary() +#9 C:\Workplace\yii1.1.15\framework\web\CController.php(308): CInlineAction->runWithParams() +#10 C:\Workplace\yii1.1.15\framework\web\CController.php(286): SiteController->runAction() +#11 C:\Workplace\yii1.1.15\framework\web\CController.php(265): SiteController->runActionWithFilters() +#12 C:\Workplace\yii1.1.15\framework\web\CWebApplication.php(282): SiteController->run() +#13 C:\Workplace\yii1.1.15\framework\web\CWebApplication.php(141): CWebApplication->runController() +#14 C:\Workplace\yii1.1.15\framework\base\CApplication.php(180): CWebApplication->processRequest() +#15 C:\Workplace\Apache2.4\htdocs\cj\index.php(25): CWebApplication->run() +REQUEST_URI=/cj/index.php?r=site/dictionary +in C:\Workplace\Apache2.4\htdocs\cj\protected\views\site\dictionaryResult.php (10) +in C:\Workplace\Apache2.4\htdocs\cj\protected\controllers\SiteController.php (69) +in C:\Workplace\Apache2.4\htdocs\cj\index.php (25) +2014/12/02 06:07:31 [error] [php] array_slice() expects parameter 1 to be array, string given (C:\Workplace\yii1.1.15\framework\web\CArrayDataProvider.php:95) +Stack trace: +#0 C:\Workplace\yii1.1.15\framework\web\CDataProvider.php(212): CArrayDataProvider->getData() +#1 C:\Workplace\yii1.1.15\framework\base\CComponent.php(111): CArrayDataProvider->getItemCount() +#2 C:\Workplace\Apache2.4\htdocs\cj\protected\views\site\dictionaryResult.php(10): CArrayDataProvider->__get() +#3 C:\Workplace\yii1.1.15\framework\web\CBaseController.php(126): require() +#4 C:\Workplace\yii1.1.15\framework\web\CBaseController.php(95): SiteController->renderInternal() +#5 C:\Workplace\yii1.1.15\framework\web\CController.php(869): SiteController->renderFile() +#6 C:\Workplace\yii1.1.15\framework\web\CController.php(782): SiteController->renderPartial() +#7 C:\Workplace\Apache2.4\htdocs\cj\protected\controllers\SiteController.php(69): SiteController->render() +#8 C:\Workplace\yii1.1.15\framework\web\actions\CInlineAction.php(49): SiteController->actionDictionary() +#9 C:\Workplace\yii1.1.15\framework\web\CController.php(308): CInlineAction->runWithParams() +#10 C:\Workplace\yii1.1.15\framework\web\CController.php(286): SiteController->runAction() +#11 C:\Workplace\yii1.1.15\framework\web\CController.php(265): SiteController->runActionWithFilters() +#12 C:\Workplace\yii1.1.15\framework\web\CWebApplication.php(282): SiteController->run() +#13 C:\Workplace\yii1.1.15\framework\web\CWebApplication.php(141): CWebApplication->runController() +#14 C:\Workplace\yii1.1.15\framework\base\CApplication.php(180): CWebApplication->processRequest() +#15 C:\Workplace\Apache2.4\htdocs\cj\index.php(25): CWebApplication->run() +REQUEST_URI=/cj/index.php?r=site/dictionary +in C:\Workplace\Apache2.4\htdocs\cj\protected\views\site\dictionaryResult.php (10) +in C:\Workplace\Apache2.4\htdocs\cj\protected\controllers\SiteController.php (69) +in C:\Workplace\Apache2.4\htdocs\cj\index.php (25) +2014/12/05 05:43:36 [error] [php] array_slice() expects parameter 1 to be array, string given (C:\Workplace\yii1.1.15\framework\web\CArrayDataProvider.php:95) +Stack trace: +#0 C:\Workplace\yii1.1.15\framework\web\CDataProvider.php(212): CArrayDataProvider->getData() +#1 C:\Workplace\yii1.1.15\framework\base\CComponent.php(111): CArrayDataProvider->getItemCount() +#2 C:\Workplace\Apache2.4\htdocs\cj\protected\views\site\dictionaryResult.php(10): CArrayDataProvider->__get() +#3 C:\Workplace\yii1.1.15\framework\web\CBaseController.php(126): require() +#4 C:\Workplace\yii1.1.15\framework\web\CBaseController.php(95): SiteController->renderInternal() +#5 C:\Workplace\yii1.1.15\framework\web\CController.php(869): SiteController->renderFile() +#6 C:\Workplace\yii1.1.15\framework\web\CController.php(782): SiteController->renderPartial() +#7 C:\Workplace\Apache2.4\htdocs\cj\protected\controllers\SiteController.php(69): SiteController->render() +#8 C:\Workplace\yii1.1.15\framework\web\actions\CInlineAction.php(49): SiteController->actionDictionary() +#9 C:\Workplace\yii1.1.15\framework\web\CController.php(308): CInlineAction->runWithParams() +#10 C:\Workplace\yii1.1.15\framework\web\CController.php(286): SiteController->runAction() +#11 C:\Workplace\yii1.1.15\framework\web\CController.php(265): SiteController->runActionWithFilters() +#12 C:\Workplace\yii1.1.15\framework\web\CWebApplication.php(282): SiteController->run() +#13 C:\Workplace\yii1.1.15\framework\web\CWebApplication.php(141): CWebApplication->runController() +#14 C:\Workplace\yii1.1.15\framework\base\CApplication.php(180): CWebApplication->processRequest() +#15 C:\Workplace\Apache2.4\htdocs\cj\index.php(25): CWebApplication->run() +REQUEST_URI=/cj/index.php?r=site/dictionary +in C:\Workplace\Apache2.4\htdocs\cj\protected\views\site\dictionaryResult.php (10) +in C:\Workplace\Apache2.4\htdocs\cj\protected\controllers\SiteController.php (69) +in C:\Workplace\Apache2.4\htdocs\cj\index.php (25) +2014/12/05 05:44:17 [error] [php] array_slice() expects parameter 1 to be array, string given (C:\Workplace\yii1.1.15\framework\web\CArrayDataProvider.php:95) +Stack trace: +#0 C:\Workplace\yii1.1.15\framework\web\CDataProvider.php(212): CArrayDataProvider->getData() +#1 C:\Workplace\yii1.1.15\framework\base\CComponent.php(111): CArrayDataProvider->getItemCount() +#2 C:\Workplace\Apache2.4\htdocs\cj\protected\views\site\dictionaryResult.php(10): CArrayDataProvider->__get() +#3 C:\Workplace\yii1.1.15\framework\web\CBaseController.php(126): require() +#4 C:\Workplace\yii1.1.15\framework\web\CBaseController.php(95): SiteController->renderInternal() +#5 C:\Workplace\yii1.1.15\framework\web\CController.php(869): SiteController->renderFile() +#6 C:\Workplace\yii1.1.15\framework\web\CController.php(782): SiteController->renderPartial() +#7 C:\Workplace\Apache2.4\htdocs\cj\protected\controllers\SiteController.php(69): SiteController->render() +#8 C:\Workplace\yii1.1.15\framework\web\actions\CInlineAction.php(49): SiteController->actionDictionary() +#9 C:\Workplace\yii1.1.15\framework\web\CController.php(308): CInlineAction->runWithParams() +#10 C:\Workplace\yii1.1.15\framework\web\CController.php(286): SiteController->runAction() +#11 C:\Workplace\yii1.1.15\framework\web\CController.php(265): SiteController->runActionWithFilters() +#12 C:\Workplace\yii1.1.15\framework\web\CWebApplication.php(282): SiteController->run() +#13 C:\Workplace\yii1.1.15\framework\web\CWebApplication.php(141): CWebApplication->runController() +#14 C:\Workplace\yii1.1.15\framework\base\CApplication.php(180): CWebApplication->processRequest() +#15 C:\Workplace\Apache2.4\htdocs\cj\index.php(25): CWebApplication->run() +REQUEST_URI=/cj/index.php?r=site/dictionary +in C:\Workplace\Apache2.4\htdocs\cj\protected\views\site\dictionaryResult.php (10) +in C:\Workplace\Apache2.4\htdocs\cj\protected\controllers\SiteController.php (69) +in C:\Workplace\Apache2.4\htdocs\cj\index.php (25) +2014/12/05 07:13:15 [error] [php] array_slice() expects parameter 1 to be array, null given (C:\Workplace\yii1.1.15\framework\web\CArrayDataProvider.php:95) +Stack trace: +#0 C:\Workplace\yii1.1.15\framework\web\CDataProvider.php(212): CArrayDataProvider->getData() +#1 C:\Workplace\yii1.1.15\framework\base\CComponent.php(111): CArrayDataProvider->getItemCount() +#2 C:\Workplace\Apache2.4\htdocs\cj\protected\views\site\dictionaryResult.php(13): CArrayDataProvider->__get() +#3 C:\Workplace\yii1.1.15\framework\web\CBaseController.php(126): require() +#4 C:\Workplace\yii1.1.15\framework\web\CBaseController.php(95): SiteController->renderInternal() +#5 C:\Workplace\yii1.1.15\framework\web\CController.php(869): SiteController->renderFile() +#6 C:\Workplace\yii1.1.15\framework\web\CController.php(782): SiteController->renderPartial() +#7 C:\Workplace\Apache2.4\htdocs\cj\protected\controllers\SiteController.php(69): SiteController->render() +#8 C:\Workplace\yii1.1.15\framework\web\actions\CInlineAction.php(49): SiteController->actionDictionary() +#9 C:\Workplace\yii1.1.15\framework\web\CController.php(308): CInlineAction->runWithParams() +#10 C:\Workplace\yii1.1.15\framework\web\CController.php(286): SiteController->runAction() +#11 C:\Workplace\yii1.1.15\framework\web\CController.php(265): SiteController->runActionWithFilters() +#12 C:\Workplace\yii1.1.15\framework\web\CWebApplication.php(282): SiteController->run() +#13 C:\Workplace\yii1.1.15\framework\web\CWebApplication.php(141): CWebApplication->runController() +#14 C:\Workplace\yii1.1.15\framework\base\CApplication.php(180): CWebApplication->processRequest() +#15 C:\Workplace\Apache2.4\htdocs\cj\index.php(25): CWebApplication->run() +REQUEST_URI=/cj/index.php?r=site/dictionary +in C:\Workplace\Apache2.4\htdocs\cj\protected\views\site\dictionaryResult.php (13) +in C:\Workplace\Apache2.4\htdocs\cj\protected\controllers\SiteController.php (69) +in C:\Workplace\Apache2.4\htdocs\cj\index.php (25) +2014/12/05 07:14:57 [error] [php] array_slice() expects parameter 1 to be array, null given (C:\Workplace\yii1.1.15\framework\web\CArrayDataProvider.php:95) +Stack trace: +#0 C:\Workplace\yii1.1.15\framework\web\CDataProvider.php(212): CArrayDataProvider->getData() +#1 C:\Workplace\yii1.1.15\framework\base\CComponent.php(111): CArrayDataProvider->getItemCount() +#2 C:\Workplace\Apache2.4\htdocs\cj\protected\views\site\dictionaryResult.php(13): CArrayDataProvider->__get() +#3 C:\Workplace\yii1.1.15\framework\web\CBaseController.php(126): require() +#4 C:\Workplace\yii1.1.15\framework\web\CBaseController.php(95): SiteController->renderInternal() +#5 C:\Workplace\yii1.1.15\framework\web\CController.php(869): SiteController->renderFile() +#6 C:\Workplace\yii1.1.15\framework\web\CController.php(782): SiteController->renderPartial() +#7 C:\Workplace\Apache2.4\htdocs\cj\protected\controllers\SiteController.php(69): SiteController->render() +#8 C:\Workplace\yii1.1.15\framework\web\actions\CInlineAction.php(49): SiteController->actionDictionary() +#9 C:\Workplace\yii1.1.15\framework\web\CController.php(308): CInlineAction->runWithParams() +#10 C:\Workplace\yii1.1.15\framework\web\CController.php(286): SiteController->runAction() +#11 C:\Workplace\yii1.1.15\framework\web\CController.php(265): SiteController->runActionWithFilters() +#12 C:\Workplace\yii1.1.15\framework\web\CWebApplication.php(282): SiteController->run() +#13 C:\Workplace\yii1.1.15\framework\web\CWebApplication.php(141): CWebApplication->runController() +#14 C:\Workplace\yii1.1.15\framework\base\CApplication.php(180): CWebApplication->processRequest() +#15 C:\Workplace\Apache2.4\htdocs\cj\index.php(25): CWebApplication->run() +REQUEST_URI=/cj/index.php?r=site/dictionary +in C:\Workplace\Apache2.4\htdocs\cj\protected\views\site\dictionaryResult.php (13) +in C:\Workplace\Apache2.4\htdocs\cj\protected\controllers\SiteController.php (69) +in C:\Workplace\Apache2.4\htdocs\cj\index.php (25) diff --git a/yii/protected/views/site/_dictionaryResultView.php b/yii/protected/views/site/_dictionaryResultView.php index 2471bd6..f05da6e 100644 --- a/yii/protected/views/site/_dictionaryResultView.php +++ b/yii/protected/views/site/_dictionaryResultView.php @@ -28,7 +28,7 @@ else } $genderSuffix = ""; -if ($data["animated"] !== "true" && $data["count"] === "NC_SINGULAR") +if ($data["count"] === "NC_SINGULAR") { if ($data["gender"] === "0") { @@ -60,7 +60,7 @@ else if ($data["grammaticalCase"] === "NGC_P1_NOMINATIVE") } else { - $combinedStr = $data["grammaticalCase"] . "_" . $data["count"]; + $combinedStr = $data["grammaticalCase"] . "_" . $data["count"] . $genderSuffix; echo str_replace('{noun}', $request, Yii::t('dict', $combinedStr)) . "
"; } diff --git a/yii/protected/views/site/dictionaryResult.php b/yii/protected/views/site/dictionaryResult.php index 5b620c4..54ab249 100644 --- a/yii/protected/views/site/dictionaryResult.php +++ b/yii/protected/views/site/dictionaryResult.php @@ -7,7 +7,15 @@ $this->pageTitle=Yii::t('app', Yii::app()->name) . ' - ' . Yii::t('app', 'Dictio

-getDataProvider()->itemCount, Yii::t('dict', '{n} records found.'))?> +resultExists()) +{ +echo str_replace('{n}', $model->getDataProvider()->itemCount, Yii::t('dict', '{n} records found.')); +} +else +{ +} +?>