Comments (7)
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.
Yup, exactly.
from goflow.
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.
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.
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.
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.
Closed via #52
from goflow.
Related Issues (20)
- Combine editor autocompletion files into single JSON file
- Doc generation shouldn't use fuzzy entries from localization files
- Docs shouldn't be in the repo? HOT 5
- Add flow_exited event?
- Limit message attachment length to 2048
- Support formatting of date components as words HOT 4
- Similar implementation of SUM HOT 1
- @count() always return 11 HOT 2
- ContactQL query normalization adds superfulous parentheses
- Re-evaluate groups after ticket opening
- Only set `expires_on` for waiting runs HOT 2
- Expose campaign on `@trigger` HOT 1
- Don't include router fields in PO extraction for subflow, webhook nodes etc HOT 3
- Failing a session should exit all runs
- Switch to https://github.com/Shopify/gomail
- Allow querying datetime values with time accuracy
- Time limits on dial waits
- Record on `msg_created` events whether contact is messageable HOT 1
- Make call available to expressions
- Consider UNICODE confusables when text matching HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from goflow.