Skip to content

Commit

Permalink
Update source-control requirement & WP-CLI docs (#158)
Browse files Browse the repository at this point in the history
* Elaborate on the source control requirements

* WP-CLI: Mention language-pack build —all flag

* Clarify plugin & theme integration documentation

* Update minimum requirements for registry.
  • Loading branch information
grappler authored and ocean90 committed Mar 15, 2019
1 parent c9e5dfc commit 0e48cbf
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 9 deletions.
6 changes: 3 additions & 3 deletions docs/cli.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,12 @@ Generate language packs for one or more projects.
wp traduttore language-pack build <project>
```

Language packs will automatically be updated upon translation changes.

This WP-CLI command is mostly useful for debugging / testing.
Language packs will automatically be updated upon translation changes. This WP-CLI command is mostly useful for debugging / testing.

Use the `--force` flag to force ZIP file generation, even if there were no changes since the last build.

Use the `--all` flag to generate the language packs for all active projects.

## List project language packs

List language packs for the given project.
Expand Down
6 changes: 4 additions & 2 deletions docs/installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,11 @@ To send Slack notifications, Traduttore requires a separate WordPress plugin. [L

Traduttore requires at least PHP 7.1, while the [Traduttore Registry](https://github.com/wearerequired/traduttore-registry) also supports PHP 7.0.

To download the latest code from your source code repositories, Traduttore requires Git to be installed on the server. For string extraction Traduttore requires [WP-CLI](https://wp-cli.org/) 2.0 or newer. [Learn more about the available CLI commands](cli.md).
To download the latest code from your source code repositories, Traduttore requires the respective version control to be installed on the server. Depending on the projects it may be Git, Subversion or Mercurial.

If you're not sure whether Git or WP-CLI are available on your system, please contact your hosting provider.
For string extraction Traduttore requires [WP-CLI](https://wp-cli.org/) 2.0 or newer. [Learn more about the available CLI commands](cli.md).

If you're not sure whether Git or WP-CLI are available on your system, please contact your hosting provider or run the WP-CLI command `wp traduttore info`.

## Installing Traduttore

Expand Down
8 changes: 4 additions & 4 deletions docs/integration.md → docs/plugin-theme.md
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
---
layout: default
title: Integrating Traduttore
title: Plugin & Theme Integration
nav_order: 9
---

# Integration
# Plugin & Theme Integration

Using our little helper library called [Traduttore Registry](https://github.com/wearerequired/traduttore-registry), you can then tell WordPress that translations for your project should be loaded from Traduttore.

**Note:** Traduttore Registry requires PHP 7.0 or higher.
**Note:** Traduttore Registry requires PHP 7.1 or higher.

## Setting up Traduttore Registry

If you're using [Composer](https://getcomposer.org/) to manage dependencies, you can use the following command to add the library to your WordPress plugin or theme:

```bash
composer require wearerequired/traduttore
composer require wearerequired/traduttore-registry
```

After that, you can use `Required\Traduttore_Registry\add_project( $type, $slug, $api_url )` in your theme or plugin.
Expand Down

0 comments on commit 0e48cbf

Please sign in to comment.