Translation guidelines
All translations are stored im Yaml files. As it is a Yaml file, its format is very important. If you use windows, one of the choices for editing YAML files would be Notepad++ (http://notepad-plus-plus.org/). Do not edit it in default Windows Notepad as it does not highlight syntax.
Here are some guidelines how to edit translation file:
- As you can see it is kind of a structure and it is very important that number of spaces before "keys" won't change. Every nested line must have 2 more spaces than its parent.
- Keys that precede colons must not be translated, only the right part of each line, just after a colon - like "sleeps 1 adult" etc.
In the right part of a line you can find some strings enclosed with curly brackets, like "Child %{number}". In this case, only “Child" word should be translated as %{number} is a variable. You can also find there parts of plain HTML like "<span>Show cities with at least </span><span class="min-val">0</span><span> hotels</span>" - in this case, only text inside tags (marked in red) should be translated.
- After editing, save a file in UTF8 encoding.
Sample file
en: default: consts: occupancy: room_type: SR: "Single" DS: "Double for single use" DR: "Double" TW: "Twin" TR: "Triple" QR: "Quad" room_type_label: SR: "sleeps 1 adult" DS: "sleeps 1 adult" DR: "sleeps 2 adults" TW: "sleeps 2 adults" TR: "sleeps 3 adults" QR: "sleeps 4 adults" date: formats: topbar: '%e-%m-%Y' review_stay: '%b %Y' validation: error_message: no_agency_of_number: 'Agency of number: %{number} for tenant: %{tenant} could not be found.'
Sample file after translation to Polish
pl: default: consts: occupancy: room_type: SR: "Jedynka" DS: "Podwójny dla jednej osoby" DR: "Podwójny, 1 łóżko" TW: "Podwójny, 2 łóżka" TR: "Trójka" QR: "Czwórka" room_type_label: SR: "mieści 1 dorosłego" DS: "mieści 1 dorosłego" DR: "mieści 2 dorosłych" TW: "mieści 2 dorosłych" TR: "mieści 3 dorosłych" QR: "mieści 4 dorosłych" date: formats: topbar: '%e-%m-%Y' review_stay: '%b %Y' validation: error_message: no_agency_of_number: 'Agencja o numerze: %{number} dla tenanta: %{tenant} nie została znaleziona.'