The documentation for Plume.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

39 lines
1.8 KiB

  1. # Making Plume available in your language
  2. *You will need to have basic git and GitHub knownledge to follow this guide. But we plan to setup a more user-friendly translation tool in the future.*
  3. To translate Plume in your language, you'll first need to make sure it is listed in the `po/LINGUAS` file. If it is not, you can ask anybody with a development environment to add it (or do it yourself if you have a development environment). Once it will be here, Plume must be launched once to generate all the needed files.
  4. Then you can start translating. Find the file corresponding to your locale, which is `po/YOUR_LOCALE.po`, and open it. Inside, you have a list of strings to translate. There are two kind of translatable strings.
  5. ## Simple strings
  6. They look like this:
  7. ```po
  8. msgid "Hello, world"
  9. msgstr ""
  10. ```
  11. What is next to `msgid` is the string in English. To translate it, just fill the `msgstr` field with the translation.
  12. ## Strings with plural forms
  13. Sometimes, strings may change depending on a number (for instance, a post counter). In the `.po` files, these strings look like this:
  14. ```
  15. msgid "One post"
  16. msgid_plural "{{ count }} posts"
  17. msgstr[0] ""
  18. msgstr[1] ""
  19. ```
  20. Then you should fill the two `msgstr` field, one with the singular form, the second with the plural one. If your language as more than two forms, you can add another one by following the same pattern (`msgstr[n] ""`).
  21. ## Interpolation
  22. Strings you translate may contain data from Plume (a username for instance). To tell Plume where to put these data, surround their identifier by `{{` and `}}`. The identifier is also present in this form in the English string to translate (this what you can see above, with the `{{ count }} posts` message).
  23. ## Note
  24. When translating, please try to be as inclusive as possible.