Update /theme-check/checks/class-title-check.php. Validate two text-d… #463
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Validate two text-domains for child themes
File: /theme-check/checks/class-textdomain-check.php
Error:
The file correctly collects all unique text domains used in both parent and child themes. However, it incorrectly expects that only one text domain has been used across both parent and child themes. As a result, it displays an error message when the two correct domains (one for the parent theme and one for the child theme) are found.
Fix:
When, and only when, valid text domains for both child and parent themes are found, an appropriate "INFO" message is displayed instead of an error.
Reasoning behind the fix:
The parent theme must be activated to use a child theme. Consequently, the parent theme should be translated into any language that the child theme is being translated into. Therefore, when validating a child theme, it makes sense to check for both the parent and child theme text domains.