forci/lexik-translation-ui-bundle

UI for LexikTranslationBundle

Installs: 2 670

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 3

Forks: 0

Open Issues: 0

Language:CSS

Type:symfony-bundle

v0.2.3 2018-09-22 16:59 UTC

This package is auto-updated.

Last update: 2024-04-16 07:53:58 UTC


README

Register the bundle as usual and mount its routing.

!! Make sure it is not publicly accessible.

forci_lexik_translation_ui:
    # A Service ID that implements
    # Forci\Bundle\LexikTranslationUIBundle\Authorization\TranslationAuthorizationCheckerInterface
    # Optional - example in sample app
    authorization_service: Your\AuthorizationChecker\ServiceId
    # Optional - example in sample app
    description_files:
        - '%kernel.root_dir%/../src/App/Resources/translations_descriptions.yml'
# translations_descriptions.yml
some.translation.key: Some descriptive text to be displayed inside the UI

Then, make a link somewhere in your app to

<a href="{{ path('forci_lexik_translation_ui_index') }}">
    Translations
</a>

Play with the Sample App

  • The forci_lexik_translation_ui.config.per_page parameter is hardcoded to 2 for the test application
cd sample/
./bin/console doctrine:database:create -e prod
./bin/console doctrine:schema:update -e prod -f
./bin/console lexik:translations:import App -e prod
./bin/console server:start
./bin/console server:start --docroot public/

If you would like to experiment/develop the user interface:

cd src/Resources/vue
npm install
npm run serve
// In order for the API to work, you need to start the local symfony server as per the above block
// build production assets
npm run build

TODO

  • favicon
  • logo
  • use vueup or something else for notificationsg