argosopentech / argos-translate

Open-source offline translation library written in Python
https://www.argosopentech.com
MIT License
3.79k stars 277 forks source link

Port to more platforms #10

Open PJ-Finlay opened 3 years ago

PJ-Finlay commented 3 years ago

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.

pierotofy commented 3 years ago

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.

PJ-Finlay commented 3 years ago

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.

trymeouteh commented 3 years ago

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

mbnoimi commented 3 years ago

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

EmanuelLoos commented 3 years ago

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_

PJ-Finlay commented 3 years ago

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

PJ-Finlay commented 2 years ago

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

hendursaga commented 2 years ago

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.

ghost commented 2 years ago

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

PJ-Finlay commented 2 years ago

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

ghost commented 2 years ago

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).

hendursaga commented 2 years ago

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.

EmanuelLoos commented 2 years ago

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 commented 2 years ago

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 commented 2 years ago

+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:

hendursaga commented 2 years ago

@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.

tooolbox commented 2 years ago

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.

PJ-Finlay commented 2 years ago

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.

andsofine commented 2 years ago

+1 for f-droid

PJ-Finlay commented 2 years ago

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

andsofine commented 2 years ago

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