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

Extract all supported functions. #13

Merged
merged 6 commits into from
Jan 22, 2018
Merged

Extract all supported functions. #13

merged 6 commits into from
Jan 22, 2018

Conversation

gitlost
Copy link
Contributor

@gitlost gitlost commented Jan 13, 2018

See #12 (comment)

Renames function map names to be more meaningful in WordPress_Code_Extractor and supports all in WordPress_Functions_Scanner::saveGettextFunctions() and errors if unmapped found.

Also errors if comments_number_link() found (not sure what to do here).

Adds tests.

@gitlost
Copy link
Contributor Author

gitlost commented Jan 13, 2018

https://github.com/oscarotero/Gettext requires PHP 5.4!

@swissspidy
Copy link
Member

Hmm. I simply copied comments_number_link() from the existing makepot.php file. Turns out, this isn't even an existing function in WordPress. At least not anymore.

It was added to the script over seven years ago in https://i18n.trac.wordpress.org/changeset/15325. I guess it's a remnant from the earlier days of WordPress.

We should remove it from this script as it serves no purpose.

@swissspidy
Copy link
Member

Actually, I think we can remove support for _n_js() and _nx_js() as well since they don't exist in WordPress.

These functions were added to makepot.php in https://i18n.trac.wordpress.org/changeset/20807 to test patches for the #22229 ticket in WordPress core. I used the same function in another patch for #20491.

We can remove them now and re-add them as soon as they actually exist. However, I don't think these functions will ever make it to core in that form

@swissspidy swissspidy requested a review from a team January 22, 2018 16:28
@swissspidy swissspidy mentioned this pull request Jan 22, 2018
@schlessera schlessera merged commit 3771364 into master Jan 22, 2018
@schlessera schlessera deleted the functions-fix branch January 22, 2018 21:24
@schlessera schlessera added this to the 0.1.0 milestone Jan 22, 2018
schlessera added a commit that referenced this pull request Jan 6, 2022
Extract all supported functions.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants