воскресенье, 27 июня 2021 г.

how to load BazingaJsTranslationBundle without ajax requests (+ inside Vue components)

  1. Install it as in bundle readme.md
  2. run `php bin/console bazinga:js-translation:dump public/js --format=js`
  3. add in your main template tag: <html lang="{{ app.request.locale|split('_')[0] }}">
  4. add in your js file:
    global.Translator = require('../public/bundles/bazingajstranslation/js/translator.min');
    require('../public/js/translations/messages/ru.js');
  5. if you need also access Translator via Vue, add it in your Vue initialization file:
    Vue.prototype.$t = Translator;
    And use it in your template like this: 
    {{ $t.trans('common.save') }}

вторник, 15 июня 2021 г.

[linux] how to optimize performance with browser hardware acceleration

I had performance issues mostly because browser slowed down everything. I just enabled flags "Override software rendering list" and "GPU rasterization" in chrome://flags and work become much better. I also works on Chrome/Chromium and Opera.

Works well on MSI 2pe leopard