Mercurial > gemma
changeset 4253:922075a7d598
client:add rules to docs for translations
author | Fadi Abbud <fadi.abbud@intevation.de> |
---|---|
date | Fri, 23 Aug 2019 16:17:53 +0200 |
parents | a5694f6d62a4 |
children | f1f1395f141b |
files | client/docs/developer.md |
diffstat | 1 files changed, 7 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/client/docs/developer.md Fri Aug 23 12:04:19 2019 +0200 +++ b/client/docs/developer.md Fri Aug 23 16:17:53 2019 +0200 @@ -119,3 +119,10 @@ `component.vue ---> /tmp/template.pot ---> app/locale/fr_FR/LC_MESSAGES/app.po ---> app/translations.json` (taken from the documentation of `vue-gettext`) + +## Some rules to marking strings for translations + +- `gettext` must be called only in javascript part. For html part we use `<translate>` and `<v-translate>` to make sure that `makemessages` marks the strings correctly +- passing a value with \`\` to `gettext` leads to break up the translation process (e.g. gettext(\` text to translate ${value} \`)) +- passing html element (e.g. `<div>`) to gettext is interpreted as string. +- The strings to translate have to be included in the source code and not directly in `.po` files.