forci /lexik-translation-ui-bundle
LexikTranslationBundle的UI
v0.2.3
2018-09-22 16:59 UTC
Requires
- php: >=7.1.3
- lexik/translation-bundle: ~4.0
- symfony/form: ~2.0|~3.0|~4.0
- symfony/framework-bundle: ~2.0|~3.0|~4.0
- symfony/translation: ~2.0|~3.0|~4.0
- symfony/yaml: ~2.0|~3.0|~4.0
Requires (Dev)
- doctrine/doctrine-bundle: ~1.9
- doctrine/orm: ~2.6
- friendsofphp/php-cs-fixer: ^2.8
- symfony/debug-bundle: ~4.0
- symfony/security-csrf: ^4.1
- symfony/twig-bundle: ~4.1.4
- symfony/web-profiler-bundle: ~4.0
- symfony/web-server-bundle: ^4.1
- twig/twig: ~2.0
- wucdbm/php-cs-fixers: ~0.1
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或其他东西进行通知