Git Product home page Git Product logo

Comments (7)

nicpottier avatar nicpottier commented on July 18, 2024

Oh so this is a flow with multiple languages, but we want to cascade from contact->org->flow default language when looking up a translation?

from goflow.

ericnewcomer avatar ericnewcomer commented on July 18, 2024

Yup, exactly.

from goflow.

rowanseymour avatar rowanseymour commented on July 18, 2024

How do we feel about this approach instead - we use org.primary_language as the default for unset contact languages: https://github.com/nyaruka/rapidpro/blob/b14a246e0dcf31adbb70124f0bdf041f1ac4f33a/temba/contacts/models.py#L484-L484

The upside is goflow doesn't have to know about another thing which can have a language - the downside is we can't implement a "clear language action" so easily - but I'm not sure how useful that is anyway (just set it to your org primary language instead) and it's not something we currently support.

Whatever we do here, we'll want to do something similar for org.timezone vs contact.timezone.

from goflow.

ericnewcomer avatar ericnewcomer commented on July 18, 2024

The impetus behind the existing behavior is that flows can have various language support and travel about different accounts which may have different primary languages. Since localization of 100% isn’t required we need reasonable fallbacks. The case we are trying to support is which of the flow’s languages to use if the contact’s primary language is not present, not necessarily just not set.

I do appreciate the simplicity of this suggestion but it’s really not at all the same thing. If we went down this path, to me it’s more appropriate to let the flow dictate backdowns and to remove the concept of a primary org language altogether.

from goflow.

rowanseymour avatar rowanseymour commented on July 18, 2024

That makes sense - so I guess we need pass something like environment to goflow which has a language (and probably a timezone).

Or make Contact.languages a list? RapidPro would populate it as [contact.language, contact.org.primary_language] but goflow would support an arbitrary list of languages to try.
SetLanguageAction would add a language to the start of the list. There's nice flexibility to letting contacts have their own backdown languages.

from goflow.

ericnewcomer avatar ericnewcomer commented on July 18, 2024

Ya, since the engine operates on contacts and knows nothing of orgs, I think it makes sense to put whatever is needed there. A list of languages on contact makes the most sense to me.

from goflow.

rowanseymour avatar rowanseymour commented on July 18, 2024

Closed via #52

from goflow.

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.