From b9abe706902c666d85cf60eb828a72c4f3062297 Mon Sep 17 00:00:00 2001 From: Inverle Date: Sun, 16 Nov 2025 18:44:07 +0100 Subject: 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. --- Makefile | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'Makefile') diff --git a/Makefile b/Makefile index 5b9871614..8ab9bee70 100644 --- a/Makefile +++ b/Makefile @@ -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 -- cgit v1.2.3