From 06bfaafb3b5108dcc9b6cb0bb2e25f2e240ce3a2 Mon Sep 17 00:00:00 2001 From: Romain Goyet Date: Thu, 1 Feb 2018 12:17:03 +0100 Subject: [PATCH] [python] Add "input()" to the catalog --- apps/code/catalog.de.i18n | 1 + apps/code/catalog.en.i18n | 1 + apps/code/catalog.es.i18n | 1 + apps/code/catalog.fr.i18n | 1 + apps/code/catalog.pt.i18n | 1 + apps/code/catalog.universal.i18n | 1 + apps/code/python_toolbox.cpp | 3 ++- 7 files changed, 8 insertions(+), 1 deletion(-) diff --git a/apps/code/catalog.de.i18n b/apps/code/catalog.de.i18n index a1e63a3a2..74d147b0e 100644 --- a/apps/code/catalog.de.i18n +++ b/apps/code/catalog.de.i18n @@ -50,6 +50,7 @@ PythonImportFromCmath = "Import cmath module" PythonImportFromKandinsky = "Import kandinsky module" PythonImportFromRandom = "Import random module" PythonImportFromMath = "Import math module" +PythonInput = "Prompt a value" PythonInt = "Convert x to an integer" PythonIsFinite = "Check if x is finite" PythonIsInfinite = "Check if x is infinity" diff --git a/apps/code/catalog.en.i18n b/apps/code/catalog.en.i18n index a1e63a3a2..74d147b0e 100644 --- a/apps/code/catalog.en.i18n +++ b/apps/code/catalog.en.i18n @@ -50,6 +50,7 @@ PythonImportFromCmath = "Import cmath module" PythonImportFromKandinsky = "Import kandinsky module" PythonImportFromRandom = "Import random module" PythonImportFromMath = "Import math module" +PythonInput = "Prompt a value" PythonInt = "Convert x to an integer" PythonIsFinite = "Check if x is finite" PythonIsInfinite = "Check if x is infinity" diff --git a/apps/code/catalog.es.i18n b/apps/code/catalog.es.i18n index a1e63a3a2..74d147b0e 100644 --- a/apps/code/catalog.es.i18n +++ b/apps/code/catalog.es.i18n @@ -50,6 +50,7 @@ PythonImportFromCmath = "Import cmath module" PythonImportFromKandinsky = "Import kandinsky module" PythonImportFromRandom = "Import random module" PythonImportFromMath = "Import math module" +PythonInput = "Prompt a value" PythonInt = "Convert x to an integer" PythonIsFinite = "Check if x is finite" PythonIsInfinite = "Check if x is infinity" diff --git a/apps/code/catalog.fr.i18n b/apps/code/catalog.fr.i18n index da5d5b77a..732c9fe53 100644 --- a/apps/code/catalog.fr.i18n +++ b/apps/code/catalog.fr.i18n @@ -50,6 +50,7 @@ PythonImportFromCmath = "Importation du module cmath" PythonImportFromKandinsky = "Importation du module kandinsky" PythonImportFromRandom = "Importation du module random" PythonImportFromMath = "Importation du module math" +PythonInput = "Entrer une valeur" PythonInt = "Conversion en entier" PythonIsFinite = "Teste si x est fini" PythonIsInfinite = "Teste si x est infini" diff --git a/apps/code/catalog.pt.i18n b/apps/code/catalog.pt.i18n index ab5d65894..9adca7ea8 100644 --- a/apps/code/catalog.pt.i18n +++ b/apps/code/catalog.pt.i18n @@ -50,6 +50,7 @@ PythonImportFromCmath = "Import cmath module" PythonImportFromKandinsky = "Import kandinsky module" PythonImportFromRandom = "Import random module" PythonImportFromMath = "Import math module" +PythonInput = "Prompt a value" PythonInt = "Convert x to an integer" PythonIsFinite = "Check if x is finite" PythonIsInfinite = "Check if x is infinity" diff --git a/apps/code/catalog.universal.i18n b/apps/code/catalog.universal.i18n index 5bc71fbb7..bcb3233f1 100644 --- a/apps/code/catalog.universal.i18n +++ b/apps/code/catalog.universal.i18n @@ -51,6 +51,7 @@ PythonCommandImportCmath = "import cmath" PythonCommandImportKandinsky = "import kandinsky" PythonCommandImportRandom = "import random" PythonCommandImportMath = "import math" +PythonCommandInput = "input(\"text\")" PythonCommandInt = "int(x)" PythonCommandIsFinite = "isfinite(x)" PythonCommandIsInfinite = "isinf(x)" diff --git a/apps/code/python_toolbox.cpp b/apps/code/python_toolbox.cpp index 1092f5359..db52cf34c 100644 --- a/apps/code/python_toolbox.cpp +++ b/apps/code/python_toolbox.cpp @@ -8,7 +8,7 @@ extern "C" { namespace Code { -static constexpr int catalogChildrenCount = 93; +static constexpr int catalogChildrenCount = 94; static constexpr int MathModuleChildrenCount = 43; static constexpr int KandinskyModuleChildrenCount = 7; static constexpr int CMathModuleChildrenCount = 13; @@ -195,6 +195,7 @@ const ToolboxMessageTree catalogChildren[catalogChildrenCount] = { ToolboxMessageTree(I18n::Message::PythonCommandImportKandinsky, I18n::Message::PythonImportKandinsky, I18n::Message::PythonCommandImportKandinsky), ToolboxMessageTree(I18n::Message::PythonCommandImportMath, I18n::Message::PythonImportMath, I18n::Message::PythonCommandImportMath), ToolboxMessageTree(I18n::Message::PythonCommandImportRandom, I18n::Message::PythonImportRandom, I18n::Message::PythonCommandImportRandom), + ToolboxMessageTree(I18n::Message::PythonCommandInput, I18n::Message::PythonInput, I18n::Message::PythonCommandInput), ToolboxMessageTree(I18n::Message::PythonCommandInt, I18n::Message::PythonInt, I18n::Message::PythonCommandInt), ToolboxMessageTree(I18n::Message::PythonCommandIsFinite, I18n::Message::PythonIsFinite, I18n::Message::PythonCommandIsFinite), ToolboxMessageTree(I18n::Message::PythonCommandIsInfinite, I18n::Message::PythonIsInfinite, I18n::Message::PythonCommandIsInfinite),