From f6da3a84c8f033c76b4928a76254d9064fa9ec31 Mon Sep 17 00:00:00 2001 From: Igor Chepurnoy Date: Mon, 25 Jul 2016 18:55:43 +0300 Subject: [PATCH] add `uk` translation, update composer.json --- composer.json | 7 ++-- messages/config.php | 2 +- messages/ru/yii2mod.settings.php | 4 +-- messages/uk/yii2mod.settings.php | 51 ++++++++++++++++++++++++++++++ migrations/m150227_114524_init.php | 18 +++++------ 5 files changed, 64 insertions(+), 18 deletions(-) create mode 100644 messages/uk/yii2mod.settings.php diff --git a/composer.json b/composer.json index 99074b9..215e7b8 100644 --- a/composer.json +++ b/composer.json @@ -2,10 +2,7 @@ "name": "yii2mod/yii2-settings", "description": "Simple Yii2 settings extension", "type": "yii2-extension", - "keywords": [ - "yii2", - "extension" - ], + "keywords": ["yii2", "settings", "config", "storage"], "license": "MIT", "authors": [ { @@ -14,7 +11,7 @@ } ], "require": { - "yiisoft/yii2": "*", + "yiisoft/yii2": ">=2.0.8", "yii2mod/yii2-editable": "*", "yii2mod/yii2-enum": "*" }, diff --git a/messages/config.php b/messages/config.php index 34cdfe6..a99458f 100644 --- a/messages/config.php +++ b/messages/config.php @@ -5,7 +5,7 @@ 'sourcePath' => __DIR__ . DIRECTORY_SEPARATOR . '..', // array, required, list of language codes that the extracted messages // should be translated to. For example, ['zh-CN', 'de']. - 'languages' => ['en', 'ru'], + 'languages' => ['en', 'ru', 'uk'], // string, the name of the function for translating messages. // Defaults to 'Yii::t'. This is used as a mark to find the messages to be // translated. You may use a string for single function name or an array for diff --git a/messages/ru/yii2mod.settings.php b/messages/ru/yii2mod.settings.php index e974ff0..d01389c 100644 --- a/messages/ru/yii2mod.settings.php +++ b/messages/ru/yii2mod.settings.php @@ -45,7 +45,7 @@ 'Float' => 'Число с плавающей точкой', 'Null' => 'Null', 'Setting has been created.' => 'Настройка была сохранена.', - 'Setting has been updated.' => 'Настройка был обновлена.', - 'Setting has been deleted.' => 'Настройка был удалена.', + 'Setting has been updated.' => 'Настройка была обновлена.', + 'Setting has been deleted.' => 'Настройка была удалена.', 'The requested page does not exist.' => 'Ошибка 404 - страница не найдена!' ]; diff --git a/messages/uk/yii2mod.settings.php b/messages/uk/yii2mod.settings.php new file mode 100644 index 0000000..03bcbdc --- /dev/null +++ b/messages/uk/yii2mod.settings.php @@ -0,0 +1,51 @@ + 'ID', + 'Type' => 'Тип', + 'Section' => 'Розділ', + 'Key' => 'Ключ', + 'Value' => 'Значення', + 'Status' => 'Статус', + 'Created date' => 'Дата створення', + 'Updated date' => 'Дата поновлення', + 'Settings' => 'Налаштування', + 'Create Setting' => 'Створити Налаштування', + 'Select Type' => 'Виберіть Тип', + 'Select Section' => 'Виберіть Розділ', + 'Select Status' => 'Виберіть Статус', + 'Actions' => 'Дії', + 'Active' => 'Включений', + 'Inactive' => 'Вимкнений', + 'Update Setting: {0} -> {1}' => 'Редагування Настройки: {0} -> {1}', + 'Update Setting' => 'Редагування Настройки', + 'Update' => 'Редагувати', + 'Create' => 'Створити', + 'Delete' => 'Видалити', + 'Go Back' => 'Повернутися', + 'String' => 'Строка', + 'Integer' => 'Ціле число', + 'Boolean' => '0 или 1', + 'Float' => 'Число з плаваючою комою', + 'Null' => 'Null', + 'Setting has been created.' => 'Налаштування було створено.', + 'Setting has been updated.' => 'Налаштування було оновлено.', + 'Setting has been deleted.' => 'Налаштування було видалено.', + 'The requested page does not exist.' => 'Помилка 404 - сторінка не знайдена!' +]; diff --git a/migrations/m150227_114524_init.php b/migrations/m150227_114524_init.php index e66b7b9..fbfaeb9 100644 --- a/migrations/m150227_114524_init.php +++ b/migrations/m150227_114524_init.php @@ -1,11 +1,9 @@ createTable('{{%Setting}}', [ - 'id' => Schema::TYPE_PK, - 'type' => Schema::TYPE_STRING . '(10) NOT NULL', - 'section' => Schema::TYPE_STRING . ' NOT NULL', - 'key' => Schema::TYPE_STRING . ' NOT NULL', - 'value' => Schema::TYPE_TEXT . ' NOT NULL', - 'status' => Schema::TYPE_SMALLINT . ' NOT NULL', - 'createdAt' => Schema::TYPE_INTEGER . ' NOT NULL', - 'updatedAt' => Schema::TYPE_INTEGER . ' NOT NULL', + 'id' => $this->primaryKey(), + 'type' => $this->string(10)->notNull(), + 'section' => $this->string()->notNull(), + 'key' => $this->string()->notNull(), + 'value' => $this->text()->notNull(), + 'status' => $this->boolean(), + 'createdAt' => $this->integer()->notNull(), + 'updatedAt' => $this->integer()->notNull() ], $tableOptions); }