diff --git a/composer.json b/composer.json index 85baea6..2c0251a 100644 --- a/composer.json +++ b/composer.json @@ -55,7 +55,8 @@ }, "extra": { "branch-alias": { - "dev-master": "1.0.x-dev" - } + "dev-master": "2.0.x-dev" + }, + "bootstrap": "yii\\bootstrap5\\i18n\\TranslationBootstrap" } } diff --git a/src/i18n/TranslationBootstrap.php b/src/i18n/TranslationBootstrap.php new file mode 100644 index 0000000..8a667c4 --- /dev/null +++ b/src/i18n/TranslationBootstrap.php @@ -0,0 +1,27 @@ + + */ + +namespace yii\bootstrap5\i18n; + +use yii\base\Application; + +/** + * This bootstrap implementation is used to add translations automatically to app configuration + */ +class TranslationBootstrap implements \yii\base\BootstrapInterface +{ + /** + * {@inheritDoc} + */ + public function bootstrap($app) + { + $app->i18n->translations['yii/bootstrap5*'] = [ + 'class' => '\yii\i18n\GettextMessageSource', + 'sourceLanguage' => 'en-US', + 'basePath' => '@yii/bootstrap5/messages' + ]; + } +} diff --git a/src/messages/it/messages.mo b/src/messages/it/messages.mo index 2ec054f..16436f1 100644 Binary files a/src/messages/it/messages.mo and b/src/messages/it/messages.mo differ diff --git a/src/messages/it/messages.po b/src/messages/it/messages.po index 2d57c94..49b326c 100644 --- a/src/messages/it/messages.po +++ b/src/messages/it/messages.po @@ -12,21 +12,21 @@ msgstr "" msgctxt "yii/bootstrap5" msgid "Button" -msgstr "" +msgstr "Bottone" msgctxt "yii/bootstrap5" msgid "Close" -msgstr "" +msgstr "Chiudi" msgctxt "yii/bootstrap5" msgid "Home" -msgstr "" +msgstr "Partenza" msgctxt "yii/bootstrap5" msgid "Show" -msgstr "" +msgstr "Indicare" msgctxt "yii/bootstrap5" msgid "Toggle Dropdown" -msgstr "" +msgstr "Attiva/Disattiva lista a tendina"