GithubHelp home page GithubHelp logo

Comments (6)

greatislander avatar greatislander commented on June 15, 2024 1

@swissspidy That would be useful as well, yes.

from i18n-command.

greatislander avatar greatislander commented on June 15, 2024 1

I like the JSON --headers idea. Much more flexible than adding a bunch of parameters. I'd be happy to work on a PR for that. And I'd lean towards the --comments parameter (again, over specificity that could be unnecessarily limiting).

from i18n-command.

swissspidy avatar swissspidy commented on June 15, 2024

Tools like grunt-wp-i18n also allow specifying a custom copyright comment notice. Would that be needed too in your case?

from i18n-command.

swissspidy avatar swissspidy commented on June 15, 2024

Related: wp-cli/wp-cli#4616, wp-cli/entity-command#133

We could add a --headers argument that allows passing an associative array in JSON format to add custom headers.

Example:

wp i18n make-pot --headers='{"Report-Msgid-Bugs-To":"https://github.com/wp-cli/i18n-command/issues"}'

This could also be useful to add other headers if one really wants to (see #48 and #49).

For the copyright notice I'd add a new --copyright argument (since it's a comment and not a header) or perhaps a new --comments argument that takes a comma separated list of comments to add (overriding the existing copyright notice if used). This would make things much more flexible.


I just noticed that the original makepot.php script has a description field for projects, e.g. Translation of the WordPress theme {name} {version} by {author}. However, that appears to be unused.

We might want to add this as a default comment to the POT file though as it can be useful when opening a POT file without context.

from i18n-command.

swissspidy avatar swissspidy commented on June 15, 2024

@greatislander I'd say go for it! :-) Happy to help when you encounter any problems.

from i18n-command.

greatislander avatar greatislander commented on June 15, 2024

Thanks, will let you know if I encounter any issues.

from i18n-command.

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.