1
1
mirror of https://github.com/leon-ai/leon.git synced 2024-12-19 14:52:21 +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": {
"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": [
"I added %todo% to your %list% list."
"I added \"%todo%\" to your \"%list%\" list."
],
"todo_deleted": [
"I deleted %todo% from your %list% list."
"todo_completed": [
"I completed \"%todo%\" from your \"%list%\" list, congrats!"
],
"todo_archived": [
"I archived \"%todo%\" from your \"%list%\" list."
]
}
}

View File

@ -1,10 +1,25 @@
{
"todolist": {
"added": [
"J'ai ajouté %thing% à votre liste %list%."
"list_created": [
"J'ai créé la liste \"%list%\"."
],
"deleted": [
"J'ai retiré %thing% de votre liste %list%."
"list_already_exists": [
"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": {
"create_list": {
"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": {
"expressions": [
"Add something to my named list"
],
"conditions": {
"between": [
{
"test": ""
}
]
}
"Add to the list",
"Add to my list"
]
},
"delete_todo": {
"complete_todo": {
"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": [
"Ajoute quelque chose à ma liste nommée"
]
"todolist": {
"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):
"""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):
"""WIP"""
return utils.output('end', 'todo_added', utils.translate('todo_added', {
'list': 'test',
'list': 'fake',
'todo': 'todo 1'
}))
def delete_todo(string, entities):
def complete_todo(string, entities):
"""WIP"""
return utils.output('end', 'todo_deleted', utils.translate('todo_deleted', {
'list': 'test',
return utils.output('end', 'todo_completed', utils.translate('todo_completed', {
'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'
}))