Appearance
Translations
See Xalok Translations maintenance
WARNING any translation must be generic and be suitable for ANY project (the translation will already be modified at the instance the project requires it).
In particular, the translations of the Starbase instance must be correct, since it is the one used to inject the default values into the codebase.
Deploy in a specific language
Deploy setting the variables:
yml
locale: {{ parameters.locale | default('es') }}
locale_ISO: {{ parameters.locale_ISO | default('es_ES') }}
locale_lang: {{ parameters.locale_lang | default('es-ES') }}
Steps to update new translations
- go to Starbase Translations and translate any required literal.
- inside Cobase run the
stranslations-save.sh
command (see below). - check changes (i.e.
git status
). - push changes to Cobase (i.e.
git add . && git commit -m Translations && git push
).
stranslations-save.sh
stranslations-save.sh
require ssh
access to a remote Xalok instance. Let zprepri be an ssh
access to the private Starbase Xalok instance, then:
shell
$ git clone https://git.xalok.com/webflow/xalok-go-cobase.git
$ cd xalok-go-cobase
$ ./vendor/wfcms/standard/Wf/Bundle/CmsBaseAdminBundle/Resources/bin/translations-save.sh \
-h zprepri \
-d starbase/vendor/xalok-go/cobase
Running:
host: zprepri
...
Extracting Translations for locale en
Keep old translations: No
...
Copying translation files from host zprepri, directory starbase/vendor/xalok-go/cobase
App.en.xlf 100% 814 8.1KB/s 00:00
App.es.xlf 100% 814 8.3KB/s 00:00
...
validators.en.xlf 100% 5892 58.7KB/s 00:00
validators.es.xlf 100% 5869 55.5KB/s 00:00
$ git status
...
modificado: app/public/Resources/translations/JSMessages.en.xlf
modificado: app/public/Resources/translations/JSMessages.es.xlf
...
$ git add . && git commit -m Translations && git push
[develop db30516] Translations
27 files changed, 3643 insertions(+), 2471 deletions(-)
create mode 100644 app/public/Resources/translations/St4rbase.en.xlf
create mode 100644 app/public/Resources/translations/St4rbase.es.xlf
...
create mode 100644 app/public/Resources/translations/WfAdmin.en.xlf
create mode 100644 app/public/Resources/translations/WfAdmin.es.xlf
rewrite app/public/Resources/translations/WfCms.es.yml (100%)
Enumerando objetos: 61, listo.
Contando objetos: 100% (61/61), listo.
Compresión delta usando hasta 4 hilos
Comprimiendo objetos: 100% (33/33), listo.
Escribiendo objetos: 100% (33/33), 30.04 KiB | 2.00 MiB/s, listo.
Total 33 (delta 30), reusado 0 (delta 0)
To https://git.xalok.com/webflow/xalok-go-cobase.git
e38cc73..db30516 develop -> develop
Custom translations
Two strategies exists for real time tags translation:
- use the database as backend. PROS better UI and lexik integration. CONS a lot of db calls.
- configure a small set into some
setting
. PROS only one db call for all request. CONS poor UI and lexik integration.
Currently we implement the second one into custom-translations
setting.