From 5f4ab6d0a4b00e5a0046282a3b2432a21ec07afc Mon Sep 17 00:00:00 2001 From: Yaya-Cout Date: Tue, 5 Jul 2022 19:22:41 +0200 Subject: [PATCH 1/5] [utilities] Add i18n lib --- apps/calculation/base.fr.i18n | 2 +- apps/calculation/base.hu.i18n | 38 ++-- apps/code/base.hu.i18n | 30 +-- apps/code/catalog.de.i18n | 14 +- apps/code/catalog.en.i18n | 38 ++-- apps/code/catalog.es.i18n | 38 ++-- apps/code/catalog.fr.i18n | 28 +-- apps/code/catalog.hu.i18n | 132 +++++------ apps/code/catalog.it.i18n | 14 +- apps/code/catalog.nl.i18n | 14 +- apps/code/catalog.pt.i18n | 40 ++-- apps/code/catalog.universal.i18n | 2 +- apps/code/toolbox.hu.i18n | 14 +- apps/code/toolbox.universal.i18n | 2 +- apps/external/base.de.i18n | 2 +- apps/external/base.hu.i18n | 18 +- apps/external/base.universal.i18n | 2 +- apps/graph/base.hu.i18n | 66 +++--- apps/graph/base.pt.i18n | 2 +- apps/home/base.hu.i18n | 8 +- apps/language_hu.universal.i18n | 2 +- apps/on_boarding/base.hu.i18n | 26 +-- apps/probability/base.de.i18n | 2 +- apps/probability/base.en.i18n | 2 +- apps/probability/base.es.i18n | 2 +- apps/probability/base.hu.i18n | 54 ++--- apps/probability/base.it.i18n | 2 +- apps/probability/base.nl.i18n | 2 +- apps/probability/base.pt.i18n | 2 +- apps/reader/base.es.i18n | 2 +- apps/reader/base.fr.i18n | 2 +- apps/regression/base.hu.i18n | 40 ++-- apps/regression/base.universal.i18n | 18 +- apps/sequence/base.de.i18n | 4 +- apps/sequence/base.en.i18n | 4 +- apps/sequence/base.es.i18n | 4 +- apps/sequence/base.hu.i18n | 4 +- apps/sequence/base.it.i18n | 4 +- apps/sequence/base.nl.i18n | 4 +- apps/sequence/base.pt.i18n | 4 +- apps/settings/base.de.i18n | 2 +- apps/settings/base.en.i18n | 2 +- apps/settings/base.es.i18n | 2 +- apps/settings/base.nl.i18n | 2 +- apps/shared.de.i18n | 4 +- apps/shared.en.i18n | 2 +- apps/shared.es.i18n | 2 +- apps/shared.nl.i18n | 2 +- apps/shared.pt.i18n | 2 +- apps/solver/base.de.i18n | 4 +- apps/solver/base.en.i18n | 6 +- apps/solver/base.es.i18n | 6 +- apps/solver/base.fr.i18n | 4 +- apps/solver/base.hu.i18n | 58 ++--- apps/solver/base.it.i18n | 4 +- apps/solver/base.nl.i18n | 6 +- apps/solver/base.pt.i18n | 4 +- apps/statistics/base.de.i18n | 6 +- apps/statistics/base.en.i18n | 6 +- apps/statistics/base.es.i18n | 6 +- apps/statistics/base.hu.i18n | 6 +- apps/statistics/base.it.i18n | 6 +- apps/statistics/base.nl.i18n | 6 +- apps/statistics/base.pt.i18n | 6 +- apps/toolbox.de.i18n | 22 +- apps/toolbox.en.i18n | 12 +- apps/toolbox.es.i18n | 24 +- apps/toolbox.fr.i18n | 2 +- apps/toolbox.hu.i18n | 30 +-- apps/toolbox.it.i18n | 20 +- apps/toolbox.nl.i18n | 20 +- apps/toolbox.pt.i18n | 22 +- apps/variables.hu.i18n | 26 +-- build/utilities/i18n_lib.py | 337 ++++++++++++++++++++++++++++ build/utilities/translate.py | 2 +- 75 files changed, 848 insertions(+), 511 deletions(-) create mode 100755 build/utilities/i18n_lib.py diff --git a/apps/calculation/base.fr.i18n b/apps/calculation/base.fr.i18n index 74416f32c0a..a440aece5b3 100644 --- a/apps/calculation/base.fr.i18n +++ b/apps/calculation/base.fr.i18n @@ -41,4 +41,4 @@ InductanceDimension = "Inductance" CatalyticActivityDimension = "Activité catalytique" SurfaceDimension = "Surface" VolumeDimension = "Volume" -SpeedDimension = "Vitesse" \ No newline at end of file +SpeedDimension = "Vitesse" diff --git a/apps/calculation/base.hu.i18n b/apps/calculation/base.hu.i18n index 7879cdf4280..d6386cf17f0 100644 --- a/apps/calculation/base.hu.i18n +++ b/apps/calculation/base.hu.i18n @@ -1,22 +1,22 @@ -CalculApp = "Számolás" -CalculAppCapital = "SZÁMOLÁS" -AdditionalResults = "További eredmények" -DecimalBase = "Decimális" -HexadecimalBase = "Hexadecimális" -BinaryBase = "Bináris" -PrimeFactors = "Alapvetö tényezök" -MixedFraction = "Vegyes frakció" -EuclideanDivision = "Euklideszi osztás" -AdditionalDeterminant = "Meghatározó" -AdditionalInverse = "inverz" -AdditionalRowEchelonForm = "Sor echelon forma" -AdditionalReducedRowEchelonForm = "Csökkentett sorú Echelon forma" -AdditionalTrace = "Nyomkövetés" -CanonicalForm = "Kanonikus forma" -FactorizedForm = "Factorizált forma" -Discriminant = "Discriminant" -OnlyRoot = "Gyökér" -FirstRoot = "Első gyökér" +CalculApp = "Számolás" +CalculAppCapital = "SZÁMOLÁS" +AdditionalResults = "További eredmények" +DecimalBase = "Decimális" +HexadecimalBase = "Hexadecimális" +BinaryBase = "Bináris" +PrimeFactors = "Alapvetö tényezök" +MixedFraction = "Vegyes frakció" +EuclideanDivision = "Euklideszi osztás" +AdditionalDeterminant = "Meghatározó" +AdditionalInverse = "inverz" +AdditionalRowEchelonForm = "Sor echelon forma" +AdditionalReducedRowEchelonForm = "Csökkentett sorú Echelon forma" +AdditionalTrace = "Nyomkövetés" +CanonicalForm = "Kanonikus forma" +FactorizedForm = "Factorizált forma" +Discriminant = "Discriminant" +OnlyRoot = "Gyökér" +FirstRoot = "Első gyökér" SecondRoot = "Második gyökér" TimeDimension = "Idő" DistanceDimension = "Távolság" diff --git a/apps/code/base.hu.i18n b/apps/code/base.hu.i18n index 07d0e297fb1..1ad517cf3c3 100644 --- a/apps/code/base.hu.i18n +++ b/apps/code/base.hu.i18n @@ -1,15 +1,15 @@ -AddScript = "Script hozzáadása" -AllowedCharactersaz09 = "Engedélyezett karakterek: a-z, 0-9, _" -Autocomplete = "Önkiegészítés" -AutoImportScript = "Script automata importálása" -BuiltinsAndKeywords = "Beépített fonkciók és szókincs" -Console = "Konzol" -DeleteScript = "Script törlése" -DuplicateScript = "Script másolása" -ExecuteScript = "Script indítása" -FunctionsAndVariables = "Fonktiók és változók" -ImportedModulesAndScripts = "Importált scriptek és modulok" -NoWordAvailableHere = "Nincs rendelkezésre álló szó." -ScriptInProgress = "Script müködésben" -ScriptOptions = "Script beállítások" -ScriptSize = "Script mérete" +AddScript = "Script hozzáadása" +AllowedCharactersaz09 = "Engedélyezett karakterek: a-z, 0-9, _" +Autocomplete = "Önkiegészítés" +AutoImportScript = "Script automata importálása" +BuiltinsAndKeywords = "Beépített fonkciók és szókincs" +Console = "Konzol" +DeleteScript = "Script törlése" +DuplicateScript = "Script másolása" +ExecuteScript = "Script indítása" +FunctionsAndVariables = "Fonktiók és változók" +ImportedModulesAndScripts = "Importált scriptek és modulok" +NoWordAvailableHere = "Nincs rendelkezésre álló szó." +ScriptInProgress = "Script müködésben" +ScriptOptions = "Script beállítások" +ScriptSize = "Script mérete" diff --git a/apps/code/catalog.de.i18n b/apps/code/catalog.de.i18n index 5ead158750a..c6d6b34bebf 100644 --- a/apps/code/catalog.de.i18n +++ b/apps/code/catalog.de.i18n @@ -55,9 +55,9 @@ PythonExp = "Exponentialfunktion" PythonExpm1 = "Berechne exp(x)-1" PythonFactorial = "Fakultät von x" PythonFabs = "Absoluter Wert" -PythonFillRect = "Gefülltes Rechteck bei Pixel (x,y)" PythonFillCircle = "Füllt einen Kreis" PythonFillPolygon = "Füllt ein Polygon" +PythonFillRect = "Gefülltes Rechteck bei Pixel (x,y)" PythonFloat = "x in einen Fließkommawert umwandeln" PythonFloor = "Abrunden" PythonFmod = "a modulo b" @@ -78,6 +78,7 @@ PythonImportMath = "Math-Modul importieren" PythonImportMatplotlibPyplot = "Matplotlib.pyplot-Modul importieren" PythonImportNumpy = "Ulab.numpy-Modul importieren" PythonImportScipy = "Ulab.scipy-Modul importieren" +PythonImportUtils = "Importieren von ulab.utils" PythonImportOs = "OS-Modul importieren" PythonImportSys = "SYS-Modul importieren" PythonOsUname = "Informationen über das System holen" @@ -92,8 +93,9 @@ PythonSysImplementation = "Information about Python" PythonSysModules = "Dictionary of loaded modules" PythonSysVersion = "Python language version (string)" PythonSysVersioninfo = "Python language version (tuple)" -PythonImportTime = "Time-Modul importieren" PythonImportTurtle = "Turtle-Modul importieren" +PythonImportTime = "Time-Modul importieren" +PythonImportTime = "Time-Modul importieren" PythonIndex = "Index des ersten x-Vorkommens" PythonInput = "Einen Wert abfragen" PythonInsert = "x an Index i in die Liste einfügen" @@ -101,13 +103,13 @@ PythonInt = "x in eine ganze Zahl umwandeln" PythonIonFunction = "Ion-Modul-Funktionspräfix" PythonIsFinite = "Prüfen, ob x endlich ist" PythonIsInfinite = "Prüfen, ob x unendlich ist" -PythonIsNaN = "Prüfen, ob x keine Zahl ist" PythonIsKeyDown = "Wahr, wenn die Taste k gedrückt ist" PythonBattery = "Rückgabe der Batteriespannung" PythonBatteryLevel = "Gibt den Batteriestand zurück" PythonBatteryIscharging = "Gibt zurück, ob die Batterie geladen wird" PythonSetBrightness = "Helligkeitsstufe festlegen" PythonGetBrightness = "Helligkeitsstufe abrufen" +PythonIsNaN = "Prüfen, ob x keine Zahl ist" PythonKandinskyFunction = "Kandinsky-Modul Funktionspräfix" PythonKeyLeft = "LEFT ARROW key" PythonKeyUp = "UP ARROW key" @@ -167,6 +169,7 @@ PythonMax = "Maximum" PythonMin = "Minimum" PythonModf = "Bruch- und Ganzzahl-Anteile von x" PythonMonotonic = "Wert einer monotonen Uhr" +PythonMonotonic = "Monotone Zeit zurückgeben" PythonNumpyFunction = "numpy Modul-Präfix" PythonNumpyFftFunction = "numpy.fft Modul-Präfix" PythonNumpyLinalgFunction = "numpy.linalg Modul-Präfix" @@ -175,6 +178,7 @@ PythonScipyLinalgFunction = "scipy.linalg Modul-Präfix" PythonScipyOptimizeFunction = "scipy.optimize Modul-Präfix" PythonScipySignalFunction = "scipy.signal Modul-Präfix" PythonScipySpecialFunction = "scipy.special Modul-Präfix" +PythonUtilsFunction = "Funktionspräfix des utils-Moduls" PythonOct = "Ganzzahl in Oktal umwandeln" PythonPhase = "Phase von z" PythonPlot = "Plotten von y gegen x als Linien" @@ -236,8 +240,6 @@ PythonTurtleShowturtle = "Den Igel anzeigen" PythonTurtleSpeed = "Zeichengeschwindigkeit von 0 bis 10" PythonTurtleWrite = "Einen Text anzeigen" PythonUniform = "Fließkommazahl in [a,b]" -PythonImportTime = "Time-Modul importieren" -PythonMonotonic = "Monotone Zeit zurückgeben" PythonFileOpen = "Öffnet eine Datei" PythonFileSeekable = "Kann Datei durchsucht werden?" PythonFileSeek = "Bewegt den Cursor einer Datei" @@ -254,5 +256,3 @@ 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 62a9400577f..64030552ea6 100644 --- a/apps/code/catalog.en.i18n +++ b/apps/code/catalog.en.i18n @@ -78,8 +78,24 @@ PythonImportMath = "Import math module" PythonImportMatplotlibPyplot = "Import matplotlib.pyplot module" PythonImportNumpy = "Import ulab.numpy module" PythonImportScipy = "Import ulab.scipy module" -PythonImportTime = "Import time module" +PythonImportUtils = "Importing ulab.utils" +PythonImportOs = "Import os module" +PythonImportSys = "Import sys module" +PythonOsUname = "Get infos about the system" +PythonOsGetlogin = "Get username" +PythonOsRemove = "Remove file named filename" +PythonOsRename = "Rename file oldname to newname" +PythonOsListdir = "List files in memory" +PythonSysExit = "Terminate current program" +PythonSysPrintexception = "Print exception" +PythonSysByteorder = "The byte order of the system" +PythonSysImplementation = "Information about Python" +PythonSysModules = "Dictionary of loaded modules" +PythonSysVersion = "Python language version (string)" +PythonSysVersioninfo = "Python language version (tuple)" PythonImportTurtle = "Import turtle module" +PythonImportTime = "Import time module" +PythonImportTime = "Import time module" PythonIndex = "Index of the first x occurrence" PythonInput = "Prompt a value" PythonInsert = "Insert x at index i in the list" @@ -153,6 +169,7 @@ PythonMax = "Maximum" PythonMin = "Minimum" PythonModf = "Fractional and integer parts of x" PythonMonotonic = "Value of a monotonic clock" +PythonMonotonic = "Return monotonic time" PythonNumpyFunction = "numpy module prefix" PythonNumpyFftFunction = "numpy.fft module prefix" PythonNumpyLinalgFunction = "numpy.linalg module prefix" @@ -161,6 +178,7 @@ PythonScipyLinalgFunction = "scipy.linalg module prefix" PythonScipyOptimizeFunction = "scipy.optimize module prefix" PythonScipySignalFunction = "scipy.signal module prefix" PythonScipySpecialFunction = "scipy.special module prefix" +PythonUtilsFunction = "utils module function prefix" PythonOct = "Convert integer to octal" PythonPhase = "Phase of z" PythonPlot = "Plot y versus x as lines" @@ -222,22 +240,6 @@ PythonTurtleShowturtle = "Show the turtle" PythonTurtleSpeed = "Drawing speed between 0 and 10" PythonTurtleWrite = "Display a text" PythonUniform = "Floating point number in [a,b]" -PythonImportTime = "Import time module" -PythonImportOs = "Import os module" -PythonImportSys = "Import sys module" -PythonOsUname = "Get infos about the system" -PythonOsGetlogin = "Get username" -PythonOsRemove = "Remove file named filename" -PythonOsRename = "Rename file oldname to newname" -PythonOsListdir = "List files in memory" -PythonSysExit = "Terminate current program" -PythonSysPrintexception = "Print exception" -PythonSysByteorder = "The byte order of the system" -PythonSysImplementation = "Information about Python" -PythonSysModules = "Dictionary of loaded modules" -PythonSysVersion = "Python language version (string)" -PythonSysVersioninfo = "Python language version (tuple)" -PythonMonotonic = "Return monotonic time" PythonFileOpen = "Opens a file" PythonFileSeekable = "Tells if seek can be used on a file" PythonFileSeek = "Move file's cursor" @@ -254,5 +256,3 @@ 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 883b47cf481..e5f38435049 100644 --- a/apps/code/catalog.es.i18n +++ b/apps/code/catalog.es.i18n @@ -78,8 +78,24 @@ PythonImportMath = "Import math module" PythonImportMatplotlibPyplot = "Import matplotlib.pyplot module" PythonImportNumpy = "Import ulab.numpy module" PythonImportScipy = "Import ulab.scipy module" -PythonImportTime = "Import time module" +PythonImportUtils = "Importando ulab.utils" +PythonImportOs = "Import os module" +PythonImportSys = "Import sys module" +PythonOsUname = " Información del sistema " +PythonOsGetlogin = "Get username" +PythonOsRemove = "Eliminar un archivo" +PythonOsRename = "Renombrar archivo" +PythonOsListdir = "Archivos de la lista" +PythonSysExit = "Terminate current program" +PythonSysPrintexception = "Print exception" +PythonSysByteorder = "The byte order of the system" +PythonSysImplementation = "Information about Python" +PythonSysModules = "Dictionary of loaded modules" +PythonSysVersion = "Python language version (string)" +PythonSysVersioninfo = "Python language version (tuple)" PythonImportTurtle = "Import turtle module" +PythonImportTime = "Import time module" +PythonImportTime = "Import time module" PythonIndex = "Index of the first x occurrence" PythonInput = "Prompt a value" PythonInsert = "Insert x at index i in the list" @@ -153,6 +169,7 @@ PythonMax = "Maximum" PythonMin = "Minimum" PythonModf = "Fractional and integer parts of x" PythonMonotonic = "Value of a monotonic clock" +PythonMonotonic = "Tiempo monótono de retorno" PythonNumpyFunction = "numpy module prefix" PythonNumpyFftFunction = "numpy.fft module prefix" PythonNumpyLinalgFunction = "numpy.linalg module prefix" @@ -161,6 +178,7 @@ PythonScipyLinalgFunction = "scipy.linalg module prefix" PythonScipyOptimizeFunction = "scipy.optimize module prefix" PythonScipySignalFunction = "scipy.signal module prefix" PythonScipySpecialFunction = "scipy.special module prefix" +PythonUtilsFunction = "prefijo de función del módulo utils" PythonOct = "Convert integer to octal" PythonPhase = "Phase of z" PythonPlot = "Plot y versus x as lines" @@ -222,22 +240,6 @@ PythonTurtleShowturtle = "Show the turtle" PythonTurtleSpeed = "Drawing speed between 0 and 10" PythonTurtleWrite = "Display a text" PythonUniform = "Floating point number in [a,b]" -PythonImportTime = "Import time module" -PythonImportOs = "Import os module" -PythonImportSys = "Import sys module" -PythonOsUname = " Información del sistema " -PythonOsGetlogin = "Get username" -PythonOsRemove = "Eliminar un archivo" -PythonOsRename = "Renombrar archivo" -PythonOsListdir = "Archivos de la lista" -PythonSysExit = "Terminate current program" -PythonSysPrintexception = "Print exception" -PythonSysByteorder = "The byte order of the system" -PythonSysImplementation = "Information about Python" -PythonSysModules = "Dictionary of loaded modules" -PythonSysVersion = "Python language version (string)" -PythonSysVersioninfo = "Python language version (tuple)" -PythonMonotonic = "Tiempo monótono de retorno" PythonFileOpen = "Opens a file" PythonFileSeekable = "Tells if seek can be used on a file" PythonFileSeek = "Move file's internal cursor" @@ -254,5 +256,3 @@ 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 99377015773..f3b528989c7 100644 --- a/apps/code/catalog.fr.i18n +++ b/apps/code/catalog.fr.i18n @@ -79,6 +79,20 @@ PythonImportMatplotlibPyplot = "Importation de matplotlib.pyplot" PythonImportNumpy = "Importation de ulab.numpy" PythonImportScipy = "Importation de ulab.scipy" PythonImportUtils = "Importation de ulab.utils" +PythonImportOs = "Importation du module os" +PythonImportSys = "Importation du module sys" +PythonOsUname = "Donne des infos sur le système" +PythonOsGetlogin = "Donne le nom d'utilisateur" +PythonOsRemove = "Supprime le fichier nommé filename" +PythonOsRename = "Renomme oldname en newname" +PythonOsListdir = "Liste les fichiers" +PythonSysExit = "Termine le programme" +PythonSysPrintexception = "Imprime une exception" +PythonSysByteorder = "L'ordre des octets du système" +PythonSysImplementation = "Information sur Python" +PythonSysModules = "Dictionnaire des modules chargés" +PythonSysVersion = "Version du langage Python (string)" +PythonSysVersioninfo = "Version du langage Python (tuple)" PythonImportTurtle = "Importation du module turtle" PythonImportTime = "Importation du module time" PythonIndex = "Indice première occurrence de x" @@ -225,20 +239,6 @@ PythonTurtleSpeed = "Vitesse du tracé entre 0 et 10" PythonTurtleWrite = "Affiche un texte" PythonUniform = "Nombre décimal dans [a,b]" PythonImportTime = "Importation du module temps" -PythonImportOs = "Importation du module os" -PythonImportSys = "Importation du module sys" -PythonOsUname = "Donne des infos sur le système" -PythonOsGetlogin = "Donne le nom d'utilisateur" -PythonOsRemove = "Supprime le fichier nommé filename" -PythonOsRename = "Renomme oldname en newname" -PythonOsListdir = "Liste les fichiers" -PythonSysExit = "Termine le programme" -PythonSysPrintexception = "Imprime une exception" -PythonSysByteorder = "L'ordre des octets du système" -PythonSysImplementation = "Information sur Python" -PythonSysModules = "Dictionnaire des modules chargés" -PythonSysVersion = "Version du langage Python (string)" -PythonSysVersioninfo = "Version du langage Python (tuple)" PythonMonotonic = "Retourne le temps monotone" PythonFileOpen = "Ouvre un fichier" PythonFileSeekable = "Indique si seek peut être utilisé" diff --git a/apps/code/catalog.hu.i18n b/apps/code/catalog.hu.i18n index 6242e4dc35a..f7843c2e037 100644 --- a/apps/code/catalog.hu.i18n +++ b/apps/code/catalog.hu.i18n @@ -30,8 +30,8 @@ PythonColor = "Rgb (pzk) szín allítása" PythonColorBlack = "Fekete szín" PythonColorBlue = "Kék szín" PythonColorBrown = "Barna szín" -PythonColorGreen = "Zöld szín" PythonColorGray = "Szürke szín" +PythonColorGreen = "Zöld szín" PythonColorOrange = "Narancssárga szín" PythonColorPink = "Rózsaszín szín" PythonColorPurple = "Lila szín" @@ -55,9 +55,9 @@ PythonExp = "Exponenciális függvény" PythonExpm1 = "exp(x)-1 sámitása" PythonFactorial = "x faktorál" PythonFabs = "Abszolút érték" -PythonFillRect = "Téglalap töltése" PythonFillCircle = "Kitölti a kört" PythonFillPolygon = "Kitölti a poligont" +PythonFillRect = "Téglalap töltése" PythonFloat = "Konvertálása tizedes számra" PythonFloor = "Egész része" PythonFmod = "a modulo b" @@ -78,8 +78,24 @@ PythonImportMath = "math modul importálása" PythonImportMatplotlibPyplot = "matplotlib.pyplot modul importálása" PythonImportNumpy = "ulab.numpy modul importálása" PythonImportScipy = "ulab.scipy modul importálása" +PythonImportUtils = "Az ulab.utils importálása" +PythonImportOs = "os modul importálása" +PythonImportSys = "sys modul importálása" +PythonOsUname = "Rendszer informaciók" +PythonOsGetlogin = "Get username" +PythonOsRemove = "Fájl törlése" +PythonOsRename = "Fájl átnevezése" +PythonOsListdir = "Fájlok listája" +PythonSysExit = "Terminate current program" +PythonSysPrintexception = "Print exception" +PythonSysByteorder = "The byte order of the system" +PythonSysImplementation = "Information about Python" +PythonSysModules = "Dictionary of loaded modules" +PythonSysVersion = "Python language version (string)" +PythonSysVersioninfo = "Python language version (tuple)" PythonImportTurtle = "turtle modul importálása" PythonImportTime = "time modul importálása" +PythonImportTime = "time modul importálása" PythonIndex = "Az elsö x esemény indexe" PythonInput = "Irjon egy értéket (számot)" PythonInsert = "x-et i. pozícióra helyezze a listában" @@ -95,6 +111,52 @@ PythonSetBrightness = "Fényerőszint beállítása" PythonGetBrightness = "Get brightness level" PythonIsNaN = "Ellenörizze hogy x nem NaN" PythonKandinskyFunction = "kandinsky modul funkció elötag" +PythonKeyLeft = "BALRA NYÍL billentyű" +PythonKeyUp = "FEL NYÍL billentyű" +PythonKeyDown = "LE NYÍL billentyű" +PythonKeyRight = "JOBBRA NYÍL billentyű" +PythonKeyOk = "OK gomb" +PythonKeyBack = "VISSZA gomb" +PythonKeyHome = "Lakáskulcs" +PythonKeyOnOff = "BE/KI gomb" +PythonKeyShift = "SHIFT billentyű" +PythonKeyAlpha = "ALPHA kulcs" +PythonKeyXnt = "X,N,T gomb" +PythonKeyVar = "VAR gomb" +PythonKeyToolbox = "TOOLBOX gomb" +PythonKeyBackspace = "BACKSPACE billentyű" +PythonKeyExp = "EXPONENTIÁLIS kulcs" +PythonKeyLn = "TERMÉSZETES LOGARITMUS kulcs" +PythonKeyLog = "DECIMÁLIS LOGARITMUS billentyű" +PythonKeyImaginary = "KÉPZELETES I kulcs" +PythonKeyComma = "VESZSŰ gomb" +PythonKeyPower = "POWER gomb" +PythonKeySine = "SINE gomb" +PythonKeyCosine = "KOSINUS kulcs" +PythonKeyTangent = "ÉRINTŐ gomb" +PythonKeyPi = "PI kulcs" +PythonKeySqrt = "NÉGYGYÖK kulcs" +PythonKeySquare = "SZÖGZET billentyű" +PythonKeySeven = "7 kulcs" +PythonKeyEight = "8 kulcs" +PythonKeyNine = "9 kulcs" +PythonKeyLeftParenthesis = "BAL ZÁRÓZELŐ gomb" +PythonKeyRightParenthesis = "JOBB ZÁRÓZELŐ billentyű" +PythonKeyFour = "4 kulcs" +PythonKeyFive = "5 kulcs" +PythonKeySix = "6 kulcs" +PythonKeyMultiplication = "SZORZAT gomb" +PythonKeyDivision = "OSZTÁS kulcs" +PythonKeyOne = "1 kulcs" +PythonKeyTwo = "2 kulcs" +PythonKeyThree = "3 kulcs" +PythonKeyPlus = "PLUSZ kulcs" +PythonKeyMinus = "MÍNUS gomb" +PythonKeyZero = "0 kulcs" +PythonKeyDot = "DOT gomb" +PythonKeyEe = "10 POWER X gomb" +PythonKeyAns = "ANS kulcs" +PythonKeyExe = "EXE kulcs" PythonLdexp = "frexp ellentéte : x*(2**i)" PythonLength = "Egy targy hossza" PythonLgamma = "Gamma funkció logaritmusa" @@ -107,6 +169,7 @@ PythonMax = "Maximum" PythonMin = "Minimum" PythonModf = "x-nek tört és egész részei" PythonMonotonic = "Az óra értékét adja vissza" +PythonMonotonic = "Meg fordítani a monoton idö" PythonNumpyFunction = "numpy elötag" PythonNumpyFftFunction = "numpy.fft elötag" PythonNumpyLinalgFunction = "numpy.linalg elötag" @@ -115,6 +178,7 @@ PythonScipyLinalgFunction = "scipy.linalg elötag" PythonScipyOptimizeFunction = "scipy.optimize elötag" PythonScipySignalFunction = "scipy.signal elötag" PythonScipySpecialFunction = "scipy.special elötag" +PythonUtilsFunction = "utils modul függvény előtagja" PythonOct = "Decimális szám konvertálása octális számra" PythonPhase = "z fázisa" PythonPlot = "y-t jelöli x függvényében" @@ -176,8 +240,6 @@ PythonTurtleShowturtle = "A teknöst meg mutatni" PythonTurtleSpeed = "Rajzolási sebesség 0 és 10 között" PythonTurtleWrite = "Szöveg irás" PythonUniform = "Lebegöpontos szám [a,b] -ban" -PythonImportTime = "time modul importálása" -PythonMonotonic = "Meg fordítani a monoton idö" PythonFileOpen = "Fájl megnyitása" PythonFileSeekable = "Seek-et lehete használni" PythonFileSeek = "A kurzort áthelyezni" @@ -194,65 +256,3 @@ PythonFileName = "A fájl neve" PythonFileMode = "A fájl nyitott módja" PythonFileReadable = "read-et lehete használni" PythonFileWritable = "write-ot lehete használni" -PythonImportOs = "os modul importálása" -PythonOsUname = "Rendszer informaciók" -PythonOsGetlogin = "Get username" -PythonOsRemove = "Fájl törlése" -PythonOsRename = "Fájl átnevezése" -PythonOsListdir = "Fájlok listája" -PythonImportSys = "sys modul importálása" -PythonSysExit = "Terminate current program" -PythonSysPrintexception = "Print exception" -PythonSysByteorder = "The byte order of the system" -PythonSysImplementation = "Information about Python" -PythonSysModules = "Dictionary of loaded modules" -PythonSysVersion = "Python language version (string)" -PythonSysVersioninfo = "Python language version (tuple)" -PythonKeyLeft = "BALRA NYÍL billentyű" -PythonKeyUp = "FEL NYÍL billentyű" -PythonKeyDown = "LE NYÍL billentyű" -PythonKeyRight = "JOBBRA NYÍL billentyű" -PythonKeyOk = "OK gomb" -PythonKeyBack = "VISSZA gomb" -PythonKeyHome = "Lakáskulcs" -PythonKeyOnOff = "BE/KI gomb" -PythonKeyShift = "SHIFT billentyű" -PythonKeyAlpha = "ALPHA kulcs" -PythonKeyXnt = "X,N,T gomb" -PythonKeyVar = "VAR gomb" -PythonKeyToolbox = "TOOLBOX gomb" -PythonKeyBackspace = "BACKSPACE billentyű" -PythonKeyExp = "EXPONENTIÁLIS kulcs" -PythonKeyLn = "TERMÉSZETES LOGARITMUS kulcs" -PythonKeyLog = "DECIMÁLIS LOGARITMUS billentyű" -PythonKeyImaginary = "KÉPZELETES I kulcs" -PythonKeyComma = "VESZSŰ gomb" -PythonKeyPower = "POWER gomb" -PythonKeySine = "SINE gomb" -PythonKeyCosine = "KOSINUS kulcs" -PythonKeyTangent = "ÉRINTŐ gomb" -PythonKeyPi = "PI kulcs" -PythonKeySqrt = "NÉGYGYÖK kulcs" -PythonKeySquare = "SZÖGZET billentyű" -PythonKeySeven = "7 kulcs" -PythonKeyEight = "8 kulcs" -PythonKeyNine = "9 kulcs" -PythonKeyLeftParenthesis = "BAL ZÁRÓZELŐ gomb" -PythonKeyRightParenthesis = "JOBB ZÁRÓZELŐ billentyű" -PythonKeyFour = "4 kulcs" -PythonKeyFive = "5 kulcs" -PythonKeySix = "6 kulcs" -PythonKeyMultiplication = "SZORZAT gomb" -PythonKeyDivision = "OSZTÁS kulcs" -PythonKeyOne = "1 kulcs" -PythonKeyTwo = "2 kulcs" -PythonKeyThree = "3 kulcs" -PythonKeyPlus = "PLUSZ kulcs" -PythonKeyMinus = "MÍNUS gomb" -PythonKeyZero = "0 kulcs" -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 d8a24f355b9..db0862dc8e4 100644 --- a/apps/code/catalog.it.i18n +++ b/apps/code/catalog.it.i18n @@ -78,15 +78,14 @@ PythonImportMath = "Importa modulo math" PythonImportMatplotlibPyplot = "Importa modulo matplotlib.pyplot" PythonImportNumpy = "Importa modulo ulab.numpy" PythonImportScipy = "Importa modulo ulab.scipy" -PythonImportTurtle = "Importa del modulo turtle" -PythonImportTime = "Importa del modulo time" +PythonImportUtils = "Importazione di ulab.utils" PythonImportOs = "Importa modulo os" +PythonImportSys = "Importa modulo sys" PythonOsUname = "Ottieni informazioni sul sistema" PythonOsGetlogin = "Get username" PythonOsRemove = "Rimuovere un file" PythonOsRename = "Rinomina file" PythonOsListdir = "Elenca file" -PythonImportSys = "Importa modulo sys" PythonSysExit = "Terminate current program" PythonSysPrintexception = "Print exception" PythonSysByteorder = "The byte order of the system" @@ -94,6 +93,9 @@ PythonSysImplementation = "Information about Python" PythonSysModules = "Dictionary of loaded modules" PythonSysVersion = "Python language version (string)" PythonSysVersioninfo = "Python language version (tuple)" +PythonImportTurtle = "Importa del modulo turtle" +PythonImportTime = "Importa del modulo time" +PythonImportTime = "Import time module" PythonIndex = "Indice prima occorrenza di x" PythonInput = "Inserire un valore" PythonInsert = "Inserire x in posizione i-esima" @@ -167,6 +169,7 @@ PythonMax = "Massimo" PythonMin = "Minimo" PythonModf = "Parti frazionarie e intere" PythonMonotonic = "Restituisce il valore dell'orologio" +PythonMonotonic = "Return monotonic time" PythonNumpyFunction = "Prefisso modulo numpy" PythonNumpyFftFunction = "Prefisso modulo numpy.fft" PythonNumpyLinalgFunction = "Prefisso modulo numpy.linalg" @@ -175,6 +178,7 @@ PythonScipyLinalgFunction = "Prefisso modulo scipy.linalg" PythonScipyOptimizeFunction = "Prefisso modulo scipy.optimize" PythonScipySignalFunction = "Prefisso modulo scipy.signal" PythonScipySpecialFunction = "Prefisso modulo scipy.special" +PythonUtilsFunction = "prefisso della funzione del modulo utils" PythonOct = "Conversione in ottale" PythonPhase = "Argomento di z" PythonPlot = "Disegna y in f. di x come linee" @@ -236,8 +240,6 @@ PythonTurtleShowturtle = "Mostra la tartaruga" PythonTurtleSpeed = "Velocità di disegno (x tra 0 e 10)" PythonTurtleWrite = "Mostra un testo" PythonUniform = "Numero decimale tra [a,b]" -PythonImportTime = "Import time module" -PythonMonotonic = "Return monotonic time" PythonFileOpen = "Opens a file" PythonFileSeekable = "Tells if seek can be used on a file" PythonFileSeek = "Move file's cursor" @@ -254,5 +256,3 @@ 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 876073d95b9..02499f7eca4 100644 --- a/apps/code/catalog.nl.i18n +++ b/apps/code/catalog.nl.i18n @@ -78,15 +78,15 @@ PythonImportMath = "Importeer math module" PythonImportMatplotlibPyplot = "Importeer matplotlib.pyplot module" PythonImportNumpy = "Importeer ulab.numpy module" PythonImportScipy = "Importeer ulab.scipy module" -PythonImportTime = "Importeer time module" +PythonImportUtils = "Ulab.utils importeren" PythonImportOs = "Importeer os module" +PythonImportSys = "Importeer sys module" +PythonImportSys = "Importeer sys module" PythonOsUname = " Krijg systeeminfo" PythonOsGetlogin = "Get username" PythonOsRemove = "Een bestand verwijderen" PythonOsRename = "Hernoem bestand" PythonOsListdir = "Lijstbestanden" -PythonImportSys = "Importeer sys module" -PythonImportSys = "Importeer sys module" PythonSysExit = "Terminate current program" PythonSysPrintexception = "Print exception" PythonSysByteorder = "The byte order of the system" @@ -95,6 +95,8 @@ PythonSysModules = "Dictionary of loaded modules" PythonSysVersion = "Python language version (string)" PythonSysVersioninfo = "Python language version (tuple)" PythonImportTurtle = "Importeer turtle module" +PythonImportTime = "Importeer time module" +PythonImportTime = "Import time module" PythonIndex = "Index van de eerste x aanwezigheden" PythonInput = "Wijs een waarde toe" PythonInsert = "Voeg x toe aan index i in de lijst" @@ -168,6 +170,7 @@ PythonMax = "Maximum" PythonMin = "Minimum" PythonModf = "Fractionele en gehele delen van x" PythonMonotonic = "Waarde van een monotone klok" +PythonMonotonic = "Return monotonic time" PythonNumpyFunction = "numpy module prefix" PythonNumpyFftFunction = "numpy.fft module prefix" PythonNumpyLinalgFunction = "numpy.linalg module prefix" @@ -176,6 +179,7 @@ PythonScipyLinalgFunction = "scipy.linalg module prefix" PythonScipyOptimizeFunction = "scipy.optimize module prefix" PythonScipySignalFunction = "scipy.signal module prefix" PythonScipySpecialFunction = "scipy.special module prefix" +PythonUtilsFunction = "utils module functie prefix" PythonOct = "Integer omzetten naar octaal" PythonPhase = "Fase van z in radialen" PythonPlot = "Plot y versus x als lijnen" @@ -237,8 +241,6 @@ PythonTurtleShowturtle = "Laat de schildpad zien" PythonTurtleSpeed = "Tekensnelheid tussen 0 and 10" PythonTurtleWrite = "Display a text" PythonUniform = "Decimaal getal in [a,b]" -PythonImportTime = "Import time module" -PythonMonotonic = "Return monotonic time" PythonFileOpen = "Opens a file" PythonFileSeekable = "Tells if seek can be used on a file" PythonFileSeek = "Move file's cursor" @@ -255,5 +257,3 @@ 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 155aa785f56..2ad7a6b9f0e 100644 --- a/apps/code/catalog.pt.i18n +++ b/apps/code/catalog.pt.i18n @@ -6,9 +6,9 @@ PythonTab = "Tabulação" PythonAmpersand = "Operador binário and" PythonSymbolExp = "Operador binário exclusivo or" PythonVerticalBar = "Operador binário or" -PythonSingleQuote = "Apóstrofo" PythonImag = "Parte imaginária de z" PythonReal = "Parte real de z" +PythonSingleQuote = "Apóstrofo" PythonAbs = "Valor absoluto/módulo" PythonAcos = "Arco cosseno" PythonAcosh = "Arco cosseno hiperbólico" @@ -78,8 +78,24 @@ PythonImportMath = "Importar módulo math" PythonImportMatplotlibPyplot = "Importar módulo matplotlib.pyplot" PythonImportNumpy = "Importar módulo ulab.numpy" PythonImportScipy = "Importar módulo ulab.scipy" -PythonImportTime = "Importar módulo time" +PythonImportUtils = "Importando ulab.utils" +PythonImportOs = "Import os module" +PythonImportSys = "Import sys module" +PythonOsUname = " Obter informações do sistema" +PythonOsGetlogin = "Get username" +PythonOsRemove = "Remover um ficheiro" +PythonOsRename = "Renomear ficheiro" +PythonOsListdir = "Listar ficheiros" +PythonSysExit = "Terminate current program" +PythonSysPrintexception = "Print exception" +PythonSysByteorder = "The byte order of the system" +PythonSysImplementation = "Information about Python" +PythonSysModules = "Dictionary of loaded modules" +PythonSysVersion = "Python language version (string)" +PythonSysVersioninfo = "Python language version (tuple)" PythonImportTurtle = "Importar módulo turtle" +PythonImportTime = "Importar módulo time" +PythonImportTime = "Import time module" PythonIndex = "Índice da primeira ocorrência de x" PythonInput = "Adicionar um valor" PythonInsert = "Inserir x no índice i na lista" @@ -153,6 +169,7 @@ PythonMax = "Máximo" PythonMin = "Mínimo" PythonModf = "Partes inteira e frácionária de x" PythonMonotonic = "Devolve o valor do relógio" +PythonMonotonic = "Return monotonic time" PythonNumpyFunction = "Prefixo do módulo numpy" PythonNumpyFftFunction = "Prefixo do módulo numpy.fft" PythonNumpyLinalgFunction = "Prefixo do módulo numpy.linalg" @@ -161,6 +178,7 @@ PythonScipyLinalgFunction = "Prefixo do módulo scipy.linalg" PythonScipyOptimizeFunction = "Prefixo do módulo scipy.optimize" PythonScipySignalFunction = "Prefixo do módulo scipy.signal" PythonScipySpecialFunction = "Prefixo do módulo scipy.special" +PythonUtilsFunction = "prefixo de função do módulo utils" PythonOct = "Converter número inteiro em octal" PythonPhase = "Argumento de z" PythonPlot = "Desenhar y em função de x" @@ -222,22 +240,6 @@ PythonTurtleShowturtle = "Mostrar o turtle" PythonTurtleSpeed = "Velocidade do desenho entre 0 e 10" PythonTurtleWrite = "Mostrar um texto" PythonUniform = "Número decimal em [a,b]" -PythonImportTime = "Import time module" -PythonImportOs = "Import os module" -PythonOsUname = " Obter informações do sistema" -PythonOsGetlogin = "Get username" -PythonOsRemove = "Remover um ficheiro" -PythonOsRename = "Renomear ficheiro" -PythonOsListdir = "Listar ficheiros" -PythonImportSys = "Import sys module" -PythonSysExit = "Terminate current program" -PythonSysPrintexception = "Print exception" -PythonSysByteorder = "The byte order of the system" -PythonSysImplementation = "Information about Python" -PythonSysModules = "Dictionary of loaded modules" -PythonSysVersion = "Python language version (string)" -PythonSysVersioninfo = "Python language version (tuple)" -PythonMonotonic = "Return monotonic time" PythonFileOpen = "Opens a file" PythonFileSeekable = "Tells if seek can be used on a file" PythonFileSeek = "Move file's cursor" @@ -254,5 +256,3 @@ 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 ca6e19c4576..857958c8e25 100644 --- a/apps/code/catalog.universal.i18n +++ b/apps/code/catalog.universal.i18n @@ -402,7 +402,7 @@ PythonTurtleCommandForward = "forward(x)" PythonTurtleCommandGoto = "goto(x,y)" PythonTurtleCommandHeading = "heading()" PythonTurtleCommandHideturtle = "hideturtle()" -PythonTurtleCommandIsdown= "isdown()" +PythonTurtleCommandIsdown = "isdown()" PythonTurtleCommandLeft = "left(a)" PythonTurtleCommandPendown = "pendown()" PythonTurtleCommandPensize = "pensize(x)" diff --git a/apps/code/toolbox.hu.i18n b/apps/code/toolbox.hu.i18n index da82c67b22f..8ea32433707 100644 --- a/apps/code/toolbox.hu.i18n +++ b/apps/code/toolbox.hu.i18n @@ -1,10 +1,10 @@ -Functions = "Funkciók" -Catalog = "Katalógus" -Modules = "Modulok" -LoopsAndTests = "Hurkok és tesztek" -Files = "Fájlok" -Exceptions = "Kivételek" -UlabDocumentation = "Dokumentáció" +Functions = "Funkciók" +Catalog = "Katalógus" +Modules = "Modulok" +LoopsAndTests = "Hurkok és tesztek" +Files = "Fájlok" +Exceptions = "Kivételek" +UlabDocumentation = "Dokumentáció" IonSelector = "Kulcsválasztó" PressAKey = "Nyomj meg egy gombot" IonKeyList = "A kulcsok listája" diff --git a/apps/code/toolbox.universal.i18n b/apps/code/toolbox.universal.i18n index c05493a0564..a04e267dfa9 100644 --- a/apps/code/toolbox.universal.i18n +++ b/apps/code/toolbox.universal.i18n @@ -45,7 +45,7 @@ IfAndIfElseStatement = "if \x11 and :\n \nelse:\n " IfAndIfElseStatementWithArg = "if condition1 and condition2:\n instruction1\nelse:\n instruction2" IfElifElseStatement = "if \x11:\n \nelif :\n \nelse:\n " IfElifElseStatementWithArg = "if condition1:\n instruction1\nelif condition2:\n instruction2\nelse:\n instruction3" -IfThenStatement= "if \x11:\n " +IfThenStatement = "if \x11:\n " IfThenStatementWithArg = "if condition:\n instruction" IfElseStatement = "if \x11:\n \nelse:\n " IfElseStatementWithArg = "if condition:\n instruction1\nelse:\n instruction2" diff --git a/apps/external/base.de.i18n b/apps/external/base.de.i18n index 28dd31e4e4d..7a165f4abf3 100644 --- a/apps/external/base.de.i18n +++ b/apps/external/base.de.i18n @@ -6,4 +6,4 @@ ExternalNotCompatible = "Externe App ist nicht kompatibel" WithSimulator = "mit dem Simulator" WithN0100 = "mit N0100" GetMoreAppsAt = "Weitere Apps abrufen bei" -NoAppsInstalled = "Keine Apps installiert" \ No newline at end of file +NoAppsInstalled = "Keine Apps installiert" diff --git a/apps/external/base.hu.i18n b/apps/external/base.hu.i18n index e984edc511d..71c8ccd984a 100644 --- a/apps/external/base.hu.i18n +++ b/apps/external/base.hu.i18n @@ -1,9 +1,9 @@ -ExternalApp = "Külsö" -ExternalAppCapital = "KÜLSÖ" -ExternalAppApiMismatch = "API eltérés" -ExternalAppExecError = "A fájl nem futtatható" -ExternalNotCompatible = "Externál nem kompatibilis" -WithSimulator = "Szimulátorral" -WithN0100 = "n0100-al" -GetMoreAppsAt = "Mégtöbb alkalmazás itt :" -NoAppsInstalled = "Nincs letöltött externál" +ExternalApp = "Külsö" +ExternalAppCapital = "KÜLSÖ" +ExternalAppApiMismatch = "API eltérés" +ExternalAppExecError = "A fájl nem futtatható" +ExternalNotCompatible = "Externál nem kompatibilis" +WithSimulator = "Szimulátorral" +WithN0100 = "n0100-al" +GetMoreAppsAt = "Mégtöbb alkalmazás itt :" +NoAppsInstalled = "Nincs letöltött externál" diff --git a/apps/external/base.universal.i18n b/apps/external/base.universal.i18n index bd64604ea1a..0e61293eede 100644 --- a/apps/external/base.universal.i18n +++ b/apps/external/base.universal.i18n @@ -1 +1 @@ -URL = "zardam.github.io/nw-external-apps/" \ No newline at end of file +URL = "zardam.github.io/nw-external-apps/" diff --git a/apps/graph/base.hu.i18n b/apps/graph/base.hu.i18n index 9b1c306fc57..11a1e496f69 100644 --- a/apps/graph/base.hu.i18n +++ b/apps/graph/base.hu.i18n @@ -1,33 +1,33 @@ -FunctionApp = "Funkciók" -FunctionAppCapital = "FUNKCIÓK" -FunctionTab = "Funkciók" -AddFunction = "Funkció hozzáadása" -DeleteFunction = "Funkció törlése" -CurveType = "Görbe típus" -CartesianType = "Kartéziánus " -PolarType = "Poláris " -ParametricType = "Parametrikus " -IntervalT = "t intervallum" -IntervalTheta = "θ intervallum" -IntervalX = "x intervallum" -FunctionDomain = "Tervtartomány" -FunctionColor = "Funkció színe" -NoFunction = "Nincs funkció" -NoActivatedFunction = "Nincs használt funkció" -PlotOptions = "Görbe beállítások" -Compute = "Kiszámolás" -Zeros = "Nullák" -Tangent = "Tangens" -Intersection = "Metszéspont" -Preimage = "Inverz kép" -SelectLowerBound = "Alsó határ kiválasztása" -SelectUpperBound = "Felsö határ kiválasztása" -NoMaximumFound = "Nem talált maximum-ot" -NoMinimumFound = "Nem talált minimum-ot" -NoZeroFound = "Nem talált nullát" -NoIntersectionFound = "Nem található keresztezödés" -NoPreimageFound = "Nem található inverz kép" -DerivativeFunctionColumn = "A derivált fügvény oszlopa" -HideDerivativeColumn = "A derivált függvény oszlop elrejtése" -AllowedCharactersAZaz09 = "Engedélyezett karakterek: A..Z, a..z, 0..9, _" -ReservedName = "Fenntartott név" +FunctionApp = "Funkciók" +FunctionAppCapital = "FUNKCIÓK" +FunctionTab = "Funkciók" +AddFunction = "Funkció hozzáadása" +DeleteFunction = "Funkció törlése" +CurveType = "Görbe típus" +CartesianType = "Kartéziánus " +PolarType = "Poláris " +ParametricType = "Parametrikus " +IntervalT = "t intervallum" +IntervalTheta = "θ intervallum" +IntervalX = "x intervallum" +FunctionDomain = "Tervtartomány" +FunctionColor = "Funkció színe" +NoFunction = "Nincs funkció" +NoActivatedFunction = "Nincs használt funkció" +PlotOptions = "Görbe beállítások" +Compute = "Kiszámolás" +Zeros = "Nullák" +Tangent = "Tangens" +Intersection = "Metszéspont" +Preimage = "Inverz kép" +SelectLowerBound = "Alsó határ kiválasztása" +SelectUpperBound = "Felsö határ kiválasztása" +NoMaximumFound = "Nem talált maximum-ot" +NoMinimumFound = "Nem talált minimum-ot" +NoZeroFound = "Nem talált nullát" +NoIntersectionFound = "Nem található keresztezödés" +NoPreimageFound = "Nem található inverz kép" +DerivativeFunctionColumn = "A derivált fügvény oszlopa" +HideDerivativeColumn = "A derivált függvény oszlop elrejtése" +AllowedCharactersAZaz09 = "Engedélyezett karakterek: A..Z, a..z, 0..9, _" +ReservedName = "Fenntartott név" diff --git a/apps/graph/base.pt.i18n b/apps/graph/base.pt.i18n index 707a10013c4..c5eed5a07c5 100644 --- a/apps/graph/base.pt.i18n +++ b/apps/graph/base.pt.i18n @@ -29,5 +29,5 @@ NoIntersectionFound = "Nenhuma interseção encontrada" NoPreimageFound = "Nenhuma imagem inversa encontrada" DerivativeFunctionColumn = "Coluna da função derivada" HideDerivativeColumn = "Esconder função derivada" -AllowedCharactersAZaz09 = "Caracteres permitidos : A..Z, a..z, 0..9, _" +AllowedCharactersAZaz09 = "Caracteres permitidos : A..Z, a..z, 0..9, _" ReservedName = "Nome reservado" diff --git a/apps/home/base.hu.i18n b/apps/home/base.hu.i18n index aa3c0f1e3b7..a051b4e90a6 100644 --- a/apps/home/base.hu.i18n +++ b/apps/home/base.hu.i18n @@ -1,4 +1,4 @@ -Apps = "Alkalmazások" -AppsCapital = "UPSILON" -ForbiddenAppInExamMode1 = "Ez az alkalmazás" -ForbiddenAppInExamMode2 = "tilos vizsga módban" +Apps = "Alkalmazások" +AppsCapital = "UPSILON" +ForbiddenAppInExamMode1 = "Ez az alkalmazás" +ForbiddenAppInExamMode2 = "tilos vizsga módban" diff --git a/apps/language_hu.universal.i18n b/apps/language_hu.universal.i18n index 6718a8d72e2..ad733b0d88f 100644 --- a/apps/language_hu.universal.i18n +++ b/apps/language_hu.universal.i18n @@ -1 +1 @@ -LanguageHU = "Magyar " +LanguageHU = "Magyar " diff --git a/apps/on_boarding/base.hu.i18n b/apps/on_boarding/base.hu.i18n index e97da92baf2..86f55958e03 100644 --- a/apps/on_boarding/base.hu.i18n +++ b/apps/on_boarding/base.hu.i18n @@ -1,13 +1,13 @@ -UpdateAvailable = "Elérhetö Frissítések!" -UpdateMessage1 = "Fontos frissítések vannak" -UpdateMessage2 = "a számológépéhez." -UpdateMessage3 = "Töltje le a weboldalunkról az utolso verziót" -UpdateMessage4 = "www.numworks.com/update" -BetaVersion = "BETA VERZIÓ" -BetaVersionMessage1 = "" -BetaVersionMessage2 = "Az eszköz béta szoftvert futtat." -BetaVersionMessage3 = "Lehet, hogy hibákat észlel." -BetaVersionMessage4 = "" -BetaVersionMessage5 = "Kérjük, küldjön minden visszajelzést a" -BetaVersionMessage6 = "contact@numworks.com email címre" -Skip = "Tovább" +UpdateAvailable = "Elérhetö Frissítések!" +UpdateMessage1 = "Fontos frissítések vannak" +UpdateMessage2 = "a számológépéhez." +UpdateMessage3 = "Töltje le a weboldalunkról az utolso verziót" +UpdateMessage4 = "www.numworks.com/update" +BetaVersion = "BETA VERZIÓ" +BetaVersionMessage1 = "" +BetaVersionMessage2 = "Az eszköz béta szoftvert futtat." +BetaVersionMessage3 = "Lehet, hogy hibákat észlel." +BetaVersionMessage4 = "" +BetaVersionMessage5 = "Kérjük, küldjön minden visszajelzést a" +BetaVersionMessage6 = "contact@numworks.com email címre" +Skip = "Tovább" diff --git a/apps/probability/base.de.i18n b/apps/probability/base.de.i18n index 5c7c68fbac1..ba6f1a7aef4 100644 --- a/apps/probability/base.de.i18n +++ b/apps/probability/base.de.i18n @@ -1,10 +1,10 @@ +Normal = "Normal" ProbaApp = "Wahrsch." ProbaAppCapital = "WAHRSCHEINLICHKEIT" ChooseDistribution = "Wählen Sie eine Verteilung" Binomial = "Binomial" Geometric = "Geometrische" Uniforme = "Gleichverteilung" -Normal = "Normal" ChiSquared = "Chi-Quadrat" UniformDistribution = "Uniformverteilung" ExponentialDistribution = "Exponentialverteilung" diff --git a/apps/probability/base.en.i18n b/apps/probability/base.en.i18n index c05cf05bbef..5d302349d87 100644 --- a/apps/probability/base.en.i18n +++ b/apps/probability/base.en.i18n @@ -1,10 +1,10 @@ +Normal = "Normal" ProbaApp = "Probability" ProbaAppCapital = "PROBABILITY" ChooseDistribution = "Choose the distribution" Binomial = "Binomial" Geometric = "Geometric" Uniforme = "Uniform" -Normal = "Normal" ChiSquared = "Chi-squared" UniformDistribution = "Uniform distribution" ExponentialDistribution = "Exponential distribution" diff --git a/apps/probability/base.es.i18n b/apps/probability/base.es.i18n index 65c70e20e2c..81d49e11c78 100644 --- a/apps/probability/base.es.i18n +++ b/apps/probability/base.es.i18n @@ -1,10 +1,10 @@ +Normal = "Normal" ProbaApp = "Probabilidad" ProbaAppCapital = "PROBABILIDAD" ChooseDistribution = "Seleccionar la distribución" Binomial = "Binomial" Geometric = "Geométrica" Uniforme = "Uniforme" -Normal = "Normal" ChiSquared = "Chi-cuadrado" UniformDistribution = "Distribución uniforme" ExponentialDistribution = "Distribución exponencial" diff --git a/apps/probability/base.hu.i18n b/apps/probability/base.hu.i18n index 98fb7e74c2f..7f341e49ed8 100644 --- a/apps/probability/base.hu.i18n +++ b/apps/probability/base.hu.i18n @@ -1,27 +1,27 @@ -ProbaApp = "Valószínüség" -ProbaAppCapital = "VALÓSZÍNÜSÉG" -ChooseDistribution = "Válassza ki a disztribúciót" -Binomial = "Binomiális" -Geometric = "Geometriai" -Uniforme = "Állandó" -Normal = "Normál" -ChiSquared = "Chi-négyzet" -UniformDistribution = "Egységes eloszlás" -ExponentialDistribution = "Exponenciális eloszlás" -GeometricDistribution = "Geometriai eloszlás" -PoissonDistribution = "Poisson eloszlás" -ChiSquaredDistribution = "Chi-négyzet eloszlás" -StudentDistribution = "Student eloszlása" -FisherDistribution = "Fisher eloszlás" -ChooseParameters = "Paraméterek kiválasztása" -RepetitionNumber = "n: ismétlések száma" -SuccessProbability = "p: a siker valószínüsége" -IntervalDefinition = "[a, b]: intervallum" -LambdaExponentialDefinition = "λ: paraméter" -MeanDefinition = "μ: remény vagy atlag" -DeviationDefinition = "σ: szórás" -LambdaPoissonDefinition = "λ: paraméter" -DegreesOfFreedomDefinition = "k: szabadságfokok" -D1FisherDefinition = "d1: a számláló szabadságfokai" -D2FisherDefinition = "d2: a nevezó szabadságfokai" -ComputeProbability = "Számítsa ki a valószínüségeket" +Normal = "Normál" +ProbaApp = "Valószínüség" +ProbaAppCapital = "VALÓSZÍNÜSÉG" +ChooseDistribution = "Válassza ki a disztribúciót" +Binomial = "Binomiális" +Geometric = "Geometriai" +Uniforme = "Állandó" +ChiSquared = "Chi-négyzet" +UniformDistribution = "Egységes eloszlás" +ExponentialDistribution = "Exponenciális eloszlás" +GeometricDistribution = "Geometriai eloszlás" +PoissonDistribution = "Poisson eloszlás" +ChiSquaredDistribution = "Chi-négyzet eloszlás" +StudentDistribution = "Student eloszlása" +FisherDistribution = "Fisher eloszlás" +ChooseParameters = "Paraméterek kiválasztása" +RepetitionNumber = "n: ismétlések száma" +SuccessProbability = "p: a siker valószínüsége" +IntervalDefinition = "[a, b]: intervallum" +LambdaExponentialDefinition = "λ: paraméter" +MeanDefinition = "μ: remény vagy atlag" +DeviationDefinition = "σ: szórás" +LambdaPoissonDefinition = "λ: paraméter" +DegreesOfFreedomDefinition = "k: szabadságfokok" +D1FisherDefinition = "d1: a számláló szabadságfokai" +D2FisherDefinition = "d2: a nevezó szabadságfokai" +ComputeProbability = "Számítsa ki a valószínüségeket" diff --git a/apps/probability/base.it.i18n b/apps/probability/base.it.i18n index 443229b5357..b04b65ffa36 100644 --- a/apps/probability/base.it.i18n +++ b/apps/probability/base.it.i18n @@ -1,10 +1,10 @@ +Normal = "Normale" ProbaApp = "Probabilità" ProbaAppCapital = "PROBABILITA" ChooseDistribution = "Scegliere il tipo di distribuzione" Binomial = "Binomiale" Geometric = "Geometrica" Uniforme = "Uniforme" -Normal = "Normale" ChiSquared = "Chi2" UniformDistribution = "Distribuzione uniforme" ExponentialDistribution = "Distribuzione esponenziale" diff --git a/apps/probability/base.nl.i18n b/apps/probability/base.nl.i18n index 07ace74556c..df2e21a3200 100644 --- a/apps/probability/base.nl.i18n +++ b/apps/probability/base.nl.i18n @@ -1,10 +1,10 @@ +Normal = "Normaal" ProbaApp = "Kansrekenen" ProbaAppCapital = "KANSREKENEN" ChooseDistribution = "Kies de kansverdeling" Binomial = "Binomiaal" Geometric = "Geometrisch" Uniforme = "Uniform" -Normal = "Normaal" ChiSquared = "Chi-kwadraat" UniformDistribution = "Uniforme verdeling" ExponentialDistribution = "Exponentiële verdeling" diff --git a/apps/probability/base.pt.i18n b/apps/probability/base.pt.i18n index f3775739057..26712658066 100644 --- a/apps/probability/base.pt.i18n +++ b/apps/probability/base.pt.i18n @@ -1,10 +1,10 @@ +Normal = "Normal" ProbaApp = "Probabilidades" ProbaAppCapital = "PROBABILIDADES" ChooseDistribution = "Selecionar a distribuição" Binomial = "Binomial" Geometric = "Geométrica" Uniforme = "Uniforme" -Normal = "Normal" ChiSquared = "Qui-quadrado" UniformDistribution = "Distribuição uniforme" ExponentialDistribution = "Distribuição exponencial" diff --git a/apps/reader/base.es.i18n b/apps/reader/base.es.i18n index 76962dca3c4..977e2f88004 100644 --- a/apps/reader/base.es.i18n +++ b/apps/reader/base.es.i18n @@ -1,5 +1,5 @@ ReaderApp = "Lector" ReaderAppCapital = "LECTOR" -NoFileToDisplay ="No hay archivos para mostrar" +NoFileToDisplay = "No hay archivos para mostrar" FileError1 = "Error al leer el archivo" FileError2 = "Por favor revise su sintaxis" diff --git a/apps/reader/base.fr.i18n b/apps/reader/base.fr.i18n index b74e6add0f5..bbf3bceaada 100644 --- a/apps/reader/base.fr.i18n +++ b/apps/reader/base.fr.i18n @@ -2,4 +2,4 @@ ReaderApp = "Liseuse" ReaderAppCapital = "LISEUSE" NoFileToDisplay = "Aucun fichier à afficher" FileError1 = "Erreur durant la lecture du fichier" -FileError2 = "Veuillez vérifier sa syntaxe" \ No newline at end of file +FileError2 = "Veuillez vérifier sa syntaxe" diff --git a/apps/regression/base.hu.i18n b/apps/regression/base.hu.i18n index e5d37d82553..2871adc72e7 100644 --- a/apps/regression/base.hu.i18n +++ b/apps/regression/base.hu.i18n @@ -1,20 +1,20 @@ -RegressionApp = "Regresszió" -RegressionAppCapital = "REGRESSZIÓ" -Regression = "Regresszió" -MeanDot = "Középérték" -RegressionCurve = "Regressziós görbe" -XPrediction = "Jóslás X megadva" -YPrediction = "Jóslás Y megadva" -ValueNotReachedByRegression = "Az ablakban az érték még nem volt elérve" -NumberOfDots = "Pontok száma" -Covariance = "Kovariancia" -Linear = "Lineáris" -Proportional = "Általános" -Quadratic = "Másodfokú" -Cubic = "Kockás" -Quartic = "Kvartikus" -Logarithmic = "Logaritmikus" -Power = "Teljesítmény" -Trigonometrical = "Trigonometrikus" -Logistic = "Logisztikai" -DataNotSuitableForRegression = "Ezek az adatok nem megfelelö ehhez a regressziós modellhez" +RegressionApp = "Regresszió" +RegressionAppCapital = "REGRESSZIÓ" +Regression = "Regresszió" +MeanDot = "Középérték" +RegressionCurve = "Regressziós görbe" +XPrediction = "Jóslás X megadva" +YPrediction = "Jóslás Y megadva" +ValueNotReachedByRegression = "Az ablakban az érték még nem volt elérve" +NumberOfDots = "Pontok száma" +Covariance = "Kovariancia" +Linear = "Lineáris" +Proportional = "Általános" +Quadratic = "Másodfokú" +Cubic = "Kockás" +Quartic = "Kvartikus" +Logarithmic = "Logaritmikus" +Power = "Teljesítmény" +Trigonometrical = "Trigonometrikus" +Logistic = "Logisztikai" +DataNotSuitableForRegression = "Ezek az adatok nem megfelelö ehhez a regressziós modellhez" diff --git a/apps/regression/base.universal.i18n b/apps/regression/base.universal.i18n index e974d8a9fc3..ee9f2fafa54 100644 --- a/apps/regression/base.universal.i18n +++ b/apps/regression/base.universal.i18n @@ -1,11 +1,11 @@ -ProportionalRegressionFormula = " y=a·x " -QuadraticRegressionFormula = " y=a·x^2+b·x+c " -CubicRegressionFormula = " y=a·x^3+b·x^2+c·x+d " -QuarticRegressionFormula = " y=a·x^4+b·x^3+c·x^2+d·x+e " -LogarithmicRegressionFormula = " y=a·ln(x)+b " -ExponentialRegressionFormula = " y=a·exp(b·x) " -PowerRegressionFormula = " y=a·x^b " -TrigonometricRegressionFormula = " y=a·sin(b·x+c)+d " -LogisticRegressionFormula = " y=c/(1+a·exp(-b·x)) " +ProportionalRegressionFormula = " y=a·x " +QuadraticRegressionFormula = " y=a·x^2+b·x+c " +CubicRegressionFormula = " y=a·x^3+b·x^2+c·x+d " +QuarticRegressionFormula = " y=a·x^4+b·x^3+c·x^2+d·x+e " +LogarithmicRegressionFormula = " y=a·ln(x)+b " +ExponentialRegressionFormula = " y=a·exp(b·x) " +PowerRegressionFormula = " y=a·x^b " +TrigonometricRegressionFormula = " y=a·sin(b·x+c)+d " +LogisticRegressionFormula = " y=c/(1+a·exp(-b·x)) " Dash = "-" Reg = "reg" diff --git a/apps/sequence/base.de.i18n b/apps/sequence/base.de.i18n index 21da2aeabd6..a220402db48 100644 --- a/apps/sequence/base.de.i18n +++ b/apps/sequence/base.de.i18n @@ -1,3 +1,5 @@ +NEnd = "Endwert" +NStart = "Startwert" SequenceApp = "Folge" SequenceAppCapital = "FOLGE" SequenceTab = "Folgen" @@ -12,8 +14,6 @@ SequenceColor = "Farbe der Folge" DeleteSequence = "Folge löschen" NoSequence = "Keine Folge" NoActivatedSequence = "Keine aktive Folge" -NStart = "Startwert" -NEnd = "Endwert" TermSum = "Summe der Terme" SelectFirstTerm = "Erster Term " SelectLastTerm = "Letzter Term " diff --git a/apps/sequence/base.en.i18n b/apps/sequence/base.en.i18n index 8776d4b7910..8b3f4eea52d 100644 --- a/apps/sequence/base.en.i18n +++ b/apps/sequence/base.en.i18n @@ -1,3 +1,5 @@ +NEnd = "N end" +NStart = "N start" SequenceApp = "Sequences" SequenceAppCapital = "SEQUENCES" SequenceTab = "Sequences" @@ -12,8 +14,6 @@ SequenceColor = "Sequence color" DeleteSequence = "Delete sequence" NoSequence = "No sequence" NoActivatedSequence = "No sequence is turned on" -NStart = "N start" -NEnd = "N end" TermSum = "Sum of terms" SelectFirstTerm = "Select First Term " SelectLastTerm = "Select last term " diff --git a/apps/sequence/base.es.i18n b/apps/sequence/base.es.i18n index 691b286b249..a1756dc8aa4 100644 --- a/apps/sequence/base.es.i18n +++ b/apps/sequence/base.es.i18n @@ -1,3 +1,5 @@ +NEnd = "N fin" +NStart = "N inicio" SequenceApp = "Sucesión" SequenceAppCapital = "SUCESIÓN" SequenceTab = "Sucesiones" @@ -12,8 +14,6 @@ SequenceColor = "Color de la sucesión" DeleteSequence = "Eliminar la sucesión" NoSequence = "Ninguna sucesión" NoActivatedSequence = "Ninguna sucesión activada" -NStart = "N inicio" -NEnd = "N fin" TermSum = "Suma de términos" SelectFirstTerm = "Seleccionar el primer término " SelectLastTerm = "Seleccionar el último término " diff --git a/apps/sequence/base.hu.i18n b/apps/sequence/base.hu.i18n index b52a13cfaf0..c79b8c6fe97 100644 --- a/apps/sequence/base.hu.i18n +++ b/apps/sequence/base.hu.i18n @@ -1,3 +1,5 @@ +NEnd = "N vég" +NStart = "N start" SequenceApp = "Szekvenciák" SequenceAppCapital = "SZEKVENCIÁK" SequenceTab = "Szekvenciák" @@ -12,8 +14,6 @@ SequenceColor = "Szekvencia színe" DeleteSequence = "Sorozat törlése" NoSequence = "Nincs sorrend" NoActivatedSequence = "Nincs szekvencia bekapcsolva" -NStart = "N start" -NEnd = "N vég" TermSum = "A kifejezés összege" SelectFirstTerm = "Elsö kifejezés kiválasztása " SelectLastTerm = "Utolsó kifejezés kiválasztása " diff --git a/apps/sequence/base.it.i18n b/apps/sequence/base.it.i18n index 3d714acfeac..a7831c80a62 100644 --- a/apps/sequence/base.it.i18n +++ b/apps/sequence/base.it.i18n @@ -1,3 +1,5 @@ +NEnd = "N finale" +NStart = "N iniziale" SequenceApp = "Successioni" SequenceAppCapital = "SUCCESSIONI" SequenceTab = "Successioni" @@ -12,8 +14,6 @@ SequenceColor = "Colore della successione" DeleteSequence = "Cancella la successione" NoSequence = "Nessuna successione" NoActivatedSequence = "Nessuna successione attiva" -NStart = "N iniziale" -NEnd = "N finale" TermSum = "Somma dei termini" SelectFirstTerm = "Selezionare il primo termine " SelectLastTerm = "Selezionare l'ultimo termine " diff --git a/apps/sequence/base.nl.i18n b/apps/sequence/base.nl.i18n index 178761f1d40..d2d78224dbe 100644 --- a/apps/sequence/base.nl.i18n +++ b/apps/sequence/base.nl.i18n @@ -1,3 +1,5 @@ +NEnd = "N einde" +NStart = "N begin" SequenceApp = "Rijen" SequenceAppCapital = "RIJEN" SequenceTab = "Rijen" @@ -12,8 +14,6 @@ SequenceColor = "Rij-kleur" DeleteSequence = "Rij verwijderen" NoSequence = "Geen rij ingevoerd" NoActivatedSequence = "Geen rij is ingeschakeld" -NStart = "N begin" -NEnd = "N einde" TermSum = "Som van termen" SelectFirstTerm = "Selecteer eerste term " SelectLastTerm = "Selecteer laatste term " diff --git a/apps/sequence/base.pt.i18n b/apps/sequence/base.pt.i18n index 3cfbb3338a7..a0b23225def 100644 --- a/apps/sequence/base.pt.i18n +++ b/apps/sequence/base.pt.i18n @@ -1,3 +1,5 @@ +NEnd = "N fim" +NStart = "N início" SequenceApp = "Sequências" SequenceAppCapital = "SEQUÊNCIAS" SequenceTab = "Sequências" @@ -12,8 +14,6 @@ SequenceColor = "Cor da sequência" DeleteSequence = "Eliminar a sequência" NoSequence = "Sem sequência" NoActivatedSequence = "Sem sequência ativada" -NStart = "N início" -NEnd = "N fim" TermSum = "Soma dos termos" SelectFirstTerm = "Selecionar primeiro termo " SelectLastTerm = "Selecionar último termo " diff --git a/apps/settings/base.de.i18n b/apps/settings/base.de.i18n index 3eb0e59fbb7..26056fa35a9 100644 --- a/apps/settings/base.de.i18n +++ b/apps/settings/base.de.i18n @@ -25,8 +25,8 @@ Degrees = "Grad " Gradians = "Gon " Radian = "Bogenmaß " Decimal = "Dezimal " -Engineering = "Technisch " Scientific = "Wissenschaftlich " +Engineering = "Technisch " SignificantFigures = "Signifikante Stellen " Real = "Reell " Cartesian = "Kartesisch " diff --git a/apps/settings/base.en.i18n b/apps/settings/base.en.i18n index c6a048e2a7c..b615f0124d4 100644 --- a/apps/settings/base.en.i18n +++ b/apps/settings/base.en.i18n @@ -44,8 +44,8 @@ SmallFont = "Small " SerialNumber = "Serial number" UpdatePopUp = "Update pop-up" BetaPopUp = "Beta pop-up" -Battery = "Battery" Contributors = "Contributors" +Battery = "Battery" Accessibility = "Accessibility" AccessibilityInvertColors = "Invert colors" AccessibilityMagnify = "Magnify" diff --git a/apps/settings/base.es.i18n b/apps/settings/base.es.i18n index 839f25ba8a3..c78966333a0 100644 --- a/apps/settings/base.es.i18n +++ b/apps/settings/base.es.i18n @@ -24,9 +24,9 @@ About = "Acerca" Degrees = "Grados " Gradians = "Gradianes " Radian = "Radianes " -Engineering = "Ingeniería " Decimal = "Decimal " Scientific = "Científico " +Engineering = "Ingeniería " SignificantFigures = "Cifras significativas " Real = "Real " Cartesian = "Binómica " diff --git a/apps/settings/base.nl.i18n b/apps/settings/base.nl.i18n index d71a7682472..6c5c1f0cce5 100644 --- a/apps/settings/base.nl.i18n +++ b/apps/settings/base.nl.i18n @@ -11,7 +11,7 @@ ExamModeActive = "Herstart examenstand" ToDeactivateExamMode1 = "Om de examenstand te verlaten," ToDeactivateExamMode2 = "sluit de rekenmachine aan op" ToDeactivateExamMode3 = "een computer of stopcontact." -# --------------------- Please do not edit these messages - Discuss with Leo (remove this later) --------------------- +# --------------------- Please do not edit these messages --------------------- ExamModeWarning1 = "Let op: naleving van de examenstand" ExamModeWarning2 = "op deze onofficiële software wordt" ExamModeWarning3 = "door NumWorks/Omega niet gegarandeerd." diff --git a/apps/shared.de.i18n b/apps/shared.de.i18n index b72d2803a15..56963e9445a 100644 --- a/apps/shared.de.i18n +++ b/apps/shared.de.i18n @@ -51,8 +51,8 @@ NameCannotStartWithNumber = "Name darf nicht mit Zahl beginnen" NameTaken = "Dieser Name ist bereits vergeben" NameTooLong = "Der Name ist zu lang" Navigate = "Navigieren" -NEnd = "N Endwert" Next = "Nächste" +NEnd = "N Endwert" NoDataToPlot = "Keine Daten zum Zeichnen" NoValueToCompute = "Keine Größe zum Berechnen" NStart = "N Startwert" @@ -67,8 +67,8 @@ Sci = "wiss" SortValues = "Nach Werten sortieren" SortSizes = "Nach Frequenzen sortieren" SquareSum = "Quadratsumme" -StatTab = "Stats" StandardDeviation = "Standardabweichung" +StatTab = "Stats" Step = "Schrittwert" StorageMemoryFull1 = "Der Speicher ist voll. Löschen Sie" StorageMemoryFull2 = "einige Daten, dann erneut versuchen." diff --git a/apps/shared.en.i18n b/apps/shared.en.i18n index 257e39c9429..4265bc3dd76 100644 --- a/apps/shared.en.i18n +++ b/apps/shared.en.i18n @@ -52,9 +52,9 @@ NameTaken = "This name has already been taken" NameTooLong = "This name is too long" Navigate = "Navigate" Next = "Next" +NEnd = "N end" NoDataToPlot = "No data to draw" NoValueToCompute = "No values to calculate" -NEnd = "N end" NStart = "N start" Ok = "Confirm" Or = " or " diff --git a/apps/shared.es.i18n b/apps/shared.es.i18n index f1f6ca4ade0..0bcbe38441a 100644 --- a/apps/shared.es.i18n +++ b/apps/shared.es.i18n @@ -51,8 +51,8 @@ NameCannotStartWithNumber = "Un nombre no puede empezar con un número" NameTaken = "Este nombre ya está en uso" NameTooLong = "Este nombre es demasiado largo" Navigate = "Navegar" -NEnd = "N fin" Next = "Siguiente" +NEnd = "N fin" NoDataToPlot = "Ningunos datos que dibujar" NoValueToCompute = "Ninguna medida que calcular" NStart = "N inicio" diff --git a/apps/shared.nl.i18n b/apps/shared.nl.i18n index 62060e011c9..cc0b82153f9 100644 --- a/apps/shared.nl.i18n +++ b/apps/shared.nl.i18n @@ -52,9 +52,9 @@ NameTaken = "Deze naam is al in gebruik" NameTooLong = "Deze naam is te lang" Navigate = "Navigeren" Next = "Volgende" +NEnd = "N einde" NoDataToPlot = "Geen gegevens om te plotten" NoValueToCompute = "Geen waarden om te berekenen" -NEnd = "N einde" NStart = "N begin" Ok = "Bevestig" Or = " of " diff --git a/apps/shared.pt.i18n b/apps/shared.pt.i18n index 4edea43ba44..f00fc306e0e 100644 --- a/apps/shared.pt.i18n +++ b/apps/shared.pt.i18n @@ -51,8 +51,8 @@ NameCannotStartWithNumber = "O nome não pode começar com um número" NameTaken = "Este nome já está a ser usado" NameTooLong = "Este nome é muito longo" Navigate = "Navegar" -NEnd = "N fim" Next = "Seguinte" +NEnd = "N fim" NoDataToPlot = "Não há dados para desenhar" NoValueToCompute = "Não há dados para calcular" NStart = "N início" diff --git a/apps/solver/base.de.i18n b/apps/solver/base.de.i18n index 89b770872f1..40aaf533b43 100644 --- a/apps/solver/base.de.i18n +++ b/apps/solver/base.de.i18n @@ -17,8 +17,8 @@ NoSolutionEquation = "Die Gleichung hat keine Lösung" NoSolutionInterval = "Keine Lösung im Intervall gefunden" EnterEquation = "Geben Sie eine Gleichung ein" InfiniteNumberOfSolutions = "Es gibt unendlich viele Lösungen" -ApproximateSolutionIntervalInstruction0= "Geben Sie das Suchintervall" -ApproximateSolutionIntervalInstruction1= "für eine ungefähre Lösung ein" +ApproximateSolutionIntervalInstruction0 = "Geben Sie das Suchintervall" +ApproximateSolutionIntervalInstruction1 = "für eine ungefähre Lösung ein" OnlyFirstSolutionsDisplayed0 = "Es werden nur die ersten" OnlyFirstSolutionsDisplayed1 = "zehn Lösungen angezeigt." PolynomeHasNoRealSolution0 = "Das Polynom hat" diff --git a/apps/solver/base.en.i18n b/apps/solver/base.en.i18n index b8239dae01c..62864dc3dc7 100644 --- a/apps/solver/base.en.i18n +++ b/apps/solver/base.en.i18n @@ -5,8 +5,8 @@ ResolveEquation = "Solve the equation" ResolveSystem = "Solve the system" UseEquationModel = "Use an equation template" RequireEquation = "The input must be an equation" -UnrealEquation = "Unreal equation" UndefinedEquation = "Undefined equation" +UnrealEquation = "Unreal equation" TooManyVariables = "There are too many unknowns" NonLinearSystem = "The system is not linear" Solution = "Solution" @@ -17,8 +17,8 @@ NoSolutionEquation = "The equation has no solution" NoSolutionInterval = "No solution found in the interval" EnterEquation = "Enter an equation" InfiniteNumberOfSolutions = "There are an infinite number of solutions" -ApproximateSolutionIntervalInstruction0= "Enter the interval to search" -ApproximateSolutionIntervalInstruction1= "for an approximate solution" +ApproximateSolutionIntervalInstruction0 = "Enter the interval to search" +ApproximateSolutionIntervalInstruction1 = "for an approximate solution" OnlyFirstSolutionsDisplayed0 = "Only the first 10 solutions" OnlyFirstSolutionsDisplayed1 = "are displayed" PolynomeHasNoRealSolution0 = "The polynomial has no" diff --git a/apps/solver/base.es.i18n b/apps/solver/base.es.i18n index 40c567c9d1a..29b708f8bc0 100644 --- a/apps/solver/base.es.i18n +++ b/apps/solver/base.es.i18n @@ -5,8 +5,8 @@ ResolveEquation = "Resolver la ecuación" ResolveSystem = "Resolver el sistema" UseEquationModel = "Usar un modelo de ecuación" RequireEquation = "La entrada debe ser una ecuación" -UnrealEquation = "Una ecuación no es real" UndefinedEquation = "Una ecuación es indefinida" +UnrealEquation = "Una ecuación no es real" TooManyVariables = "Hay demasiadas incógnitas" NonLinearSystem = "El sistema no es lineal" Solution = "Solución" @@ -17,8 +17,8 @@ NoSolutionEquation = "La ecuación no tiene solución" NoSolutionInterval = "Ninguna solución encontrada en el intervalo" EnterEquation = "Escribe una ecuación" InfiniteNumberOfSolutions = "Hay un número infinito de soluciones" -ApproximateSolutionIntervalInstruction0= "Introduzca el intervalo para" -ApproximateSolutionIntervalInstruction1= "buscar una solución aproximada" +ApproximateSolutionIntervalInstruction0 = "Introduzca el intervalo para" +ApproximateSolutionIntervalInstruction1 = "buscar una solución aproximada" OnlyFirstSolutionsDisplayed0 = "Sólo se muestran las" OnlyFirstSolutionsDisplayed1 = "10 primeras soluciones" PolynomeHasNoRealSolution0 = "El polinomio no tiene" diff --git a/apps/solver/base.fr.i18n b/apps/solver/base.fr.i18n index 424c15cfebe..f9b8708dc9b 100644 --- a/apps/solver/base.fr.i18n +++ b/apps/solver/base.fr.i18n @@ -17,8 +17,8 @@ NoSolutionEquation = "L'équation n'admet aucune solution" NoSolutionInterval = "Aucune solution trouvée dans cet intervalle" EnterEquation = "Entrez une équation" InfiniteNumberOfSolutions = "Le système admet une infinité de solutions" -ApproximateSolutionIntervalInstruction0= "Entrez l'intervalle dans lequel" -ApproximateSolutionIntervalInstruction1= "rechercher une solution approchée" +ApproximateSolutionIntervalInstruction0 = "Entrez l'intervalle dans lequel" +ApproximateSolutionIntervalInstruction1 = "rechercher une solution approchée" OnlyFirstSolutionsDisplayed0 = "Seulement les 10 premières" OnlyFirstSolutionsDisplayed1 = "solutions sont affichées" PolynomeHasNoRealSolution0 = "Le polynôme n'admet pas" diff --git a/apps/solver/base.hu.i18n b/apps/solver/base.hu.i18n index a36ed7ad4cf..e47cf40198b 100644 --- a/apps/solver/base.hu.i18n +++ b/apps/solver/base.hu.i18n @@ -1,29 +1,29 @@ -SolverApp = "Egyenletek" -SolverAppCapital = "EGYENLETEK" -AddEquation = "Egyenlet hozzáadás" -ResolveEquation = "Egyenletet megoldása" -ResolveSystem = "Rendszer megoldása" -UseEquationModel = "Használjon egyenleti sablont" -RequireEquation = "A bemenetnek csak egyenlet lehet" -UnrealEquation = "Irreális egyenlet" -UndefinedEquation = "Egy egyenlet meghatározatlan " -TooManyVariables = "Túl sok ismeretlen van" -NonLinearSystem = "A rendszer nem lineáris" -Solution = "Megoldás" -ApproximateSolution = "Hozzávetöleges megoldás" -SearchInterval = "Keresési intervallum" -NoSolutionSystem = "A rendszernek nincs megoldása" -NoSolutionEquation = "Az egyenletnek nincs megoldása" -NoSolutionInterval = "Nincs megoldás ebben az intervallumban" -EnterEquation = "Írjon be egy egyenletet" -InfiniteNumberOfSolutions = "Végtelen menyi megoldások léteznek" -ApproximateSolutionIntervalInstruction0 = "Irja be a keresés intervallumot" -ApproximateSolutionIntervalInstruction1 = "amelyikbe egy hozzávetöleges megoldást keressen" -OnlyFirstSolutionsDisplayed0 = "Csak a 10 elsö megoldások" -OnlyFirstSolutionsDisplayed1 = "jelennek meg" -PolynomeHasNoRealSolution0 = "A polinomnak nincs" -PolynomeHasNoRealSolution1 = "valódi gyökére" -PredefinedVariablesUsedLeft = "Alkalmazott elöre-" -PredefinedVariablesUsedRight = "meghatározott változók" -PredefinedVariablesIgnoredLeft = "Mellözött" -PredefinedVariablesIgnoredRight = "elöre-meghatározott változók" +SolverApp = "Egyenletek" +SolverAppCapital = "EGYENLETEK" +AddEquation = "Egyenlet hozzáadás" +ResolveEquation = "Egyenletet megoldása" +ResolveSystem = "Rendszer megoldása" +UseEquationModel = "Használjon egyenleti sablont" +RequireEquation = "A bemenetnek csak egyenlet lehet" +UndefinedEquation = "Egy egyenlet meghatározatlan " +UnrealEquation = "Irreális egyenlet" +TooManyVariables = "Túl sok ismeretlen van" +NonLinearSystem = "A rendszer nem lineáris" +Solution = "Megoldás" +ApproximateSolution = "Hozzávetöleges megoldás" +SearchInterval = "Keresési intervallum" +NoSolutionSystem = "A rendszernek nincs megoldása" +NoSolutionEquation = "Az egyenletnek nincs megoldása" +NoSolutionInterval = "Nincs megoldás ebben az intervallumban" +EnterEquation = "Írjon be egy egyenletet" +InfiniteNumberOfSolutions = "Végtelen menyi megoldások léteznek" +ApproximateSolutionIntervalInstruction0 = "Irja be a keresés intervallumot" +ApproximateSolutionIntervalInstruction1 = "amelyikbe egy hozzávetöleges megoldást keressen" +OnlyFirstSolutionsDisplayed0 = "Csak a 10 elsö megoldások" +OnlyFirstSolutionsDisplayed1 = "jelennek meg" +PolynomeHasNoRealSolution0 = "A polinomnak nincs" +PolynomeHasNoRealSolution1 = "valódi gyökére" +PredefinedVariablesUsedLeft = "Alkalmazott elöre-" +PredefinedVariablesUsedRight = "meghatározott változók" +PredefinedVariablesIgnoredLeft = "Mellözött" +PredefinedVariablesIgnoredRight = "elöre-meghatározott változók" diff --git a/apps/solver/base.it.i18n b/apps/solver/base.it.i18n index bf0848d14e2..871d5ff251a 100644 --- a/apps/solver/base.it.i18n +++ b/apps/solver/base.it.i18n @@ -17,8 +17,8 @@ NoSolutionEquation = "L'equazione non ammette nessuna soluzione" NoSolutionInterval = "Nessuna soluzione trovata dentro questo intervallo" EnterEquation = "Inserire un'equazione" InfiniteNumberOfSolutions = "Il sistema ammette un'infinità di soluzioni" -ApproximateSolutionIntervalInstruction0= "Inserire l'intervallo dentro al quale" -ApproximateSolutionIntervalInstruction1= "ricercare una soluzione approssimata" +ApproximateSolutionIntervalInstruction0 = "Inserire l'intervallo dentro al quale" +ApproximateSolutionIntervalInstruction1 = "ricercare una soluzione approssimata" OnlyFirstSolutionsDisplayed0 = "Solamente le prime 10" OnlyFirstSolutionsDisplayed1 = "soluzioni sono mostrate" PolynomeHasNoRealSolution0 = "Il polinomio non ammette" diff --git a/apps/solver/base.nl.i18n b/apps/solver/base.nl.i18n index b6c838f8566..bb468ed8902 100644 --- a/apps/solver/base.nl.i18n +++ b/apps/solver/base.nl.i18n @@ -5,8 +5,8 @@ ResolveEquation = "Vergelijking oplossen" ResolveSystem = "Stelsel oplossen" UseEquationModel = "Gebruik een template" RequireEquation = "De invoer moet een vergelijking zijn" -UnrealEquation = "Vergelijking is niet reëel" UndefinedEquation = "Ongedefinieerde vergelijking" +UnrealEquation = "Vergelijking is niet reëel" TooManyVariables = "Er zijn te veel onbekenden" NonLinearSystem = "Het stelsel is niet lineair" Solution = "Oplossing" @@ -17,8 +17,8 @@ NoSolutionEquation = "De vergelijking heeft geen oplossing" NoSolutionInterval = "Geen oplossing gevonden binnen het interval" EnterEquation = "Voer een vergelijking in" InfiniteNumberOfSolutions = "Er is een oneindig aantal oplossingen" -ApproximateSolutionIntervalInstruction0= "Bepaal het interval waarin" -ApproximateSolutionIntervalInstruction1= "de oplossing moet liggen" +ApproximateSolutionIntervalInstruction0 = "Bepaal het interval waarin" +ApproximateSolutionIntervalInstruction1 = "de oplossing moet liggen" OnlyFirstSolutionsDisplayed0 = "Alleen de eerste tien oplossingen" OnlyFirstSolutionsDisplayed1 = "worden weergegeven" PolynomeHasNoRealSolution0 = "De polynoom heeft geen" diff --git a/apps/solver/base.pt.i18n b/apps/solver/base.pt.i18n index e3e0c19de15..7a0cf538f62 100644 --- a/apps/solver/base.pt.i18n +++ b/apps/solver/base.pt.i18n @@ -17,8 +17,8 @@ NoSolutionEquation = "A equação não tem solução" NoSolutionInterval = "Nenhuma solução encontrada no intervalo" EnterEquation = "Digite uma equação" InfiniteNumberOfSolutions = "Existe uma infinidade de soluções" -ApproximateSolutionIntervalInstruction0= "Digite o intervalo para procurar" -ApproximateSolutionIntervalInstruction1= "uma solução aproximada" +ApproximateSolutionIntervalInstruction0 = "Digite o intervalo para procurar" +ApproximateSolutionIntervalInstruction1 = "uma solução aproximada" OnlyFirstSolutionsDisplayed0 = "Apenas as 10 primeiras" OnlyFirstSolutionsDisplayed1 = "soluções são exibidas" PolynomeHasNoRealSolution0 = "O polinómio não tem" diff --git a/apps/statistics/base.de.i18n b/apps/statistics/base.de.i18n index bb7260e8450..a1891234c5b 100644 --- a/apps/statistics/base.de.i18n +++ b/apps/statistics/base.de.i18n @@ -16,6 +16,9 @@ RectangleWidth = "Breite der Rechtecke" BarStart = "Beginn der Serie" FirstQuartile = "Unteres Quartil" Median = "Median" +GeometricMean = "Geometrisches Mittel" +HarmonicMean = "Harmonische Mittel" +StatisticsMode = "Modus " ThirdQuartile = "Oberes Quartil" TotalFrequency = "Anzahl der Elemente" Range = "Spannweite" @@ -24,6 +27,3 @@ SampleStandardDeviationS = "Standardabweichung s" SumValues = "Summe" SumSquareValues = "Quadratsumme" InterquartileRange = "Interquartilsabstand" -GeometricMean = "Geometrisches Mittel" -HarmonicMean = "Harmonische Mittel" -StatisticsMode = "Modus " diff --git a/apps/statistics/base.en.i18n b/apps/statistics/base.en.i18n index 70a86dda6b9..f1b4eb677e7 100644 --- a/apps/statistics/base.en.i18n +++ b/apps/statistics/base.en.i18n @@ -16,6 +16,9 @@ RectangleWidth = "Bin width" BarStart = "X start" FirstQuartile = "First quartile" Median = "Median" +GeometricMean = "Geometric mean" +HarmonicMean = "Harmonic Mean" +StatisticsMode = "Mode" ThirdQuartile = "Third quartile" TotalFrequency = "Number of data points" Range = "Range" @@ -24,6 +27,3 @@ SampleStandardDeviationS = "Sample std deviation s" SumValues = "Sum of values" SumSquareValues = "Sum of squared values" InterquartileRange = "Interquartile range" -GeometricMean = "Geometric mean" -HarmonicMean = "Harmonic Mean" -StatisticsMode = "Mode" diff --git a/apps/statistics/base.es.i18n b/apps/statistics/base.es.i18n index c38da099c00..442b28a39ff 100644 --- a/apps/statistics/base.es.i18n +++ b/apps/statistics/base.es.i18n @@ -16,6 +16,9 @@ RectangleWidth = "Ancho del rectangulo" BarStart = "Principio de la serie" FirstQuartile = "Primer cuartil" Median = "Mediana" +GeometricMean = "Significado geometrico" +HarmonicMean = "Significado armonico" +StatisticsMode = "Modo" ThirdQuartile = "Tercer cuartil" TotalFrequency = "Población" Range = "Rango" @@ -24,6 +27,3 @@ SampleStandardDeviationS = "Desviación típica s" SumValues = "Suma" SumSquareValues = "Suma cuadrados" InterquartileRange = "Rango intercuartilo" -GeometricMean = "Significado geometrico" -HarmonicMean = "Significado armonico" -StatisticsMode = "Modo" diff --git a/apps/statistics/base.hu.i18n b/apps/statistics/base.hu.i18n index 544a5fe11d0..ec6b1021950 100644 --- a/apps/statistics/base.hu.i18n +++ b/apps/statistics/base.hu.i18n @@ -16,6 +16,9 @@ RectangleWidth = "Tálca szélessége" BarStart = "X kezdet" FirstQuartile = "Elsö kvartilis" Median = "Medián" +GeometricMean = "Geometriai átlag" +HarmonicMean = "Harmonikus átlag" +StatisticsMode = "Mód" ThirdQuartile = "Harmadik kvartilis" TotalFrequency = "Adatpontok száma " Range = "Intervallum" @@ -24,6 +27,3 @@ SampleStandardDeviationS = "Minta std eltérés σ" SumValues = "Értékek összege" SumSquareValues = "Négyzetértékek összege" InterquartileRange = "Interkvartilis tartomány" -GeometricMean = "Geometriai átlag" -HarmonicMean = "Harmonikus átlag" -StatisticsMode = "Mód" diff --git a/apps/statistics/base.it.i18n b/apps/statistics/base.it.i18n index 5cbd3650fe9..65d4973384a 100644 --- a/apps/statistics/base.it.i18n +++ b/apps/statistics/base.it.i18n @@ -16,6 +16,9 @@ RectangleWidth = "Larghezza dei rettangoli" BarStart = "Inizio della serie" FirstQuartile = "Primo quartile" Median = "Mediana" +GeometricMean = "Media geometrica" +HarmonicMean = "Media armonica" +StatisticsMode = "Modalità" ThirdQuartile = "Terzo quartile" TotalFrequency = "Dimensione totale" Range = "Ampiezza" @@ -24,6 +27,3 @@ SampleStandardDeviationS = "Dev. std campionaria s" SumValues = "Somma" SumSquareValues = "Somma dei quadrati" InterquartileRange = "Scarto interquartile" -GeometricMean = "Media geometrica" -HarmonicMean = "Media armonica" -StatisticsMode = "Modalità" diff --git a/apps/statistics/base.nl.i18n b/apps/statistics/base.nl.i18n index 4caad6efc2a..1b960b4e7aa 100644 --- a/apps/statistics/base.nl.i18n +++ b/apps/statistics/base.nl.i18n @@ -16,6 +16,9 @@ RectangleWidth = "Kolombreedte" BarStart = "X start" FirstQuartile = "Eerste kwartiel" Median = "Mediaan" +GeometricMean = "Geometrisch gemiddelde" +HarmonicMean = "Harmonisch gemiddelde" +StatisticsMode = "Modus" ThirdQuartile = "Derde kwartiel" TotalFrequency = "Totale frequentie" Range = "Spreidingsbreedte" @@ -24,6 +27,3 @@ SampleStandardDeviationS = "Standaardafwijking s" SumValues = "Som" SumSquareValues = "Som van kwadraten" InterquartileRange = "Interkwartielafstand" -GeometricMean = "Geometrisch gemiddelde" -HarmonicMean = "Harmonisch gemiddelde" -StatisticsMode = "Modus" diff --git a/apps/statistics/base.pt.i18n b/apps/statistics/base.pt.i18n index 73e76f58c45..574522201c9 100644 --- a/apps/statistics/base.pt.i18n +++ b/apps/statistics/base.pt.i18n @@ -16,6 +16,9 @@ RectangleWidth = "Largura dos retângulos" BarStart = "Início da série" FirstQuartile = "Primeiro quartil" Median = "Mediana" +GeometricMean = "Média geométrica" +HarmonicMean = "Média Harmônica" +StatisticsMode = "Modo" ThirdQuartile = "Terceiro quartil" TotalFrequency = "Dimensão" Range = "Amplitude" @@ -24,6 +27,3 @@ SampleStandardDeviationS = "Desvio padrão amostral s" SumValues = "Somatório" SumSquareValues = "Soma dos quadrados" InterquartileRange = "Amplitude interquartil" -GeometricMean = "Média geométrica" -HarmonicMean = "Média Harmônica" -StatisticsMode = "Modo" diff --git a/apps/toolbox.de.i18n b/apps/toolbox.de.i18n index 40c021a7065..e6e38e2a4a1 100644 --- a/apps/toolbox.de.i18n +++ b/apps/toolbox.de.i18n @@ -17,13 +17,13 @@ UnitDistanceMeterMilli = "Millimeter" UnitDistanceMeterMicro = "Micrometer" UnitDistanceMeterNano = "Nanometer" UnitDistanceMeterPico = "Pikometer" +UnitDistanceInch = "Zoll" +UnitDistanceFoot = "Fuß" +UnitDistanceYard = "Yard" +UnitDistanceMile = "Meile" UnitDistanceAstronomicalUnit = "Astronomische Einheit" UnitDistanceLightYear = "Lichtjahr" UnitDistanceParsec = "Parsec" -UnitDistanceMile = "Meile" -UnitDistanceYard = "Yard" -UnitDistanceFoot = "Fuß" -UnitDistanceInch = "Zoll" UnitMassMenu = "Masse" UnitMassGramKilo = "Kilogramm" UnitMassGram = "Gramm" @@ -83,7 +83,7 @@ UnitVolumeLiterDeci = "Deziliter" UnitVolumeLiterCenti = "Centiliter" UnitVolumeLiterMilli = "Milliliter" UnitVolumeTeaspoon = "Teelöffel" -UnitVolumeTablespoon= "Esslöffel" +UnitVolumeTablespoon = "Esslöffel" UnitVolumeFluidOunce = "Flüssigunze" UnitVolumeCup = "Tasse" UnitVolumePint = "Pint" @@ -409,21 +409,16 @@ NumberElementUbn = "120 - Unbinilium (Ubn)" AlphaElementUbn = "Ubn - Unbinilium (120)" Speed = "Geschwindigkeit" SpeedOfSound = "Schallgeschwindigkeit" -SpeedOfLightTag = "Lichtgeschwindigkeit" SpeedOfSound0Tag = "Meeresspiegel, 20 ° C" SpeedOfSoundWaterTag = "In Wasser" SpeedOfSoundSteelTag = "In Stahl" SpeedOfSoundGlassTag = "In Glas" -EscapeVelocity = "Fluchtgeschwindigkeit" -EscapeVelocityFromEarth = "Von der Erde" -EscapeVelocityFromMoon = "Vom Mond" -EscapeVelocityFromSun = "Von der Sonne" +SpeedOfLightTag = "Lichtgeschwindigkeit" Thermodynamics = "Thermodynamik" BoltzmannTag = "Boltzmann Konstante" AvogadroTag = "Avogadro-Konstante" GasTag = "Gaskonstante" Electromagnetism = "Elektromagnetismus" -CoulombTag = "Coulomb-Konstante" ConductivityConstants = "Leitfähigkeitskonstanten" Electricity = "Elektrizität" ResistivityConstants = "Konstanten der Widerstandsfähigkeit" @@ -445,6 +440,11 @@ Water = "Wasser" Air = "Luft" Glass = "Glas" Wood = "Holz" +CoulombTag = "Coulomb-Konstante" +EscapeVelocity = "Fluchtgeschwindigkeit" +EscapeVelocityFromEarth = "Von der Erde" +EscapeVelocityFromMoon = "Vom Mond" +EscapeVelocityFromSun = "Von der Sonne" Vacuum_permittivityTag = "Vakuum-Durchlässigkeit" Vacuum_permeabilityTag = "Vakuumdurchlässigkeit" PlanckTag = "Planck - Konstante" diff --git a/apps/toolbox.en.i18n b/apps/toolbox.en.i18n index b3ff61e2961..2d47aafc696 100644 --- a/apps/toolbox.en.i18n +++ b/apps/toolbox.en.i18n @@ -83,7 +83,7 @@ UnitVolumeLiterDeci = "Deciliter" UnitVolumeLiterCenti = "Centiliter" UnitVolumeLiterMilli = "Milliliter" UnitVolumeTeaspoon = "Teaspoon" -UnitVolumeTablespoon= "Tablespoon" +UnitVolumeTablespoon = "Tablespoon" UnitVolumeFluidOunce = "Fluid Ounce" UnitVolumeCup = "Cup" UnitVolumePint = "Pint" @@ -413,17 +413,12 @@ SpeedOfSound0Tag = "Sea level, 20°C" SpeedOfSoundWaterTag = "In water" SpeedOfSoundSteelTag = "In steel" SpeedOfSoundGlassTag = "In glass" -EscapeVelocity = "Escape Velocity" -EscapeVelocityFromEarth = "Of Earth" -EscapeVelocityFromMoon = "Of Moon" -EscapeVelocityFromSun = "Of Sun" SpeedOfLightTag = "Speed of light" Thermodynamics = "Thermodynamics" BoltzmannTag = "Boltzmann Constant" AvogadroTag = "Avogadro Constant" GasTag = "Gas Constant" Electromagnetism = "Electromagnetism" -CoulombTag = "Coulomb Constant" ConductivityConstants = "Conductivity constants" Electricity = "Electricity" ResistivityConstants = "Resistivity Constants" @@ -445,6 +440,11 @@ Water = "Water" Air = "Air" Glass = "Glass" Wood = "Wood" +CoulombTag = "Coulomb Constant" +EscapeVelocity = "Escape Velocity" +EscapeVelocityFromEarth = "Of Earth" +EscapeVelocityFromMoon = "Of Moon" +EscapeVelocityFromSun = "Of Sun" Vacuum_permittivityTag = "Vacuum permittivity" Vacuum_permeabilityTag = "Vacuum permeability" PlanckTag = "Planck Constant" diff --git a/apps/toolbox.es.i18n b/apps/toolbox.es.i18n index f4f9a212c56..582217adeda 100644 --- a/apps/toolbox.es.i18n +++ b/apps/toolbox.es.i18n @@ -17,13 +17,13 @@ UnitDistanceMeterMilli = "Millimeter" UnitDistanceMeterMicro = "Micrometer" UnitDistanceMeterNano = "Nanometer" UnitDistanceMeterPico = "Picometer" +UnitDistanceInch = "Pulgada" +UnitDistanceFoot = "Pie" +UnitDistanceYard = "Yardas" +UnitDistanceMile = "Milla" UnitDistanceAstronomicalUnit = "Astronomical unit" UnitDistanceLightYear = "Light year" UnitDistanceParsec = "Parsec" -UnitDistanceMile = "Milla" -UnitDistanceYard = "Yardas" -UnitDistanceFoot = "Pie" -UnitDistanceInch = "Pulgada" UnitMassMenu = "Mass" UnitMassGramKilo = "Kilogram" UnitMassGram = "Gram" @@ -83,7 +83,7 @@ UnitVolumeLiterDeci = "Deciliter" UnitVolumeLiterCenti = "Centiliter" UnitVolumeLiterMilli = "Milliliter" UnitVolumeTeaspoon = "Cucharadita" -UnitVolumeTablespoon= "Cucharada" +UnitVolumeTablespoon = "Cucharada" UnitVolumeFluidOunce = "Onza líquida" UnitVolumeCup = "Taza" UnitVolumePint = "Pinta" @@ -408,22 +408,17 @@ AlphaElementUue = "Uue - Ununennio (119)" NumberElementUbn = "120 - Unbinilio (Ubn)" AlphaElementUbn = "Ubn - Unbinilio (120)" Speed = "Velocidad" -SpeedOfLightTag = "Velocidad de la luz" SpeedOfSound = "La velocidad del sonido" -Thermodynamics = "Termodinámica" SpeedOfSound0Tag = "Nivel del mar, 20 ° C" SpeedOfSoundWaterTag = "En el agua" SpeedOfSoundSteelTag = "En acero" SpeedOfSoundGlassTag = "En vidrio" -EscapeVelocity = "Velocidad de escape" -EscapeVelocityFromEarth = "De La Tierra" -EscapeVelocityFromMoon = "De la Luna" -EscapeVelocityFromSun = "De el Sol" +SpeedOfLightTag = "Velocidad de la luz" +Thermodynamics = "Termodinámica" BoltzmannTag = "Constante Boltzmann" AvogadroTag = "Constante de Avogadro" GasTag = "Constante de gas" Electromagnetism = "Electromagnetismo" -CoulombTag = "Constante de Coulomb" ConductivityConstants = "Constantes de conductividad" Electricity = "Electricidad" ResistivityConstants = "Constantes de resistividad" @@ -445,6 +440,11 @@ Water = "Agua" Air = "Aire" Glass = "Vidrio" Wood = "Madera" +CoulombTag = "Constante de Coulomb" +EscapeVelocity = "Velocidad de escape" +EscapeVelocityFromEarth = "De La Tierra" +EscapeVelocityFromMoon = "De la Luna" +EscapeVelocityFromSun = "De el Sol" Vacuum_permittivityTag = "Permisividad de vacío" Vacuum_permeabilityTag = "Permeabilidad al vacío" PlanckTag = "Constante de Planck" diff --git a/apps/toolbox.fr.i18n b/apps/toolbox.fr.i18n index 41164cd0863..02d9cb1a2f0 100644 --- a/apps/toolbox.fr.i18n +++ b/apps/toolbox.fr.i18n @@ -87,7 +87,7 @@ UnitVolumeLiterDeci = "Décilitre" UnitVolumeLiterCenti = "Centilitre" UnitVolumeLiterMilli = "Millilitre" UnitVolumeTeaspoon = "Cuillère à café" -UnitVolumeTablespoon= "Cuillère à soupe" +UnitVolumeTablespoon = "Cuillère à soupe" UnitVolumeFluidOunce = "Once fluide" UnitVolumeCup = "Tasse" UnitVolumePint = "Pinte" diff --git a/apps/toolbox.hu.i18n b/apps/toolbox.hu.i18n index 79d22308ab3..4150d8ee1a9 100644 --- a/apps/toolbox.hu.i18n +++ b/apps/toolbox.hu.i18n @@ -24,16 +24,16 @@ UnitDistanceMile = "Mérföld" UnitDistanceAstronomicalUnit = "Csillagászati egység" UnitDistanceLightYear = "Fény év" UnitDistanceParsec = "Parsec" -UnitMassShortTon = "Rövid tonna" -UnitMassLongTon = "Hosszú tonna" -UnitMassPound = "Font" -UnitMassOunce = "Uncia" UnitMassMenu = "Tömeg" UnitMassGramKilo = "Kilogramm" UnitMassGram = "Gramm" UnitMassGramMilli = "Milligramm" UnitMassGramMicro = "Mikrogramm" UnitMassTonne = "Tonna" +UnitMassOunce = "Uncia" +UnitMassPound = "Font" +UnitMassShortTon = "Rövid tonna" +UnitMassLongTon = "Hosszú tonna" UnitCurrentMenu = "Áram" UnitCurrentAmpere = "Amper" UnitCurrentAmpereMilli = "Milliamper" @@ -155,11 +155,11 @@ RandomInteger = "Véletlen egész szám [a, b] -ben" PrimeFactorDecomposition = "Egész szám tényezö" NormCDF = "P (X dict[str, str]: + """Generate the locale's files. + + Args: + language (str): The language. + data (list): The i18n data. + + Returns: + list: The locale's files. + """ + # Log the generation + logging.debug("Generating locale's files for %s", language) + # Generate the locale's files + keys: dict[str, list[Key]] = {} + # Get the keys by file, to handle bad sorting + for key in data: + # Get the file + file = key.file + # Add the file to the list + if file not in keys: + keys[file] = [] + # Add the key + keys[file].append(key) + # Return the files + return { + file: + self.generate_file(language, file, keys) + for file, keys in keys.items() + } + + def generate_file(self, language: str, file: str, data: list[Key]) -> str: + """Generate the locale's file. + + Args: + language (str): The language. + file (str): The file. + data (list): The i18n data. + + Returns: + str: The locale's file. + """ + # Log the generation + logging.debug("Generating locale's file for %s in %s", language, file) + # Generate the locale's file + file_data = "" + # Iterate over the keys + for key in data: + # Check if the line is active + if not key.is_active: + file_data += f"{key.line}\n" + continue + # Else, generate the line + file_data += f"{key.key} = \"{key.value}\"\n" + print(file_data) + # Return the file + return file_data + + def write_locale_files(self, files: dict[str, str]) -> None: + """Write the locale's files. + + Args: + files (dict): The locale's files. + """ + # Log the writing + logging.info("Writing locale's files") + # Iterate over the files + for file, content in files.items(): + # Write the file + self.write_file(file, content) + + def write_file(self, file: str, content: str) -> None: + """Write the file. + + Args: + file (str): The file. + content (str): The content. + """ + # Log the writing + logging.debug("Writing file %s", file) + # Write the file + with open(file, "w", encoding=self.encoding) as file_handle: + # Write the content + file_handle.write(content) + + +def main(): + """Run the tests.""" + # Setup the logging + logging.basicConfig(level=logging.DEBUG) + # Load the i18n files + i18n = I18nData() + # Print a part of the i18n data (the 10th key of each language) + print("Part of the i18n data before sorting:") + for language, keys in i18n.data.items(): + print("\t", language, keys[10].key, keys[10].value) + # Sort the i18n data + i18n.sort_i18n_data("fr") + # Print a part of the i18n data (the 10th key of each language), each key name should be the same + last_key: str = "" + first_key: bool = True + print("Part of the i18n data after sorting:") + for language, keys in i18n.data.items(): + print("\t", language, keys[10].key, keys[10].value) + # Ignore universal + if language == "universal": + continue + if not first_key: + assert last_key == keys[10].key + last_key = keys[10].key + first_key = False + # TODO: Assert that keys are sorted by files + # Write the i18n data + i18n.write_data() + + +if __name__ == "__main__": + main() diff --git a/build/utilities/translate.py b/build/utilities/translate.py index 1bfc533e62b..4ff87ebef9d 100755 --- a/build/utilities/translate.py +++ b/build/utilities/translate.py @@ -218,7 +218,7 @@ def list_keys(i18n_files: Dict[str, List[str]]) -> Dict[str, List[List[str]]]: i18n_files (Dict[str, List[str]]): I18n files list Returns: - Dict[str, List[str]]: The dictionnary of keys in the i18n files by + Dict[str, List[str]]: The dictionary of keys in the i18n files by locale. """ From ef63623ca0f9ef247f88ea2ddfe558b05a941631 Mon Sep 17 00:00:00 2001 From: Yaya-Cout Date: Wed, 6 Jul 2022 11:13:43 +0200 Subject: [PATCH 2/5] [utilities/I18n-Lib] Fix somes bugs --- build/utilities/i18n_lib.py | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/build/utilities/i18n_lib.py b/build/utilities/i18n_lib.py index de5c10d89fb..d77a8539a52 100755 --- a/build/utilities/i18n_lib.py +++ b/build/utilities/i18n_lib.py @@ -19,7 +19,7 @@ def __init__(self, line: str, filename: str): self.line: str = line self.file: str = filename self.is_active: bool = True - self.valid: bool = True + self.is_valid: bool = True # Set the key and value as empty to avoid errors self.key = self.line self.value = '' @@ -39,12 +39,12 @@ def parse_line(self): # Handle empty lines if self.line.strip() == '': self.is_active = False - self.valid = False + self.is_valid = False return # Handle lines with only a key if '=' not in self.line: self.is_active = False - self.valid = False + self.is_valid = False return # Split the line line_split = self.line.split('=') @@ -214,11 +214,11 @@ def write_data(self) -> None: for language, data in self.data.items(): # Generate locale's files files: dict[str, str] = self.generate_locale_files(language, data) - print(files) # Write the files self.write_locale_files(files) - def generate_locale_files(self, language: str, data: list[Key]) -> dict[str, str]: + def generate_locale_files(self, language: str, data: list[Key]) ->\ + dict[str, str]: """Generate the locale's files. Args: @@ -271,7 +271,6 @@ def generate_file(self, language: str, file: str, data: list[Key]) -> str: continue # Else, generate the line file_data += f"{key.key} = \"{key.value}\"\n" - print(file_data) # Return the file return file_data @@ -299,8 +298,9 @@ def write_file(self, file: str, content: str) -> None: logging.debug("Writing file %s", file) # Write the file with open(file, "w", encoding=self.encoding) as file_handle: - # Write the content - file_handle.write(content) + # Write the content if not in dry run + if not self.dry_run: + file_handle.write(content) def main(): @@ -315,7 +315,8 @@ def main(): print("\t", language, keys[10].key, keys[10].value) # Sort the i18n data i18n.sort_i18n_data("fr") - # Print a part of the i18n data (the 10th key of each language), each key name should be the same + # Print a part of the i18n data (the 10th key of each language), + # each key name should be the same last_key: str = "" first_key: bool = True print("Part of the i18n data after sorting:") From f8bc15d28ead11b6cdf5654390fd371a34fd2843 Mon Sep 17 00:00:00 2001 From: Yaya-Cout Date: Wed, 6 Jul 2022 15:29:31 +0200 Subject: [PATCH 3/5] [utilities/I18n-Lib] Improve editing --- build/utilities/i18n_lib.py | 514 ++++++++++++++++++++++++++++++++---- 1 file changed, 468 insertions(+), 46 deletions(-) diff --git a/build/utilities/i18n_lib.py b/build/utilities/i18n_lib.py index d77a8539a52..f83add941e3 100755 --- a/build/utilities/i18n_lib.py +++ b/build/utilities/i18n_lib.py @@ -3,6 +3,8 @@ # Base imports import os import logging +import contextlib +import copy class Key: @@ -66,20 +68,37 @@ def remove_spaces(self): # Remove space at the end of the line self.line = self.line.rstrip() + def get_filename(self, locale=""): + """Get the filename of the key. + + Args: + locale (str): The locale to use. + """ + # Get the filename + filename = self.file + # If the locale is empty, return the filename + if locale == "": + return filename + # If the locale is not empty, update the filename with the locale + filename = filename.replace(f".{self.language}", f".{locale}") + return filename + class I18nData: """Class to interact with the i18n files easily.""" - def __init__(self, base_path=".", recursive=True, dry_run=False): + def __init__(self, base_path=".", dry_run=False, ignore_universal=False, + base_locale="fr"): """Initialise the class. Args: base_path (str, optional): The base path to search i18n files. Defaults to ".". - recursive (bool, optional): Weather to search i18n files - recursively. Defaults to True. dry_run (bool, optional): Weather to skip the writing of the files. Defaults to False. + ignore_universal (bool, optional): Weather to ignore the universal + keys. Defaults to False. + base_locale (str, optional): The base locale. Defaults to "en". """ # Log the initialisation logging.info("Initialising i18n data") @@ -87,27 +106,45 @@ def __init__(self, base_path=".", recursive=True, dry_run=False): self.data = {} self.encoding = "utf-8" # Log the settings - logging.info("Settings:") - logging.info(" Base path: %s", base_path) - logging.info(" Recursive: %s", recursive) - logging.info(" Dry run: %s", dry_run) + logging.debug("Settings:") + logging.debug(" Base path: %s", base_path) + logging.debug(" Dry run: %s", dry_run) + logging.debug(" Ignore universal: %s", ignore_universal) + logging.debug(" Base locale: %s", base_locale) # Save the settings self.base_path = base_path - self.recursive = recursive self.dry_run = dry_run + self.ignore_universal = ignore_universal + self.base_locale = base_locale # Load the i18n files self.load_i18n() + # Sort the i18n data + self.sort_i18n_data(self.base_locale) def load_i18n(self): """Load the i18n files.""" # Log the loading - logging.info("Loading i18n files") + logging.debug("Loading i18n files") # Clear the current data self.data = {} # Get the i18n files i18n_files = self.get_i18n_files() # Sort the i18n files self.data = self.sort_i18n_files(i18n_files) + # Remove the universal keys if needed + if self.ignore_universal: + self.remove_locale("universal") + + def remove_locale(self, locale: str): + """Remove the locale. + + Args: + locale (str): The locale to remove. + """ + # Log the removal + logging.info("Removing locale %s", locale) + # Remove the locale + self.data.pop(locale, None) def get_i18n_files(self) -> list[str]: """Get the i18n files. @@ -116,7 +153,7 @@ def get_i18n_files(self) -> list[str]: list: The i18n files. """ # Log the loading - logging.info("Getting i18n files") + logging.debug("Getting i18n files") # Get the i18n files i18n_files: list[str] = [] # Get the i18n files @@ -140,7 +177,7 @@ def sort_i18n_files(self, i18n_files: list) -> dict[str, list[Key]]: dict: The i18n files sorted by language. """ # Log the loading - logging.info("Sorting i18n files") + logging.debug("Sorting i18n files") # Sort the i18n files i18n_files_language: dict[str, list[Key]] = {} # Sort the i18n files @@ -181,7 +218,7 @@ def get_i18n_data(self, i18n_file: str) -> list[Key]: # Return the i18n data return i18n_data - def sort_i18n_data(self, original_order: str) -> None: + def sort_i18n_data(self, original_order="") -> None: """Sort the i18n data. Args: @@ -191,7 +228,10 @@ def sort_i18n_data(self, original_order: str) -> None: Sorting is done by copying the order of the original locale. """ # Log the sorting - logging.info("Sorting i18n data") + logging.debug("Sorting i18n data") + # If the original order is empty, use the base locale + if original_order == "": + original_order = self.base_locale # Extract the original order original_order_data = self.data[original_order] # Extract the keys names from the original order @@ -202,7 +242,11 @@ def sort_i18n_data(self, original_order: str) -> None: if language in [original_order, "universal"]: continue # Sort the data - data.sort(key=lambda key: original_order_keys.index(key.key)) + try: + data.sort(key=lambda key: original_order_keys.index(key.key)) + except ValueError: + logging.warning("Could not sort the i18n data for %s", + language) # Update the data self.data[language] = data @@ -210,6 +254,12 @@ def write_data(self) -> None: """Save the i18n data to the disk.""" # Log the writing logging.info("Writing i18n data") + # Get if dry run is enabled + if self.dry_run: + # Log the dry run + logging.info("Dry run enabled, files will be only generated") + # Sort the i18n data + self.sort_i18n_data(self.base_locale) # Iterate over the languages for language, data in self.data.items(): # Generate locale's files @@ -281,7 +331,7 @@ def write_locale_files(self, files: dict[str, str]) -> None: files (dict): The locale's files. """ # Log the writing - logging.info("Writing locale's files") + logging.debug("Writing locale's files") # Iterate over the files for file, content in files.items(): # Write the file @@ -296,42 +346,414 @@ def write_file(self, file: str, content: str) -> None: """ # Log the writing logging.debug("Writing file %s", file) - # Write the file - with open(file, "w", encoding=self.encoding) as file_handle: - # Write the content if not in dry run - if not self.dry_run: + # Write the file if not in dry run + if not self.dry_run: + with open(file, "w", encoding=self.encoding) as file_handle: file_handle.write(content) + def get_languages(self) -> list[str]: + """Get the languages. + + Returns: + list: The languages. + """ + # Log the loading + logging.info("Getting languages") + # Get the languages + return [language for language, data in self.data.items()] + + def get_keys(self, locale="all") -> list[Key]: + """Get the keys. + + Args: + locale (str): The locale. Defaults to all. + + Returns: + list: The keys. + """ + # Log the loading + logging.debug("Getting all keys") + # Get the keys + keys = [] + # Iterate over the languages if all + if locale == "all": + for _, data in self.data.items(): + # Add the keys + keys.extend(data) + # Else, get the keys for the locale + else: + # Get the keys + keys = self.data[locale] + # Return the keys + return keys + + def get_keys_names(self, locale="all") -> list[str]: + """Get the keys names. + + Args: + locale (str): The locale. Defaults to all. + + Returns: + list: The keys names. + """ + # Log the loading + logging.debug("Getting keys names") + # Get the keys names + keys_names = [key.key for key in self.get_keys(locale=locale)] + # Remove the duplicates + return list(set(keys_names)) + + def get_key(self, key: str, locale: str) -> Key: + """Get the key. + + Args: + key (str): The key. + locale (str): The locale. + + Returns: + Key: The key. + """ + # Log the loading + logging.debug("Getting key %s in %s", key, locale) + # Print all the keys in the locale + for key_iter in self.get_keys(locale=locale): + # Check if the key is the same + if key_iter.key == key: + # Return the key + return key_iter + # Raise an error if the key is not found + raise KeyError(f"Key {key} not found in {locale}") + + def get_key_index(self, key: str, locale="all") -> int: + """Get the key index. + + Args: + key (str): The key. + locale (str): The locale. Defaults to all. + + Returns: + int: The key index. + """ + # Log the loading + logging.debug("Getting key index for %s in %s", key, locale) + # Get the key index + key_index = -1 + # Iterate over the languages if all + if locale == "all": + for _, data in self.data.items(): + # Try to get the key index + with contextlib.suppress(KeyError): + # Get the key index + key_index = data.index(self.get_key(key, locale=_)) + # Break the loop + break + else: + # Get the key index + key_index = self.data[locale].index(self.get_key(key, locale)) + # Raise an error if the key is not found + if key_index == -1: + raise KeyError(f"Key {key} not found in {locale}") + # Return the key index + return key_index + + def get_value(self, key: str, locale: str) -> str: + """Get the value. + + Args: + key (str): The key. + locale (str): The locale. + + Returns: + str: The value. + """ + # Log the loading + logging.info("Getting value for %s in %s", key, locale) + # Get the value + return self.get_key(key, locale).value + + def set_value(self, key: str, locale: str, value: str) -> None: + """Set the value. + + Args: + key (str): The key. + locale (str): The locale. + value (str): The value. + """ + # Log the setting + logging.info("Setting value for %s in %s to %s", key, locale, value) + # Set the value + self.get_key(key, locale).value = value + + def remove_key(self, key: str, locale_origin="all") -> None: + """Remove the key. + + Args: + key (str): The key. + locale (str): The locale. Defaults to all. + """ + # Log the removing + logging.info("Removing key %s in %s", key, locale_origin) + # If the locale is all, remove the key from all locales + if locale_origin == "all": + # Iterate over the locales + for locale in self.data: + # Remove the key + self.remove_key(key, locale) + # Return + return + # Else, remove the key from the locale + self.data[locale_origin].pop(self.get_key_index(key, locale_origin)) + + def key_exists(self, key: str, locale: str) -> bool: + """Check if the key exists. + + Args: + key (str): The key. + locale (str): The locale. + + Returns: + bool: True if the key exists, False otherwise. + """ + # Log the checking + logging.debug("Checking if key %s in %s exists", key, locale) + # Check if the key exists + try: + # Get the key + self.get_key(key, locale) + # Return true + return True + # Else, return false + except KeyError: + return False + + def get_missing_keys(self) -> dict[str, list[str]]: + """Get the missing keys by comparing with other locales. + + Returns: + dict: The missing keys as a dict with the locale as key and the + missing keys in a list as value. + """ + # Log the loading + logging.info("Getting missing keys") + # Backup the data + data_backup = self.data + # Remove the universal locale + self.remove_locale("universal") + # Initialize the missing keys + missing_keys: dict[str, list[str]] = {} + # Get the keys names list + keys_names = self.get_keys_names() + # Iterate over the locales + for locale in self.data: + # Get the keys names + keys_names_locale = self.get_keys_names(locale) + # Get the missing keys + missing_keys[locale] = [ + key for key in keys_names if key not in keys_names_locale + ] + # Restore the data + self.data = data_backup + # Return the missing keys + return missing_keys + + def add_key(self, key: str, value: str, locale: str, filename=None) \ + -> None: + """Add the key. + + Args: + key (str): The key. + locale (str): The locale. + value (str): The value. + """ + # Log the adding + logging.info("Adding key %s in %s with value %s", key, locale, value) + # Get if filename is given + if filename: + # Create the key + key_obj = Key("", "") + # Set the key + key_obj.key = key + # Set the value + key_obj.value = value + # Set the filename + key_obj.key = filename + # Set the locale + key_obj.language = locale + else: + # Get the key index + key_index = self.get_key_index(key, "all") + # If the key doesn't exist, crash, because we can't guess the + # filename + if key_index == -1: + raise ValueError("Key doesn't exist and no file were given") + # Get the key + key_obj_original = self.get_key(key, "all") + # Copy the key; we don't want to modify the original key + key_obj = copy.copy(key_obj_original) + # Set the value + key_obj.value = value + # Update the filename to match the locale + key_obj.file = key_obj.get_filename(locale) + # Set the key as valid and active + key_obj.is_valid = True + key_obj.is_active = True + # Add the key + self.data[locale].append(key_obj) + + +class Tests: + """Tests.""" + + def test_rw(self): + """Test the reading and writing.""" + # Load the i18n files + i18n = I18nData() + # Read the i18n raw data + for language, keys in i18n.data.items(): + # Iterate over the keys + for key in keys: + # Get the value + value = key.value + # Get the key name + key_name = key.key + # Get the locale + locale = key.language + # Sort the i18n data + i18n.sort_i18n_data() + # Read a part of the i18n data (the 10th key of each language), + # each key name should be the same + last_key: str = "" + first_key: bool = True + for language, keys in i18n.data.items(): + # Ignore universal + if language == "universal": + continue + if not first_key: + assert last_key == keys[10].key + last_key = keys[10].key + first_key = False + # Write the i18n data + i18n.write_data() + + def test_rw_dry_run(self): + """Test the reading and writing in dry run.""" + # Load the i18n files + i18n = I18nData(dry_run=True) + # Remove some keys + i18n.remove_key("SettingsApp", "fr") + # Assert that the key is not in the data + assert not i18n.key_exists("SettingsApp", "fr") + # Write the i18n data + i18n.write_data() + # Reload the i18n data + i18n = I18nData() + # Check that the key is in the i18n data + assert i18n.key_exists("SettingsApp", "fr") + + def test_languages(self): + """Test the languages.""" + # Load the i18n files + i18n = I18nData() + # Get the languages + languages = i18n.get_languages() + # Log the languages + logging.info("Languages: %s", languages) + # Check that the languages are correct + assert "universal" in languages + assert "fr" in languages + # Remove the universal language + languages.remove("universal") + # Check that the languages are correct + assert "universal" not in languages + assert "fr" in languages + + def test_keys_edit(self): + """Test the keys edition.""" + # Load the i18n files + i18n = I18nData(dry_run=True, ignore_universal=True) + # Get the keys + keys = i18n.get_keys() + # Read the keys + for key in keys: + # Get the value + value = key.value + # Get the key name + key_name = key.key + # Get the locale + # Get the keys names + keys_names = i18n.get_keys_names() + # Read keys names + for key_name in keys_names[:5]: + # Get the key + key = i18n.get_key(key_name, "fr") + # Get the value + value = key.value + # Get the key name + key_name = key.key + # Get the locale + locale = key.language + # Make the linter quiet about the unused variables + assert value + assert key_name + assert locale + # Assert that there is no duplicate key names + assert len(keys_names) == len(set(keys_names)) + # Get a key + key = i18n.get_key("SettingsApp", "fr") + # Read the key + key_name = key.key + value = key.value + # Get a value + value = i18n.get_value("SettingsApp", "fr") + # Set a value + i18n.set_value("SettingsApp", "fr", "Test") + # Get the value + value = i18n.get_value("SettingsApp", "fr") + # Assert that the value is correct + assert value == "Test" + # # Write the i18n data + i18n.write_data() + + def test_keys_add_remove(self): + """Test the keys addition and deletion.""" + # Load the i18n files + i18n = I18nData(dry_run=True) + # Remove a key + i18n.remove_key("SettingsApp", "fr") + # Assert that the key does not exist + assert not i18n.key_exists("SettingsApp", "fr") + # Add a key + i18n.add_key("SettingsApp", "Test", "fr") + # Assert that the key is in the i18n data + assert i18n.key_exists("SettingsApp", "fr") + # Write the i18n data + i18n.write_data() + + def test_missing_keys(self): + """Test the missing keys.""" + # Load the i18n files + i18n = I18nData() + # Get the missing keys + missing_keys = i18n.get_missing_keys() + # Log the missing keys + logging.info("Missing keys: %s", missing_keys) + def main(): """Run the tests.""" - # Setup the logging - logging.basicConfig(level=logging.DEBUG) - # Load the i18n files - i18n = I18nData() - # Print a part of the i18n data (the 10th key of each language) - print("Part of the i18n data before sorting:") - for language, keys in i18n.data.items(): - print("\t", language, keys[10].key, keys[10].value) - # Sort the i18n data - i18n.sort_i18n_data("fr") - # Print a part of the i18n data (the 10th key of each language), - # each key name should be the same - last_key: str = "" - first_key: bool = True - print("Part of the i18n data after sorting:") - for language, keys in i18n.data.items(): - print("\t", language, keys[10].key, keys[10].value) - # Ignore universal - if language == "universal": - continue - if not first_key: - assert last_key == keys[10].key - last_key = keys[10].key - first_key = False - # TODO: Assert that keys are sorted by files - # Write the i18n data - i18n.write_data() + # Initialise the logger + logging.basicConfig( + level=logging.INFO, + format='%(asctime)s - %(name)s - %(levelname)s - %(message)s' + ) + # Run the tests + test_instance = Tests() + test_instance.test_rw() + test_instance.test_rw_dry_run() + test_instance.test_languages() + test_instance.test_keys_edit() + test_instance.test_keys_add_remove() + test_instance.test_missing_keys() if __name__ == "__main__": From f6092a9975da33d6204de218d5dd1b3c18ab8eb5 Mon Sep 17 00:00:00 2001 From: Yaya-Cout Date: Wed, 6 Jul 2022 16:01:03 +0200 Subject: [PATCH 4/5] [utilities/translate] Rewrite using I18n lib --- build/utilities/i18n_lib.py | 32 +++++++++++++++++++++++++++----- 1 file changed, 27 insertions(+), 5 deletions(-) diff --git a/build/utilities/i18n_lib.py b/build/utilities/i18n_lib.py index f83add941e3..a0ef1f00bc3 100755 --- a/build/utilities/i18n_lib.py +++ b/build/utilities/i18n_lib.py @@ -346,6 +346,16 @@ def write_file(self, file: str, content: str) -> None: """ # Log the writing logging.debug("Writing file %s", file) + # Get the actual file + with open(file, "r", encoding=self.encoding) as file_handle: + # Get the file content + file_content = file_handle.read() + # Check if the file content is different + if file_content == content: + # Log the file is up to date + logging.debug("File %s is up to date", file) + # Return + return # Write the file if not in dry run if not self.dry_run: with open(file, "w", encoding=self.encoding) as file_handle: @@ -403,7 +413,7 @@ def get_keys_names(self, locale="all") -> list[str]: # Remove the duplicates return list(set(keys_names)) - def get_key(self, key: str, locale: str) -> Key: + def get_key(self, key_name: str, locale: str) -> Key: """Get the key. Args: @@ -414,15 +424,27 @@ def get_key(self, key: str, locale: str) -> Key: Key: The key. """ # Log the loading - logging.debug("Getting key %s in %s", key, locale) + logging.debug("Getting key %s in %s", key_name, locale) + # If locale is all, return the first match + if locale == "all": + # Iterate over the languages + for language, _ in self.data.items(): + # Try to get the key + try: + # Return the key if found + return self.get_key(key_name, language) + except KeyError: + continue + # If no key was found, raise an error + raise KeyError(f"Key {key_name} not found in any language") # Print all the keys in the locale for key_iter in self.get_keys(locale=locale): # Check if the key is the same - if key_iter.key == key: + if key_iter.key == key_name: # Return the key return key_iter # Raise an error if the key is not found - raise KeyError(f"Key {key} not found in {locale}") + raise KeyError(f"Key {key_name} not found in {locale}") def get_key_index(self, key: str, locale="all") -> int: """Get the key index. @@ -744,7 +766,7 @@ def main(): # Initialise the logger logging.basicConfig( level=logging.INFO, - format='%(asctime)s - %(name)s - %(levelname)s - %(message)s' + format='%(asctime)s - %(levelname)s - %(message)s' ) # Run the tests test_instance = Tests() From 97deac090d841aa798b80e63e8bd6c8a6951a49e Mon Sep 17 00:00:00 2001 From: Yaya-Cout Date: Wed, 6 Jul 2022 16:15:16 +0200 Subject: [PATCH 5/5] Push the translate script --- build/utilities/i18n_lib.py | 20 +- build/utilities/translate-old.py | 436 ++++++++++++++++++++++++++++++ build/utilities/translate.py | 441 +++---------------------------- 3 files changed, 484 insertions(+), 413 deletions(-) create mode 100755 build/utilities/translate-old.py diff --git a/build/utilities/i18n_lib.py b/build/utilities/i18n_lib.py index a0ef1f00bc3..49af502fa07 100755 --- a/build/utilities/i18n_lib.py +++ b/build/utilities/i18n_lib.py @@ -1,10 +1,10 @@ #!/usr/bin/env python3 """Module to interact with the i18n files easily.""" # Base imports -import os -import logging import contextlib import copy +import logging +import os class Key: @@ -21,7 +21,6 @@ def __init__(self, line: str, filename: str): self.line: str = line self.file: str = filename self.is_active: bool = True - self.is_valid: bool = True # Set the key and value as empty to avoid errors self.key = self.line self.value = '' @@ -41,12 +40,10 @@ def parse_line(self): # Handle empty lines if self.line.strip() == '': self.is_active = False - self.is_valid = False return # Handle lines with only a key if '=' not in self.line: self.is_active = False - self.is_valid = False return # Split the line line_split = self.line.split('=') @@ -616,8 +613,7 @@ def add_key(self, key: str, value: str, locale: str, filename=None) \ key_obj.value = value # Update the filename to match the locale key_obj.file = key_obj.get_filename(locale) - # Set the key as valid and active - key_obj.is_valid = True + # Set the key as active key_obj.is_active = True # Add the key self.data[locale].append(key_obj) @@ -632,14 +628,8 @@ def test_rw(self): i18n = I18nData() # Read the i18n raw data for language, keys in i18n.data.items(): - # Iterate over the keys - for key in keys: - # Get the value - value = key.value - # Get the key name - key_name = key.key - # Get the locale - locale = key.language + # Do nothing because we just want to test the format of the data + pass # Sort the i18n data i18n.sort_i18n_data() # Read a part of the i18n data (the 10th key of each language), diff --git a/build/utilities/translate-old.py b/build/utilities/translate-old.py new file mode 100755 index 00000000000..4ff87ebef9d --- /dev/null +++ b/build/utilities/translate-old.py @@ -0,0 +1,436 @@ +#!/usr/bin/env python3 +"""Generate missing translations for i18n files.""" +# Build-in library imports +import os +import re +import sys +import argparse +from typing import Dict, List +# Deep translator import +try: + from deep_translator import GoogleTranslator +except ModuleNotFoundError: + print('Module deep_translator not found. Please install it with ', + '"pip3 install deep_translator"') + sys.exit(1) + + +# Initialize the parser +parser = argparse.ArgumentParser(description='Generate missing translations' + + ' for i18n files', epilog='You can execute' + + ' this script without arguments') +# Add arguments to the parser +parser.add_argument("--default-input-language", default="en", + help="The language code of the input language") +parser.add_argument("--base-path", default=".", + help="The base path of the i18n files") +parser.add_argument("--no-recursive", default=False, action="store_true", + help="Disable finding the i18n files recursively") +parser.add_argument("--dry-run", default=False, action="store_true", + help="Disable saving the i18n files") +# Parse command line arguments +args = parser.parse_args() + +# Save the user language into the global variable +DEFAULT_INPUT_LANGUAGE = args.default_input_language +# Save the base path into the global variable +BASE_PATH = args.base_path +# Save if i18n files can be found recursively +FIND_RECURSIVE = not args.no_recursive +# Save if dryrun is enabled +DRYRUN = args.dry_run + + +def translate(text: str, output_language: str, input_language: str = 'auto')\ + -> str: + """Translate the given text. + + Args: + text (str): The text to translate + output_language (str): The output language + input_language (str): The input language + + Returns: + str: The translated text + + """ + # Ensure of the text exists (not empty) + if not text: + return "" + # Initialize the translator + translator = GoogleTranslator(source=input_language, + target=output_language) + # Translate and return the translated text + return translator.translate(text) + + +def get_all_files_in_directory(directory: str) -> List[str]: + """Get all files in the given directory recursively. + + Args: + directory (str): The directory + + Returns: + Liststr]: The list of files in the directory + + """ + # Initialize the list of files + files = [] + # Iterate over all files in the directory + for i in os.listdir(directory): + # Add the current directory to the file name + i = directory + '/' + i + # If the file is a directory + if FIND_RECURSIVE and os.path.isdir(i): + # Iter the directory and add the files to the list + files.extend(get_all_files_in_directory(i)) + # Else the file is a file + else: + # Add the file to the list + files.append(i) + # Return the list of files + return files + + +def get_i18n_files(directory: str = '.') -> Dict[str, List[str]]: + """Get the list of i18n files in the given directory. + + Args: + directory (str, optional): The directory to find the i18n files. + Defaults to '.'. + + Returns: + Dict[List[str]]: The list of i18n files in a dictionary of languages. + + """ + # Get all files in the directory recursively + files = get_all_files_in_directory(directory) + # Initialize the dictionary + i18n_files_language: Dict[str, List[str]] = {} + # Iterate over all files in the directory + for i in files: + # If the file is an i18n file + if ".i18n" in i: + # Get the language of the file + file_language = i.split('.')[-2] + # If the dictionary already contains the language + if file_language in i18n_files_language: + # Append the file to the dictionary + i18n_files_language[file_language].append(i) + # Else add the language to the dictionary + else: + # Add the file to the dictionary + i18n_files_language[file_language] = [i] + # Return the dictionary + return i18n_files_language + + +def need_to_be_translated(keys: Dict[str, List[List[str]]])\ + -> Dict[str, List[List[str]]]: + """Return the key that needs to be translated by locale. + + Args: + keys (Dict[str, List[str]]): The keys of the i18n files + + Returns: + Dict[str, List[str]]: The keys that needs to be translated, + sorted by locale + + """ + # Initialize the list of keys + keys_list: List[List[str]] = [] + keys_to_translate: Dict[str, List[List[str]]] = {} + # Iterate over all locales + for value_ in keys.values(): + # Iterate on keys of the locale + for key in value_: + # Skip if the key is already in the list + if key[0] in keys_list: + continue + # Else add the key to the list + keys_list.append(key) + for locale, value in keys.items(): + # Initialize the list of keys in the locale + keys_in_locale: List[str] = [i[0] for i in value] + # Get the keys of keys that need to be translated + keys_to_translate_in_locale: List[List[str]] = [ + key for key in keys_list if key[0] not in keys_in_locale + ] + # Remove duplicates from the list + # Initialize the deduplicated list + keys_to_translate_in_locale_deduplicated: List[List[str]] = [] + # Iterate over the duplicated list + for item in keys_to_translate_in_locale: + # If the key is not in the deduplicated list, add it + if item not in keys_to_translate_in_locale_deduplicated: + keys_to_translate_in_locale_deduplicated.append(item) + # Else, ignore the key, because it is already in the list + # Save the deduplicated list into the dictionary + keys_to_translate[locale] = keys_to_translate_in_locale_deduplicated + return keys_to_translate + + +def get_keys_in_file(filename: str) -> List[List[str]]: + """Return a list of keys in the file. + + Args: + filename (str): The name of the file to read + + Returns: + List[str]: The keys in the file + + """ + # Initialize the list of keys in the file + keys = [] + # Open the file read only + with open(filename, 'r', encoding='utf-8') as file_read: + # Read the content of the file line by line + for line in file_read.readlines(): + # Ignore commented lines + if re.match(r"^#(.*)$", line): + continue + # Ignore lines without = + if '=' not in line: + continue + # Get the key by spliting the line by = + key = line.split("=")[0] + # Remove spaces from the start of the key + while key[0] == " ": + key = key[1:] + # Remove spaces from the end of the key + while key[-1] == " ": + key = key[:-1] + # Get generic filename into a list separated by dots + generic_filename_list = filename.split(".")[:-2] + # Get the filename as string with a trailing dot at the end + generic_filename = "".join(i + "." for i in generic_filename_list) + # Remove trailing dot from the end of the generic filename + generic_filename = generic_filename[:-1] + # Add the key and the generic filename to the list of keys + keys.append([key, generic_filename]) + return keys + + +def list_keys(i18n_files: Dict[str, List[str]]) -> Dict[str, List[List[str]]]: + """List all keys in the i18n files. + + Args: + i18n_files (Dict[str, List[str]]): I18n files list + + Returns: + Dict[str, List[str]]: The dictionary of keys in the i18n files by + locale. + + """ + # Initialize the list of keys in the i18n files + keys_dict: Dict[str, List[List[str]]] = {} + # Iterate on the locales + for locale in i18n_files: + # Initialize the dictionary for the locale + keys_dict[locale] = [] + # Iterate on the locale's files + for actual_file in i18n_files[locale]: + # Get the keys in the file and add them to the list + keys_dict[locale].extend(get_keys_in_file(actual_file)) + # Return the dictionary of keys in the i18n files sorted by locale + return keys_dict + + +def get_value_from_key(key_to_find: str, filename_generic: str, locale: str)\ + -> str: + """Get the value of a key in the i18n files from the given locale. + + Args: + key (str): The key to fetch the value + filename_generic (str): The path to the file where the value will be + fetched + locale (str): The locale from the value will be retrieved + + Returns: + str: The value of the key from the given file + + """ + # Get the filename from the generic filename + file_path = filename_generic + '.' + locale + '.i18n' + # Exit if the file does not exist + if not os.path.exists(file_path): + return "" + # Open the file for reading + with open(file_path, 'r', encoding='utf-8') as file_read: + # Read the file line by line + for line in file_read.readlines(): + # Ignore commented lines + if re.match(r"^#(.*)$", line): + continue + # Ignore lines without = + if '=' not in line: + continue + # Get the key and value by spliting the line by = + key = line.split("=")[0] + value = "".join(i + " " for i in line.split("=")[1:]) + # print(key, value) + # Remove spaces from the start of the key + while key[0] == " ": + key = key[1:] + # Remove spaces from the end of the key + while key[-1] == " ": + key = key[:-1] + # Remove spaces from the start of the value + while value[0] == " ": + value = value[1:] + # Remove spaces from the end of the value + while value[-1] in [" ", "\n"]: + value = value[:-1] + # Remove the quotes from the value + value = value[1:][:-1] + if key == key_to_find: + # Add a space to the end of the value if the key is empty, + # because an empty value is parsed as a error + if not value: + value = " " + return value + # Return a empty string if no value were found because we can't use bools + # because it made that the linters crash + return "" + + +def translate_missing_keys(keys_to_translate: Dict[str, List[List[str]]], + input_language: str) -> Dict[str, List[List[str]]]: + """Get a dictionary of file with the keys and translations to add. + + Args: + keys_to_translate (Dict[str, List[List[str]]]): The list of keys to + translate + input_language (str): The language to get the text that will be + translated + + Returns: + Dict[str, List[str]]: The dictionary of files with translations + + """ + # Initialize the dictionary of translations + output: Dict[str, List[List[str]]] = {} + # Initialize the variable to store the number of translated keys + keys_translated: int = 0 + # Iterate over the locales of the dictionary of untranslated keys + for locale in keys_to_translate: + # Iterate over the untranslated keys in the locale + for key in keys_to_translate[locale]: + # Get the filename from the generic filename + filename = key[1] + '.' + locale + '.i18n' + # Get the value of the key + value = get_value_from_key(key[0], key[1], input_language) + # If the value was not found in the locale, try other languages + if not value: + print(f"Key '{key[0]}' not found in locale {input_language}") + print("Iterating over all known languages") + # Initialize the variable to store if a value was found to false + value_found = False + # Iterate over all the known languages + for language in keys_to_translate: + # Try to get the value from the language + value = get_value_from_key(key[0], key[1], language) + # If the value was found in the language, break + if value: + print(f"Value found in the language '{language}'") + # Mark the value as been found + value_found = True + # Save the language + input_language = language + break + # Else, continue + # Crash if the value is not available all the known languages + if not value_found: + raise ValueError(f"Key '{key[0]}' not found in all locales") + + # Restore the default value if a space have been + # inserted + if value == ' ': + value = '' + # Translate the value into the requested language + value_translated = translate(value, locale, input_language) + # If the file is already in the dictionary, append the translation + # to it + if filename in output: + output[filename].append([key[0], value_translated]) + # Else create the list for the file in the dictionary + else: + output[filename] = [[key[0], value_translated]] + # Print the key and value + print(key[0] + ' = "' + value_translated + '"') + # Increment the number of translated keys + keys_translated += 1 + # If no keys were translated, print a specific message + if not keys_translated: + print('No keys were translated') + # Else, if only one key was translated, print a specific message + elif keys_translated == 1: + print('One key was translated') + # Else, print a generic message + else: + print(f'{keys_translated} keys were translated') + # Return the dictionary of translations + return output + + +def save_translations(missing_keys_translation: Dict[str, List[List[str]]]): + """Save the translations. + + Args: + missing_keys_translation (Dict[str, List[List[str]]]): The dictionary + of translations + + """ + # Read the dictionary of files + for filename, keys_for_file in missing_keys_translation.items(): + # Initialize add new line variable to false + add_new_line = False + # Open the file for reading only if it exists + if os.path.exists(filename): + # Open the file for reading + with open(filename, 'r', encoding='utf-8') as file_read: + # Save content of the file into the content variable and + # ensure sure there is a first character (not a empty file) + if content := str(file_read.read()): + # If the last char isn't a newline + if content[-1] != '\n': + # Mark that a newline should be added + add_new_line = True + # Else, print of the file will be created + else: + print(f"{filename} is not found, creating an empty file") + # Open the file for writing + with open(filename, 'a', encoding='utf-8') as file_write: + # If add new line is true, add a new line at the end of the file + if add_new_line: + file_write.write('\n') + # Iterate on the values to be save in the file + for value in keys_for_file: + # Generate the in the style Key = "Value" + line = value[0] + ' = "' + value[1] + '"' + # Write the line at the end of the file + file_write.write(line + '\n') + + +def main(): + """Run the program.""" + # Get the list of i18n files + i18n_files = get_i18n_files(BASE_PATH) + # Get the list of keys in the i18n files + keys = list_keys(i18n_files) + # Delete universals keys from the list of keys + if 'universal' in keys: + del keys['universal'] + # Get the list of keys to translate in the i18n files + keys_to_translate = need_to_be_translated(keys) + # Translate the missings keys + missing_keys_translation = translate_missing_keys(keys_to_translate, + DEFAULT_INPUT_LANGUAGE) + # Save the translations + if not DRYRUN: + save_translations(missing_keys_translation) + else: + print("Dry run enabled, translations aren't saved") + + +main() diff --git a/build/utilities/translate.py b/build/utilities/translate.py index 4ff87ebef9d..8a84c140130 100755 --- a/build/utilities/translate.py +++ b/build/utilities/translate.py @@ -1,48 +1,19 @@ #!/usr/bin/env python3 """Generate missing translations for i18n files.""" -# Build-in library imports -import os -import re import sys -import argparse -from typing import Dict, List -# Deep translator import +import logging + +import i18n_lib try: from deep_translator import GoogleTranslator except ModuleNotFoundError: - print('Module deep_translator not found. Please install it with ', + print('Module deep_translator not found. Please install it with', '"pip3 install deep_translator"') sys.exit(1) -# Initialize the parser -parser = argparse.ArgumentParser(description='Generate missing translations' + - ' for i18n files', epilog='You can execute' + - ' this script without arguments') -# Add arguments to the parser -parser.add_argument("--default-input-language", default="en", - help="The language code of the input language") -parser.add_argument("--base-path", default=".", - help="The base path of the i18n files") -parser.add_argument("--no-recursive", default=False, action="store_true", - help="Disable finding the i18n files recursively") -parser.add_argument("--dry-run", default=False, action="store_true", - help="Disable saving the i18n files") -# Parse command line arguments -args = parser.parse_args() - -# Save the user language into the global variable -DEFAULT_INPUT_LANGUAGE = args.default_input_language -# Save the base path into the global variable -BASE_PATH = args.base_path -# Save if i18n files can be found recursively -FIND_RECURSIVE = not args.no_recursive -# Save if dryrun is enabled -DRYRUN = args.dry_run - - def translate(text: str, output_language: str, input_language: str = 'auto')\ - -> str: + -> str: """Translate the given text. Args: @@ -64,373 +35,47 @@ def translate(text: str, output_language: str, input_language: str = 'auto')\ return translator.translate(text) -def get_all_files_in_directory(directory: str) -> List[str]: - """Get all files in the given directory recursively. +def generate_missing_translations(i18n_data: i18n_lib.I18nData, + missing_translations: dict[str, list[str]])\ + -> None: + """Generate missing translations. Args: - directory (str): The directory - - Returns: - Liststr]: The list of files in the directory - + i18n_data (i18n_lib.I18nData): The i18n data. + missing_translations (dict[str, list[str]]): The missing translations + by locale. """ - # Initialize the list of files - files = [] - # Iterate over all files in the directory - for i in os.listdir(directory): - # Add the current directory to the file name - i = directory + '/' + i - # If the file is a directory - if FIND_RECURSIVE and os.path.isdir(i): - # Iter the directory and add the files to the list - files.extend(get_all_files_in_directory(i)) - # Else the file is a file - else: - # Add the file to the list - files.append(i) - # Return the list of files - return files - - -def get_i18n_files(directory: str = '.') -> Dict[str, List[str]]: - """Get the list of i18n files in the given directory. - - Args: - directory (str, optional): The directory to find the i18n files. - Defaults to '.'. - - Returns: - Dict[List[str]]: The list of i18n files in a dictionary of languages. - - """ - # Get all files in the directory recursively - files = get_all_files_in_directory(directory) - # Initialize the dictionary - i18n_files_language: Dict[str, List[str]] = {} - # Iterate over all files in the directory - for i in files: - # If the file is an i18n file - if ".i18n" in i: - # Get the language of the file - file_language = i.split('.')[-2] - # If the dictionary already contains the language - if file_language in i18n_files_language: - # Append the file to the dictionary - i18n_files_language[file_language].append(i) - # Else add the language to the dictionary - else: - # Add the file to the dictionary - i18n_files_language[file_language] = [i] - # Return the dictionary - return i18n_files_language - - -def need_to_be_translated(keys: Dict[str, List[List[str]]])\ - -> Dict[str, List[List[str]]]: - """Return the key that needs to be translated by locale. - - Args: - keys (Dict[str, List[str]]): The keys of the i18n files - - Returns: - Dict[str, List[str]]: The keys that needs to be translated, - sorted by locale - - """ - # Initialize the list of keys - keys_list: List[List[str]] = [] - keys_to_translate: Dict[str, List[List[str]]] = {} - # Iterate over all locales - for value_ in keys.values(): - # Iterate on keys of the locale - for key in value_: - # Skip if the key is already in the list - if key[0] in keys_list: - continue - # Else add the key to the list - keys_list.append(key) - for locale, value in keys.items(): - # Initialize the list of keys in the locale - keys_in_locale: List[str] = [i[0] for i in value] - # Get the keys of keys that need to be translated - keys_to_translate_in_locale: List[List[str]] = [ - key for key in keys_list if key[0] not in keys_in_locale - ] - # Remove duplicates from the list - # Initialize the deduplicated list - keys_to_translate_in_locale_deduplicated: List[List[str]] = [] - # Iterate over the duplicated list - for item in keys_to_translate_in_locale: - # If the key is not in the deduplicated list, add it - if item not in keys_to_translate_in_locale_deduplicated: - keys_to_translate_in_locale_deduplicated.append(item) - # Else, ignore the key, because it is already in the list - # Save the deduplicated list into the dictionary - keys_to_translate[locale] = keys_to_translate_in_locale_deduplicated - return keys_to_translate - - -def get_keys_in_file(filename: str) -> List[List[str]]: - """Return a list of keys in the file. - - Args: - filename (str): The name of the file to read - - Returns: - List[str]: The keys in the file - - """ - # Initialize the list of keys in the file - keys = [] - # Open the file read only - with open(filename, 'r', encoding='utf-8') as file_read: - # Read the content of the file line by line - for line in file_read.readlines(): - # Ignore commented lines - if re.match(r"^#(.*)$", line): - continue - # Ignore lines without = - if '=' not in line: - continue - # Get the key by spliting the line by = - key = line.split("=")[0] - # Remove spaces from the start of the key - while key[0] == " ": - key = key[1:] - # Remove spaces from the end of the key - while key[-1] == " ": - key = key[:-1] - # Get generic filename into a list separated by dots - generic_filename_list = filename.split(".")[:-2] - # Get the filename as string with a trailing dot at the end - generic_filename = "".join(i + "." for i in generic_filename_list) - # Remove trailing dot from the end of the generic filename - generic_filename = generic_filename[:-1] - # Add the key and the generic filename to the list of keys - keys.append([key, generic_filename]) - return keys - - -def list_keys(i18n_files: Dict[str, List[str]]) -> Dict[str, List[List[str]]]: - """List all keys in the i18n files. - - Args: - i18n_files (Dict[str, List[str]]): I18n files list - - Returns: - Dict[str, List[str]]: The dictionary of keys in the i18n files by - locale. - - """ - # Initialize the list of keys in the i18n files - keys_dict: Dict[str, List[List[str]]] = {} - # Iterate on the locales - for locale in i18n_files: - # Initialize the dictionary for the locale - keys_dict[locale] = [] - # Iterate on the locale's files - for actual_file in i18n_files[locale]: - # Get the keys in the file and add them to the list - keys_dict[locale].extend(get_keys_in_file(actual_file)) - # Return the dictionary of keys in the i18n files sorted by locale - return keys_dict - - -def get_value_from_key(key_to_find: str, filename_generic: str, locale: str)\ - -> str: - """Get the value of a key in the i18n files from the given locale. - - Args: - key (str): The key to fetch the value - filename_generic (str): The path to the file where the value will be - fetched - locale (str): The locale from the value will be retrieved - - Returns: - str: The value of the key from the given file - - """ - # Get the filename from the generic filename - file_path = filename_generic + '.' + locale + '.i18n' - # Exit if the file does not exist - if not os.path.exists(file_path): - return "" - # Open the file for reading - with open(file_path, 'r', encoding='utf-8') as file_read: - # Read the file line by line - for line in file_read.readlines(): - # Ignore commented lines - if re.match(r"^#(.*)$", line): - continue - # Ignore lines without = - if '=' not in line: - continue - # Get the key and value by spliting the line by = - key = line.split("=")[0] - value = "".join(i + " " for i in line.split("=")[1:]) - # print(key, value) - # Remove spaces from the start of the key - while key[0] == " ": - key = key[1:] - # Remove spaces from the end of the key - while key[-1] == " ": - key = key[:-1] - # Remove spaces from the start of the value - while value[0] == " ": - value = value[1:] - # Remove spaces from the end of the value - while value[-1] in [" ", "\n"]: - value = value[:-1] - # Remove the quotes from the value - value = value[1:][:-1] - if key == key_to_find: - # Add a space to the end of the value if the key is empty, - # because an empty value is parsed as a error - if not value: - value = " " - return value - # Return a empty string if no value were found because we can't use bools - # because it made that the linters crash - return "" - - -def translate_missing_keys(keys_to_translate: Dict[str, List[List[str]]], - input_language: str) -> Dict[str, List[List[str]]]: - """Get a dictionary of file with the keys and translations to add. - - Args: - keys_to_translate (Dict[str, List[List[str]]]): The list of keys to - translate - input_language (str): The language to get the text that will be - translated - - Returns: - Dict[str, List[str]]: The dictionary of files with translations - - """ - # Initialize the dictionary of translations - output: Dict[str, List[List[str]]] = {} - # Initialize the variable to store the number of translated keys - keys_translated: int = 0 - # Iterate over the locales of the dictionary of untranslated keys - for locale in keys_to_translate: - # Iterate over the untranslated keys in the locale - for key in keys_to_translate[locale]: - # Get the filename from the generic filename - filename = key[1] + '.' + locale + '.i18n' - # Get the value of the key - value = get_value_from_key(key[0], key[1], input_language) - # If the value was not found in the locale, try other languages - if not value: - print(f"Key '{key[0]}' not found in locale {input_language}") - print("Iterating over all known languages") - # Initialize the variable to store if a value was found to false - value_found = False - # Iterate over all the known languages - for language in keys_to_translate: - # Try to get the value from the language - value = get_value_from_key(key[0], key[1], language) - # If the value was found in the language, break - if value: - print(f"Value found in the language '{language}'") - # Mark the value as been found - value_found = True - # Save the language - input_language = language - break - # Else, continue - # Crash if the value is not available all the known languages - if not value_found: - raise ValueError(f"Key '{key[0]}' not found in all locales") - - # Restore the default value if a space have been - # inserted - if value == ' ': - value = '' - # Translate the value into the requested language - value_translated = translate(value, locale, input_language) - # If the file is already in the dictionary, append the translation - # to it - if filename in output: - output[filename].append([key[0], value_translated]) - # Else create the list for the file in the dictionary - else: - output[filename] = [[key[0], value_translated]] - # Print the key and value - print(key[0] + ' = "' + value_translated + '"') - # Increment the number of translated keys - keys_translated += 1 - # If no keys were translated, print a specific message - if not keys_translated: - print('No keys were translated') - # Else, if only one key was translated, print a specific message - elif keys_translated == 1: - print('One key was translated') - # Else, print a generic message - else: - print(f'{keys_translated} keys were translated') - # Return the dictionary of translations - return output - - -def save_translations(missing_keys_translation: Dict[str, List[List[str]]]): - """Save the translations. - - Args: - missing_keys_translation (Dict[str, List[List[str]]]): The dictionary - of translations - - """ - # Read the dictionary of files - for filename, keys_for_file in missing_keys_translation.items(): - # Initialize add new line variable to false - add_new_line = False - # Open the file for reading only if it exists - if os.path.exists(filename): - # Open the file for reading - with open(filename, 'r', encoding='utf-8') as file_read: - # Save content of the file into the content variable and - # ensure sure there is a first character (not a empty file) - if content := str(file_read.read()): - # If the last char isn't a newline - if content[-1] != '\n': - # Mark that a newline should be added - add_new_line = True - # Else, print of the file will be created - else: - print(f"{filename} is not found, creating an empty file") - # Open the file for writing - with open(filename, 'a', encoding='utf-8') as file_write: - # If add new line is true, add a new line at the end of the file - if add_new_line: - file_write.write('\n') - # Iterate on the values to be save in the file - for value in keys_for_file: - # Generate the in the style Key = "Value" - line = value[0] + ' = "' + value[1] + '"' - # Write the line at the end of the file - file_write.write(line + '\n') + # Loop through the locales. + for locale, missing_translations_locale in missing_translations.items(): + # Loop through the missing translations. + for missing_translation in missing_translations_locale: + # Get the key. + value = i18n_data.get_value(missing_translation, "all") + # Get the translation. + translation = translate(value, locale) + # Log the translation. + logging.info("%s: %s -> %s", locale, missing_translation, + translation) + # Add the key to the locale. + i18n_data.add_key(missing_translation, translation, locale) def main(): - """Run the program.""" - # Get the list of i18n files - i18n_files = get_i18n_files(BASE_PATH) - # Get the list of keys in the i18n files - keys = list_keys(i18n_files) - # Delete universals keys from the list of keys - if 'universal' in keys: - del keys['universal'] - # Get the list of keys to translate in the i18n files - keys_to_translate = need_to_be_translated(keys) - # Translate the missings keys - missing_keys_translation = translate_missing_keys(keys_to_translate, - DEFAULT_INPUT_LANGUAGE) - # Save the translations - if not DRYRUN: - save_translations(missing_keys_translation) - else: - print("Dry run enabled, translations aren't saved") - - -main() + """Run the script.""" + # Initialise the logger + logging.basicConfig( + level=logging.INFO, + format='%(asctime)s - %(levelname)s - %(message)s' + ) + # Load the i18n files. + i18n_data = i18n_lib.I18nData() + # Get the missing translations. + missing_translations = i18n_data.get_missing_keys() + # Generate the missing translations. + generate_missing_translations(i18n_data, missing_translations) + # Save the i18n files. + i18n_data.write_data() + + +if __name__ == '__main__': + main()