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

Decide on command name #11

Closed
schlessera opened this issue Jan 9, 2018 · 8 comments
Closed

Decide on command name #11

schlessera opened this issue Jan 9, 2018 · 8 comments
Milestone

Comments

@schlessera
Copy link
Member

@miya0001 :

makepot is verb, but other commands on wp-cli are noun. Is it ok?

We should discuss the best name for this command, as wp makepot is less than ideal.

Options so far:
wp i18n ...
wp translations ...
wp pot make

@swissspidy :

I'd prefer wp i18n, e.g. wp i18n makepot or wp i18n addtextdomain

@kjohnson
Copy link

kjohnson commented Jan 9, 2018

Would gettext be the WordPress noun for this?
Seems to match the language of the related filter: https://codex.wordpress.org/Plugin_API/Filter_Reference/gettext

@swissspidy
Copy link
Member

Grouping these commands under wp i18n would make it possible to add other commands in the future if needed. One such command (addtextdomain or checktextdomain) is being discussed in #7. Then it could look like this:

  • wp i18n makepot
  • wp i18n addtextdomain

Plus, users could use this namespace, if you so will, for their own sub commands.


wp translations would be too close to wp language, which is a command for dealing with translation files in a WP install.

@schlessera
Copy link
Member Author

Yes, looks good. We should just use a dash to separate the verb parts:

  • wp i18n make-pot
  • wp i18n add-text-domain

@swissspidy swissspidy added this to the 0.1.0 milestone Jan 12, 2018
@swissspidy
Copy link
Member

Maybe with another verb then? Perhaps wp i18n generate-pot or wp i18n create-pot? Or even wp i18n pot create (like wp comment create).

@schlessera
Copy link
Member Author

schlessera commented Jan 12, 2018

wp i18n pot create sounds like it would be a good fit, but I fear that it might be too close to CRUD and people start to assume they can also list and get and delete and ...

@swissspidy
Copy link
Member

Another reason for wp i18n would be that in the future, WordPress core will likely adopt a (better) way to translate JavaScript applications (like Gutenberg). This means there's a need to extract strings from JavaScript and generate a catalog file for them as well. Jed

If it's possible to do extract these strings with PHP (maybe even with the same library), there could be a new wp i18n <…> command in addition to the makepot one.

@schlessera
Copy link
Member Author

Okay, to move forward, let's go with the following:

  • Use wp i18n as the command namespace here.
  • Use wp i18n make-pot as the subcommand for now. It is the most obvious one, I think.
  • Once we further flesh out additional commands, we can reconsider the make-pot name and use an alias for back-compat as needed.

@swissspidy
Copy link
Member

Cool. I'll work on that once #13 is merged, to avoid conflicts.

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

No branches or pull requests

3 participants