diff --git a/apps/code/catalog.de.i18n b/apps/code/catalog.de.i18n index fa6a0999d..d7425f15a 100644 --- a/apps/code/catalog.de.i18n +++ b/apps/code/catalog.de.i18n @@ -128,3 +128,8 @@ PythonTurtleSpeed = "Drawing speed between 0 and 10" PythonTurtleWhite = "White color" PythonTurtleYellow = "Yellow color" PythonUniform = "Floating point number in [a,b]" +PythonTimeFromImport = "Import time module" +PythonTimeImport = "Import time module" +PythonTimePrefix = "time module function prefix" +PythonTimeSleep = "Warten Sie n Sekunden lang" +PythonTimeMonotonic = "Monotone Zeit zurückgeben" diff --git a/apps/code/catalog.en.i18n b/apps/code/catalog.en.i18n index 312851e59..150277610 100644 --- a/apps/code/catalog.en.i18n +++ b/apps/code/catalog.en.i18n @@ -128,3 +128,8 @@ PythonTurtleSpeed = "Drawing speed between 0 and 10" PythonTurtleWhite = "White color" PythonTurtleYellow = "Yellow color" PythonUniform = "Floating point number in [a,b]" +PythonTimeFromImport = "Import time module" +PythonTimeImport = "Import time module" +PythonTimePrefix = "time module function prefix" +PythonTimeSleep = "Wait for n second" +PythonTimeMonotonic = "Return monotonic time" diff --git a/apps/code/catalog.es.i18n b/apps/code/catalog.es.i18n index 312851e59..fbd41a5ed 100644 --- a/apps/code/catalog.es.i18n +++ b/apps/code/catalog.es.i18n @@ -128,3 +128,8 @@ PythonTurtleSpeed = "Drawing speed between 0 and 10" PythonTurtleWhite = "White color" PythonTurtleYellow = "Yellow color" PythonUniform = "Floating point number in [a,b]" +PythonTimeFromImport = "Import time module" +PythonTimeImport = "Import time module" +PythonTimePrefix = "time module function prefix" +PythonTimeSleep = "Esperar n segundos" +PythonTimeMonotonic = "Tiempo monótono de retorno" diff --git a/apps/code/catalog.fr.i18n b/apps/code/catalog.fr.i18n index 847a45b43..99d42f55b 100644 --- a/apps/code/catalog.fr.i18n +++ b/apps/code/catalog.fr.i18n @@ -128,3 +128,8 @@ PythonTurtleSpeed = "Vitesse du tracé entre 0 et 10" PythonTurtleWhite = "Couleur blanche" PythonTurtleYellow = "Couleur jaune" PythonUniform = "Nombre décimal dans [a,b]" +PythonTimeFromImport = "Importation du module temps" +PythonTimeImport = "Importation du module temps" +PythonTimePrefix = "Préfixe fonction du module temps" +PythonTimeSleep = "Attendre n secondes" +PythonTimeMonotonic = "Retorune le temps monotonic" diff --git a/apps/code/catalog.pt.i18n b/apps/code/catalog.pt.i18n index e77aaf28b..ad3f43d97 100644 --- a/apps/code/catalog.pt.i18n +++ b/apps/code/catalog.pt.i18n @@ -128,3 +128,8 @@ PythonTurtleSpeed = "Drawing speed between 0 and 10" PythonTurtleWhite = "White color" PythonTurtleYellow = "Yellow color" PythonUniform = "Floating point number in [a,b]" +PythonTimeFromImport = "Import time module" +PythonTimeImport = "Import time module" +PythonTimePrefix = "time module function prefix" +PythonTimeSleep = "Aguardar n segundos" +PythonTimeMonotonic = "Retornar tempo monotônico" diff --git a/apps/code/catalog.universal.i18n b/apps/code/catalog.universal.i18n index 24f35baba..e331df515 100644 --- a/apps/code/catalog.universal.i18n +++ b/apps/code/catalog.universal.i18n @@ -141,3 +141,10 @@ PythonTurtleCommandShowturtle = "showturtle()" PythonTurtleCommandSpeed = "speed(x)" PythonTurtleCommandWhite = "'white'" PythonTurtleCommandYellow = "'yellow'" +PythonTimeModule = "time" +PythonTimeCommandImportFrom = "from time import *" +PythonCommandImportTime = "import time" +PythonCommandTimeFunction = "time.function" +PythonTimeCommandSleep = "sleep()" +PythonTimeCommandSleepDemo = "sleep(n)" +PythonTimeCommandMonotonic = "monotonic()" diff --git a/apps/code/python_toolbox.cpp b/apps/code/python_toolbox.cpp index 55989b01d..2b82bfec9 100644 --- a/apps/code/python_toolbox.cpp +++ b/apps/code/python_toolbox.cpp @@ -167,12 +167,21 @@ const ToolboxMessageTree TurtleModuleChildren[] = { ToolboxMessageTree::Leaf(I18n::Message::PythonTurtleCommandGrey, I18n::Message::PythonTurtleGrey, false) }; +const ToolboxMessageTree timeModuleChildren[] = { + ToolboxMessageTree::Leaf(I18n::Message::PythonTimeCommandImportFrom, I18n::Message::PythonTimeFromImport, false), + ToolboxMessageTree::Leaf(I18n::Message::PythonCommandImportTime, I18n::Message::PythonTimeImport, false), + ToolboxMessageTree::Leaf(I18n::Message::PythonCommandTimeFunction, I18n::Message::PythonTimePrefix, false), + ToolboxMessageTree::Leaf(I18n::Message::PythonTimeCommandSleepDemo, I18n::Message::PythonTimeSleep, false, I18n::Message::PythonTimeCommandSleep), + ToolboxMessageTree::Leaf(I18n::Message::PythonTimeCommandMonotonic, I18n::Message::PythonTimeMonotonic, false) +}; + const ToolboxMessageTree modulesChildren[] = { ToolboxMessageTree::Node(I18n::Message::MathModule, MathModuleChildren), ToolboxMessageTree::Node(I18n::Message::CmathModule, CMathModuleChildren), ToolboxMessageTree::Node(I18n::Message::RandomModule, RandomModuleChildren), ToolboxMessageTree::Node(I18n::Message::TurtleModule, TurtleModuleChildren), - ToolboxMessageTree::Node(I18n::Message::KandinskyModule, KandinskyModuleChildren) + ToolboxMessageTree::Node(I18n::Message::KandinskyModule, KandinskyModuleChildren), + ToolboxMessageTree::Node(I18n::Message::PythonTimeModule, timeModuleChildren) }; const ToolboxMessageTree catalogChildren[] = {