Skip to content

Commit

Permalink
add uk translation, update composer.json
Browse files Browse the repository at this point in the history
Igor Chepurnoy committed Jul 25, 2016
1 parent 571b77c commit f6da3a8
Showing 5 changed files with 64 additions and 18 deletions.
7 changes: 2 additions & 5 deletions composer.json
Original file line number Diff line number Diff line change
@@ -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": "*"
},
2 changes: 1 addition & 1 deletion messages/config.php
Original file line number Diff line number Diff line change
@@ -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
4 changes: 2 additions & 2 deletions messages/ru/yii2mod.settings.php
Original file line number Diff line number Diff line change
@@ -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 - страница не найдена!'
];
51 changes: 51 additions & 0 deletions messages/uk/yii2mod.settings.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
<?php
/**
* Message translations.
*
* This file is automatically generated by 'yii message' command.
* It contains the localizable messages extracted from source code.
* You may modify this file by translating the extracted messages.
*
* Each array element represents the translation (value) of a message (key).
* If the value is empty, the message is considered as not translated.
* Messages that no longer need translation will have their translations
* enclosed between a pair of '@@' marks.
*
* Message string can be used with plural forms format. Check i18n section
* of the guide for details.
*
* NOTE: this file must be saved in UTF-8 encoding.
*/
return [
'ID' => '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 - сторінка не знайдена!'
];
18 changes: 8 additions & 10 deletions migrations/m150227_114524_init.php
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
<?php

use yii\db\Schema;
use yii\db\Migration;

/**
* Class m150227_114524_init
* Init settings table
*/
class m150227_114524_init extends Migration
{
@@ -21,14 +19,14 @@ public function up()
}

$this->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);
}

0 comments on commit f6da3a8

Please sign in to comment.