-
Notifications
You must be signed in to change notification settings - Fork 71
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use language value in templating metadata instead of trying to match #668
Conversation
SendPrep: setSendURL, | ||
}, | ||
{ | ||
Label: "Template Country Language", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
language is now just used as it is so don't need a separate test for en
vs en_US
etc
SendPrep: setSendURL, | ||
}, | ||
{ | ||
Label: "Template Invalid Language", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can't happen
|
||
import "github.com/nyaruka/gocommon/i18n" | ||
|
||
func GetText(text string, locale i18n.Locale) string { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
figured might as well make this a generic translation thing
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #668 +/- ##
==========================================
- Coverage 74.39% 74.38% -0.01%
==========================================
Files 97 97
Lines 13087 13082 -5
==========================================
- Hits 9736 9731 -5
Misses 2662 2662
Partials 689 689 ☔ View full report in Codecov by Sentry. |
This gets rid of trying to match one of our language codes to a known whatsapp language code