Skip to content

Use relative paths for file header references - #384

Merged
swissspidy merged 3 commits into
wp-cli:mainfrom
jkrrv:patch-1
Feb 13, 2024
Merged

Use relative paths for file header references#384
swissspidy merged 3 commits into
wp-cli:mainfrom
jkrrv:patch-1

Conversation

@jkrrv

@jkrrv jkrrv commented Feb 13, 2024

Copy link
Copy Markdown
Contributor

Resolves #383

@jkrrv
jkrrv marked this pull request as ready for review February 13, 2024 05:22
@jkrrv
jkrrv requested a review from a team as a code owner February 13, 2024 05:22
@swissspidy swissspidy changed the title Update MakePotCommand.php Feb 13, 2024
@swissspidy

Copy link
Copy Markdown
Member

Thanks for the fix!

Not sure why the test didn't catch this:

Scenario: Adds file references for file headers.
Given an empty foo-plugin directory
And a foo-plugin/foo-plugin.php file:
"""
<?php
/**
* Plugin Name: Foo Plugin
* Plugin URI: https://example.com
* Description: Plugin Description
* Version: 0.1.0
* Author:
* Author URI:
* License: GPL-2.0+
* License URI: http://www.gnu.org/licenses/gpl-2.0.txt
* Text Domain: foo-plugin
* Domain Path: /languages
*/
"""
When I try `wp i18n make-pot foo-plugin foo-plugin.pot`
Then the foo-plugin.pot file should exist
And the foo-plugin.pot file should contain:
"""
Description of the plugin
"""
And the foo-plugin.pot file should contain:
"""
#: foo-plugin.php
"""
And the foo-plugin.pot file should contain:
"""
Plugin Description
"""

Comment thread src/MakePotCommand.php Outdated
Co-authored-by: Pascal Birchler <pascal.birchler@gmail.com>
@jkrrv

jkrrv commented Feb 13, 2024

Copy link
Copy Markdown
Contributor Author

Awesome. Thanks for the speedy response.

@swissspidy swissspidy added this to the 2.6.1 milestone Feb 13, 2024
@swissspidy
swissspidy enabled auto-merge February 13, 2024 13:37
@swissspidy
swissspidy merged commit c251a9c into wp-cli:main Feb 13, 2024
saas786 added a commit to saas786/i18n-command that referenced this pull request May 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants