Giter Club home page Giter Club logo

dynamo's Introduction

Welcome to the Polylang repository on GitHub. Here you can browse the source, discuss open issues and keep track of the development.

If you are not a developer, we recommend to download Polylang from WordPress directory.

Before starting, make sure that you have the following software installed and working on your computer:

  1. A local WordPress (6.2 or later) instance
  2. Git to clone the Polylang repository (or your fork of the Polylang repository).
  3. Node.js which provides NPM. They are both required by Webpack that Polylang uses to build and minify CSS and javascript files. We recommend to install Node.js LTS version.
  4. Composer because Polylang uses its autoloader to work and it is required to install development tools such as PHP CodeSniffer that ensures your code follows coding standards.

The simplest way is to clone locally this repository and build it directly in your local WordPress instance by following the steps below:

  1. Go to your local WordPress instance wp-content/plugins/ folder:
    cd your/local/wordpress/path/wp-content/plugins
  2. Clone there the polylang repository (or your fork) from GitHub:
    git clone https://github.com/polylang/polylang.git
  3. Go to your local Polylang clone folder from there: cd polylang
  4. Run the composer command: composer build
  5. Activate Polylang as if you had installed it from WordPress.org:
    See https://wordpress.org/plugins/polylang/#installation

Note: we recommend for Windows users to use Git Bash provided with Git for Windows instead of the command or powershell terminal.

dynamo's People

Contributors

chouby avatar sebastienserre avatar szepeviktor avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

szepeviktor

dynamo's Issues

Fatal error: Uncaught Error: fread(): Argument #2 ($length) must be greater than 0

php v8.2.7
WordPress v6.2.2
WPML v4.6.3
WPML String Translation v3.2.5
Gravity Forms Multilingual v1.7.2
Gravity Forms v2.7.8

Activated GF Multilingual.
"completed" translation of the form.
Browsed front end page where form shows.
Got "Fatal error: Uncaught Error: fread(): Argument #2 ($length) must be greater than 0 at .../src/Dynamic/mo-reader.php line 111"

I added a workaround:
if( !$translations[ (int) $headers_idx ]) {
return false;
}
so fread() is not called with an invalid argument #2
I suspect there is something fundamental going on to cause this error though?

Investigate possible new performance improvements

This issue is a summary of ideas that could be implemented in the future if they are worth it.

  • Take profit of object cache if present (this feature was included in WPPP). See #10
  • Share the hash evaluation when looking for a string in multiple files of one domain (typically the default domain). This could be done by storing an array of already evaluated hash values in a static properties ( so shared across all instances of Hash_Search ).
  • Don't store the plural forms in $this->originals and thus avoid testing the existence of plural forms to use only strcmp() in Binary_Search. See #8
  • Is it useful to store original strings in $this->originals in Hash_Search? This seems to be useful for about 10% of the strings of the default domain.

_n() function breaks due to a conflict between Dynamo and WPML

Plugins activated
Dynamo 1.0
WooCommerce 6.0
WPML Multilingual CMS 4.5.2
WooCommerce Multilingual 4.12.4
WPML String Translation 3.2.0
WPML Media 2.7.0

Describe the bug
reported here
We get a conflict between Dynamo and WPML which breaks the _n() function. When adding a unique item to the cart I get Warning: sprintf(): Too few arguments in /app/wp-content/plugins/woocommerce/includes/wc-cart-functions.php on line 118

When adding a unique item this is the singular message which is called and that triggers the issue. We don't get the same issue when adding several items into cart. The plural message doesn't trigger the same issue.

The singular and plural message arelocated at https://github.com/woocommerce/woocommerce/blob/3611d4643791bad87a0d3e6e73e031bb80447417/plugins/woocommerce/includes/wc-cart-functions.php#L118
$added_text = sprintf( _n( '%s has been added to your cart.', '%s have been added to your cart.', $count, 'woocommerce' ), wc_format_list_of_items( $titles ) );

This issue happens with Dynamo and WPML together. There isn't the problem when they are activated separately.

Steps to reproduce
Go to the front > add to the cart a unique French product. This action triggers the warning mentioned above.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.