You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: README.md
+13-4
Original file line number
Diff line number
Diff line change
@@ -13,6 +13,8 @@ Composer plugin to download translation files for WordPress core, plugins and th
13
13
14
14
Optimized for the [Roots](https://roots.io/) stack, particularly Bedrock, but can be adapted to other setups based on Composer.
15
15
16
+
Supports Composer v2 (only).
17
+
16
18
Instructions are given relative to the Bedrock root folder, usually `site`.
17
19
18
20
## Installation
@@ -22,12 +24,12 @@ Install with:
22
24
$ composer require raph-topo/wp-translations
23
25
```
24
26
25
-
Set the following options in`composer.json`:
27
+
Add the following settings to`composer.json`:
26
28
```json
27
29
{
28
30
"extra": {
29
31
"wordpress-translations": [ "fr_FR" ],
30
-
"wordpress-languages-dir": "web/app/languages"
32
+
"wordpress-translations-dir": "web/app/languages"
31
33
}
32
34
}
33
35
```
@@ -40,10 +42,17 @@ Composer will try to install translations from through the WordPress.org API eve
40
42
41
43
**Commit the translation files** (`web/app/languages/{.,themes,plugins}/*{.mo,.po}`) and deploy them to staging and production.
42
44
45
+
From time to time, you might want to get rid of old translation files (plugins that were uninstalled, etc.) To do that, you must delete `web/app/languages` and follow _Extant projects_ hereunder.
46
+
43
47
## Extant projects
44
48
45
-
To force-update translations for already installed packages, delete the contents of `web/app/plugins` (keep any `.gitkeep`) and run `composer install`
49
+
To force-update translations for already installed packages, delete the contents of the following folders:
50
+
51
+
-`web/wp`
52
+
-`web/app/plugins`, except the file `web/app/plugins/.gitkeep`
53
+
54
+
Run `composer update`.
46
55
47
56
## Credits
48
57
49
-
This package was started by [Angry Creative](https://github.com/Angrycreative/composer-plugin-language-update), has been rewritten by [Bjørn Johansen](https://github.com/bjornjohansen/wplang) and integrates compatibility changes made by [Mirai](https://github.com/mirai-wordpress/wplang).
58
+
This package was started by [Angry Creative](https://github.com/Angrycreative/composer-plugin-language-update), has been rewritten by [Bjørn Johansen](https://github.com/bjornjohansen/wplang), integrates compatibility changes made by [Mirai](https://github.com/mirai-wordpress/wplang) and was updated to support Composer v2.
0 commit comments