1
1
mirror of https://github.com/leon-ai/leon.git synced 2024-11-10 15:19:18 +03:00

feat(package/calendar): To-Do List module backbone

This commit is contained in:
Louistiti 2019-05-04 09:26:11 +08:00
parent 352c39a46b
commit 0cdd73d6c2
5 changed files with 125 additions and 28 deletions

View File

@ -1,13 +1,25 @@
{ {
"todolist": { "todolist": {
"list_created": [ "list_created": [
"I created the %list% list." "I created the \"%list%\" list."
],
"list_already_exists": [
"You already have a list named \"%list%\"."
],
"list_renamed": [
"I renamed the \"%old_list%\" list to \"%new_list%\" list."
],
"list_deleted": [
"I deleted the \"%list%\" list and all the todos it contained."
], ],
"todo_added": [ "todo_added": [
"I added %todo% to your %list% list." "I added \"%todo%\" to your \"%list%\" list."
], ],
"todo_deleted": [ "todo_completed": [
"I deleted %todo% from your %list% list." "I completed \"%todo%\" from your \"%list%\" list, congrats!"
],
"todo_archived": [
"I archived \"%todo%\" from your \"%list%\" list."
] ]
} }
} }

View File

@ -1,10 +1,25 @@
{ {
"todolist": { "todolist": {
"added": [ "list_created": [
"J'ai ajouté %thing% à votre liste %list%." "J'ai créé la liste \"%list%\"."
], ],
"deleted": [ "list_already_exists": [
"J'ai retiré %thing% de votre liste %list%." "Vous avez déjà une liste nommée \"%list%\"."
],
"list_renamed": [
"J'ai renommé la liste \"%old_list%\" en liste \"%new_list%\"."
],
"list_deleted": [
"J'ai supprimé la liste \"%list%\" et toutes les tâches qu'elle contenait."
],
"todo_added": [
"J'ai ajouté la tâche \"%todo%\" à votre liste \"%list%\"."
],
"todo_completed": [
"J'ai complété la tâche \"%todo%\" de votre liste \"%list%\", bravo !"
],
"todo_archived": [
"J'ai archivé la tâche \"%todo%\" de votre liste \"%list%\"."
] ]
} }
} }

View File

@ -2,24 +2,38 @@
"todolist": { "todolist": {
"create_list": { "create_list": {
"expressions": [ "expressions": [
"Create the named list" "Create the list",
"Create a list"
]
},
"rename_list": {
"expressions": [
"Rename the list to list",
"Rename my list to list"
]
},
"delete_list": {
"expressions": [
"Delete the list",
"Delete my list"
] ]
}, },
"add_todo": { "add_todo": {
"expressions": [ "expressions": [
"Add something to my named list" "Add to the list",
], "Add to my list"
"conditions": { ]
"between": [
{
"test": ""
}
]
}
}, },
"delete_todo": { "complete_todo": {
"expressions": [ "expressions": [
"Delete something from my named list" "Complete from the list",
"Complete from my list"
]
},
"archive_todo": {
"expressions": [
"Archive from the list",
"Archive from my list"
] ]
} }
} }

View File

@ -1,5 +1,40 @@
{ {
"todolist": [ "todolist": {
"Ajoute quelque chose à ma liste nommée" "create_list": {
] "expressions": [
"Créé la liste",
"Créé une liste"
]
},
"rename_list": {
"expressions": [
"Renomme la liste en liste",
"Renomme ma liste en liste"
]
},
"delete_list": {
"expressions": [
"Supprime la liste",
"Supprime ma liste"
]
},
"add_todo": {
"expressions": [
"Ajoute à la liste",
"Ajoute à ma liste"
]
},
"complete_todo": {
"expressions": [
"Complète de la liste",
"Complete de ma liste"
]
},
"archive_todo": {
"expressions": [
"Archive de la liste",
"Archive de ma liste"
]
}
}
} }

View File

@ -7,20 +7,41 @@ import utils
def create_list(string, entities): def create_list(string, entities):
"""WIP""" """WIP"""
return utils.output('end', 'list_created', utils.translate('list_created', { 'list': 'test' })) return utils.output('end', 'list_created', utils.translate('list_created', { 'list': 'fake' }))
def rename_list(string, entities):
"""WIP"""
return utils.output('end', 'list_renamed', utils.translate('list_renamed', {
'old_list': 'fake',
'new_list': 'new'
}))
def delete_list(string, entities):
"""WIP"""
return utils.output('end', 'list_deleted', utils.translate('list_deleted', { 'list': 'fake' }))
def add_todo(string, entities): def add_todo(string, entities):
"""WIP""" """WIP"""
return utils.output('end', 'todo_added', utils.translate('todo_added', { return utils.output('end', 'todo_added', utils.translate('todo_added', {
'list': 'test', 'list': 'fake',
'todo': 'todo 1' 'todo': 'todo 1'
})) }))
def delete_todo(string, entities): def complete_todo(string, entities):
"""WIP""" """WIP"""
return utils.output('end', 'todo_deleted', utils.translate('todo_deleted', { return utils.output('end', 'todo_completed', utils.translate('todo_completed', {
'list': 'test', 'list': 'fake',
'todo': 'todo 1'
}))
def archive_todo(string, entities):
"""WIP"""
return utils.output('end', 'todo_archived', utils.translate('todo_archived', {
'list': 'fake',
'todo': 'todo 1' 'todo': 'todo 1'
})) }))