argos-translate icon indicating copy to clipboard operation
argos-translate copied to clipboard

Port to more platforms

Open PJ-Finlay opened this issue 4 years ago • 21 comments

The easiest are probably MacOS and Windows using py2app and py2exe but other platforms to consider could be mobile, BSD, Debian, Red Hat, FlatPak, or BSD. I'd like to be able to run builds on Linux as much as possible but this may not be possible for some platforms.

There's also a decision to be made if we want to use tools like py2app/py2exe or go all in on pyqtdeploy.

There are probably some challenges for doing local translation on mobile so a better strategy may be to build/port simple mobile apps that connect to the LibreTranslate API.

PJ-Finlay avatar Dec 21 '20 23:12 PJ-Finlay

Linux folks are pretty comfortable using pip to install Python packages (I think), but yes, MacOS and Windows would want some sort of setups (or binary distributions).

On mobile the quickest way is for sure an API client interface.

pierotofy avatar Dec 23 '20 03:12 pierotofy

That's what I've been thinking. It would be really cool to do local mobile translation but I think it's a pretty hard problem technically. I have some background in Android development so I've been considering writing/modifying an Android app to work with the LibreTranslate API. I also agree about MacOS/Windows. The easiest thing would probably to let people download native binaries through GitHub releases but getting into the Mac/Windows app stores would have a lot of benefits too. Before trying to get into the app stores model distribution probably needs to be improved so that people can download models directly from the GUI.

PJ-Finlay avatar Dec 23 '20 04:12 PJ-Finlay

Would like to see a fully open source Android version available on F-Droid

trymeouteh avatar Feb 10 '21 03:02 trymeouteh

+1 for Flatpak (I use Linux Mint, so I'm unable to get snap packages by default) +1 for F-Droid (Android)

mbnoimi avatar Apr 19 '21 03:04 mbnoimi

Linux folks are pretty comfortable using pip to install Python packages (I think), but yes, MacOS and Windows would want some sort of setups (or binary distributions).

Comfortable? Maybe. Though I do prefer the official and main Debian GNU/Linux repositories over something else like pip (except for things like youtube-dl where old, "stable" versions don't work because the online services change too fast) and especially over things like flatpak or snap because Debian packages have to be conform with the DFSG, there is no code copying (dependencies must be seperate packages), the packages are reviewed to be legal as well as free, as in freedom, ~~and the binary packages are built reducibly from source packages with all build dependencies~~ Debian tries to make builds reproducible and they are built from source packages with machine-readable build instructions (I think bash scripts) that work on a machine where only free software that is already included in Debian is installed (packages required for this are refered to as build dependencies) ~~build instructions mentioned in a machine-readable way~~. This makes it another level of quality to me.

Also, when searching for something with apt (the package manager of Debian) one could find argos-translate there if it was there tough it may take a few years for it to get into the stable branch. (I am using the testing branch, actually on Devuan, a Debian fork without systemd, an init system getting a larger and larger piece of software replacing more and more standard GNU/Linux tools with itself making the distribution less modular, having Google DNS and Google NTP as hardcoded fallback, etc.)

See also: Debian Social Contract HowToPackageForDebian Introduction for maintainers: How will my package get into Debian? Debian New Maintainers' Guide

EmanuelLoos avatar Sep 06 '21 17:09 EmanuelLoos

I agree, getting argos-translate in the Debian package repos would definitely be a good thing!

PJ-Finlay avatar Sep 06 '21 18:09 PJ-Finlay

https://github.com/argosopentech/argos-translate/issues/191

PJ-Finlay avatar Oct 13 '21 02:10 PJ-Finlay

Concerning FreeBSD, I believe I managed to get it working awhile, but I definitely had to compile CTranslate2 and a few others from source. It was rather tedious.

hendursaga avatar Nov 26 '21 22:11 hendursaga

Vote for flatpak who is winning the Multiplateforme package over snap.

BirdInFire avatar Dec 31 '21 05:12 BirdInFire

I'm open to distributing to Flatpak if anyone wants to contribute a pull request.

PJ-Finlay avatar Dec 31 '21 23:12 PJ-Finlay

I'm open to distributing to Flatpak if anyone wants to contribute a pull request.

i will check if i can generate a flatpak locally, if other (maybe more experienced whant to check out how i intend to do it : FlatpakDocs, since it's my very first try on flatpak or snap (cannot say it will succeed first try).

BirdInFire avatar Jan 01 '22 01:01 BirdInFire

I'm open to distributing to Flatpak...

I'd be more interested in distributing to GNU Guix, but that would be more difficult, I think.

hendursaga avatar Jan 01 '22 16:01 hendursaga

I just updated my comment to reflect more accurately what Debian does. I knew that there was something special about official Debian packages, but I guess I did not completely understand what when I wrote that. I think I understand it better now. Please consider my comment again and and sorry for writing without knowing enough.

EmanuelLoos avatar Feb 06 '22 22:02 EmanuelLoos

I'd be more interested in distributing to GNU Guix, but that would be more difficult, I think.

@hendursaga Why would that be more difficult? What would be the requirements?

EmanuelLoos avatar Feb 06 '22 23:02 EmanuelLoos

+1 for F-Droid (Android)

@mbnoimi Therefore an Android App would have to be created. If it is created F-Droid inclusion (meaning the official repository) would be great.

To be included Apps have to be:

  • completely free, as in freedom
  • built from source by F-Droid
  • anything else required by the Inclusion Policy

EmanuelLoos avatar Feb 06 '22 23:02 EmanuelLoos

@EmanuelLoos it's strong emphasis on 100% libre software along with build reproducibility might make it more difficult, though there are non-free channels like nonguix.

hendursaga avatar Feb 07 '22 01:02 hendursaga

Ran across this looking for an offline translation software for Windows. I do not have a lot of experience with Python, but is this a simple matter of running py2exe or similar? Forgive any naivete, please.

tooolbox avatar May 14 '22 18:05 tooolbox

Windows isn't currently well supported but should mostly work.

The easiest way to install on Windows is probably from PyPI with pip. People have installed LibreTranslate on Windows so it's definitely possible.

py2exe may work too, I got Mac installs with py2app to work but it wasn't straightforward.

PJ-Finlay avatar May 15 '22 18:05 PJ-Finlay

+1 for f-droid

andsofine avatar May 19 '22 18:05 andsofine

There's a F-Droid app for LibreTranslate: https://gitlab.com/BeowuIf/libretranslator

PJ-Finlay avatar May 20 '22 11:05 PJ-Finlay

There's a F-Droid app for LibreTranslate: https://gitlab.com/BeowuIf/libretranslator

I need an offline translator. and it has no pop-up mode

andsofine avatar May 20 '22 22:05 andsofine