i18n/*.po
Zammad translations are managed exclusively via translations.zammad.org.
You are welcome to contribute. Please get a free account there if you want to do so.
Any pull requests modifying translation files directly will be rejected.
app/views/mailer/*
and app/views/messaging/*
These back end template files are also managed via translations.zammad.org.
Translatable strings are extracted from the English templates. Any other languages are automatically generated from the available translated contents of translations.zammad.org.
Any pull requests modifying translated template files directly will be rejected.
i18n/text_modules/*.yml
Zammad text modules are automatically imported when the first admin user is created, according to this user's language. This is just meant to provide for a smooth start with some existing helpful text modules. They can be modified later on; no subsequent import from the example files will be performed.
Feel free to send pull requests to add more helpful examples to existing files or even files for new languages.
Writing strings that can be translated well and are a pleasure to read for the end user is not always easy.
lock
- this English word is ambiguous, it can be a noun (a lock
), an infinitive (to lock
) and an imperative (lock this!
). That makes it impossible to translate it properly.No email!
- this error message is not understandable for an end user.This is a sentence.
) or colons (My label:
) as part of the translatable string. This punctuation might look different in some languages and should therefore not be hardcoded."Open" + ticket_number
, good: "Open ticket %s"
(and pass ticket_number
as parameter). It's almost always a good idea to produce such slightly longer strings with placeholders. That helps translators to understand them and allows them to change the position of the placeholders in translations.you
and my
are fine (Do you want to proceed?
, My escalated tickets
). Other pronouns should be avoided, especially when talking about the software/system itself. Bad: I / we could not generate the key
. Use the passive (The key could not be generated
) or talk about Zammad
instead (Zammad does not support OTRS BPM processes
).i18n/zammad.*.po
are updated.Translation.sync
gets called, which happens for example during a package update.If changes to translatable strings are made during the development process, developers can just run the following to re-extract the strings to the catalog file:
rails generate zammad:translation_catalog
This will update the i18n/zammad.pot
file in Zammad. To do this for an existing addon module, call
rails generate zammad:translation_catalog --addon-path /path/to/addon
To perform additional tasks such as updating template files from translations, use:
rails generate zammad:translation_catalog --full
To test any changes made to translations in Weblate that are not yet published to Zammad, you can use this workflow:
i18n/zammad.pt-br.po
(for pt-br
in this case, use corresponding file names for other languages).rails r Translation.sync
to import the latest state to the database.See i18n.coffee
App.i18n.translateContent('translate and <b>html escape</b> and replace _markup_')
App.i18n.translateInline('translate and <b>html escape</b> and no _markup_')
App.i18n.translatePlain('plain text')
App.Ticket.find(1).created_at
"2021-06-10T09:45:30.394Z"
App.i18n.translateTimestamp(App.Ticket.find(1).created_at)
"10.06.2021 11:45"
App.Ticket.find(1).created_at
"2021-06-10T09:45:30.394Z"
App.i18n.translateDate(App.Ticket.find(1).created_at)
"10.06.2021"
Translation.translate('de-de', '3 high')
"3 hoch"
> obj = ObjectManager::Attribute.find_by(name: 'my_attribute')
=> #<ObjectManager::Attribute:0x0000564593325508
...
[34] pry(main)> obj.data_option['translate'] = true
=> true
[35] pry(main)> obj.save
=> true