diff --git a/i18n/en.yml b/i18n/en.yml index f214e03..d0aacf8 100644 --- a/i18n/en.yml +++ b/i18n/en.yml @@ -78,6 +78,15 @@ en: bad_password: "Bad password!" goodbye: "Goodbye!" unknown_command: "Unknown command!" + option: + title: "Help" + show: "Search and show the results" + group: "Change the group for the search" + add: "Add an item" + update: "Update an item" + remove: "Remove an item" + help: "Show this message" + quit: "Quit the software" display: comment: "Comment" error: "ERROR" diff --git a/i18n/fr.yml b/i18n/fr.yml index 2295d19..197ae80 100644 --- a/i18n/fr.yml +++ b/i18n/fr.yml @@ -78,6 +78,15 @@ fr: bad_password: "Mauvais mot de passe!" goodbye: "Au revoir!" unknown_command: "Commande inconnue!" + option: + title: "Aide" + show: "Cherche et affiche les résulats" + group: "Change de groupe pour la recherche" + add: "Ajout un élément" + update: "Met à jour un élément" + remove: "Supprime un élément" + help: "Affiche ce message d'aide" + quit: "Quitte le programme" display: comment: "Commentaire" error: "ERREUR" diff --git a/lib/Cli.rb b/lib/Cli.rb index 9514f0a..44aebf0 100644 --- a/lib/Cli.rb +++ b/lib/Cli.rb @@ -279,28 +279,15 @@ class Cli group = nil end when 'help', 'h', '?' - puts '# Help' + puts "# #{I18n.t('cli.interactive.option.title')}" puts '# --------------------' - puts '# Display an item:' - puts '# display SEARCH' - puts '# show SEARCH' - puts '# s SEARCH' - puts '# d SEARCH' - puts '# Add an new item:' - puts '# add' - puts '# a' - puts '# Update an item:' - puts '# update ID' - puts '# u ID' - puts '# Remove an item:' - puts '# remove ID' - puts '# delete ID' - puts '# r ID' - puts '# d ID' - puts '# Quit the program:' - puts '# quit' - puts '# exit' - puts '# q' + puts "# display, show, d, s SEARCH #{I18n.t('cli.interactive.option.show')}" + puts "# group, g #{I18n.t('cli.interactive.option.group')}" + puts "# add, a #{I18n.t('cli.interactive.option.add')}" + puts "# update, u ID #{I18n.t('cli.interactive.option.update')}" + puts "# remove, delete, r, d ID #{I18n.t('cli.interactive.option.remove')}" + puts "# help, h, ? #{I18n.t('cli.interactive.option.help')}" + puts "# quit, exit, q #{I18n.t('cli.interactive.option.quit')}" when 'quit', 'exit', 'q' puts I18n.t('cli.interactive.goodbye') break