From 03f300a754be9c80ee7daf53334f54cbbaff1aba Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9a=20Saviot?= Date: Thu, 27 Dec 2018 17:09:45 +0100 Subject: [PATCH] [python/turtle] Add showturtle and hideturtle to the toolbox --- apps/code/catalog.de.i18n | 2 ++ apps/code/catalog.en.i18n | 2 ++ apps/code/catalog.es.i18n | 2 ++ apps/code/catalog.fr.i18n | 2 ++ apps/code/catalog.pt.i18n | 2 ++ apps/code/catalog.universal.i18n | 2 ++ apps/code/python_toolbox.cpp | 4 ++++ 7 files changed, 16 insertions(+) diff --git a/apps/code/catalog.de.i18n b/apps/code/catalog.de.i18n index d7e73b9e6..2bbcd18ff 100644 --- a/apps/code/catalog.de.i18n +++ b/apps/code/catalog.de.i18n @@ -107,6 +107,7 @@ PythonTurtleGoto = "Move to (x,y) coordinates" PythonTurtleGreen = "Green color" PythonTurtleGrey = "Grey color" PythonTurtleHeading = "Return the current heading" +PythonTurtleHideturtle = "Hide the turtle" PythonTurtleIsdown = "Return True if the pen is down" PythonTurtleLeft = "Turn left by a degrees" PythonTurtleOrange = "Orange color" @@ -121,6 +122,7 @@ PythonTurtleReset = "Reset the drawing" PythonTurtleRight = "Turn right by a degrees" PythonTurtleSetheading = "Set the orientation to a degrees" PythonTurtleSetposition = "Positionne la tortue" +PythonTurtleShowturtle = "Show the turtle" PythonTurtleSpeed = "Drawing speed between 0 and 10" PythonTurtleWhite = "White color" PythonTurtleYellow = "Yellow color" diff --git a/apps/code/catalog.en.i18n b/apps/code/catalog.en.i18n index 606562c16..d9ec7bfad 100644 --- a/apps/code/catalog.en.i18n +++ b/apps/code/catalog.en.i18n @@ -107,6 +107,7 @@ PythonTurtleGoto = "Move to (x,y) coordinates" PythonTurtleGreen = "Green color" PythonTurtleGrey = "Grey color" PythonTurtleHeading = "Return the current heading" +PythonTurtleHideturtle = "Hide the turtle" PythonTurtleIsdown = "Return True if the pen is down" PythonTurtleLeft = "Turn left by a degrees" PythonTurtleOrange = "Orange color" @@ -121,6 +122,7 @@ PythonTurtleReset = "Reset the drawing" PythonTurtleRight = "Turn right by a degrees" PythonTurtleSetheading = "Set the orientation to a degrees" PythonTurtleSetposition = "Positionne la tortue" +PythonTurtleShowturtle = "Show the turtle" PythonTurtleSpeed = "Drawing speed between 0 and 10" PythonTurtleWhite = "White color" PythonTurtleYellow = "Yellow color" diff --git a/apps/code/catalog.es.i18n b/apps/code/catalog.es.i18n index 606562c16..d9ec7bfad 100644 --- a/apps/code/catalog.es.i18n +++ b/apps/code/catalog.es.i18n @@ -107,6 +107,7 @@ PythonTurtleGoto = "Move to (x,y) coordinates" PythonTurtleGreen = "Green color" PythonTurtleGrey = "Grey color" PythonTurtleHeading = "Return the current heading" +PythonTurtleHideturtle = "Hide the turtle" PythonTurtleIsdown = "Return True if the pen is down" PythonTurtleLeft = "Turn left by a degrees" PythonTurtleOrange = "Orange color" @@ -121,6 +122,7 @@ PythonTurtleReset = "Reset the drawing" PythonTurtleRight = "Turn right by a degrees" PythonTurtleSetheading = "Set the orientation to a degrees" PythonTurtleSetposition = "Positionne la tortue" +PythonTurtleShowturtle = "Show the turtle" PythonTurtleSpeed = "Drawing speed between 0 and 10" PythonTurtleWhite = "White color" PythonTurtleYellow = "Yellow color" diff --git a/apps/code/catalog.fr.i18n b/apps/code/catalog.fr.i18n index 289a76c00..109faebe0 100644 --- a/apps/code/catalog.fr.i18n +++ b/apps/code/catalog.fr.i18n @@ -107,6 +107,7 @@ PythonTurtleGoto = "Va au point de coordonnées (x,y)" PythonTurtleGreen = "Couleur verte" PythonTurtleGrey = "Couleur grise" PythonTurtleHeading = "Renvoie l'orientation actuelle" +PythonTurtleHideturtle = "Masque la tortue" PythonTurtleIsdown = "True si le crayon est abaissé" PythonTurtleLeft = "Pivote de a degrés vers la gauche" PythonTurtleOrange = "Couleur orange" @@ -121,6 +122,7 @@ PythonTurtleReset = "Réinitialise le dessin" PythonTurtleRight = "Pivote de a degrés vers la droite" PythonTurtleSetheading = "Met une orientation de a degrés" PythonTurtleSetposition = "Positionne la tortue" +PythonTurtleShowturtle = "Affiche la tortue" PythonTurtleSpeed = "Vitesse du tracé entre 0 et 10" PythonTurtleWhite = "Couleur blanche" PythonTurtleYellow = "Couleur jaune" diff --git a/apps/code/catalog.pt.i18n b/apps/code/catalog.pt.i18n index f74892713..2d0210552 100644 --- a/apps/code/catalog.pt.i18n +++ b/apps/code/catalog.pt.i18n @@ -107,6 +107,7 @@ PythonTurtleGoto = "Move to (x,y) coordinates" PythonTurtleGreen = "Green color" PythonTurtleGrey = "Grey color" PythonTurtleHeading = "Return the current heading" +PythonTurtleHideturtle = "Hide the turtle" PythonTurtleIsdown = "Return True if the pen is down" PythonTurtleLeft = "Turn left by a degrees" PythonTurtleOrange = "Orange color" @@ -121,6 +122,7 @@ PythonTurtleReset = "Reset the drawing" PythonTurtleRight = "Turn right by a degrees" PythonTurtleSetheading = "Set the orientation to a degrees" PythonTurtleSetposition = "Positionne la tortue" +PythonTurtleShowturtle = "Show the turtle" PythonTurtleSpeed = "Drawing speed between 0 and 10" PythonTurtleWhite = "White color" PythonTurtleYellow = "Yellow color" diff --git a/apps/code/catalog.universal.i18n b/apps/code/catalog.universal.i18n index e55a6e922..d1e47d336 100644 --- a/apps/code/catalog.universal.i18n +++ b/apps/code/catalog.universal.i18n @@ -121,6 +121,7 @@ PythonTurtleCommandGoto = "goto(x,y)" PythonTurtleCommandGreen = "'green'" PythonTurtleCommandGrey = "'grey'" PythonTurtleCommandHeading = "heading()" +PythonTurtleCommandHideturtle = "hideturtle()" PythonTurtleCommandIsdown= "isdown()" PythonTurtleCommandLeft = "left(a)" PythonTurtleCommandOrange = "'orange'" @@ -135,6 +136,7 @@ PythonTurtleCommandReset = "reset()" PythonTurtleCommandRight = "right(a)" PythonTurtleCommandSetheading = "setheading(a)" PythonTurtleCommandSetposition = "setposition(x, [y])" +PythonTurtleCommandShowturtle = "showturtle()" PythonTurtleCommandSpeed = "speed(x)" PythonTurtleCommandWhite = "'white'" PythonTurtleCommandYellow = "'yellow'" diff --git a/apps/code/python_toolbox.cpp b/apps/code/python_toolbox.cpp index b38ff341d..1a3ed9916 100644 --- a/apps/code/python_toolbox.cpp +++ b/apps/code/python_toolbox.cpp @@ -150,6 +150,8 @@ const ToolboxMessageTree TurtleModuleChildren[] = { ToolboxMessageTree::Leaf(I18n::Message::PythonTurtleCommandPensize, I18n::Message::PythonTurtlePensize), ToolboxMessageTree::Leaf(I18n::Message::PythonTurtleCommandIsdown, I18n::Message::PythonTurtleIsdown, false), ToolboxMessageTree::Leaf(I18n::Message::PythonTurtleCommandReset, I18n::Message::PythonTurtleReset, false), + ToolboxMessageTree::Leaf(I18n::Message::PythonTurtleCommandShowturtle, I18n::Message::PythonTurtleShowturtle, false), + ToolboxMessageTree::Leaf(I18n::Message::PythonTurtleCommandHideturtle, I18n::Message::PythonTurtleHideturtle, false), ToolboxMessageTree::Leaf(I18n::Message::PythonTurtleCommandColor, I18n::Message::PythonTurtleColor, false, I18n::Message::PythonTurtleCommandColorWithoutArg), ToolboxMessageTree::Leaf(I18n::Message::PythonTurtleCommandBlue, I18n::Message::PythonTurtleBlue, false), ToolboxMessageTree::Leaf(I18n::Message::PythonTurtleCommandRed, I18n::Message::PythonTurtleRed, false), @@ -232,6 +234,7 @@ const ToolboxMessageTree catalogChildren[] = { ToolboxMessageTree::Leaf(I18n::Message::PythonTurtleCommandGrey, I18n::Message::PythonTurtleGrey, false), ToolboxMessageTree::Leaf(I18n::Message::PythonTurtleCommandHeading, I18n::Message::PythonTurtleHeading, false), ToolboxMessageTree::Leaf(I18n::Message::PythonCommandHex, I18n::Message::PythonHex), + ToolboxMessageTree::Leaf(I18n::Message::PythonTurtleCommandHideturtle, I18n::Message::PythonTurtleHideturtle, false), ToolboxMessageTree::Leaf(I18n::Message::PythonCommandImportCmath, I18n::Message::PythonImportCmath, false), ToolboxMessageTree::Leaf(I18n::Message::PythonCommandImportKandinsky, I18n::Message::PythonImportKandinsky, false), ToolboxMessageTree::Leaf(I18n::Message::PythonCommandImportMath, I18n::Message::PythonImportMath, false), @@ -283,6 +286,7 @@ const ToolboxMessageTree catalogChildren[] = { ToolboxMessageTree::Leaf(I18n::Message::PythonTurtleCommandSetheading, I18n::Message::PythonTurtleSetheading), ToolboxMessageTree::Leaf(I18n::Message::PythonCommandSetPixel, I18n::Message::PythonSetPixel), ToolboxMessageTree::Leaf(I18n::Message::PythonCommandSeed, I18n::Message::PythonSeed), + ToolboxMessageTree::Leaf(I18n::Message::PythonTurtleCommandShowturtle, I18n::Message::PythonTurtleShowturtle, false), ToolboxMessageTree::Leaf(I18n::Message::PythonCommandSin, I18n::Message::PythonSin), ToolboxMessageTree::Leaf(I18n::Message::PythonCommandSinh, I18n::Message::PythonSinh), ToolboxMessageTree::Leaf(I18n::Message::PythonCommandSorted, I18n::Message::PythonSorted),