Use gettext for the Quit function
This commit is contained in:
parent
75ca39b012
commit
ca86ef1507
@ -452,12 +452,12 @@ func (h *Handlers) CheckAccountStatus(ctx context.Context, sym string, input []b
|
|||||||
// Quit displays the Thank you message and exits the menu
|
// Quit displays the Thank you message and exits the menu
|
||||||
func (h *Handlers) Quit(ctx context.Context, sym string, input []byte) (resource.Result, error) {
|
func (h *Handlers) Quit(ctx context.Context, sym string, input []byte) (resource.Result, error) {
|
||||||
res := resource.Result{}
|
res := resource.Result{}
|
||||||
switch codeFromCtx(ctx) {
|
|
||||||
case "swa":
|
code := codeFromCtx(ctx)
|
||||||
res.Content = "Asante kwa kutumia huduma ya Sarafu. Kwaheri!"
|
l := gotext.NewLocale(translationDir, code)
|
||||||
default:
|
l.AddDomain("default")
|
||||||
res.Content = "Thank you for using Sarafu. Goodbye!"
|
|
||||||
}
|
res.Content = l.Get("Thank you for using Sarafu. Goodbye!")
|
||||||
res.FlagReset = append(res.FlagReset, models.USERFLAG_ACCOUNT_UNLOCKED)
|
res.FlagReset = append(res.FlagReset, models.USERFLAG_ACCOUNT_UNLOCKED)
|
||||||
return res, nil
|
return res, nil
|
||||||
}
|
}
|
||||||
|
@ -3,3 +3,6 @@ msgstr "Salio lako ni %s"
|
|||||||
|
|
||||||
msgid "Your request has been sent. %s will receive %s from %s."
|
msgid "Your request has been sent. %s will receive %s from %s."
|
||||||
msgstr "Ombi lako limetumwa. %s atapokea %s kutoka kwa %s."
|
msgstr "Ombi lako limetumwa. %s atapokea %s kutoka kwa %s."
|
||||||
|
|
||||||
|
msgid "Thank you for using Sarafu. Goodbye!"
|
||||||
|
msgstr "Asante kwa kutumia huduma ya Sarafu. Kwaheri!"
|
||||||
|
Loading…
Reference in New Issue
Block a user