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

Are file references for plugin/theme headers supposed to be absolute paths? #383

Closed
jkrrv opened this issue Feb 13, 2024 · 1 comment · Fixed by #384
Closed

Are file references for plugin/theme headers supposed to be absolute paths? #383

jkrrv opened this issue Feb 13, 2024 · 1 comment · Fixed by #384
Labels

Comments

@jkrrv
Copy link
Contributor

jkrrv commented Feb 13, 2024

I realize support questions are supposed to go through other channels, but since this is closely related to #377 and #65, posting here made sense. (Though, let me know if elsewhere would still be better).

I'm a plugin developer and I'm noticing the header strings now being added to pot files, which is great! But, the file references being used are absolute paths, which seems odd to me.

I'm running on Windows, but this is holding true for the handful of plugins I work on.

Running wp-cli i18n make-pot . i18n/my-plugin.pot from the root directory of the plugin results in the pot file containing:

...
#. Author URI of the plugin
#: V:\my-plugin\my-plugin.php
msgid "https://github.com/jkrrv"
msgstr ""

#: src/templates/admin/invKoForm.php:17
#: src/templates/admin/locationsKoForm.php:13
#: src/templates/admin/locationsKoForm.php:50
msgid "Delete"
msgstr ""
...

I've included the last header item, and the first regular string. The second item, the regular string, has the relative paths I expect. But the paths for the header strings are all absolute, which is not what I would expect. After all, these paths are going to be different for every developer or translator.

Is this intentional?

Thanks!

jkrrv added a commit to jkrrv/i18n-command that referenced this issue Feb 13, 2024
@jkrrv
Copy link
Contributor Author

jkrrv commented Feb 13, 2024

Based on the diff in #377, it appears the answer is 'no', it's not intentional. #384 is intended to resolve this.

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

Successfully merging a pull request may close this issue.

2 participants