Pachli 2.16.0 released

Pachli 2.16.0 is now available. This release supports privacy-preserving on-device translation (when installed from Google Play), remembers and restores your reading position on the Local and Federated timelines, further improves the UX around emojis, and more.

New features and other improvements #

Support on-device translation if installed from Google Play #

Pachli 2.0.0 introduced translation support. This uses your server’s translation feature (“server-side translation”), and comes with a number of problems.

  • Your server might not support translation. It requires the server operator to sign up with a third-party service, with associated costs to them. If your server does not support translation Pachli hides the relevant part of the UI.
  • Mastodon’s implementation relies on the post you are translating having its language marked correctly. For example, if your account is set to English, you are reading a post written in German, but the post’s author did not set change their post’s language from English to German, then Mastodon will refuse to translate it.
  • You might not want to share that you are translating a post with a third party service.
  • Translation speed is dependent on the speed of the third party service.
  • Server-side translation is disabled for non-public posts. If someone sends you a direct message in a different language you cannot translate it.

To fix these problems Pachli can now translate posts entirely on your device.

To do this Pachli uses Google’s MLKit translation library.

While the library is free to use it is not open source. As some Pachli users may want to avoid proprietary libraries this feature is not present on Pachli installed from F-Droid or GitHub. If this is you then you can skip the rest of this section.

Per Pachli’s Privacy Policy, when you use this feature the content of the post you are translating remains on your device and is not sent to Google.

In Pachli 2.16.0 the default behaviour when you translate a post is to try and translate the post using your server first, and if that fails (for any of the reasons listed earlier) then try and translate on your device.

Translating on your device may require Pachli to download a translation language pack. By default Pachli will only do this if your device is connected to Wi-Fi.

All of this can be configured in a new Translation section in Preferences.

Translation preferences

How to translate controls translation behaviour. You can set this to Server only for Pachli’s previous behaviour, Server first (the default) for the behaviour described earlier, or On-device only to only use on-device translation with MLKit.

Manage language packs shows you the languages Pachli has already downloaded (in response to your requests to translate posts), and languages available to download.

Translation preferences

“English” is always present, as it is required by MLKit. You can delete any of the other downloaded languages, they will be downloaded again when necessary.

Tapping the download button for any of the other languages will download the language pack to your device. If the Require Wi-Fi to download language packs setting is “on” then you will be prompted to confirm this download if your device is not on Wi-Fi. Downloading a language pack typically downloads 30–60MB of data.

The Translation disclaimer option is required by Google’s terms of service.

On-device translation fixes the problems identified earlier:

  • It works irrespective of whether or not your server operator has enabled translation.
  • It works even if the language of the original post is not set, or is set incorrectly.
  • The text being translated stays on your device.
  • Translation speed depends on the speed of your device.
  • It works for all posts on Mastodon, including direct messages.

On-device translation does have some drawbacks;

  • Text that was a link in the original post (e.g., links to websites, or hashtags) are unlinked. The text remains.
  • MLKit’s translation models are trained to translate to and from English. When you translate from one non-English language to another non-English language, English is used as an intermediate translation. This can affect translation quality.
  • Not all languages are supported. You can see the complete set of supported languages in the Manage language packs screen.

Restore reading position on Local and Federated timelines #

If you read the Local or Federated timelines Pachli now remembers and restores your reading position on those timelines.

If you are very far behind in the timeline and want to jump to the newest posts you can use the Load newest posts option in the top-right ⋮ menu.

Emoji improvements #

Last month’s Pachli release made significant changes to UX to find and enter emojis. Based on user feedback more changes have been made this month.

This screenshot shows a number of the changes.

New emoji picker

  • Previously, entering an emoji would show the emoji’s shortcode (the text like :blobcat:) in the editor. This doesn’t seem very helpful, so now the emoji image is shown in the editor.
  • The part of the UI showing the emojis could cover the text you were entering. Now it has a maximum size, enough to show 4–5 rows of emojis.
  • The search box has been made smaller.
  • The Toot! button is disabled when the emoji picker is open, so trying to select an emoji near the button doesn’t inadvertently send the post.
  • There is a new Show detail checkbox.

Checking the Show detail checkbox changes the picker view and the picker’s behaviour.

New emoji picker detail

With the detail view open tapping a small emoji shows a larger version on the right. The emoji’s shortcode is shown below.

Both of these changes should make it easier to make sure you are using the emoji you want.

Tap the large version of the emoji to insert it in the editor.

Several people provided valuable feedback while these changes were in development, including:

Updates to translations #

Languages with updated translations are:

If you would like to help improve Pachli’s translation in to your language there’s information on how you can contribute.

Significant bug fixes #

Timeline behaviour fixes #

The work to remember and restore the reading position on the Local and Federated timelines uncovered a number of bugs which have been fixed:

  • The “Load newest” feature could sometimes silently fail.
  • When you mute or block an account the server does not modify your timelines immediately. Pachli now remembers the mute/block for a short period of time and applies it locally to ensure the content is hidden.
  • The position in a timeline to restore to could sometimes be wildly off, jumping the user around the timeline.

Show translation state when viewing a thread #

Normally, translating a post in Pachli shows feedback while the translation is in progress, and an error message if the translation failed.

This wasn’t shown when viewing a thread. First reported by Ângelo in issue #280, and fixed with change #1735.

Always load a post’s view data with the correct account #

Each post in Pachli has a collection of “view data” associated with it. This is information like:

  • Have you translated the post? If so, what is the text of the translated version?
  • If the post is very long, have you clicked the “Show more” button to view the entire post?
  • If the post was filtered, have you clicked through to view the post?

A different copy of this information is stored for each account you use.

Sometimes – when viewing a post in a thread – the view data for the post from the wrong account would be used to display the post.

For example, consider two accounts on the device that both have the same post in their timeline. The post is in a different language and part of a thread, and the first account translates the status. This is now part of the cached view data.

The second account sees the same post, does not translate it, and clicks through to view the thread. The cached data is loaded, and it’s the translated version of the post. So the second account sees the translation even though they did not explicitly request it.

This was fixed with #1732.

Thank you #

Thank you to everyone who took the time to report issues and provide additional followup information and screenshots.

Download Pachli 2.16.0 from Google Play, F-Droid, or the GitHub release page.

Pachli is a Nivenly Foundation project