translation.rst 1.3KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  1. Translation
  2. ===========
  3. run these commands in the root directory of searx
  4. Add new language
  5. ~~~~~~~~~~~~~~~~
  6. .. code:: shell
  7. pybabel init -i messages.pot -d searx/translations -l it
  8. Update .po files
  9. ~~~~~~~~~~~~~~~~
  10. .. code:: shell
  11. ./utils/update-translations.sh
  12. You may have errors here. In that case, edit the
  13. ``update-translations.sh`` script to change ``pybabel`` to
  14. ``pybabel-python2 or pybabel2``
  15. After this step, you can modify the .po files.
  16. Compile translations
  17. ~~~~~~~~~~~~~~~~~~~~
  18. .. code:: shell
  19. pybabel compile -d searx/translations
  20. Transifex stuff
  21. ~~~~~~~~~~~~~~~
  22. Init Project
  23. ^^^^^^^^^^^^
  24. .. code:: shell
  25. tx init # Transifex instance: https://www.transifex.com/asciimoo/searx/
  26. tx set --auto-local -r searx.messagespo 'searx/translations/<lang>/LC_MESSAGES/messages.po' \
  27. --source-lang en --type PO --source-file messages.pot --execute
  28. http://docs.transifex.com/client/init/
  29. http://docs.transifex.com/client/set/
  30. Get translations
  31. ^^^^^^^^^^^^^^^^
  32. .. code:: shell
  33. tx pull -a
  34. http://docs.transifex.com/client/pull
  35. Upload source File
  36. ^^^^^^^^^^^^^^^^^^
  37. .. code:: shell
  38. tx push -s
  39. Upload all Translation
  40. ^^^^^^^^^^^^^^^^^^^^^^
  41. .. code:: shell
  42. tx push -s -t
  43. upload specifc Translation
  44. ~~~~~~~~~~~~~~~~~~~~~~~~~~
  45. .. code:: shell
  46. tx push -t -l tr
  47. http://docs.transifex.com/client/push