Skip to content

Commit

Permalink
Merge pull request #163 from Ilhasoft/fix/language-menu
Browse files Browse the repository at this point in the history
Remove menu button name mapping
  • Loading branch information
Robi9 authored Dec 5, 2024
2 parents d9fd595 + 977f097 commit 5380ba8
Showing 1 changed file with 1 addition and 35 deletions.
36 changes: 1 addition & 35 deletions handlers/whatsapp/whatsapp.go
Original file line number Diff line number Diff line change
Expand Up @@ -897,11 +897,7 @@ func buildPayloads(msg courier.Msg, h *handler, clog *courier.ChannelLog) ([]int
} else {
payload.Interactive.Type = "list"
payload.Interactive.Body.Text = part
if msg.Locale() != "" {
payload.Interactive.Action.Button = langCode
} else {
payload.Interactive.Action.Button = "Menu"
}
payload.Interactive.Action.Button = "Menu"
section := mtSection{
Rows: make([]mtSectionRow, len(qrs)),
}
Expand Down Expand Up @@ -1363,33 +1359,3 @@ var supportedLanguages = map[courier.Locale]string{
"vie": "vi", // Vietnamese
"zul": "zu", // Zulu
}

// iso language code mapping to respective "Menu" word translation
var languageMenuMap = map[string]string{
"da-DK": "Menu",
"de-DE": "Speisekarte",
"en-AU": "Menu",
"en-CA": "Menu",
"en-GB": "Menu",
"en-IN": "Menu",
"en-US": "Menu",
"ca-ES": "Menú",
"es-ES": "Menú",
"es-MX": "Menú",
"fi-FI": "Valikko",
"fr-CA": "Menu",
"fr-FR": "Menu",
"it-IT": "Menù",
"ja-JP": "メニュー",
"ko-KR": "메뉴",
"nb-NO": "Meny",
"nl-NL": "Menu",
"pl-PL": "Menu",
"pt-BR": "Menu",
"ru-RU": "Меню",
"sv-SE": "Meny",
"zh-CN": "菜单",
"zh-HK": "菜單",
"zh-TW": "菜單",
"ar-JO": "قائمة",
}

0 comments on commit 5380ba8

Please sign in to comment.