Customizing the panel texts
You can replace any text of the pane, of the error and test pages, and of the sign-in windows, without changing the application. For example, to show your support phone number in an error message.
Setting up
Create a folder for your texts, for example
translations/in the application folder.Set it in
.env:iniTRANSLATIONS_OVERRIDE_DIR=translationsWith Docker, mount the folder in the container (line provided as a comment in
docker-compose.yml) and set/app/translations.In this folder, create one file per language to change:
fr.json,en.json,de.jsonorit.json, all optional. Each one contains only the texts to replace, with the same structure as the application's files (public/locales/<language>.json):json{ "common": { "welcome": "Welcome to\nSave2ERP Acme" }, "errorMessage": { "systemUnavailable": { "action": "Call SAP support on 021 123 45 67." } } }Restart the server. The logs show the number of texts replaced.
Rules
- Do not copy a whole file: the other texts remain the application's and thus follow its updates.
- An error in a file never prevents startup: the text concerned is ignored and reported in the logs. This is the case for invalid JSON, an unavailable language, an unknown key (typo, or text removed in a new version).
- Keep the values in braces (
,…): without them, the value would not be shown. The server reports it in the logs. - After a Save2ERP update, read the logs again: a text whose key has changed is reported there.
What cannot be changed
- The texts of the manifest (add-in name, ribbon button and its tooltip): they are in the manifest provided by Swiss Computing.
- The messages returned by the target system, shown as is.
Custom texts remain your responsibility: in particular, they must not present the add-in as a product of the target system's vendor.