diff options
| author | 2025-11-16 18:44:07 +0100 | |
|---|---|---|
| committer | 2025-11-16 18:44:07 +0100 | |
| commit | b9abe706902c666d85cf60eb828a72c4f3062297 (patch) | |
| tree | 887eae20f83b8e39bb515933615b4a39428b965e /Makefile | |
| parent | cf4d8043d2076ba346e9890a41984d458e94c8dc (diff) | |
Add new translate action: `move`, `make i18n-move-key` (#8214)
So that renaming something like `conf.shortcut.toggle_sidebar` to `conf.shortcut.toggle_aside` can be done easily even after already having added `conf.shortcut.toggle_sidebar` and translated it in multiple languages.
Example of usage:
```console
./cli/manipulate.translation.php -a move -k conf.shortcut.toggle_sidebar -n conf.shortcut.toggle_aside
```
```console
make i18n-move-key key="conf.shortcut.toggle_sidebar" new-key="conf.shortcut.toggle_aside"
```
The key will be moved and all values/states will be kept.
Diffstat (limited to 'Makefile')
| -rw-r--r-- | Makefile | 11 |
1 files changed, 11 insertions, 0 deletions
@@ -114,6 +114,17 @@ endif @$(PHP) ./cli/manipulate.translation.php --action add --key $(key) --value "$(value)" @echo Key added. +.PHONY: i18n-move-key +i18n-move-key: ## Move an existing key into a new location +ifndef key + $(error To move a key, you need to provide one in the "key" variable) +endif +ifndef new-key + $(error To specify a location to move the key to, you need to provide it in the "new-key" variable) +endif + @$(PHP) ./cli/manipulate.translation.php --action move --key $(key) --new-key "$(new-key)" + @echo Key moved. + .PHONY: i18n-add-language i18n-add-language: ## Add a new supported language ifndef lang |
