From 424393bc050ad72c2ecaaad4f72db653c205e67b Mon Sep 17 00:00:00 2001 From: Ad5001 Date: Thu, 27 Jan 2022 01:02:44 +0100 Subject: [PATCH] Translations for all object properties! --- LogarithmPlotter/i18n/lp_de.ts | 149 ++++++++++++++- LogarithmPlotter/i18n/lp_en.ts | 151 ++++++++++++++- LogarithmPlotter/i18n/lp_es.ts | 149 ++++++++++++++- LogarithmPlotter/i18n/lp_fr.ts | 176 ++++++++++++++++-- LogarithmPlotter/i18n/lp_hu.ts | 149 ++++++++++++++- LogarithmPlotter/i18n/lp_nb_NO.ts | 149 ++++++++++++++- LogarithmPlotter/i18n/lp_template.ts | 149 ++++++++++++++- .../ObjectLists/EditorDialog.qml | 6 +- .../LogarithmPlotter/js/objs/gainbode.js | 10 +- .../LogarithmPlotter/js/objs/phasebode.js | 9 +- .../ad5001/LogarithmPlotter/js/objs/point.js | 8 +- .../LogarithmPlotter/js/objs/repartition.js | 11 +- .../LogarithmPlotter/js/objs/sequence.js | 17 +- .../js/objs/sommegainsbode.js | 6 +- .../js/objs/sommephasesbode.js | 6 +- .../ad5001/LogarithmPlotter/js/objs/text.js | 8 +- .../LogarithmPlotter/js/objs/xcursor.js | 17 +- .../ad5001/LogarithmPlotter/js/parameters.js | 16 +- 18 files changed, 1124 insertions(+), 62 deletions(-) diff --git a/LogarithmPlotter/i18n/lp_de.ts b/LogarithmPlotter/i18n/lp_de.ts index 3a0fe19..92e27f3 100644 --- a/LogarithmPlotter/i18n/lp_de.ts +++ b/LogarithmPlotter/i18n/lp_de.ts @@ -161,8 +161,8 @@ Name + Wert - - + + + Create new %1 + Neues %1objekt erstellen @@ -473,6 +473,16 @@ Diese Einstellungen können jederzeit über das Menü "Einstellungen" The following parameters are used when the definition domain is a non-continuous set. (Ex: ℕ, ℤ, sets like {0;3}...) + + + Note: Specify the probability for each value. + + + + + Note: Use %1[n] to refer to %1ₙ, %1[n+1] for %1ₙ₊₁... + + function @@ -500,12 +510,12 @@ Diese Einstellungen können jederzeit über das Menü "Einstellungen" Bode-Magnituden - + low-pass Tiefpass - + high-pass Hochpass @@ -590,6 +600,31 @@ Diese Einstellungen können jederzeit über das Menü "Einstellungen" function + + + high + + + + + low + + + + + Next to target + + + + + With label + + + + + Hidden + + phasebode @@ -636,6 +671,15 @@ Diese Einstellungen können jederzeit über das Menü "Einstellungen" + + + + + + + + + labelPosition @@ -646,19 +690,116 @@ Diese Einstellungen können jederzeit über das Menü "Einstellungen" + + + + + + labelX + drawPoints + drawDashedLines + + + + om_0 + + + + + pass + + + + + gain + + + + + omGraduation + + + + + phase + + + + + unit + + + + + + + x + + + + + + y + + + + + pointStyle + + + + + probabilities + + + + + text + + + + + targetElement + + + + + approximate + + + + + rounding + + + + + displayStyle + + + + + targetValuePosition + + + + + baseValues + + repartition diff --git a/LogarithmPlotter/i18n/lp_en.ts b/LogarithmPlotter/i18n/lp_en.ts index 13fa414..ee7ab9c 100644 --- a/LogarithmPlotter/i18n/lp_en.ts +++ b/LogarithmPlotter/i18n/lp_en.ts @@ -161,8 +161,8 @@ name + value - - + + + Create new %1 + Create new %1 @@ -473,6 +473,16 @@ These settings can be changed at any time from the "Settings" menu.The following parameters are used when the definition domain is a non-continuous set. (Ex: ℕ, ℤ, sets like {0;3}...) The following parameters are used when the definition domain is a non-continuous set. (Ex: ℕ, ℤ, sets like {0;3}...) + + + Note: Specify the probability for each value. + Note: Specify the probability for each value. + + + + Note: Use %1[n] to refer to %1ₙ, %1[n+1] for %1ₙ₊₁... + Note: Use %1[n] to refer to %1ₙ, %1[n+1] for %1ₙ₊₁... + function @@ -500,12 +510,12 @@ These settings can be changed at any time from the "Settings" menu.Bode Magnitudes - + low-pass low-pass - + high-pass high-pass @@ -590,6 +600,31 @@ These settings can be changed at any time from the "Settings" menu.function Function + + + high + High + + + + low + Low + + + + Next to target + Next to target + + + + With label + With label + + + + Hidden + Hidden + phasebode @@ -636,6 +671,15 @@ These settings can be changed at any time from the "Settings" menu. + + + + + + + + + labelPosition Label position @@ -646,19 +690,116 @@ These settings can be changed at any time from the "Settings" menu. + + + + + + labelX Label X position + drawPoints - Show points + Afficher les points + drawDashedLines Show dashed lines + + + + om_0 + ω₀ + + + + pass + Pass + + + + gain + Magnitude gain + + + + omGraduation + Show graduation on ω + + + + phase + Phase + + + + unit + Unit to use + + + + + + x + X + + + + + y + Y + + + + pointStyle + Point style + + + + probabilities + Probabilities list + + + + text + Content + + + + targetElement + Object to target + + + + approximate + Show approximate value + + + + rounding + Rounding + + + + displayStyle + Display style + + + + targetValuePosition + Target's value position + + + + baseValues + Initialisation values + repartition diff --git a/LogarithmPlotter/i18n/lp_es.ts b/LogarithmPlotter/i18n/lp_es.ts index ef182bd..51ca2a7 100644 --- a/LogarithmPlotter/i18n/lp_es.ts +++ b/LogarithmPlotter/i18n/lp_es.ts @@ -161,8 +161,8 @@ - - + + + Create new %1 @@ -472,6 +472,16 @@ These settings can be changed at any time from the "Settings" menu.The following parameters are used when the definition domain is a non-continuous set. (Ex: ℕ, ℤ, sets like {0;3}...) + + + Note: Specify the probability for each value. + + + + + Note: Use %1[n] to refer to %1ₙ, %1[n+1] for %1ₙ₊₁... + + function @@ -499,12 +509,12 @@ These settings can be changed at any time from the "Settings" menu. - + low-pass - + high-pass @@ -589,6 +599,31 @@ These settings can be changed at any time from the "Settings" menu.function + + + high + + + + + low + + + + + Next to target + + + + + With label + + + + + Hidden + + phasebode @@ -635,6 +670,15 @@ These settings can be changed at any time from the "Settings" menu. + + + + + + + + + labelPosition @@ -645,19 +689,116 @@ These settings can be changed at any time from the "Settings" menu. + + + + + + labelX + drawPoints + drawDashedLines + + + + om_0 + + + + + pass + + + + + gain + + + + + omGraduation + + + + + phase + + + + + unit + + + + + + + x + + + + + + y + + + + + pointStyle + + + + + probabilities + + + + + text + + + + + targetElement + + + + + approximate + + + + + rounding + + + + + displayStyle + + + + + targetValuePosition + + + + + baseValues + + repartition diff --git a/LogarithmPlotter/i18n/lp_fr.ts b/LogarithmPlotter/i18n/lp_fr.ts index 31385b5..f9b6bb8 100644 --- a/LogarithmPlotter/i18n/lp_fr.ts +++ b/LogarithmPlotter/i18n/lp_fr.ts @@ -106,7 +106,7 @@ &Report a bug - Rapport de bug + &Rapport de bug @@ -162,8 +162,8 @@ nom + valeur - - + + + Create new %1 Traduction non litéralle pour éviter les problèmes de genre. + Créer un nouvel objet %1 @@ -474,12 +474,23 @@ These settings can always be changed at any time from the "Settings" m Ex: R+* (ℝ⁺*), N (ℕ), Z-* (ℤ⁻*), ]0;1[, {3;4;5} - + Par exemple: R+* (ℝ⁺*), N (ℕ), Z-* (ℤ⁻*), ]0;1[, {3;4;5} The following parameters are used when the definition domain is a non-continuous set. (Ex: ℕ, ℤ, sets like {0;3}...) - + Les paramètres suivants sont utilisés lorsque le domaine de définition est un ensemble non-continu. (Ex : ℕ, ℤ, des ensembles comme {0;3}...) + + + + Note: Specify the probability for each value. + Note : Spécifiez la probabilité pour chaque valeur. + + + + Note: Use %1[n] to refer to %1ₙ, %1[n+1] for %1ₙ₊₁... + Note : Utilisez %1[n] pour faire référence à %1ₙ, %1[n+1] pour %1ₙ₊₁... + Note: Use %1[n] to refer to %1ₙ, %1[n+1] for %1ₙ₊₁... @@ -508,12 +519,12 @@ These settings can always be changed at any time from the "Settings" m Gains de Bode - + low-pass passe-bas - + high-pass passe-haut @@ -591,12 +602,37 @@ These settings can always be changed at any time from the "Settings" m application - + Application function - + Fonction + + + + high + Haut + + + + low + Bas + + + + Next to target + A côté de la cible + + + + With label + Avec l'étiquette + + + + Hidden + Caché @@ -630,42 +666,148 @@ These settings can always be changed at any time from the "Settings" m expression - + Expression definitionDomain - + Domaine de définition destinationDomain - + Portée + + + + + + + + + labelPosition - + Position de l'étiquette displayMode - + Mode d'affichage + + + + + + labelX - + Position en X de l'étiquette + drawPoints - + Afficher les points + drawDashedLines - + Afficher les pointillés + + + + + om_0 + ω₀ + + + + pass + Passe + + + + gain + Gain + + + + omGraduation + Afficher la graduation sur ω₀ + + + + phase + Phase + + + + unit + Unité de la phase + + + + + + x + X + + + + + y + Y + + + + pointStyle + Style du point + + + + probabilities + Liste de probabilités + + + + text + Contenu + + + + targetElement + Objet à cibler + + + + approximate + Afficher la valeur approximative + + + + rounding + Arrondi + + + + displayStyle + Style d'affichage + + + + targetValuePosition + Position de la valeur de la cible + + + + baseValues + Valeurs d'initialisation diff --git a/LogarithmPlotter/i18n/lp_hu.ts b/LogarithmPlotter/i18n/lp_hu.ts index a19a39f..9b95538 100644 --- a/LogarithmPlotter/i18n/lp_hu.ts +++ b/LogarithmPlotter/i18n/lp_hu.ts @@ -161,8 +161,8 @@ név + érték - - + + + Create new %1 + Új %1 létrehozása @@ -473,6 +473,16 @@ Ezek a beállítások bármikor módosíthatók a „Beállítások” menüben. The following parameters are used when the definition domain is a non-continuous set. (Ex: ℕ, ℤ, sets like {0;3}...) + + + Note: Specify the probability for each value. + + + + + Note: Use %1[n] to refer to %1ₙ, %1[n+1] for %1ₙ₊₁... + + function @@ -500,12 +510,12 @@ Ezek a beállítások bármikor módosíthatók a „Beállítások” menüben. Bode-nagyságrendek - + low-pass aluláteresztő - + high-pass felüláteresztő @@ -590,6 +600,31 @@ Ezek a beállítások bármikor módosíthatók a „Beállítások” menüben. function + + + high + + + + + low + + + + + Next to target + + + + + With label + + + + + Hidden + + phasebode @@ -636,6 +671,15 @@ Ezek a beállítások bármikor módosíthatók a „Beállítások” menüben. + + + + + + + + + labelPosition @@ -646,19 +690,116 @@ Ezek a beállítások bármikor módosíthatók a „Beállítások” menüben. + + + + + + labelX + drawPoints + drawDashedLines + + + + om_0 + + + + + pass + + + + + gain + + + + + omGraduation + + + + + phase + + + + + unit + + + + + + + x + + + + + + y + + + + + pointStyle + + + + + probabilities + + + + + text + + + + + targetElement + + + + + approximate + + + + + rounding + + + + + displayStyle + + + + + targetValuePosition + + + + + baseValues + + repartition diff --git a/LogarithmPlotter/i18n/lp_nb_NO.ts b/LogarithmPlotter/i18n/lp_nb_NO.ts index 3668f41..c6090a0 100644 --- a/LogarithmPlotter/i18n/lp_nb_NO.ts +++ b/LogarithmPlotter/i18n/lp_nb_NO.ts @@ -161,8 +161,8 @@ navn + veri - - + + + Create new %1 + Opprett nytt %1 @@ -473,6 +473,16 @@ Disse innstillingene kan endres når som helst fra «Innstillinger»-menyen.The following parameters are used when the definition domain is a non-continuous set. (Ex: ℕ, ℤ, sets like {0;3}...) + + + Note: Specify the probability for each value. + + + + + Note: Use %1[n] to refer to %1ₙ, %1[n+1] for %1ₙ₊₁... + + function @@ -500,12 +510,12 @@ Disse innstillingene kan endres når som helst fra «Innstillinger»-menyen.Bode-magnituder - + low-pass lavpass - + high-pass høypass @@ -590,6 +600,31 @@ Disse innstillingene kan endres når som helst fra «Innstillinger»-menyen.function + + + high + + + + + low + + + + + Next to target + + + + + With label + + + + + Hidden + + phasebode @@ -636,6 +671,15 @@ Disse innstillingene kan endres når som helst fra «Innstillinger»-menyen. + + + + + + + + + labelPosition @@ -646,19 +690,116 @@ Disse innstillingene kan endres når som helst fra «Innstillinger»-menyen. + + + + + + labelX + drawPoints + drawDashedLines + + + + om_0 + + + + + pass + + + + + gain + + + + + omGraduation + + + + + phase + + + + + unit + + + + + + + x + + + + + + y + + + + + pointStyle + + + + + probabilities + + + + + text + + + + + targetElement + + + + + approximate + + + + + rounding + + + + + displayStyle + + + + + targetValuePosition + + + + + baseValues + + repartition diff --git a/LogarithmPlotter/i18n/lp_template.ts b/LogarithmPlotter/i18n/lp_template.ts index b489b2e..1cb4e50 100644 --- a/LogarithmPlotter/i18n/lp_template.ts +++ b/LogarithmPlotter/i18n/lp_template.ts @@ -161,8 +161,8 @@ - - + + + Create new %1 @@ -472,6 +472,16 @@ These settings can be changed at any time from the "Settings" menu.The following parameters are used when the definition domain is a non-continuous set. (Ex: ℕ, ℤ, sets like {0;3}...) + + + Note: Specify the probability for each value. + + + + + Note: Use %1[n] to refer to %1ₙ, %1[n+1] for %1ₙ₊₁... + + function @@ -499,12 +509,12 @@ These settings can be changed at any time from the "Settings" menu. - + low-pass - + high-pass @@ -589,6 +599,31 @@ These settings can be changed at any time from the "Settings" menu.function + + + high + + + + + low + + + + + Next to target + + + + + With label + + + + + Hidden + + phasebode @@ -635,6 +670,15 @@ These settings can be changed at any time from the "Settings" menu. + + + + + + + + + labelPosition @@ -645,19 +689,116 @@ These settings can be changed at any time from the "Settings" menu. + + + + + + labelX + drawPoints + drawDashedLines + + + + om_0 + + + + + pass + + + + + gain + + + + + omGraduation + + + + + phase + + + + + unit + + + + + + + x + + + + + + y + + + + + pointStyle + + + + + probabilities + + + + + text + + + + + targetElement + + + + + approximate + + + + + rounding + + + + + displayStyle + + + + + targetValuePosition + + + + + baseValues + + repartition diff --git a/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/ObjectLists/EditorDialog.qml b/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/ObjectLists/EditorDialog.qml index a2ed94a..4e3ac3f 100644 --- a/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/ObjectLists/EditorDialog.qml +++ b/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/ObjectLists/EditorDialog.qml @@ -34,7 +34,7 @@ D.Dialog { property QtObject editingRow: QtObject{} property var objectLists title: `LogarithmPlotter` - width: 300 + width: 350 height: 400 Label { @@ -111,8 +111,8 @@ D.Dialog { height: visible ? implicitHeight : 0 visible: modelData[0].startsWith('comment') // Translated text with object name. - property string trText: visible ? qsTranslate('comment', modelData[1]) : '' - text: trText// trText.contains("%1") ? trText.arg(objEditor.obj.name).toString() : trText + property string trText: visible ? qsTranslate('comment', modelData[1]).toString() : '' + text: (visible && trText.includes("%1") ? trText.arg(objEditor.obj.name) : trText).toString() //color: sysPalette.windowText wrapMode: Text.WordWrap } diff --git a/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/js/objs/gainbode.js b/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/js/objs/gainbode.js index a3e5a35..e605c1e 100644 --- a/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/js/objs/gainbode.js +++ b/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/js/objs/gainbode.js @@ -30,13 +30,21 @@ class GainBode extends Common.ExecutableObject { static type(){return 'Gain Bode'} static displayType(){return qsTr('Bode Magnitude')} static displayTypeMultiple(){return qsTr('Bode Magnitudes')} - static properties() {return { + /*static properties() {return { 'om_0': new P.ObjectType('Point'), 'pass': new P.Enum('high', 'low'), 'gain': 'Expression', 'labelPosition': new P.Enum('above', 'below', 'left', 'right', 'above-left', 'above-right', 'below-left', 'below-right'), 'labelX': 'number', 'omGraduation': 'boolean' + }}*/ + static properties() {return { + [QT_TRANSLATE_NOOP('prop','om_0')]: new P.ObjectType('Point'), + [QT_TRANSLATE_NOOP('prop','pass')]: P.Enum.BodePass, + [QT_TRANSLATE_NOOP('prop','gain')]: 'Expression', + [QT_TRANSLATE_NOOP('prop','labelPosition')]: P.Enum.Position, + [QT_TRANSLATE_NOOP('prop','labelX')]: 'number', + [QT_TRANSLATE_NOOP('prop','omGraduation')]: 'boolean' }} constructor(name = null, visible = true, color = null, labelContent = 'name + value', diff --git a/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/js/objs/phasebode.js b/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/js/objs/phasebode.js index c747c22..c3e813b 100644 --- a/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/js/objs/phasebode.js +++ b/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/js/objs/phasebode.js @@ -29,12 +29,19 @@ class PhaseBode extends Common.ExecutableObject { static type(){return 'Phase Bode'} static displayType(){return qsTr('Bode Phase')} static displayTypeMultiple(){return qsTr('Bode Phases')} - static properties() {return { + /*static properties() {return { 'om_0': new P.ObjectType('Point'), 'phase': 'Expression', 'unit': new P.Enum('°', 'deg', 'rad'), 'labelPosition': new P.Enum('above', 'below', 'left', 'right', 'above-left', 'above-right', 'below-left', 'below-right'), 'labelX': 'number' + }}*/ + static properties() {return { + [QT_TRANSLATE_NOOP('prop','om_0')]: new P.ObjectType('Point'), + [QT_TRANSLATE_NOOP('prop','phase')]: 'Expression', + [QT_TRANSLATE_NOOP('prop','unit')]: new P.Enum('°', 'deg', 'rad'), + [QT_TRANSLATE_NOOP('prop','labelPosition')]: P.Enum.Position, + [QT_TRANSLATE_NOOP('prop','labelX')]: 'number' }} constructor(name = null, visible = true, color = null, labelContent = 'name + value', diff --git a/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/js/objs/point.js b/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/js/objs/point.js index a2e9e54..2f00de7 100644 --- a/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/js/objs/point.js +++ b/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/js/objs/point.js @@ -28,11 +28,17 @@ class Point extends Common.DrawableObject { static displayType(){return qsTr('Point')} static displayTypeMultiple(){return qsTr('Points')} - static properties() {return { + /*static properties() {return { 'x': 'Expression', 'y': 'Expression', 'labelPosition': new P.Enum('top', 'bottom', 'left', 'right', 'top-left', 'top-right', 'bottom-left', 'bottom-right'), 'pointStyle': new P.Enum('●', '✕', '+'), + }}*/ + static properties() {return { + [QT_TRANSLATE_NOOP('prop','x')]: 'Expression', + [QT_TRANSLATE_NOOP('prop','y')]: 'Expression', + [QT_TRANSLATE_NOOP('prop','labelPosition')]: P.Enum.Position, + [QT_TRANSLATE_NOOP('prop','pointStyle')]: new P.Enum('●', '✕', '+') }} constructor(name = null, visible = true, color = null, labelContent = 'name + value', diff --git a/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/js/objs/repartition.js b/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/js/objs/repartition.js index 9baed2b..c6d13a9 100644 --- a/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/js/objs/repartition.js +++ b/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/js/objs/repartition.js @@ -25,13 +25,22 @@ class RepartitionFunction extends Common.ExecutableObject { static type(){return 'Repartition'} static displayType(){return qsTr('Repartition')} static displayTypeMultiple(){return qsTr('Repartition functions')} - static properties() {return { + /*static properties() {return { 'beginIncluded': 'boolean', 'drawLineEnds': 'boolean', 'comment1': 'Note: Specify the properties for each potential result.', 'probabilities': new P.Dictionary('string', 'float', /^-?[\d.,]+$/, /^-?[\d\.,]+$/, 'P({name} = ', ') = '), 'labelPosition': new P.Enum('above', 'below', 'left', 'right', 'above-left', 'above-right', 'below-left', 'below-right'), 'labelX': 'number' + }}*/ + static properties() {return { + [QT_TRANSLATE_NOOP('prop','labelPosition')]: P.Enum.Position, + [QT_TRANSLATE_NOOP('prop','labelX')]: 'number', + 'comment1': QT_TRANSLATE_NOOP( + 'comment', + 'Note: Specify the probability for each value.' + ), + [QT_TRANSLATE_NOOP('prop','probabilities')]: new P.Dictionary('string', 'float', /^-?[\d.,]+$/, /^-?[\d\.,]+$/, 'P({name} = ', ') = '), }} constructor(name = null, visible = true, color = null, labelContent = 'name + value', diff --git a/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/js/objs/sequence.js b/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/js/objs/sequence.js index e1fd800..9635ef6 100644 --- a/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/js/objs/sequence.js +++ b/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/js/objs/sequence.js @@ -28,14 +28,17 @@ class Sequence extends Common.ExecutableObject { static type(){return 'Sequence'} static displayType(){return qsTr('Sequence')} static displayTypeMultiple(){return qsTr('Sequences')} + static properties() {return { - 'drawPoints': 'boolean', - 'drawDashedLines': 'boolean', - 'defaultExpression': new P.Dictionary('string', 'int', /^.+$/, /^\d+$/, '{name}[n+', '] = ', true), - 'comment1': 'Note: Use {name}[n] to refer to {name}ₙ, {name}[n+1] for {name}ₙ₊₁...', - 'baseValues': new P.Dictionary('string', 'int', /^.+$/, /^\d+$/, '{name}[', '] = '), - 'labelPosition': new P.Enum('above', 'below', 'left', 'right', 'above-left', 'above-right', 'below-left', 'below-right'), - 'labelX': 'number' + [QT_TRANSLATE_NOOP('prop','drawPoints')]: 'boolean', + [QT_TRANSLATE_NOOP('prop','drawDashedLines')]: 'boolean', + 'comment1': QT_TRANSLATE_NOOP( + 'comment', + 'Note: Use %1[n] to refer to %1ₙ, %1[n+1] for %1ₙ₊₁...' + ), + [QT_TRANSLATE_NOOP('prop','baseValues')]: new P.Dictionary('string', 'int', /^.+$/, /^\d+$/, '{name}[', '] = '), + [QT_TRANSLATE_NOOP('prop','labelPosition')]: P.Enum.Position, + [QT_TRANSLATE_NOOP('prop','labelX')]: 'number', }} constructor(name = null, visible = true, color = null, labelContent = 'name + value', diff --git a/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/js/objs/sommegainsbode.js b/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/js/objs/sommegainsbode.js index 20f1edb..f5e1328 100644 --- a/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/js/objs/sommegainsbode.js +++ b/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/js/objs/sommegainsbode.js @@ -30,9 +30,13 @@ class SommeGainsBode extends Common.DrawableObject { static displayType(){return qsTr('Bode Magnitudes Sum')} static displayTypeMultiple(){return qsTr('Bode Magnitudes Sum')} static createable() {return false} - static properties() {return { + /*static properties() {return { 'labelPosition': new P.Enum('above', 'below', 'left', 'right', 'above-left', 'above-right', 'below-left', 'below-right'), 'labelX': 'number' + }}*/ + static properties() {return { + [QT_TRANSLATE_NOOP('prop','labelPosition')]: P.Enum.Position, + [QT_TRANSLATE_NOOP('prop','labelX')]: 'number', }} constructor(name = null, visible = true, color = null, labelContent = 'name + value', diff --git a/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/js/objs/sommephasesbode.js b/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/js/objs/sommephasesbode.js index 7617521..17e3945 100644 --- a/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/js/objs/sommephasesbode.js +++ b/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/js/objs/sommephasesbode.js @@ -29,9 +29,13 @@ class SommePhasesBode extends Common.ExecutableObject { static displayType(){return qsTr('Bode Phases Sum')} static displayTypeMultiple(){return qsTr('Bode Phases Sum')} static createable() {return false} - static properties() {return { + /*static properties() {return { 'labelPosition': new P.Enum('above', 'below', 'left', 'right', 'above-left', 'above-right', 'below-left', 'below-right'), 'labelX': 'number' + }}*/ + static properties() {return { + [QT_TRANSLATE_NOOP('prop','labelPosition')]: P.Enum.Position, + [QT_TRANSLATE_NOOP('prop','labelX')]: 'number', }} constructor(name = null, visible = true, color = null, labelContent = 'name + value', diff --git a/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/js/objs/text.js b/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/js/objs/text.js index b67932c..e2cc780 100644 --- a/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/js/objs/text.js +++ b/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/js/objs/text.js @@ -27,11 +27,17 @@ class Text extends Common.DrawableObject { static type(){return 'Text'} static displayType(){return qsTr('Text')} static displayTypeMultiple(){return qsTr('Texts')} - static properties() {return { + /*static properties() {return { 'x': 'Expression', 'y': 'Expression', 'labelPosition': new P.Enum('center', 'top', 'bottom', 'left', 'right', 'top-left', 'top-right', 'bottom-left', 'bottom-right'), 'text': 'string', + }}*/ + static properties() {return { + [QT_TRANSLATE_NOOP('prop','x')]: 'Expression', + [QT_TRANSLATE_NOOP('prop','y')]: 'Expression', + [QT_TRANSLATE_NOOP('prop','labelPosition')]: P.Enum.Position, + [QT_TRANSLATE_NOOP('prop','text')]: 'string' }} constructor(name = null, visible = true, color = null, labelContent = 'null', diff --git a/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/js/objs/xcursor.js b/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/js/objs/xcursor.js index 09e548b..3d0d28c 100644 --- a/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/js/objs/xcursor.js +++ b/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/js/objs/xcursor.js @@ -28,7 +28,7 @@ class XCursor extends Common.DrawableObject { static type(){return 'X Cursor'} static displayType(){return qsTr('X Cursor')} static displayTypeMultiple(){return qsTr('X Cursors')} - static properties() { + /*static properties() { return { 'x': 'Expression', 'targetElement': new P.ObjectType('ExecutableObject'), @@ -42,7 +42,20 @@ class XCursor extends Common.DrawableObject { ), 'targetValuePosition' : new P.Enum('Next to target', 'With label', 'Hidden') } - } + }*/ + static properties() {return { + [QT_TRANSLATE_NOOP('prop','x')]: 'Expression', + [QT_TRANSLATE_NOOP('prop','targetElement')]: new P.ObjectType('ExecutableObject'), + [QT_TRANSLATE_NOOP('prop','labelPosition')]: P.Enum.Position, + [QT_TRANSLATE_NOOP('prop','approximate')]: 'boolean', + [QT_TRANSLATE_NOOP('prop','rounding')]: 'number', + [QT_TRANSLATE_NOOP('prop','displayStyle')]: new P.Enum( + '— — — — — — —', + '⸺⸺⸺⸺⸺⸺', + '• • • • • • • • • •' + ), + [QT_TRANSLATE_NOOP('prop','targetValuePosition')]: P.Enum.XCursorValuePosition, + }} constructor(name = null, visible = true, color = null, labelContent = 'name + value', x = 1, targetElement = null, labelPosition = 'left', approximate = true, diff --git a/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/js/parameters.js b/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/js/parameters.js index c57c9e0..3c3dc8f 100644 --- a/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/js/parameters.js +++ b/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/js/parameters.js @@ -72,4 +72,18 @@ Enum.Position = new Enum( Enum.FunctionDisplayType = new Enum( QT_TR_NOOP('application'), QT_TR_NOOP('function') -); +) + +Enum.BodePass = new Enum( + QT_TR_NOOP('high'), + QT_TR_NOOP('low') +) + + +Enum.XCursorValuePosition = new Enum( + QT_TR_NOOP('Next to target'), + QT_TR_NOOP('With label'), + QT_TR_NOOP('Hidden') +) + +