Giter Site home page Giter Site logo

seokeys's People

Contributors

elisdn avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

seokeys's Issues

Переводы

Добрый день, Дмитрий.
Почитала ваши обучающие материалы.
Там этого еще нет - попыталась в исходниках разобраться.
Мне понравилась идея перенести переводы в модули.
И я смотрю у Вас идея эта реализована.
Но судя по коммитам, были метания между разными решениями.
Вот идея с AdminModule:t('admin', 'MESSAGE') у меня заработала.
папки переводов лежат в modules\admin\messages\en|ru
В модуле прописано следующее

public function registerTranslations() {
        Yii::$app->i18n->translations['modules/admin/*'] = [
            'class' => 'yii\i18n\PhpMessageSource',
            'sourceLanguage' => 'en',
            'basePath' => '@app/modules/admin/messages/',
            'fileMap' => [
                'modules/admin/admin' => 'admin.php',
            ],
        ];
    }

    public static function t($category, $message, $params = [], $language = null) {
        return Yii::t('modules/admin/'.$category, $message, $params, $language);
    }

Но я догадываюсь почему вы отказались от этого метода.
Писать каждый раз
use app\modules\admin\Module as AdminModule;
не очень хочется.

PS. в идеале хотелось бы использовать конструкцию внутри модуля
Yii::t('admin', ....... или Yii::t('admin-error', .......
при этом хранить файлы admin.php и admin-error.php внутри модуля admin

Как же всё таки реализовано у Вас сейчас.
Хотя настройки, я смотрю, вы выкинули, но файлы сообщений все же в модулях.
Спасибо, заранее

Class Fxp\Composer\AssetPlugin\Repository\NpmRepository does not exist

Composer вылетает с ошибкой:

Installation failed, deleting ./composer.json.

  [ReflectionException]                                                   
  Class Fxp\Composer\AssetPlugin\Repository\NpmRepository does not exist  

  [ErrorException]                                                             
  Declaration of Fxp\Composer\AssetPlugin\Repository\AbstractAssetsRepository  
  ::whatProvides() should be compatible with Composer\Repository\ComposerRepo  
  sitory::whatProvides(Composer\DependencyResolver\Pool $pool, $name, $bypass  
  Filters = false)  

Fix:

composer global require "fxp/composer-asset-plugin:~1.1.1"

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.