dazzle/behat-drupal-translations

Allows you to use the original interface string in Drupal without worrying about the current language.

Installs: 11 361

Dependents: 0

Suggesters: 0

Security: 0

Stars: 2

Watchers: 3

Forks: 3

Open Issues: 1

Type:behat-extension

dev-develop 2024-02-26 07:33 UTC

This package is auto-updated.

Last update: 2024-04-26 08:05:00 UTC


README

This extension to Behat and the Drupal extension enables the power of translate interface into your steps.

Installation

Installation through composer:

composer require dazzle/behat-drupal-translations:dev-develop

Usage

In your Behat config YAML file add following part in the 'extensions':

Dazzle\DrupalTranslations\Extension: ~

Syntax:

string|t
string#context|t

Example steps:

...
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"
...

In the background this extension will use the current language and lookup the translation.

Credits

www.dazzle.be