From 58d28c0bc448ec698008e4b37dadee45a98de179 Mon Sep 17 00:00:00 2001 From: Simon Karlen Date: Thu, 6 Jan 2022 07:35:27 +0100 Subject: [PATCH] added italian translation try bootstrapping approach updated composer.json --- composer.json | 5 +++-- src/i18n/TranslationBootstrap.php | 27 +++++++++++++++++++++++++++ src/messages/it/messages.mo | Bin 235 -> 527 bytes src/messages/it/messages.po | 10 +++++----- 4 files changed, 35 insertions(+), 7 deletions(-) create mode 100644 src/i18n/TranslationBootstrap.php 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 2ec054feea481bc080112dd6fac61c9dbc8bb5f1..16436f11783e8014993f7fbd64e6c350813a9c1a 100644 GIT binary patch literal 527 zcmZXQ%Sr<=6o#YL3w7sZrAS^NRu@94xUd(o&|=Zi{pn1cMyAP-q^%WS!*|f7Pv8@{ z)19~zT=@hp{HL@i^)Me_&f(+_%==32j-eL7CTM_Va0{}!2kYPgtbr%63SP$kgtx#q zcmx|Wj4i^?aF+QBFTrnPf50657mSb1fl19z4r6EcXF)FOhe{RN#(3u~rF*$@&wHb% zr)ajtLsRGWF6$$ delta 65 wcmeBYdCh2XPl#nI0}wC*u?!Ha05LNV>i{tbSOD=xAhrZzkQx}6EXBAP0QeOKH2?qr 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"