# Using Transifex Client on the Raspberry Pi & Android phone

**URL:** <https://community.transifex.com/t/using-transifex-client-on-the-raspberry-pi-android-phone/2687>\
**Category:** Developers\
**Created:** [February 20, 2022, 6:57am UTC](https://community.transifex.com/t/using-transifex-client-on-the-raspberry-pi-android-phone/2687 "2022-02-20T06:57:39Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![niccokunzmann](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.transifex.com/niccokunzmann/32/70_2.png) [@niccokunzmann](https://community.transifex.com/u/niccokunzmann)\
**Post date:** [March 6, 2022, 8:44am UTC](https://community.transifex.com/t/using-transifex-client-on-the-raspberry-pi-android-phone/2687/3 "2022-03-06T08:44:11Z")

</div>

Okay, here is the first draft. You can use it and modify it.

* * *

# Transifex CLI on Android and Raspberry Pi

The `transifex-client` provides a command-line access to the translations of your Transifex projects. It is also open-source. This is of benefit for the company in ways nobody would be able to predict. This blog post shows an example.

Since January 2022, a the former `transifex-client` Python library is superceeded by the [Transifex-CLI](https://github.com/transifex/cli) implemented in Go. The Transifex-CLI provides the `tx` command to update and configure translations of projects such as apps and websites. Since the CLI is open-source, people can tinker with it and adapt it to their use-cases. One of these is to use the CLI on Android.

The Transifex-CLI is provided through a binary file `tx`. It allows you to to setup the translations for projects on your local file system. These binary files are released by Transifex on [GitHub](https://github.com/transifex/cli/releases) for each new version for Windows, Linux and MacOS. It is possible to build the client yourself so that systems which are not officially supported can also be used. Two of these systems are the famous Raspberry Pi and the Android phone and luckily, they tend to have the same processor: A binary file which runs on the Raspberry Pi 3 with its armv7l architecture also runs on Android phone with the same processor architecture.

## Android Setup

This section aims to help you setup the Transifex-CLI on your Android phone.

On an Android Phone there are a series of open-source apps from F-Droid that can be used in conjuction with the Transifex-CLI. The command line interface can be provided by [UserLAnd](https://f-droid.org/app/tech.ula) or [Termux](https://f-droid.org/app/com.termux), if you do not have a Bluetooth Keyboard, also [Hacker’s Keyboard](https://f-droid.org/app/org.pocketworkstation.pckeyboard) is recommended to have access to the arrow keys.

After installing UserLAnd, one can create an Ubuntu environment. Termux runs straight on the Android phone and as such does not need setup.  
The following picture shows the Transifex-CLI as it pushes new source files to a project. This is where we want to get to.

 ![Screenshot tx push --source](https://canada1.discourse-cdn.com/flex030/uploads/transifex/original/2X/b/bfb7ca3a73acec0a218bb53d8ad8f4a5796d4502.png)

After having setup UserLAnd or Termux, you will need to retrieve the binary file. You can compile this yourself, as shown in the section about the Raspberry Pi or download the binary compiled by Nicco Kunzmann from [GitHub](https://github.com/niccokunzmann/transifex-client-armv7l-binary/#readme). These commands should get the binary working on your phone:

1. Make sure you have the correct processor:

```auto
$ uname -m
armv7l

```

2. Download the Transifex-CLI’s `tx` binary file - you can also point the URL to your Raspberry Pi.

```auto
wget -O tx 'https://github.com/niccokunzmann/transifex-client-armv7l-binary/blob/master/tx?raw=true'

```

3. Move the `tx` binary into your `$PATH` so it is acessible as the `tx` command.

```auto
mkdir -p ~/.local/bin
mv tx ~/.local/bin
chmod +x ~/.local/bin/tx
echo 'export PATH="$PATH:~/.local/bin"' >> ~/.bashrc
source ~/.bashrc

```

Now, you are ready to go. You can get help by the client, add resources and pull source files and push translations. The [Transifex-CLI source repository](https://github.com/transifex/cli) shows in detail how to proceed.

 ![Screenshot tx --help](https://canada1.discourse-cdn.com/flex030/uploads/transifex/original/2X/4/4a5540a96e240c09de9a2f23f71d7c5a00677082.png)

On UserLAnd, you can access your SD-card at `/host-rootfs/sdcard/`. If you like to edit files with other apps, it is recommended that you store your resources there.

If you like to translate files, you might also want to edit them. These open-source apps may help you further:

- [Acode](https://f-droid.org/app/com.foxdebug.acode) is a code editor which will also show syntax errors for common formats. This is useful when creating new translations as it points out your mistakes editing the files.
- [MGit](https://f-droid.org/app/com.manichord.mgit) to interact with Git repositories as they may not yet use the Transifex GitHub integration.
- [OctoDroid](https://f-droid.org/app/com.gh4a) to browse GitHub repositories such as the [Transifex CLI](https://github.com/transifex/cli) and report issues.

It is well possible to access the Transifex API on an Android phone using the Transifex-CLI. Access to the SD-card and a variety of open-source apps allow you to create and update resources locally and on Transifex.

## Compiling Transifex-CLI on a Raspberry Pi

Compiling the [Transifex CLI](https://github.com/transifex/cli) on a Raspberry Pi is possible with the Docker build it provides. Following this section, you should be left with a working Transifex-CLI on your Raspberry Pi.

The first step is to install Docker. There are various tutorials available online, such as [this one on phoenixnap](https://phoenixnap.com/kb/docker-on-raspberry-pi).

After you have installed Docker, you can install git and download the Transifex-CLI.

```auto
sudo apt-get install git
git clone --depth=1 https://github.com/transifex/cli.git

```

Once you have done this, you can build the Transifex CLI according to its documentation:

```auto
cd cli
make docker-build

```

This will generate your `tx` file. You can store that in your path as mentioned above for the Android phone. With this, you can manage the translations stored in your Transifex project locally on your Raspberry Pi.

## Summary

Having created an open-source client for their API, Transifex has allowed hobbyists and enthusiasts to tinker with it and adapt it to their use-cases. As a result, users on Android phones and the Raspberry Pi can synchronize translations. This was not a standard use-case targeted by the management but an open policy with their source code has allowed Transifex niche users to expand the reach of the company.

This is a blog post from the Transifex community by [Nicco Kunzmann](https://niccokunzmann.github.io).

---

_[View the full topic](https://community.transifex.com/t/using-transifex-client-on-the-raspberry-pi-android-phone/2687)._
