File: installation.rst

package info (click to toggle)
translate-toolkit 3.17.5-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 7,780 kB
  • sloc: python: 69,719; sh: 1,412; makefile: 186; xml: 48
file content (137 lines) | stat: -rw-r--r-- 3,504 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137

.. _installation:

Installation
************

This is a guide to installing the Translate Toolkit on your system.  If the
Translate Toolkit is already packaged for your system, this is probably the
easiest way to install it. For several Linux distributions, the package might
be available through your package manager.

If your system already has the toolkit prepackaged, then please let us know
what steps are required to install it.


.. _installation#download:

Download
========

The recommended installation is using :program:`uv` or :program:`pip` in a
virtual environment.

.. code-block:: sh

   uv pip install translate-toolkit

You can also  download a stable `released version
<https://github.com/translate/translate/releases>`_ and install it manually.

For those who need problems fixed, or who want to work on the bleeding edge,
get the latest source from :ref:`Git <installation#installing_from_git>`.

.. _installation#installing_packaged_versions:

Installing packaged versions
============================

Many Linux distributions come with translate-toolkit packaged, use your
distribution command to install it:

On Debian (if you are on etch), just type the following command:

.. code-block:: sh

   # Debian / Ubuntu
   apt install translate-toolkit

   # Fedora / RedHat
   dnf install translate-toolkit

   # openSUSE
   zypper install translate-toolkit

.. _installation#installing_on_windows:

Installing on Windows
=====================

On Windows we recommend using `uv <https://docs.astral.sh/uv/>`_ to install
Translate Toolkit. This automatically manages virtual environments for you.

1. Install latest `Python 3.10+ <https://www.python.org/downloads/windows/>`_
2. Install uv by running in PowerShell:

   .. code-block:: powershell

      powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.ps1 | iex"

3. Create a project directory and install:

   .. code-block:: console

      > mkdir translate-work
      > cd translate-work
      > uv venv
      > uv pip install translate-toolkit

4. Activate the environment and verify:

   .. code-block:: console

      > .venv\Scripts\activate
      > po2prop --version

Next times you need to use Translate Toolkit:

1. Navigate to your project directory
2. Activate the virtual environment: ``.venv\Scripts\activate`` (Command Prompt) or ``.venv\Scripts\Activate.ps1`` (PowerShell)
3. Run the Translate Toolkit commands you want


.. _installation#installing_from_git:

Installing from Git
===================

If you want to try the bleeding edge, or just want to have the latest fixes
from a stabilising branch then you need to use Git to get your sources:

.. code-block:: console

   $ git clone https://github.com/translate/translate.git
   $ cd translate


This will retrieve the ``master`` branch of the Toolkit.  Further Git
`instructions <http://git.or.cz/course/svn.html>`_ are also available.

**For users** wanting to install from source:

.. code-block:: console

   $ uv pip install .

**For developers** wanting to contribute:

.. code-block:: console

   $ uv sync --all-extras --dev

This sets up a complete development environment with all dependencies.
See the :doc:`contributing guide </developers/contributing>` for more details.

.. _installation#verify_installed_version:

Verify installed version
========================

To verify which version of the toolkit you have installed run:

.. highlight:: console
.. parsed-literal::


   $ prop2po --version
   prop2po |release|