Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision | |||
tutorial:adm:personalize_localization [2018/12/28 13:31] kotisovam [Script run] |
tutorial:adm:personalize_localization [2022/11/28 14:27] (current) kopro |
||
---|---|---|---|
Line 1: | Line 1: | ||
====== Personalize localization ====== | ====== Personalize localization ====== | ||
+ | |||
+ | <WRAP center round info 60%> | ||
+ | |||
+ | This tutorial may be obsole for newer version. | ||
+ | |||
+ | </ | ||
If you want to personalize some of error, warning, info messages, labels, buttons, etc. you can use the simple shell script (for now, TODO is the script only for Linux systems). | If you want to personalize some of error, warning, info messages, labels, buttons, etc. you can use the simple shell script (for now, TODO is the script only for Linux systems). | ||
- | Presently, you can download the script | + | Presently, you can download the script (TODO script will be part of the product). |
Place the script into the built-in frontend (eq. czechidm-app/ | Place the script into the built-in frontend (eq. czechidm-app/ | ||
As **pre-requisites** you must install [[https:// | As **pre-requisites** you must install [[https:// | ||
- | | + | < |
+ | |||
+ | $ apt-get install jq | ||
+ | |||
+ | </ | ||
Set up a script permission: | Set up a script permission: | ||
- | $ chmod +x localizationTransform.sh | ||
- | | ||
- | Create file '' | ||
+ | < | ||
+ | $ chmod +x localizationTransform.sh | ||
+ | |||
+ | </ | ||
+ | |||
+ | Create file '' | ||
< | < | ||
build.sh | build.sh | ||
Line 27: | Line 40: | ||
package.json | package.json | ||
src | src | ||
+ | |||
</ | </ | ||
Line 32: | Line 46: | ||
In file '' | In file '' | ||
+ | < | ||
+ | < | ||
- | | + | </code> |
* **MODULE_ID**: | * **MODULE_ID**: | ||
Line 39: | Line 55: | ||
* **LOCALIZATION KEY**: key of override message, | * **LOCALIZATION KEY**: key of override message, | ||
* **LOCALIZATION MESSAGE**: new localization message | * **LOCALIZATION MESSAGE**: new localization message | ||
+ | Examples: | ||
- | |||
- | Examples: | ||
< | < | ||
core; | core; | ||
Line 49: | Line 64: | ||
acc; | acc; | ||
acc; | acc; | ||
+ | |||
</ | </ | ||
===== Script run ===== | ===== Script run ===== | ||
- | | + | |
+ | < | ||
+ | $ ./ | ||
+ | |||
+ | </ | ||
On running the script, you get a message displaying the standard output. If some localization key will not be found though, you will receive an error message pointing out the reason for failure: | On running the script, you get a message displaying the standard output. If some localization key will not be found though, you will receive an error message pointing out the reason for failure: | ||
- | | + | |
+ | < | ||
+ | FAILED key: ' | ||
+ | |||
+ | </ | ||
===== Example output of script ===== | ===== Example output of script ===== | ||
< | < | ||
- | ➜ dist ./ | + | ➜ dist ./ |
- | | + | |
- | / ___|_______ | + | / ___|_______ |
- | | | | + | |
- | | |___ / / __/ (__| | | | | | (_| | | | | | + | |
- | \____/ | + | \____/ |
- | | + | |
- | | _ )/ __\ \ / / ___ ___| |_ _| |_(_)___ _ _ ___ | + | | _ )/ __\ \ / / ___ ___| |
- | | _ \ (__ \ V / (_-</ _ \ | || | _| / _ \ ' \(_-< | + | | _ \ (__ \ V / (_-</ _ \ | |
- | |___/\___| \_/ / | + | |
Script for transfrom lozalization message from build FE project | Script for transfrom lozalization message from build FE project | ||
Line 83: | Line 106: | ||
</ | </ | ||
+ | |||
+ |