From 6c5873da6fe3ed6795f964ebefad89d055e110ad Mon Sep 17 00:00:00 2001 From: alfred-mk Date: Tue, 7 Jan 2025 12:15:15 +0300 Subject: [PATCH 1/2] trim any leading whitespace in the input --- internal/http/at/parse.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/internal/http/at/parse.go b/internal/http/at/parse.go index 5f27d50..76e84e7 100644 --- a/internal/http/at/parse.go +++ b/internal/http/at/parse.go @@ -81,7 +81,8 @@ func (arp *ATRequestParser) GetInput(rq any) ([]byte, error) { return nil, fmt.Errorf("no input found") } - return []byte(parts[len(parts)-1]), nil + trimmedInput := strings.TrimSpace(parts[len(parts)-1]) + return []byte(trimmedInput), nil } func parseQueryParams(query string) map[string]string { From 5081b6d4ce993a4da0452668be16ff39e86c8f53 Mon Sep 17 00:00:00 2001 From: lash Date: Wed, 8 Jan 2025 06:48:35 +0000 Subject: [PATCH 2/2] Space after comma --- internal/handlers/ussd/menuhandler.go | 2 +- services/registration/locale/swa/default.po | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/internal/handlers/ussd/menuhandler.go b/internal/handlers/ussd/menuhandler.go index dfdbd02..ff0656d 100644 --- a/internal/handlers/ussd/menuhandler.go +++ b/internal/handlers/ussd/menuhandler.go @@ -835,7 +835,7 @@ func (h *Handlers) QuitWithHelp(ctx context.Context, sym string, input []byte) ( l := gotext.NewLocale(translationDir, code) l.AddDomain("default") - res.Content = l.Get("For more help,please call: 0757628885") + res.Content = l.Get("For more help, please call: 0757628885") res.FlagReset = append(res.FlagReset, flag_account_authorized) return res, nil } diff --git a/services/registration/locale/swa/default.po b/services/registration/locale/swa/default.po index 4bf876b..27e80c4 100644 --- a/services/registration/locale/swa/default.po +++ b/services/registration/locale/swa/default.po @@ -7,8 +7,8 @@ msgstr "Ombi lako limetumwa. %s atapokea %s %s kutoka kwa %s." msgid "Thank you for using Sarafu. Goodbye!" msgstr "Asante kwa kutumia huduma ya Sarafu. Kwaheri!" -msgid "For more help,please call: 0757628885" -msgstr "Kwa usaidizi zaidi,piga: 0757628885" +msgid "For more help, please call: 0757628885" +msgstr "Kwa usaidizi zaidi, piga: 0757628885" msgid "Balance: %s\n" msgstr "Salio: %s\n"