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

Fix GitHub label generation; use third-person singular for commands #18

Merged
merged 1 commit into from
Dec 6, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
58 changes: 34 additions & 24 deletions .github/settings.yml
Original file line number Diff line number Diff line change
@@ -1,26 +1,36 @@
# Used by Probot Settings: https://probot.github.io/apps/settings/
repository:
description: Manage language packs.
labels:
- name: scope:documentation
color: 0e8a16
- name: scope:testing
color: 5319e7
- name: good-first-issue
color: eb6420
- name: state:unconfirmed
color: bfe5bf
- name: state:unsupported
color: bfe5bf
- name: command:language
color: c5def5
- name: command:language-core-activate
color: c5def5
- name: command:language-core-install
color: c5def5
- name: command:language-core-list
color: c5def5
- name: command:language-core-uninstall
color: c5def5
- name: command:language-core-update
color: c5def5
description: Installs, activates, and manages language packs.
labels:
- name: bug
color: fc2929
- name: scope:documentation
color: 0e8a16
- name: scope:testing
color: 5319e7
- name: good-first-issue
color: eb6420
- name: help-wanted
color: 159818
- name: maybelater
color: c2e0c6
- name: state:unconfirmed
color: bfe5bf
- name: state:unsupported
color: bfe5bf
- name: wontfix
color: c2e0c6
- name: command:language
color: c5def5
- name: command:language-core
color: c5def5
- name: command:language-core-activate
color: c5def5
- name: command:language-core-install
color: c5def5
- name: command:language-core-list
color: c5def5
- name: command:language-core-uninstall
color: c5def5
- name: command:language-core-update
color: c5def5
56 changes: 49 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
wp-cli/language-command
=======================

Manage language packs.
Installs, activates, and manages language packs.

[![Build Status](https://travis-ci.org/wp-cli/language-command.svg?branch=master)](https://travis-ci.org/wp-cli/language-command)

Expand Down Expand Up @@ -31,14 +31,48 @@ wp language



### wp language core

Installs, activates, and manages core language packs.

~~~
wp language core
~~~

**EXAMPLES**

# Install the Dutch core language pack.
$ wp language core install nl_NL
Success: Language installed.

# Activate the Dutch core language pack.
$ wp language core activate nl_NL
Success: Language activated.

# Uninstall the Dutch core language pack.
$ wp language core uninstall nl_NL
Success: Language uninstalled.

# List installed core language packages.
$ wp language core list --status=installed
+----------+--------------+-------------+-----------+-----------+---------------------+
| language | english_name | native_name | status | update | updated |
+----------+--------------+-------------+-----------+-----------+---------------------+
| nl_NL | Dutch | Nederlands | installed | available | 2016-05-13 08:12:50 |
+----------+--------------+-------------+-----------+-----------+---------------------+



### wp language core activate

Activate a given language.
Activates a given language.

~~~
wp language core activate <language>
~~~

**OPTIONS**

<language>
Language code to activate.

Expand All @@ -51,14 +85,16 @@ wp language core activate <language>

### wp language core install

Install a given language.
Installs a given language.

~~~
wp language core install <language>... [--activate]
~~~

Downloads the language pack from WordPress.org.

**OPTIONS**

<language>...
Language code to install.

Expand All @@ -75,12 +111,14 @@ Downloads the language pack from WordPress.org.

### wp language core list

List all available languages.
Lists all available languages.

~~~
wp language core list [--field=<field>] [--<field>=<value>] [--fields=<fields>] [--format=<format>]
~~~

**OPTIONS**

[--field=<field>]
Display the value of a single field

Expand Down Expand Up @@ -131,12 +169,14 @@ These fields are optionally available:

### wp language core uninstall

Uninstall a given language.
Uninstalls a given language.

~~~
wp language core uninstall <language>...
~~~

**OPTIONS**

<language>...
Language code to uninstall.

Expand All @@ -149,14 +189,16 @@ wp language core uninstall <language>...

### wp language core update

Update installed languages.
Updates installed languages.

~~~
wp language core update [--dry-run]
~~~

Updates installed languages for core, plugins and themes.

**OPTIONS**

[--dry-run]
Preview which translations would be updated.

Expand Down Expand Up @@ -203,7 +245,7 @@ Once you've decided to commit the time to seeing your pull request through, [ple

## Support

Github issues aren't for general support questions, but there are other venues you can try: http://wp-cli.org/#support
Github issues aren't for general support questions, but there are other venues you can try: https://wp-cli.org/#support


*This README.md is generated dynamically from the project's codebase using `wp scaffold package-readme` ([doc](https://github.com/wp-cli/scaffold-package-command#wp-scaffold-package-readme)). To suggest changes, please submit a pull request against the corresponding part of the codebase.*
3 changes: 2 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "wp-cli/language-command",
"description": "Manage language packs.",
"description": "Installs, activates, and manages language packs.",
"type": "wp-cli-package",
"homepage": "https://github.com/wp-cli/language-command",
"support": {
Expand Down Expand Up @@ -35,6 +35,7 @@
},
"commands": [
"language",
"language core",
"language core activate",
"language core install",
"language core list",
Expand Down
20 changes: 15 additions & 5 deletions src/WP_CLI/CommandWithTranslation.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,9 @@ abstract class CommandWithTranslation extends \WP_CLI_Command {
);

/**
* List all available languages.
* Lists all available languages.
*
* ## OPTIONS
*
* [--field=<field>]
* : Display the value of a single field
Expand Down Expand Up @@ -120,10 +122,12 @@ protected function sort_translations_callback( $a, $b ) {
}

/**
* Install a given language.
* Installs a given language.
*
* Downloads the language pack from WordPress.org.
*
* ## OPTIONS
*
* <language>...
* : Language code to install.
*
Expand Down Expand Up @@ -170,10 +174,12 @@ public function install( $args, $assoc_args ) {
}

/**
* Update installed languages.
* Updates installed languages.
*
* Updates installed languages for core, plugins and themes.
*
* ## OPTIONS
*
* [--dry-run]
* : Preview which translations would be updated.
*
Expand Down Expand Up @@ -263,7 +269,9 @@ public function update( $args, $assoc_args ) {
}

/**
* Activate a given language.
* Activates a given language.
*
* ## OPTIONS
*
* <language>
* : Language code to activate.
Expand Down Expand Up @@ -404,7 +412,9 @@ protected function get_all_languages() {
}

/**
* Uninstall a given language.
* Uninstalls a given language.
*
* ## OPTIONS
*
* <language>...
* : Language code to uninstall.
Expand Down