GithubHelp home page GithubHelp logo

[Request]: Translate posts about tuba HOT 5 CLOSED

TriVoxel avatar TriVoxel commented on June 2, 2024
[Request]: Translate posts

from tuba.

Comments (5)

GeopJr avatar GeopJr commented on June 2, 2024 1

Oof that's a lot of implementation designing that's probably going to be left unused unfortunately 😭

Dialect apart from the proprietary services, provides a self-hosted libretranslate instance. But, making all Tuba users use that could be more bandwidth than expected for the dialect team, so I'd avoid it. I think they are working on integrating the new firefox translation system, if that goes well I wouldn't be opposed to adding it since it happens locally!

Another thing to consider is privacy. You are taking someone's post (that might be private) and sending it to dialect's libretranslate, google translate, deepl etc. that the author might not trust.

The solution is to use Mastodon's api! Translations are provided by the instance and are available for all apps to use, taking care of privacy concerns by only allowing translation on public posts.

My main blocker that I haven't looked too much into yet, is that to check if the instance has enabled translations, you have to use the v2 api which is not implemented by most of the other backend software.

Design wise, I'd probably do as you said with the 3 dotted menu but replace the post content in-place since that's all the api provides.

Side note, I really wish I could program ):

While I cannot give you advice, if it makes you feel somewhat motivated, forking tootle into tuba was the first time I touched vala and while the original plan was to just keep the lights on... here we are now!

from tuba.

TriVoxel avatar TriVoxel commented on June 2, 2024

Side note, I really wish I could program ):

from tuba.

TriVoxel avatar TriVoxel commented on June 2, 2024

@GeopJr Well, I was afraid that might be the case. I think it would be good to have a "quick translate" feature using the Mastodon API as you described. It would probably be best to stick to official solutions, and would be simpler. Thanks anyways for taking the time to explain your rationale!

However, I still think having a separate, more powerful translator such as what I described would be beneficial for some users, depending on the language of the posts they are translating. I think the Firefox translator idea is solid, and would be good. Perhaps we could have two translation features, a "quick" one using Mastodon's API, and an "advanced" one similar to what I described, hopefully running locally on the system if possible, perhaps optionally with proprietary options as well, accompanied by an appropriate privacy warning.

We certainly don't want to DDOS the Dialect guys, nor do we want to export sensitive data to a 3rd party, so I 100% agree with your decision.

While I cannot give you advice, if it makes you feel somewhat motivated, forking tootle into tuba was the first time I touched vala and while the original plan was to just keep the lights on... here we are now!

I really appreciate this! It gives me some optimism. I'm really only good at making static webpages and shell scripts, but I really like LibAdwaita and want to make some cool apps, but am intimidated by Rust, C, and Vala... I suppose I just need to start small! In your opinion, should I use Blueprints, or XML?

from tuba.

GeopJr avatar GeopJr commented on June 2, 2024

Maybe more advanced translation should be left for Dialect to handle? I can file some feature request to dialect, maybe a uri handler? so we can call something like dialect:// and the dialect app will open?

Maybe a workflow like:

flowchart TD
    A[Translate] --> B{Mastodon API}
    B -->|Success| C[Replace Post]
    B -->|Failed| D{dialect://}
    D -->|Suceess| E[Open Dialect]
    D -->|Failed| F{Dialect's Libretranslate}
    F -->|Success| G[Open In Browser]
    F -->|Failed| H[Uh oh, failed!!]

That way we avoid spamming Dialect's instance if the others are available. Tuba will take care of privacy by only allowing translating public posts. I'll have to ask the dialect team first though

If the above is possible, it's much more preferred as it will promote more the indie app ecosystem instead of adding everything in tuba!

from tuba.

GeopJr avatar GeopJr commented on June 2, 2024

I'm really only good at making static webpages and shell scripts, but I really like LibAdwaita and want to make some cool apps, but am intimidated by Rust, C, and Vala... I suppose I just need to start small!

If you are more comfortable with javascript, the gjs team has great guides https://gjs.guide/. Python is also popular for GTK apps. In general use whatever you are most comfortable with! The matrix channels for most languages will also provide support if needed

I suppose I just need to start small! In your opinion, should I use Blueprints, or XML?

Blueprint makes UI layout clearer and if it makes it easier for you, nothing else matters. On Tuba I've been holding off due to lack of guides. It's relatively new and wouldn't want contributors who might not be fully familiar with it struggle, when XML Builder files are widely used in many apps and they can lookup how other apps deal with complex layouts

from tuba.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.