From 891afff4bbc0ca09b8009fa90b62f6ac92147a82 Mon Sep 17 00:00:00 2001 From: Laury Date: Sun, 26 Jun 2022 14:30:50 +0200 Subject: [PATCH] [code] Added ulab.utils in 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.hu.i18n | 2 ++ apps/code/catalog.it.i18n | 2 ++ apps/code/catalog.nl.i18n | 2 ++ apps/code/catalog.pt.i18n | 2 ++ apps/code/catalog.universal.i18n | 8 ++++++++ apps/code/python_toolbox.cpp | 11 +++++++++++ apps/code/toolbox.universal.i18n | 1 + 11 files changed, 36 insertions(+) diff --git a/apps/code/catalog.de.i18n b/apps/code/catalog.de.i18n index 799ed9413..5ead15875 100644 --- a/apps/code/catalog.de.i18n +++ b/apps/code/catalog.de.i18n @@ -254,3 +254,5 @@ PythonFileName = "Enthält den Namen der Datei" PythonFileMode = "Enthält den Öffnungsmodus der Datei" PythonFileReadable = "Kann Datei gelesen werden?" PythonFileWritable = "Kann Datei geschrieben werden?" +PythonImportUtils = "Importieren von ulab.utils" +PythonUtilsFunction = "Funktionspräfix des utils-Moduls" diff --git a/apps/code/catalog.en.i18n b/apps/code/catalog.en.i18n index af439aeb8..62a940057 100644 --- a/apps/code/catalog.en.i18n +++ b/apps/code/catalog.en.i18n @@ -254,3 +254,5 @@ PythonFileName = "Contains file's name" PythonFileMode = "Contains file's open mode" PythonFileReadable = "Tells if read can be used on a file" PythonFileWritable = "Tells if write can be used on a file" +PythonImportUtils = "Importing ulab.utils" +PythonUtilsFunction = "utils module function prefix" diff --git a/apps/code/catalog.es.i18n b/apps/code/catalog.es.i18n index c7d94d3f4..883b47cf4 100644 --- a/apps/code/catalog.es.i18n +++ b/apps/code/catalog.es.i18n @@ -254,3 +254,5 @@ PythonFileName = "Contains file's name" PythonFileMode = "Contains file's open mode" PythonFileReadable = "Tells if read can be used on a file" PythonFileWritable = "Tells if write can be used on a file" +PythonImportUtils = "Importando ulab.utils" +PythonUtilsFunction = "prefijo de función del módulo utils" diff --git a/apps/code/catalog.fr.i18n b/apps/code/catalog.fr.i18n index aae8345d3..993770157 100644 --- a/apps/code/catalog.fr.i18n +++ b/apps/code/catalog.fr.i18n @@ -78,6 +78,7 @@ PythonImportMath = "Importation du module math" PythonImportMatplotlibPyplot = "Importation de matplotlib.pyplot" PythonImportNumpy = "Importation de ulab.numpy" PythonImportScipy = "Importation de ulab.scipy" +PythonImportUtils = "Importation de ulab.utils" PythonImportTurtle = "Importation du module turtle" PythonImportTime = "Importation du module time" PythonIndex = "Indice première occurrence de x" @@ -161,6 +162,7 @@ PythonScipyLinalgFunction = "Préfixe fonction du module scipy.linalg" PythonScipyOptimizeFunction = "Préfixe fonction du module scipy.optimize" PythonScipySignalFunction = "Préfixe fonction du module scipy.signal" PythonScipySpecialFunction = "Préfixe fonction du module scipy.special" +PythonUtilsFunction = "Préfixe fonction du module utils" PythonOct = "Conversion en octal" PythonPhase = "Argument de z" PythonPlot = "Trace y en fonction de x" diff --git a/apps/code/catalog.hu.i18n b/apps/code/catalog.hu.i18n index 3dac49470..6242e4dc3 100644 --- a/apps/code/catalog.hu.i18n +++ b/apps/code/catalog.hu.i18n @@ -254,3 +254,5 @@ PythonKeyDot = "DOT gomb" PythonKeyEe = "10 POWER X gomb" PythonKeyAns = "ANS kulcs" PythonKeyExe = "EXE kulcs" +PythonImportUtils = "Az ulab.utils importálása" +PythonUtilsFunction = "utils modul függvény előtagja" diff --git a/apps/code/catalog.it.i18n b/apps/code/catalog.it.i18n index 7e797a399..d8a24f355 100644 --- a/apps/code/catalog.it.i18n +++ b/apps/code/catalog.it.i18n @@ -254,3 +254,5 @@ PythonFileName = "Contains file's name" PythonFileMode = "Contains file's open mode" PythonFileReadable = "Tells if read can be used on a file" PythonFileWritable = "Tells if write can be used on a file" +PythonImportUtils = "Importazione di ulab.utils" +PythonUtilsFunction = "prefisso della funzione del modulo utils" diff --git a/apps/code/catalog.nl.i18n b/apps/code/catalog.nl.i18n index 9d98d756e..876073d95 100644 --- a/apps/code/catalog.nl.i18n +++ b/apps/code/catalog.nl.i18n @@ -255,3 +255,5 @@ PythonFileName = "Contains file's name" PythonFileMode = "Contains file's open mode" PythonFileReadable = "Tells if read can be used on a file" PythonFileWritable = "Tells if write can be used on a file" +PythonImportUtils = "Ulab.utils importeren" +PythonUtilsFunction = "utils module functie prefix" diff --git a/apps/code/catalog.pt.i18n b/apps/code/catalog.pt.i18n index d3a49aa55..155aa785f 100644 --- a/apps/code/catalog.pt.i18n +++ b/apps/code/catalog.pt.i18n @@ -254,3 +254,5 @@ PythonFileName = "Contains file's name" PythonFileMode = "Contains file's open mode" PythonFileReadable = "Tells if read can be used on a file" PythonFileWritable = "Tells if write can be used on a file" +PythonImportUtils = "Importando ulab.utils" +PythonUtilsFunction = "prefixo de função do módulo utils" diff --git a/apps/code/catalog.universal.i18n b/apps/code/catalog.universal.i18n index 05a79de12..ca6e19c45 100644 --- a/apps/code/catalog.universal.i18n +++ b/apps/code/catalog.universal.i18n @@ -295,6 +295,14 @@ PythonCommandNumpyFftFunction = "np.fft.function" PythonCommandNumpyFftFunctionWithoutArg = "np.fft.\x11" PythonCommandNumpyLinalgFunction = "np.linalg.function" PythonCommandNumpyLinalgFunctionWithoutArg = "np.linalg.\x11" +PythonCommandImportFromUtils = "from ulab import utils" +PythonCommandUtilsFunction = "utils.function" +PythonCommandUtilsFunctionWithoutArg = "utils.\x11" +PythonCommandUtilsSpectrogram = "spectrogram(a)" +PythonCommandUtilsFromInt16Buffer = "from_int16_buffer(b)" +PythonCommandUtilsFromUint16Buffer = "from_uint16_buffer(b)" +PythonCommandUtilsFromInt32Buffer = "from_int32_buffer(b)" +PythonCommandUtilsFromUint32Buffer = "from_uint32_buffer(b)" PythonCommandOct = "oct(x)" PythonCommandPhase = "phase(z)" PythonCommandPlot = "plot(x,y,color)" diff --git a/apps/code/python_toolbox.cpp b/apps/code/python_toolbox.cpp index b4525591d..1f75378d3 100644 --- a/apps/code/python_toolbox.cpp +++ b/apps/code/python_toolbox.cpp @@ -295,9 +295,20 @@ const ToolboxMessageTree ScipyModuleChildren[] = { ToolboxMessageTree::Node(I18n::Message::ScipySpecialModule, ScipySpecialModuleChildren), }; +const ToolboxMessageTree UtilsModuleChildren[] = { + ToolboxMessageTree::Leaf(I18n::Message::PythonCommandImportFromUtils, I18n::Message::PythonImportUtils, false), + ToolboxMessageTree::Leaf(I18n::Message::PythonCommandUtilsFunction, I18n::Message::PythonUtilsFunction, false, I18n::Message::PythonCommandUtilsFunctionWithoutArg), + ToolboxMessageTree::Leaf(I18n::Message::PythonCommandUtilsSpectrogram), + ToolboxMessageTree::Leaf(I18n::Message::PythonCommandUtilsFromInt16Buffer), + ToolboxMessageTree::Leaf(I18n::Message::PythonCommandUtilsFromUint16Buffer), + ToolboxMessageTree::Leaf(I18n::Message::PythonCommandUtilsFromInt32Buffer), + ToolboxMessageTree::Leaf(I18n::Message::PythonCommandUtilsFromUint32Buffer), +}; + const ToolboxMessageTree UlabModuleChildren[] = { ToolboxMessageTree::Node(I18n::Message::NumpyModule, NumpyModuleChildren), ToolboxMessageTree::Node(I18n::Message::ScipyModule, ScipyModuleChildren), + ToolboxMessageTree::Node(I18n::Message::UtilsModule, UtilsModuleChildren), ToolboxMessageTree::Leaf(I18n::Message::UlabDocumentation, I18n::Message::UlabDocumentationLink) }; diff --git a/apps/code/toolbox.universal.i18n b/apps/code/toolbox.universal.i18n index 1e757f43a..c05493a05 100644 --- a/apps/code/toolbox.universal.i18n +++ b/apps/code/toolbox.universal.i18n @@ -12,6 +12,7 @@ ScipyOptimizeModule = "optimize" ScipySignalModule = "signal" ScipySpecialModule = "special" NumpyNdarray = "ndarray" +UtilsModule = "utils" OsModule = "os" SysModule = "sys" TimeModule = "time"