diff --git a/internal/handlers/ussd/menuhandler.go b/internal/handlers/ussd/menuhandler.go index eeca3fd..98baf9d 100644 --- a/internal/handlers/ussd/menuhandler.go +++ b/internal/handlers/ussd/menuhandler.go @@ -817,7 +817,8 @@ func (h *Handlers) CheckBalance(ctx context.Context, sym string, input []byte) ( return res, err } - res.Content = l.Get("Balance: %s\n", fmt.Sprintf("%s %s", activeBal, activeSym)) + balStr := fmt.Sprintf("%s %s", activeBal, activeSym) + res.Content = l.Get("Balance: %s\n", balStr) return res, nil } @@ -1546,6 +1547,10 @@ func (h *Handlers) ViewVoucher(ctx context.Context, sym string, input []byte) (r return res, fmt.Errorf("missing session") } + code := codeFromCtx(ctx) + l := gotext.NewLocale(translationDir, code) + l.AddDomain("default") + flag_incorrect_voucher, _ := h.flagManager.GetFlag("flag_incorrect_voucher") inputStr := string(input) @@ -1570,7 +1575,7 @@ func (h *Handlers) ViewVoucher(ctx context.Context, sym string, input []byte) (r } res.FlagReset = append(res.FlagReset, flag_incorrect_voucher) - res.Content = fmt.Sprintf("%s\n%s", metadata.TokenSymbol, metadata.Balance) + res.Content = l.Get("Symbol: %s\nBalance: %s", metadata.TokenSymbol, metadata.Balance) return res, nil } diff --git a/services/registration/locale/swa/default.po b/services/registration/locale/swa/default.po index aa033b5..4bf876b 100644 --- a/services/registration/locale/swa/default.po +++ b/services/registration/locale/swa/default.po @@ -13,7 +13,7 @@ msgstr "Kwa usaidizi zaidi,piga: 0757628885" msgid "Balance: %s\n" msgstr "Salio: %s\n" -msid "Your invite request for %s to Sarafu Network failed. Please try again later." +msgid "Your invite request for %s to Sarafu Network failed. Please try again later." msgstr "Ombi lako la kumwalika %s kwa matandao wa Sarafu halikufaulu. Tafadhali jaribu tena baadaye." msgid "Your invitation to %s to join Sarafu Network has been sent." @@ -23,4 +23,7 @@ msgid "Your request failed. Please try again later." msgstr "Ombi lako halikufaulu. Tafadhali jaribu tena baadaye." msgid "Community Balance: 0.00" -msgid "Salio la Kikundi: 0.00" +msgstr "Salio la Kikundi: 0.00" + +msgid "Symbol: %s\nBalance: %s" +msgstr "Sarafu: %s\nSalio: %s" diff --git a/services/registration/my_balance_swa b/services/registration/my_balance_swa index 9c3a7c7..afae8c1 100644 --- a/services/registration/my_balance_swa +++ b/services/registration/my_balance_swa @@ -1 +1 @@ -Salio lako ni: 0.00 SRF \ No newline at end of file +{{.check_balance}} \ No newline at end of file