File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -328,3 +328,33 @@ Feature: Manage theme translation files for a WordPress install
328328 | en_US | active |
329329 | nl_NL | installed |
330330 And STDERR should be empty
331+
332+ @require-wp-4.0
333+ Scenario : Handle themes with text domain different from slug
334+ Given a WP install
335+ And an empty cache
336+
337+ # Create a test theme with a different text domain
338+ Given a wp-content/themes/test-theme/style.css file:
339+ """
340+ /*
341+ Theme Name: Test Theme
342+ Text Domain: different-text-domain
343+ */
344+ """
345+
346+ # Manually create a translation file using the text domain (not the theme slug)
347+ And a wp-content/languages/themes/different-text-domain-de_DE.l10n.php file:
348+ """
349+ """
350+
351+ When I run `wp language theme list test-theme --fields=language,status --format=csv`
352+ Then STDOUT should contain:
353+ """
354+ en_US,active
355+ """
356+ And STDERR should be empty
357+
358+ # If the fix is working, installed languages should be detected via text domain
359+ When I run `wp language theme is-installed test-theme de_DE`
360+ Then the return code should be 0
You can’t perform that action at this time.
0 commit comments