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

Update oik-i18n for PHP 7.0, 7.1 and 7.2 #1

Closed
bobbingwide opened this issue Jul 22, 2016 · 4 comments
Closed

Update oik-i18n for PHP 7.0, 7.1 and 7.2 #1

bobbingwide opened this issue Jul 22, 2016 · 4 comments
Assignees

Comments

@bobbingwide
Copy link
Owner

oik-i18n, initially written in 2Q/3Q 2013, was built to extend WordPress's makepot solution to support the higher level API's used in the oik suite of plugins.

A number of things need to be done

  1. It needs to be under version control
  2. The code needs updating for PHP 7
  3. It should attempt to take advantage of the solution delivered for plugins & themes on WordPress.org

This issue is for the first two items in the list.

  • The files in the pomo directory should be updated to match the current version in WordPress.
  • makeoik.php should be updated to reflect improvements in makepot.php
@bobbingwide
Copy link
Owner Author

I'm going to defer updating the code to match the current version in WordPress since there are some functional changes that I need to apply anyway.

  1. Ignore the tests/ directory when building .pot files
  2. Cater for nested rules during the transition from the custom rules set in makeoik to the standard rules set in makepot. We need to be able to support calls such as
BW_::p( __( "string" )); 
p( "string" );

Without a minor change to the code the invocation of __() in the first line of the example is not found.

bobbingwide added a commit that referenced this issue Sep 13, 2017
@bobbingwide bobbingwide changed the title Update oik-i18n for PHP 7 Update oik-i18n for PHP 7.0, 7.1 and 7.2 Dec 6, 2017
@bobbingwide
Copy link
Owner Author

PHP is now at 7.2. Some parts of oik-i18n need changing to run correctly under PHP 7.2

Errors from oik-wp running l10n.php

[0] => 8192
[1] => Deprecated: Function create_function() is deprecated
[2] => C:\apache\htdocs\wordpress\wp-content\plugins\oik-i18n\makeoik.php
[3] => 242

[0] => 8192
[1] => Deprecated: Function create_function() is deprecated
[2] => C:\apache\htdocs\wordpress\wp-content\plugins\oik-i18n\pomo\po.php
[3] => 174

@bobbingwide
Copy link
Owner Author

bobbingwide commented Dec 7, 2017

Now that makeoik.php is run in a WordPress environment we should be able to use the files from wp-includes/Pomo rather than our local version. Also check how pot-ext-meta.php is supposed to be used; compare with oik-ext-meta.php

bobbingwide added a commit that referenced this issue Dec 5, 2018
@bobbingwide
Copy link
Owner Author

I've been running the routines with PHP 7.4 for a while now. Next time it'll be compatibility with PHP 8.

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

No branches or pull requests

1 participant