From 0b564510e7ddf7333b3d4e10c100ad03ac30b06a Mon Sep 17 00:00:00 2001 From: "Yaya.Cout" Date: Mon, 20 Sep 2021 17:21:41 +0200 Subject: [PATCH] [code/time] Add time in python toolbox --- apps/code/catalog.de.i18n | 6 ++++++ apps/code/catalog.en.i18n | 6 ++++++ apps/code/catalog.es.i18n | 6 ++++++ apps/code/catalog.fr.i18n | 6 ++++++ apps/code/catalog.hu.i18n | 6 ++++++ apps/code/catalog.it.i18n | 6 ++++++ apps/code/catalog.nl.i18n | 6 ++++++ apps/code/catalog.pt.i18n | 6 ++++++ apps/code/catalog.universal.i18n | 6 ++++++ apps/code/python_toolbox.cpp | 8 +++++++- 10 files changed, 61 insertions(+), 1 deletion(-) diff --git a/apps/code/catalog.de.i18n b/apps/code/catalog.de.i18n index 614dca9ea..54bfd1697 100644 --- a/apps/code/catalog.de.i18n +++ b/apps/code/catalog.de.i18n @@ -142,6 +142,12 @@ PythonShow = "Figur anzeigen" PythonSin = "Sinus" PythonSinh = "Hyperbolischer Sinus" PythonSleep = "Ausführung aussetzen für t Sekunden" +PythonLocalTime = "Zeit in Tupel umwandeln" +PythonMktime = "Tupel in Zeit umwandeln" +PythonTime = "Abrufen des aktuellen Zeitstempels" +PythonSetLocaltime = "Zeit aus einem Tupel von localtime()" +PythonRTCmode = "Aktuellen RTC-Modus abrufen" +PythonSetRTCmode = "RTC-Modus festlegen" PythonSort = "Die Liste sortieren" PythonSqrt = "Quadratwurzel" PythonSum = "Summe der Elemente einer Liste" diff --git a/apps/code/catalog.en.i18n b/apps/code/catalog.en.i18n index 86b357fb6..93d28a084 100644 --- a/apps/code/catalog.en.i18n +++ b/apps/code/catalog.en.i18n @@ -136,6 +136,12 @@ PythonShow = "Display the figure" PythonSin = "Sine" PythonSinh = "Hyperbolic sine" PythonSleep = "Suspend the execution for t seconds" +PythonLocalTime = "Convert time into tuple" +PythonMktime = "Convert tuple into time" +PythonTime = "Get the current timestamp" +PythonSetLocaltime = "Set time from a tuple of localtime()" +PythonRTCmode = "Get current RTC mode" +PythonSetRTCmode = "Set RTC mode" PythonSort = "Sort the list" PythonSqrt = "Square root" PythonSum = "Sum the items of a list" diff --git a/apps/code/catalog.es.i18n b/apps/code/catalog.es.i18n index dbf21c95d..e80957719 100644 --- a/apps/code/catalog.es.i18n +++ b/apps/code/catalog.es.i18n @@ -136,6 +136,12 @@ PythonShow = "Display the figure" PythonSin = "Sine" PythonSinh = "Hyperbolic sine" PythonSleep = "Suspend the execution for t seconds" +PythonLocalTime = "Convertir el tiempo en tupla" +PythonMktime = "Convertir tupla en tiempo" +PythonTime = "Obtener la marca de tiempo actual" +PythonSetLocaltime = "Establecer tiempo desde una tupla de localtime()" +PythonRTCmode = "Obtener el modo RTC actual" +PythonSetRTCmode = "Establecer modo RTC" PythonSort = "Sort the list" PythonSqrt = "Square root" PythonSum = "Sum the items of a list" diff --git a/apps/code/catalog.fr.i18n b/apps/code/catalog.fr.i18n index 258a0a940..196a353a4 100644 --- a/apps/code/catalog.fr.i18n +++ b/apps/code/catalog.fr.i18n @@ -136,6 +136,12 @@ PythonShow = "Affiche la figure" PythonSin = "Sinus" PythonSinh = "Sinus hyperbolique" PythonSleep = "Suspend l'exécution t secondes" +PythonLocalTime = "Convertir le temps en tuple" +PythonMktime = "Convertir le tuple en temps" +PythonTime = "Obtenir l'horodatage actuel" +PythonSetLocaltime = "Définir l'heure à partir d'un tuple de localtime()" +PythonRTCmode = "Obtenir le mode RTC actuel" +PythonSetRTCmode = "Définir le mode RTC" PythonSort = "Trie la liste" PythonSqrt = "Racine carrée" PythonSum = "Somme des éléments de la liste" diff --git a/apps/code/catalog.hu.i18n b/apps/code/catalog.hu.i18n index c0356ed02..02b0e5844 100644 --- a/apps/code/catalog.hu.i18n +++ b/apps/code/catalog.hu.i18n @@ -136,6 +136,12 @@ PythonShow = "Mutassa az ábrát" PythonSin = "Szinusz" PythonSinh = "Hiperbolikus szinusz" PythonSleep = "t másodpercre meg állitani a programmot" +PythonLocalTime = "Idő konvertálása csomóvá" +PythonMktime = "A tuple konvertálása az időben" +PythonTime = "Az aktuális időbélyeg letöltése" +PythonSetLocaltime = "Állítsd be az időt egy tufából a localtime()" +PythonRTCmode = "Aktuális RTC mód" +PythonSetRTCmode = "RTC mód beállítása" PythonSort = "A listát rendezni" PythonSqrt = "Négyzetgyök" PythonSum = "Összeadni a lista elemeit" diff --git a/apps/code/catalog.it.i18n b/apps/code/catalog.it.i18n index a5e41368c..2d78b4e74 100644 --- a/apps/code/catalog.it.i18n +++ b/apps/code/catalog.it.i18n @@ -142,6 +142,12 @@ PythonShow = "Mostra la figura" PythonSin = "Seno" PythonSinh = "Seno iperbolico" PythonSleep = "Sospende l'esecuzione t secondi" +PythonLocalTime = "Converti il tempo in tuple" +PythonMktime = "Converti tuple in tempo" +PythonTime = "Ottieni il timestamp corrente" +PythonSetLocaltime = "Imposta il tempo da una tupla di localtime()" +PythonRTCmode = "Ottieni la modalità RTC corrente" +PythonSetRTCmode = "Imposta modalità RTC" PythonSort = "Ordina l'elenco" PythonSqrt = "Radice quadrata" PythonSum = "Somma degli elementi della lista" diff --git a/apps/code/catalog.nl.i18n b/apps/code/catalog.nl.i18n index 994c1d31c..b89fb09fc 100644 --- a/apps/code/catalog.nl.i18n +++ b/apps/code/catalog.nl.i18n @@ -142,6 +142,12 @@ PythonShow = "Figuur weergeven" PythonSin= "Sinus" PythonSinh = "Sinus hyperbolicus" PythonSleep = "Stel executie voor t seconden uit" +PythonLocalTime = "Zet tijd om in tuple" +PythonMktime = "Tuple omzetten in tijd" +PythonTime = "Haal de huidige tijdstempel" +PythonSetLocaltime = "Stel de tijd in vanaf een tuple van localtime()" +PythonRTCmode = "Huidige RTC-modus kregen" +PythonSetRTCmode = "RTC-modus instellen" PythonSort = "Sorteer de lijst" PythonSqrt = "Vierkantswortel" PythonSum = "Sommeer de items van een lijst" diff --git a/apps/code/catalog.pt.i18n b/apps/code/catalog.pt.i18n index 053942095..7437f45d5 100644 --- a/apps/code/catalog.pt.i18n +++ b/apps/code/catalog.pt.i18n @@ -136,6 +136,12 @@ PythonShow = "Mostrar a figura" PythonSin = "Seno" PythonSinh = "Seno hiperbólico" PythonSleep = "Suspender a execução por t segundos" +PythonLocalTime = "Convert o tempo em tupla" +PythonMktime = "Convert tuple em tempo" +PythonTime = "Obter o estamp de tempo atual" +PythonSetLocaltime = "Definir tempo a partir de uma tupla de localtime()" +PythonRTCmode = "Obter o modo RTC atual" +PythonSetRTCmode = "Definir o modo RTC" PythonSort = "Ordenar a lista" PythonSqrt = "Raiz quadrada" PythonSum = "Soma dos itens da lista" diff --git a/apps/code/catalog.universal.i18n b/apps/code/catalog.universal.i18n index 27f122ebb..2dd492f00 100644 --- a/apps/code/catalog.universal.i18n +++ b/apps/code/catalog.universal.i18n @@ -339,6 +339,12 @@ PythonCommandSin = "sin(x)" PythonCommandSinComplex = "sin(z)" PythonCommandSinh = "sinh(x)" PythonCommandSleep = "sleep(t)" +PythonCommandLocalTime = "localtime([timestamp])" +PythonCommandMktime = "mktime(tm)" +PythonCommandTime = "time()" +PythonCommandSetLocaltime = "setlocaltime(tm)" +PythonCommandRTCmode = "rtcmode()" +PythonCommandSetRTCmode = "setrtcmode(mode)" PythonCommandSort = "list.sort()" PythonCommandSortWithoutArg = ".sort()" PythonCommandSorted = "sorted(list)" diff --git a/apps/code/python_toolbox.cpp b/apps/code/python_toolbox.cpp index 5be82f7a9..34056c8a4 100644 --- a/apps/code/python_toolbox.cpp +++ b/apps/code/python_toolbox.cpp @@ -382,8 +382,14 @@ const ToolboxMessageTree TimeModuleChildren[] = { ToolboxMessageTree::Leaf(I18n::Message::PythonCommandImportTime, I18n::Message::PythonImportTime, false), ToolboxMessageTree::Leaf(I18n::Message::PythonCommandImportFromTime, I18n::Message::PythonImportTime, false), ToolboxMessageTree::Leaf(I18n::Message::PythonCommandTimeFunction, I18n::Message::PythonTimeFunction, false, I18n::Message::PythonCommandTimeFunctionWithoutArg), + ToolboxMessageTree::Leaf(I18n::Message::PythonCommandTime, I18n::Message::PythonTime), ToolboxMessageTree::Leaf(I18n::Message::PythonCommandMonotonic, I18n::Message::PythonMonotonic, false), - ToolboxMessageTree::Leaf(I18n::Message::PythonCommandSleep, I18n::Message::PythonSleep) + ToolboxMessageTree::Leaf(I18n::Message::PythonCommandSleep, I18n::Message::PythonSleep), + ToolboxMessageTree::Leaf(I18n::Message::PythonCommandLocalTime, I18n::Message::PythonLocalTime), + ToolboxMessageTree::Leaf(I18n::Message::PythonCommandMktime, I18n::Message::PythonMktime), + ToolboxMessageTree::Leaf(I18n::Message::PythonCommandSetLocaltime, I18n::Message::PythonSetLocaltime), + ToolboxMessageTree::Leaf(I18n::Message::PythonCommandRTCmode, I18n::Message::PythonRTCmode), + ToolboxMessageTree::Leaf(I18n::Message::PythonCommandSetRTCmode, I18n::Message::PythonSetRTCmode), }; const ToolboxMessageTree OsModuleChildren[] = {