Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
78 changes: 39 additions & 39 deletions features/language-core.feature
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Feature: Manage translation files for a WordPress install
Feature: Manage core translation files for a WordPress install

@require-wp-4.0
Scenario: Core translation CRUD
Expand Down Expand Up @@ -178,13 +178,13 @@ Feature: Manage translation files for a WordPress install
"""

When I run `wp language core uninstall en_CA ja`
Then the wp-content/languages/admin-en_CA.po file should not exist
And the wp-content/languages/en_CA.po file should not exist
And the wp-content/languages/en_CA.l10n.php file should not exist
And the wp-content/languages/admin-ja.po file should not exist
And the wp-content/languages/ja.po file should not exist
And the wp-content/languages/ja.l10n.php file should not exist
And STDOUT should be:
Then the wp-content/languages/admin-en_CA.po file should not exist
And the wp-content/languages/en_CA.po file should not exist
And the wp-content/languages/en_CA.l10n.php file should not exist
And the wp-content/languages/admin-ja.po file should not exist
And the wp-content/languages/ja.po file should not exist
And the wp-content/languages/ja.l10n.php file should not exist
And STDOUT should be:
"""
Success: Language uninstalled.
Success: Language uninstalled.
Expand Down Expand Up @@ -439,52 +439,52 @@ Feature: Manage translation files for a WordPress install
Die aktuelle Version wird installiert
"""

@require-wp-4.0
Scenario: Show correct active language after switching
Given a WP install
And an empty cache
@require-wp-4.0
Scenario: Show correct active language after switching
Given a WP install
And an empty cache

When I try `wp language core is-installed en_US`
Then the return code should be 0
When I try `wp language core is-installed en_US`
Then the return code should be 0

When I run `wp language core install de_DE`
Then the wp-content/languages/admin-de_DE.po file should exist
And the wp-content/languages/de_DE.po file should exist
And STDOUT should contain:
When I run `wp language core install de_DE`
Then the wp-content/languages/admin-de_DE.po file should exist
And the wp-content/languages/de_DE.po file should exist
And STDOUT should contain:
"""
Success: Installed 1 of 1 languages.
"""
And STDERR should be empty
And STDERR should be empty

When I try `wp language core is-installed de_DE`
Then the return code should be 0
When I try `wp language core is-installed de_DE`
Then the return code should be 0

When I run `wp language core list --field=language --status=active`
Then STDOUT should be:
When I run `wp language core list --field=language --status=active`
Then STDOUT should be:
"""
en_US
"""

When I run `wp site switch-language de_DE`
Then STDOUT should be:
When I run `wp site switch-language de_DE`
Then STDOUT should be:
"""
Success: Language activated.
"""

When I run `wp language core list --field=language --status=active`
Then STDOUT should be:
When I run `wp language core list --field=language --status=active`
Then STDOUT should be:
"""
de_DE
"""

When I run `wp site switch-language en_US`
Then STDOUT should be:
When I run `wp site switch-language en_US`
Then STDOUT should be:
"""
Success: Language activated.
"""

When I run `wp language core list --field=language --status=active`
Then STDOUT should be:
When I run `wp language core list --field=language --status=active`
Then STDOUT should be:
"""
en_US
"""
Expand Down Expand Up @@ -536,15 +536,15 @@ Feature: Manage translation files for a WordPress install
en_US
"""

@require-wp-4.0
Scenario: List languages by multiple statuses
Given a WP install
And an empty cache
And I run `wp language core install nl_NL`
@require-wp-4.0
Scenario: List languages by multiple statuses
Given a WP install
And an empty cache
And I run `wp language core install nl_NL`

When I run `wp language core list --fields=language,status --status=active,installed`
Then STDOUT should be a table containing rows:
When I run `wp language core list --fields=language,status --status=active,installed`
Then STDOUT should be a table containing rows:
| language | status |
| en_US | active |
| nl_NL | installed |
And STDERR should be empty
And STDERR should be empty
8 changes: 3 additions & 5 deletions features/language-plugin.feature
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Feature: Manage translation files for a WordPress install
Feature: Manage plugin translation files for a WordPress install

@require-wp-4.0
Scenario: Plugin translation CRUD
Expand Down Expand Up @@ -320,8 +320,7 @@ Feature: Manage translation files for a WordPress install

When I run `wp plugin install akismet --version=4.0 --force`
And I run `wp plugin install jetpack --version=6.4 --force`

When I run `wp language plugin list --all --fields=plugin,language,update,status`
And I run `wp language plugin list --all --fields=plugin,language,update,status`
Then STDOUT should be a table containing rows:
| plugin | language | update | status |
| akismet | de_DE_formal | available | installed |
Expand Down Expand Up @@ -371,7 +370,7 @@ Feature: Manage translation files for a WordPress install
"""

When I run `wp language plugin install jetpack de_DE`
And STDOUT should contain:
Then STDOUT should contain:
"""
Downloading translation from https://downloads.wordpress.org/translation/plugin/jetpack/6.0/de_DE.zip
"""
Expand All @@ -392,7 +391,6 @@ Feature: Manage translation files for a WordPress install
| jetpack | de_DE | none | installed |
And STDERR should be empty


@require-wp-4.0
Scenario: Install translations for all installed plugins
Given a WP install
Expand Down
2 changes: 1 addition & 1 deletion features/language-theme.feature
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Feature: Manage translation files for a WordPress install
Feature: Manage theme translation files for a WordPress install

@require-wp-4.0
Scenario: Theme translation CRUD
Expand Down