forci/lexik-translation-ui-bundle

LexikTranslationBundle的UI

安装量: 2,670

依赖者: 0

建议者: 0

安全: 0

星标: 0

关注者: 3

分支: 0

开放问题: 0

语言:CSS

类型:symfony-bundle

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

This package is auto-updated.

Last update: 2024-09-16 08:39:05 UTC


README

像通常一样注册bundle并挂载其路由。

!! 确保它不是公开可访问的。

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

然后,在您的应用程序中的某个位置创建一个链接到

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

试用示例应用程序

  • 对于测试应用程序,forci_lexik_translation_ui.config.per_page参数被硬编码为2
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/

如果您想实验/开发用户界面

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

待办事项

  • 图标
  • 徽标
  • 使用vueup或其他东西进行通知