Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Incorrect POT license info for themes without a license in the header #398

Closed
2 tasks done
meszarosrob opened this issue Apr 26, 2024 · 1 comment · Fixed by #399
Closed
2 tasks done

Incorrect POT license info for themes without a license in the header #398

meszarosrob opened this issue Apr 26, 2024 · 1 comment · Fixed by #399

Comments

@meszarosrob
Copy link
Contributor

Bug Report

Describe the current, buggy behavior

If in a Theme Header (style.css) the License is not added, when I generate the POT file, I see the This file is distributed under the .

"Copyright (C) %1\$s %2\$s\nThis file is distributed under the %3\$s.",

Describe how other contributors can replicate this bug

Scenario: Wrong license information is displayed for the theme
  Given an empty foo-theme directory
  And a foo-theme/style.css file:
    """
    /*
    Theme Name: Foo Theme
    */
    """

  When I run `wp i18n make-pot foo-theme foo-theme.pot`
  Then the foo-theme.pot file should contain:
    """
    # This file is distributed under the .
    """

Describe what you would expect as the correct outcome

To see the This file is distributed under the same license as the X theme.

"Copyright (C) %1\$s %2\$s\nThis file is distributed under the same license as the %3\$s theme.",

Let us know what environment you are running this on

OS:     Linux 6.5.0-10027-tuxedo
Shell:  
PHP binary:     /usr/bin/php8.0
PHP version:    8.0.30
php.ini used:   /etc/php/8.0/cli/php.ini
MySQL binary:   /usr/bin/mysql
MySQL version:  mysql  Ver 15.1 Distrib 10.5.21-MariaDB, for debian-linux-gnu (x86_64) using  EditLine wrapper
SQL modes:      STRICT_TRANS_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION
WP-CLI root dir:        phar://wp-cli.phar/vendor/wp-cli/wp-cli
WP-CLI vendor dir:      phar://wp-cli.phar/vendor
WP_CLI phar path:       /var/www/html
WP-CLI packages dir:    
WP-CLI cache dir:       /home/user/.wp-cli/cache
WP-CLI global config:   
WP-CLI project config:  /var/www/html/wp-cli.yml
WP-CLI version: 2.9.0

Provide additional context/Screenshots

There was PR that fixed this for the plugins #199

@swissspidy
Copy link
Member

Makes sense to me 👍 Are you interesting in writing a pull request for it? :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants