dazzle / behat-drupal-translations
允许您在Drupal中使用原始界面字符串,无需担心当前的语言。
dev-develop
2024-02-26 07:33 UTC
Requires
- php: >=7.2 || >=8.0
- drupal/drupal-extension: ^v5
This package is auto-updated.
Last update: 2024-09-26 08:49:32 UTC
README
此Behat和Drupal扩展使您可以将界面翻译功能集成到步骤中。
安装
通过Composer安装
composer require dazzle/behat-drupal-translations:dev-develop
用法
在您的Behat配置YAML文件中,在'extensions'部分添加以下部分
Dazzle\DrupalTranslations\Extension: ~
语法
string|t
string#context|t
示例步骤
...
And I press the "Pay|t" button
Then I should see the heading "Payment confirmation|t"
Then I should see the error message "Payment amount should be greater that @amount|1.000|t"
When I click "My payments#payments|t"
Then I should see the heading "My payments|t"
...
在后台,此扩展将使用当前语言并查找翻译。