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

Comments

3 participants
@schlessera
Copy link
Member

schlessera commented Jan 9, 2018

@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

This comment has been minimized.

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

This comment has been minimized.

Copy link
Member

swissspidy commented Jan 9, 2018

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

This comment has been minimized.

Copy link
Member Author

schlessera commented Jan 10, 2018

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

This comment has been minimized.

Copy link
Member

swissspidy commented Jan 12, 2018

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

This comment has been minimized.

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

This comment has been minimized.

Copy link
Member

swissspidy commented Jan 21, 2018

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

This comment has been minimized.

Copy link
Member Author

schlessera commented Jan 22, 2018

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

This comment has been minimized.

Copy link
Member

swissspidy commented Jan 22, 2018

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
You can’t perform that action at this time.