Compare commits
9 Commits
dc14480519
...
ca81b041f1
Author | SHA1 | Date | |
---|---|---|---|
ca81b041f1 | |||
fe7c04c0dd | |||
89da7fc741 | |||
9953ae3e56 | |||
ea68edff3d | |||
1e99db2bd7 | |||
b7783073cf | |||
6437d2e4df | |||
353c38be46 |
@ -116,6 +116,7 @@ func getHandler(appFlags *asm.FlagParser, rs *resource.DbResource, userdataStore
|
|||||||
rs.AddLocalFunc("reset_incorrect_date_format", ussdHandlers.ResetIncorrectYob)
|
rs.AddLocalFunc("reset_incorrect_date_format", ussdHandlers.ResetIncorrectYob)
|
||||||
rs.AddLocalFunc("set_reset_single_edit", ussdHandlers.SetResetSingleEdit)
|
rs.AddLocalFunc("set_reset_single_edit", ussdHandlers.SetResetSingleEdit)
|
||||||
rs.AddLocalFunc("initiate_transaction", ussdHandlers.InitiateTransaction)
|
rs.AddLocalFunc("initiate_transaction", ussdHandlers.InitiateTransaction)
|
||||||
|
rs.AddLocalFunc("set_new_language", ussdHandlers.SetNewLanguage)
|
||||||
|
|
||||||
return ussdHandlers, nil
|
return ussdHandlers, nil
|
||||||
}
|
}
|
||||||
|
@ -86,6 +86,7 @@ func getHandler(appFlags *asm.FlagParser, rs *resource.DbResource, userdataStore
|
|||||||
rs.AddLocalFunc("reset_incorrect_date_format", ussdHandlers.ResetIncorrectYob)
|
rs.AddLocalFunc("reset_incorrect_date_format", ussdHandlers.ResetIncorrectYob)
|
||||||
rs.AddLocalFunc("set_reset_single_edit", ussdHandlers.SetResetSingleEdit)
|
rs.AddLocalFunc("set_reset_single_edit", ussdHandlers.SetResetSingleEdit)
|
||||||
rs.AddLocalFunc("initiate_transaction", ussdHandlers.InitiateTransaction)
|
rs.AddLocalFunc("initiate_transaction", ussdHandlers.InitiateTransaction)
|
||||||
|
rs.AddLocalFunc("set_new_language", ussdHandlers.SetNewLanguage)
|
||||||
|
|
||||||
return ussdHandlers, nil
|
return ussdHandlers, nil
|
||||||
}
|
}
|
||||||
|
@ -76,6 +76,7 @@ func getHandler(appFlags *asm.FlagParser, rs *resource.DbResource, userdataStore
|
|||||||
rs.AddLocalFunc("reset_incorrect_date_format", ussdHandlers.ResetIncorrectYob)
|
rs.AddLocalFunc("reset_incorrect_date_format", ussdHandlers.ResetIncorrectYob)
|
||||||
rs.AddLocalFunc("set_reset_single_edit", ussdHandlers.SetResetSingleEdit)
|
rs.AddLocalFunc("set_reset_single_edit", ussdHandlers.SetResetSingleEdit)
|
||||||
rs.AddLocalFunc("initiate_transaction", ussdHandlers.InitiateTransaction)
|
rs.AddLocalFunc("initiate_transaction", ussdHandlers.InitiateTransaction)
|
||||||
|
rs.AddLocalFunc("set_new_language", ussdHandlers.SetNewLanguage)
|
||||||
|
|
||||||
return ussdHandlers, nil
|
return ussdHandlers, nil
|
||||||
}
|
}
|
||||||
|
@ -71,6 +71,7 @@ func getHandler(appFlags *asm.FlagParser, rs *resource.DbResource, pe *persist.P
|
|||||||
rs.AddLocalFunc("reset_incorrect_date_format", ussdHandlers.ResetIncorrectYob)
|
rs.AddLocalFunc("reset_incorrect_date_format", ussdHandlers.ResetIncorrectYob)
|
||||||
rs.AddLocalFunc("set_reset_single_edit", ussdHandlers.SetResetSingleEdit)
|
rs.AddLocalFunc("set_reset_single_edit", ussdHandlers.SetResetSingleEdit)
|
||||||
rs.AddLocalFunc("initiate_transaction", ussdHandlers.InitiateTransaction)
|
rs.AddLocalFunc("initiate_transaction", ussdHandlers.InitiateTransaction)
|
||||||
|
rs.AddLocalFunc("set_new_language", ussdHandlers.SetNewLanguage)
|
||||||
|
|
||||||
return ussdHandlers, nil
|
return ussdHandlers, nil
|
||||||
}
|
}
|
||||||
|
@ -968,3 +968,22 @@ func (h *Handlers) GetProfileInfo(ctx context.Context, sym string, input []byte)
|
|||||||
|
|
||||||
return res, nil
|
return res, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// SetNewLanguage sets the new language based on user input
|
||||||
|
func (h *Handlers) SetNewLanguage(ctx context.Context, sym string, input []byte) (resource.Result, error) {
|
||||||
|
var res resource.Result
|
||||||
|
|
||||||
|
inputStr := string(input)
|
||||||
|
|
||||||
|
switch inputStr {
|
||||||
|
case "0":
|
||||||
|
res.FlagSet = append(res.FlagSet, state.FLAG_LANG)
|
||||||
|
res.Content = "eng"
|
||||||
|
case "1":
|
||||||
|
res.FlagSet = append(res.FlagSet, state.FLAG_LANG)
|
||||||
|
res.Content = "swa"
|
||||||
|
default:
|
||||||
|
}
|
||||||
|
|
||||||
|
return res, nil
|
||||||
|
}
|
||||||
|
@ -1 +1 @@
|
|||||||
Rudi
|
Rudi
|
@ -1 +1 @@
|
|||||||
Balances:
|
Balances:
|
@ -1 +1 @@
|
|||||||
Salio
|
Salio:
|
1
services/registration/change_language
Normal file
1
services/registration/change_language
Normal file
@ -0,0 +1 @@
|
|||||||
|
Select language:
|
10
services/registration/change_language.vis
Normal file
10
services/registration/change_language.vis
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
LOAD reset_account_authorized 0
|
||||||
|
LOAD reset_incorrect 0
|
||||||
|
CATCH incorrect_pin flag_incorrect_pin 1
|
||||||
|
CATCH pin_entry flag_account_authorized 0
|
||||||
|
MOUT english 0
|
||||||
|
MOUT kiswahili 1
|
||||||
|
HALT
|
||||||
|
INCMP language_changed 0
|
||||||
|
INCMP language_changed 1
|
||||||
|
INCMP . *
|
@ -1 +1 @@
|
|||||||
Badili lugha
|
Badili lugha
|
1
services/registration/change_language_swa
Normal file
1
services/registration/change_language_swa
Normal file
@ -0,0 +1 @@
|
|||||||
|
Chagua lugha:
|
@ -1 +1 @@
|
|||||||
Change PIN
|
Change PIN
|
@ -1 +1 @@
|
|||||||
Badili PIN
|
Badili PIN
|
@ -1 +1 @@
|
|||||||
Check statement
|
Check statement
|
@ -1,2 +1 @@
|
|||||||
Your community balance is: 0.00SRF
|
Your community balance is: 0.00SRF
|
||||||
|
|
@ -1 +1 @@
|
|||||||
Community balance
|
Community balance
|
@ -1 +1 @@
|
|||||||
Edit name
|
Edit name
|
@ -1 +1 @@
|
|||||||
Weka jina
|
Weka jina
|
@ -1 +1 @@
|
|||||||
Edit offerings
|
Edit offerings
|
@ -1 +1 @@
|
|||||||
Enter family name:
|
Enter family name:
|
@ -1 +1 @@
|
|||||||
Enter your location:
|
Enter your location:
|
@ -1 +1 @@
|
|||||||
Weka majina yako ya kwanza:
|
Weka majina yako ya kwanza:
|
@ -1 +1 @@
|
|||||||
Female
|
Female
|
@ -1 +1 @@
|
|||||||
Guard my PIN
|
Guard my PIN
|
@ -1 +1 @@
|
|||||||
Linda PIN yangu
|
Linda PIN yangu
|
@ -1,2 +1,2 @@
|
|||||||
The year of birth you entered is invalid.
|
The year of birth you entered is invalid.
|
||||||
Please try again.
|
Please try again.
|
@ -1 +1 @@
|
|||||||
Incorrect pin
|
Incorrect pin
|
1
services/registration/language_changed
Normal file
1
services/registration/language_changed
Normal file
@ -0,0 +1 @@
|
|||||||
|
Your language change request was successful.
|
6
services/registration/language_changed.vis
Normal file
6
services/registration/language_changed.vis
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
LOAD set_new_language 6
|
||||||
|
MOUT back 0
|
||||||
|
MOUT quit 9
|
||||||
|
HALT
|
||||||
|
INCMP ^ 0
|
||||||
|
INCMP quit 9
|
1
services/registration/language_changed_swa
Normal file
1
services/registration/language_changed_swa
Normal file
@ -0,0 +1 @@
|
|||||||
|
Ombi lako la kubadilisha lugha limefanikiwa.
|
@ -9,6 +9,7 @@ MOUT back 0
|
|||||||
HALT
|
HALT
|
||||||
INCMP _ 0
|
INCMP _ 0
|
||||||
INCMP edit_profile 1
|
INCMP edit_profile 1
|
||||||
|
INCMP change_language 2
|
||||||
INCMP balances 3
|
INCMP balances 3
|
||||||
INCMP pin_management 5
|
INCMP pin_management 5
|
||||||
INCMP address 6
|
INCMP address 6
|
||||||
|
@ -1 +1 @@
|
|||||||
Anwani yangu
|
Anwani yangu
|
@ -1 +1 @@
|
|||||||
Salio lako ni: 0.00 SRF
|
Salio lako ni: 0.00 SRF
|
@ -1 +1 @@
|
|||||||
no
|
no
|
@ -1 +1 @@
|
|||||||
la
|
la
|
@ -1 +1 @@
|
|||||||
Tafadhali weka PIN yako
|
Tafadhali weka PIN yako
|
@ -1 +1 @@
|
|||||||
PIN Management
|
PIN Management
|
@ -1 +1 @@
|
|||||||
Profile
|
Profile
|
@ -1 +1 @@
|
|||||||
Wasifu wangu
|
Wasifu wangu
|
1
services/registration/quit_menu
Normal file
1
services/registration/quit_menu
Normal file
@ -0,0 +1 @@
|
|||||||
|
Quit
|
1
services/registration/quit_menu_swa
Normal file
1
services/registration/quit_menu_swa
Normal file
@ -0,0 +1 @@
|
|||||||
|
Ondoka
|
@ -1 +1 @@
|
|||||||
Badili PIN ya mwenzio
|
Badili PIN ya mwenzio
|
@ -1 +1 @@
|
|||||||
Enter recipient's phone number:
|
Enter recipient's phone number:
|
@ -1,2 +1,2 @@
|
|||||||
{{.get_recipient}} will receive {{.validate_amount}} from {{.get_sender}}
|
{{.get_recipient}} will receive {{.validate_amount}} from {{.get_sender}}
|
||||||
Please enter your PIN to confirm:
|
Please enter your PIN to confirm:
|
@ -1 +1 @@
|
|||||||
Unspecified
|
Unspecified
|
@ -1 +1 @@
|
|||||||
Profile updated successfully
|
Profile updated successfully
|
@ -1 +1 @@
|
|||||||
Akaunti imeupdatiwa
|
Akaunti imeupdatiwa
|
@ -1,2 +1,2 @@
|
|||||||
My profile:
|
My profile:
|
||||||
{{.get_profile_info}}
|
{{.get_profile_info}}
|
@ -1 +1,2 @@
|
|||||||
Wasifu wangu
|
Wasifu wangu:
|
||||||
|
{{.get_profile_info}}
|
@ -1 +1 @@
|
|||||||
Angalia Wasifu
|
Angalia Wasifu
|
@ -1 +1 @@
|
|||||||
yes
|
yes
|
@ -1 +1 @@
|
|||||||
ndio
|
ndio
|
Loading…
Reference in New Issue
Block a user