Compare commits

..

No commits in common. "8223a0b4d5c544c2c9c6aa683c2a57f4af3c1099" and "ce36e584dde347263e95ea1cb9c1d820bf0b1ff8" have entirely different histories.

4 changed files with 5 additions and 23 deletions

View File

@ -181,18 +181,8 @@ func (h *MenuHandlers) GetVoucherList(ctx context.Context, sym string, input []b
return res, fmt.Errorf("missing session")
}
code := codeFromCtx(ctx)
l := gotext.NewLocale(translationDir, code)
l.AddDomain("default")
userStore := h.userdataStore
// Fetch session data
_, _, activeSym, _, _, _, err := h.getSessionData(ctx, sessionId)
if err != nil {
return res, nil
}
// Read vouchers from the store
voucherData, err := userStore.ReadEntry(ctx, sessionId, storedb.DATA_VOUCHER_SYMBOLS)
logg.InfoCtxf(ctx, "reading voucherData in GetVoucherList", "sessionId", sessionId, "key", storedb.DATA_VOUCHER_SYMBOLS, "voucherData", voucherData)
@ -201,11 +191,6 @@ func (h *MenuHandlers) GetVoucherList(ctx context.Context, sym string, input []b
return res, err
}
if len(voucherData) == 0 {
res.Content = l.Get("Your active voucher %s is already set", string(activeSym))
return res, nil
}
voucherBalances, err := userStore.ReadEntry(ctx, sessionId, storedb.DATA_VOUCHER_BALANCES)
logg.InfoCtxf(ctx, "reading voucherBalances in GetVoucherList", "sessionId", sessionId, "key", storedb.DATA_VOUCHER_BALANCES, "voucherBalances", voucherBalances)
if err != nil {
@ -218,7 +203,7 @@ func (h *MenuHandlers) GetVoucherList(ctx context.Context, sym string, input []b
logg.InfoCtxf(ctx, "final output for GetVoucherList", "sessionId", sessionId, "finalOutput", finalOutput)
res.Content = l.Get("Select number or symbol from your vouchers:\n%s", finalOutput)
res.Content = finalOutput
return res, nil
}

View File

@ -77,10 +77,4 @@ msgid "You can remove a maximum of %s %s from '%s' pool\n\nEnter amount of %s:"
msgstr "Unaweza kuondoa kiwango cha juu cha %s %s kutoka kwenye '%s'\n\nWeka kiwango cha %s:"
msgid "Please confirm that you will use %s %s to remove your debt of %s %s\n"
msgstr "Tafadhali thibitisha kwamba utatumia %s %s kulipa deni lako la %s %s.\nWeka PIN yako:"
msgid "Your active voucher %s is already set"
msgstr "Sarafu yako %s ishachaguliwa"
msgid "Select number or symbol from your vouchers:\n%s"
msgstr "Chagua nambari au ishara kutoka kwa sarafu zako:\n%s"
msgstr "Tafadhali thibitisha kwamba utatumia %s %s kulipa deni lako la %s %s.\nWeka PIN yako:"

View File

@ -1 +1,2 @@
Select number or symbol from your vouchers:
{{.get_vouchers}}

View File

@ -0,0 +1,2 @@
Chagua nambari au ishara kutoka kwa salio zako:
{{.get_vouchers}}