Giter Site home page Giter Site logo

Comments (3)

bradyvercher avatar bradyvercher commented on June 11, 2024 1

This should be taken care of in 1fe234a. Basic testing showed duplicates were removed by simply parsing the POT file with a node gettext parser, then recompiling and saving the file.

I'll go ahead and close this out and push an update.

Thanks for the feedback @tollmanz. I hadn't considered the possibility of removing these dependencies beforehand, but like you said, it should exponentially improve the usability.

from grunt-wp-i18n.

bradyvercher avatar bradyvercher commented on June 11, 2024

For the sake of plugins and themes, it appears that the msguniq utility is the only dependency. It removes duplicate messages from POT files, which are invalid input for some other utilities. This looks like it typically only happens for some of the headers that WordPress appends after extracting gettexted strings.

The POT file will still be generated if msguniq isn't available, but a notice will be displayed and any duplicate strings will still exist.

I've searched for a node-based implementation of msguniq, but didn't have much luck. It might be as simple using a node parser to load the pot file, weed out the duplicates and re-save the file.

The other option is to bundle the msguniq binary with this package, but I'm not sure what the ramifications of that would be at the moment.

from grunt-wp-i18n.

tollmanz avatar tollmanz commented on June 11, 2024

Dude...dude! This is amazing! I really thought that this was a stretch goal and you pull it off in less than 24 hours. Amazing!

I'm going to put this task through the paces later this week. Thanks for the great work.

from grunt-wp-i18n.

Related Issues (20)

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.