diff --git a/LogarithmPlotter/i18n/lp_de.ts b/LogarithmPlotter/i18n/lp_de.ts index 9c95285..3a0fe19 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 @@ -269,37 +269,37 @@ Diese Einstellungen können jederzeit über das Menü "Einstellungen" Laden der Datei '%1'. - + Unknown object type: %1. Unbekannter Objekttyp: %1. - + Invalid file provided. Ungültige Datei angegeben. - + Could not save file: Die Datei konnte nicht gespeichert werden: - + Loaded file '%1'. Geladene Datei '%1'. - + Copied plot screenshot to clipboard! Grafik in die Zwischenablage kopiert! - + &Update &Aktualisieren - + &Update LogarithmPlotter LogarithmPlotter &aktualisieren @@ -366,101 +366,114 @@ Diese Einstellungen können jederzeit über das Menü "Einstellungen" Settings - + X Zoom Zoom auf X - + Y Zoom Zoom auf Y - + Min X Minimum X - + Max Y Maximum Y - + Max X Maximum X - + Min Y Minimum Y - + X Axis Step X-Achsen-Schritt - + Y Axis Step Y-Achsen-Schritt - + Line width Linienbreite - + Text size (px) Textgröße (px) - + X Label Label der X-Achse - + Y Label Label der Y-Achse - + X Log scale Logarithmische Skala in X - + Show X graduation X-Teilung anzeigen - + Show Y graduation Y-Teilung anzeigen - + Copy to clipboard Kopieren in die Zwischenablage - + Save plot Grafik speichern - + Save plot as Grafik speichern unter - + Load plot Grafik laden + + comment + + + Ex: 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}...) + + + function @@ -500,27 +513,27 @@ Diese Einstellungen können jederzeit über das Menü "Einstellungen" historylib - + New %1 %2 created. Neu %1 %2 erstellt. - + %1 %2 deleted. %1 %2 gelöscht. - + %1 of %2 %3 changed from "%4" to "%5". %1 von %2 %3 wurde von "%4" auf "%5" geändert. - + %1 %2 shown. %1 %2 angezeigt. - + %1 %2 hidden. %1 %2 ausgeblendet. @@ -528,45 +541,55 @@ Diese Einstellungen können jederzeit über das Menü "Einstellungen" parameters - + above ↑ Über - + below ↓ Unter - + left ← Links - + right → Rechts - + above-left ↖ Oben links - + above-right ↗ Oben rechts - + below-left ↙ Unten links - + below-right ↘ Unten rechts + + + application + + + + + function + + phasebode @@ -594,6 +617,49 @@ Diese Einstellungen können jederzeit über das Menü "Einstellungen" Punkte + + prop + + + expression + + + + + definitionDomain + + + + + destinationDomain + + + + + labelPosition + + + + + displayMode + + + + + labelX + + + + + drawPoints + + + + + drawDashedLines + + + repartition diff --git a/LogarithmPlotter/i18n/lp_en.ts b/LogarithmPlotter/i18n/lp_en.ts index dfc367a..13fa414 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 @@ -269,37 +269,37 @@ These settings can be changed at any time from the "Settings" menu.Loading file '%1'. - + Unknown object type: %1. Unknown object type: %1. - + Invalid file provided. Invalid file provided. - + Could not save file: Could not save file: - + Loaded file '%1'. Loaded file '%1'. - + Copied plot screenshot to clipboard! Copied plot screenshot to clipboard! - + &Update &Update - + &Update LogarithmPlotter &Update LogarithmPlotter @@ -366,101 +366,114 @@ These settings can be changed at any time from the "Settings" menu. Settings - + X Zoom X Zoom - + Y Zoom Y Zoom - + Min X Min X - + Max Y Max Y - + Max X Max X - + Min Y Min Y - + X Axis Step X Axis Step - + Y Axis Step Y Axis Step - + Line width Line width - + Text size (px) Text size (px) - + X Label X Label - + Y Label Y Label - + X Log scale X Log scale - + Show X graduation Show X graduation - + Show Y graduation Show Y graduation - + Copy to clipboard Copy to clipboard - + Save plot Save plot - + Save plot as Save plot as - + Load plot Load plot + + comment + + + Ex: R+* (ℝ⁺*), N (ℕ), Z-* (ℤ⁻*), ]0;1[, {3;4;5} + Ex: 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}...) + The following parameters are used when the definition domain is a non-continuous set. (Ex: ℕ, ℤ, sets like {0;3}...) + + function @@ -500,27 +513,27 @@ These settings can be changed at any time from the "Settings" menu. historylib - + New %1 %2 created. New %1 %2 created. - + %1 %2 deleted. %1 %2 deleted. - + %1 of %2 %3 changed from "%4" to "%5". %1 of %2 %3 changed from "%4" to "%5". - + %1 %2 shown. %1 %2 shown. - + %1 %2 hidden. %1 %2 hidden. @@ -528,45 +541,55 @@ These settings can be changed at any time from the "Settings" menu. parameters - + above ↑ Above - + below ↓ Below - + left ← Left - + right → Right - + above-left ↖ Above left - + above-right ↗ Above right - + below-left ↙ Below left - + below-right ↘ Below right + + + application + Application + + + + function + Function + phasebode @@ -594,6 +617,49 @@ These settings can be changed at any time from the "Settings" menu.Points + + prop + + + expression + Expression + + + + definitionDomain + Definition domain + + + + destinationDomain + Destination domain + + + + labelPosition + Label position + + + + displayMode + Display mode + + + + labelX + Label X position + + + + drawPoints + Show points + + + + drawDashedLines + Show dashed lines + + repartition diff --git a/LogarithmPlotter/i18n/lp_es.ts b/LogarithmPlotter/i18n/lp_es.ts index a83fd78..ef182bd 100644 --- a/LogarithmPlotter/i18n/lp_es.ts +++ b/LogarithmPlotter/i18n/lp_es.ts @@ -161,8 +161,8 @@ - - + + + Create new %1 @@ -268,37 +268,37 @@ These settings can be changed at any time from the "Settings" menu. - + Unknown object type: %1. - + Invalid file provided. - + Could not save file: - + Loaded file '%1'. - + Copied plot screenshot to clipboard! - + &Update - + &Update LogarithmPlotter @@ -365,101 +365,114 @@ These settings can be changed at any time from the "Settings" menu. Settings - + X Zoom - + Y Zoom - + Min X - + Max Y - + Max X - + Min Y - + X Axis Step - + Y Axis Step - + Line width - + Text size (px) - + X Label - + Y Label - + X Log scale - + Show X graduation - + Show Y graduation - + Copy to clipboard - + Save plot - + Save plot as - + Load plot + + comment + + + Ex: 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}...) + + + function @@ -499,27 +512,27 @@ These settings can be changed at any time from the "Settings" menu. historylib - + New %1 %2 created. - + %1 %2 deleted. - + %1 of %2 %3 changed from "%4" to "%5". - + %1 %2 shown. - + %1 %2 hidden. @@ -527,45 +540,55 @@ These settings can be changed at any time from the "Settings" menu. parameters - + above - + below - + left - + right - + above-left - + above-right - + below-left - + below-right + + + application + + + + + function + + phasebode @@ -593,6 +616,49 @@ These settings can be changed at any time from the "Settings" menu. + + prop + + + expression + + + + + definitionDomain + + + + + destinationDomain + + + + + labelPosition + + + + + displayMode + + + + + labelX + + + + + drawPoints + + + + + drawDashedLines + + + repartition diff --git a/LogarithmPlotter/i18n/lp_fr.ts b/LogarithmPlotter/i18n/lp_fr.ts index 7112231..31385b5 100644 --- a/LogarithmPlotter/i18n/lp_fr.ts +++ b/LogarithmPlotter/i18n/lp_fr.ts @@ -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 @@ -277,37 +277,37 @@ These settings can always be changed at any time from the "Settings" m Chargement du fichier '%1'. - + Unknown object type: %1. Type d'objet inconnu : %1. - + Invalid file provided. Fichier fourni invalide. - + Could not save file: Impossible de sauvegarder le fichier : - + Loaded file '%1'. Fichier '%1' chargé. - + Copied plot screenshot to clipboard! Image du graphe copiée dans le presse-papiers ! - + &Update &Mise à jour - + &Update LogarithmPlotter &Mettre à jour LogarithmPlotter @@ -374,101 +374,114 @@ These settings can always be changed at any time from the "Settings" m Settings - + X Zoom Zoom en X - + Y Zoom Zoom en Y - + Min X Min X - + Max Y Max Y - + Max X Max X - + Min Y Min Y - + X Axis Step Pas de l'axe X - + Y Axis Step Pas de l'axe Y - + Line width Taille des lignes - + Text size (px) Taille du texte (px) - + X Label Label de l'axe X - + Y Label Label de l'axe Y - + X Log scale Échelle logarithmique en X - + Show X graduation Montrer la graduation de l'axe X - + Show Y graduation Montrer la graduation de l'axe Y - + Copy to clipboard Copier vers le presse-papiers - + Save plot Sauvegarder le graphe - + Save plot as Sauvegarder le graphe sous - + Load plot Charger un graphe + + comment + + + Ex: 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}...) + + + function @@ -508,27 +521,27 @@ These settings can always be changed at any time from the "Settings" m historylib - + New %1 %2 created. Nouveau %1 %2 créé(e). - + %1 %2 deleted. %1 %2 supprimé(e). - + %1 of %2 %3 changed from "%4" to "%5". %1 de %2 %3 modifiée de "%4" à "%5". - + %1 %2 shown. %1 %2 affiché(e). - + %1 %2 hidden. %1 %2 cachée(e). @@ -536,45 +549,55 @@ These settings can always be changed at any time from the "Settings" m parameters - + above ↑ Au dessus - + below ↓ En dessous - + left ← À gauche - + right → À droite - + above-left ↖ Au dessus à gauche - + above-right ↗ Au dessus à droite - + below-left ↙ En dessous à gauche - + below-right ↘ En dessous à droite + + + application + + + + + function + + phasebode @@ -602,6 +625,49 @@ These settings can always be changed at any time from the "Settings" m Points + + prop + + + expression + + + + + definitionDomain + + + + + destinationDomain + + + + + labelPosition + + + + + displayMode + + + + + labelX + + + + + drawPoints + + + + + drawDashedLines + + + repartition diff --git a/LogarithmPlotter/i18n/lp_hu.ts b/LogarithmPlotter/i18n/lp_hu.ts index e559f64..a19a39f 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 @@ -269,37 +269,37 @@ Ezek a beállítások bármikor módosíthatók a „Beállítások” menüben. A(z) „%1” fájl betöltése folyamatban van. - + Unknown object type: %1. Ismeretlen objektumtípus: %1. - + Invalid file provided. A megadott fájl érvénytelen. - + Could not save file: A fájl mentése nem sikerült: - + Loaded file '%1'. A(z) „%1” fájl betöltve. - + Copied plot screenshot to clipboard! Ábra képernyőkép vágólapra másolva! - + &Update &Frissítés - + &Update LogarithmPlotter A LogarithmPlotter &frissítése @@ -366,101 +366,114 @@ Ezek a beállítások bármikor módosíthatók a „Beállítások” menüben. Settings - + X Zoom X-nagyítás - + Y Zoom Y-nagyítás - + Min X Legkisebb X - + Max Y Legnagyobb Y - + Max X Legnagyobb X - + Min Y Legkisebb Y - + X Axis Step X tengely lépésköze - + Y Axis Step Y tengely lépésköze - + Line width Vonalvastagság - + Text size (px) Szövegméret (képpont) - + X Label X címke - + Y Label Y címke - + X Log scale X tengely logaritmikus skálával - + Show X graduation X érettségi megjelenítése - + Show Y graduation Y érettségi megjelenítése - + Copy to clipboard Másolás a vágólapra - + Save plot Ábra mentése - + Save plot as Ábra mentése másként - + Load plot Ábra betöltése + + comment + + + Ex: 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}...) + + + function @@ -500,27 +513,27 @@ Ezek a beállítások bármikor módosíthatók a „Beállítások” menüben. historylib - + New %1 %2 created. Új %1 %2 létrehozva. - + %1 %2 deleted. %1 %2 törölve. - + %1 of %2 %3 changed from "%4" to "%5". %1/%2 %3 megváltozott. Régi érték: %4, új érték: %5. - + %1 %2 shown. %1 %2 megjelenítve. - + %1 %2 hidden. %1 %2 rejtve. @@ -528,45 +541,55 @@ Ezek a beállítások bármikor módosíthatók a „Beállítások” menüben. parameters - + above ↑ Felett - + below ↓ Alatt - + left ← Balra - + right → Jobbra - + above-left ↖ Felett, balra - + above-right ↗ Felett, jobbra - + below-left ↙ Alatt, balra - + below-right ↘ Alatt, jobbra + + + application + + + + + function + + phasebode @@ -594,6 +617,49 @@ Ezek a beállítások bármikor módosíthatók a „Beállítások” menüben. Pontok + + prop + + + expression + + + + + definitionDomain + + + + + destinationDomain + + + + + labelPosition + + + + + displayMode + + + + + labelX + + + + + drawPoints + + + + + drawDashedLines + + + repartition diff --git a/LogarithmPlotter/i18n/lp_nb_NO.ts b/LogarithmPlotter/i18n/lp_nb_NO.ts index 21883fe..3668f41 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 @@ -269,37 +269,37 @@ Disse innstillingene kan endres når som helst fra «Innstillinger»-menyen.Laster inn «%1»-fil. - + Unknown object type: %1. Ukjent objekttype: %1. - + Invalid file provided. Ugyldig fil angitt. - + Could not save file: Kunne ikke lagre fil: - + Loaded file '%1'. Lastet inn filen «%1». - + Copied plot screenshot to clipboard! Kopierte plott-skjermavbildning til utklippstavlen! - + &Update &Oppdater - + &Update LogarithmPlotter &Installer ny versjon av LogartimePlotter @@ -366,101 +366,114 @@ Disse innstillingene kan endres når som helst fra «Innstillinger»-menyen. Settings - + X Zoom X-forstørrelse - + Y Zoom Y-forstørrelse - + Min X Min. X - + Max Y Maks. Y - + Max X Maks. X - + Min Y Min. Y - + X Axis Step X-aksesteg - + Y Axis Step Y-aksesteg - + Line width Linjebredde - + Text size (px) Tekststørrelse (piksler) - + X Label Navn på X-akse - + Y Label Navn på Y-akse - + X Log scale Logaritmisk skala i x - + Show X graduation Vis X-inndeling - + Show Y graduation Vis Y-inndeling - + Copy to clipboard Kopier til utklippstavle - + Save plot Lagre plott - + Save plot as Lagre plott som - + Load plot Last inn plott + + comment + + + Ex: 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}...) + + + function @@ -500,27 +513,27 @@ Disse innstillingene kan endres når som helst fra «Innstillinger»-menyen. historylib - + New %1 %2 created. Ny %1 %2 opprettet. - + %1 %2 deleted. %1 %2 slettet. - + %1 of %2 %3 changed from "%4" to "%5". %1 av %2 %3 endret fra «%4» til «%5». - + %1 %2 shown. %1 %2 vist. - + %1 %2 hidden. %1 %2 skjult. @@ -528,45 +541,55 @@ Disse innstillingene kan endres når som helst fra «Innstillinger»-menyen. parameters - + above - + below - + left - + right - + above-left - + above-right - + below-left - + below-right + + + application + + + + + function + + phasebode @@ -594,6 +617,49 @@ Disse innstillingene kan endres når som helst fra «Innstillinger»-menyen.Punkter + + prop + + + expression + + + + + definitionDomain + + + + + destinationDomain + + + + + labelPosition + + + + + displayMode + + + + + labelX + + + + + drawPoints + + + + + drawDashedLines + + + repartition diff --git a/LogarithmPlotter/i18n/lp_template.ts b/LogarithmPlotter/i18n/lp_template.ts index 32cd12b..b489b2e 100644 --- a/LogarithmPlotter/i18n/lp_template.ts +++ b/LogarithmPlotter/i18n/lp_template.ts @@ -161,8 +161,8 @@ - - + + + Create new %1 @@ -268,37 +268,37 @@ These settings can be changed at any time from the "Settings" menu. - + Unknown object type: %1. - + Invalid file provided. - + Could not save file: - + Loaded file '%1'. - + Copied plot screenshot to clipboard! - + &Update - + &Update LogarithmPlotter @@ -365,101 +365,114 @@ These settings can be changed at any time from the "Settings" menu. Settings - + X Zoom - + Y Zoom - + Min X - + Max Y - + Max X - + Min Y - + X Axis Step - + Y Axis Step - + Line width - + Text size (px) - + X Label - + Y Label - + X Log scale - + Show X graduation - + Show Y graduation - + Copy to clipboard - + Save plot - + Save plot as - + Load plot + + comment + + + Ex: 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}...) + + + function @@ -499,27 +512,27 @@ These settings can be changed at any time from the "Settings" menu. historylib - + New %1 %2 created. - + %1 %2 deleted. - + %1 of %2 %3 changed from "%4" to "%5". - + %1 %2 shown. - + %1 %2 hidden. @@ -527,45 +540,55 @@ These settings can be changed at any time from the "Settings" menu. parameters - + above - + below - + left - + right - + above-left - + above-right - + below-left - + below-right + + + application + + + + + function + + phasebode @@ -593,6 +616,49 @@ These settings can be changed at any time from the "Settings" menu. + + prop + + + expression + + + + + definitionDomain + + + + + destinationDomain + + + + + labelPosition + + + + + displayMode + + + + + labelX + + + + + drawPoints + + + + + drawDashedLines + + + repartition diff --git a/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/ObjectLists/EditorDialog.qml b/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/ObjectLists/EditorDialog.qml index 1430159..a2ed94a 100644 --- a/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/ObjectLists/EditorDialog.qml +++ b/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/ObjectLists/EditorDialog.qml @@ -101,7 +101,8 @@ D.Dialog { Item { height: customPropComment.height + customPropText.height + customPropCheckBox.height + customPropCombo.height + customPropListDict.height width: dlgProperties.width - property string label: Utils.camelCase2readable(modelData[0]) + property string label: qsTranslate('prop',modelData[0]) + property string icon: Utils.camelCase2readable(modelData[0]) // Item for comments Label { @@ -109,7 +110,9 @@ D.Dialog { width: parent.width height: visible ? implicitHeight : 0 visible: modelData[0].startsWith('comment') - text: visible ? (modelData[1].replace(/\{name\}/g, objEditor.obj.name)) : '' + // 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 //color: sysPalette.windowText wrapMode: Text.WordWrap } @@ -120,7 +123,7 @@ D.Dialog { height: visible ? 30 : 0 width: parent.width label: parent.label - icon: `icons/settings/custom/${parent.label}.svg` + icon: `icons/settings/custom/${parent.icon}.svg` isDouble: modelData[1] == 'number' visible: paramTypeIn(modelData[1], ['Expression', 'Domain', 'string', 'number']) defValue: visible ? { @@ -156,7 +159,7 @@ D.Dialog { height: visible ? 20 : 0 width: parent.width text: parent.label - icon: visible ? `icons/settings/custom/${parent.label}.svg` : '' + //icon: visible ? `icons/settings/custom/${parent.icon}.svg` : '' checked: visible ? objEditor.obj[modelData[0]] : false onClicked: { @@ -176,19 +179,19 @@ D.Dialog { width: dlgProperties.width height: visible ? 30 : 0 label: parent.label - icon: visible ? `icons/settings/custom/${parent.label}.svg` : '' + icon: visible ? `icons/settings/custom/${parent.icon}.svg` : '' // True to select an object of type, false for enums. property bool selectObjMode: paramTypeIn(modelData[1], ['ObjectType']) - property bool isRealObject: !selectedObj || (modelData[1].objType != "ExecutableObject" && modelData[1].objType != "DrawableObject") + property bool isRealObject: !selectObjMode || (modelData[1].objType != "ExecutableObject" && modelData[1].objType != "DrawableObject") + // Base, untranslated version of the model. property var baseModel: visible ? - (selectObjMode ? Objects.getObjectsName(modelData[1].objType) - .concat( - isRealObject ? [qsTr("+ Create new %1").arg(modelData[1].objType)] : []) - : modelData[1].values) + (selectObjMode ? + Objects.getObjectsName(modelData[1].objType).concat(isRealObject ? [qsTr("+ Create new %1").arg(modelData[1].objType)] : []) : + modelData[1].values) : [] - // Translate the model if necessary. - model: selectObjMode ? baseModel : baseModel.map(x => qsTr(x)) + // Translated verison of the model. + model: selectObjMode ? baseModel : modelData[1].translatedValues visible: paramTypeIn(modelData[1], ['ObjectType', 'Enum']) currentIndex: baseModel.indexOf(selectObjMode ? objEditor.obj[modelData[0]].name : objEditor.obj[modelData[0]]) @@ -238,7 +241,7 @@ D.Dialog { visible: paramTypeIn(modelData[1], ['List', 'Dict']) label: parent.label - //icon: `icons/settings/custom/${parent.label}.svg` + //icon: `icons/settings/custom/${parent.icon}.svg` dictionaryMode: paramTypeIn(modelData[1], ['Dict']) keyType: dictionaryMode ? modelData[1].keyType : 'string' valueType: visible ? modelData[1].valueType : 'string' diff --git a/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/ObjectLists/ObjectLists.qml b/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/ObjectLists/ObjectLists.qml index 085d5b4..c31dda5 100644 --- a/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/ObjectLists/ObjectLists.qml +++ b/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/ObjectLists/ObjectLists.qml @@ -193,7 +193,7 @@ ListView { D.ColorDialog { id: pickColor - color: obj.color.arg(obj.name) + color: obj.color title: qsTr("Pick new color for %1 %2").arg(Objects.types[objType].displayType()) onAccepted: { history.addToHistory(new HistoryLib.EditedProperty( diff --git a/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/js/objs/function.js b/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/js/objs/function.js index 485d8ae..a22e270 100644 --- a/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/js/objs/function.js +++ b/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/js/objs/function.js @@ -28,7 +28,7 @@ class Function extends Common.ExecutableObject { static type(){return 'Function'} static displayType(){return qsTr('Function')} static displayTypeMultiple(){return qsTr('Functions')} - static properties() {return { + /*static properties() {return { 'expression': 'Expression', 'definitionDomain': 'Domain', 'destinationDomain': 'Domain', @@ -39,19 +39,25 @@ class Function extends Common.ExecutableObject { 'comment2': 'The following parameters are used when the definition domain is a non-continuous set. (Ex: ℕ, ℤ, sets like {0;3}...)', 'drawPoints': 'boolean', 'drawDashedLines': 'boolean' - }} - /*static properties() {return { - [QT_TR_NOOP('expression')]: 'Expression', - [QT_TR_NOOP('definitionDomain')]: 'Domain', - [QT_TR_NOOP('destinationDomain')]: 'Domain', - 'comment1': 'Ex: R+* (ℝ⁺*), N (ℕ), Z-* (ℤ⁻*), ]0;1[, {3;4;5}', - [QT_TR_NOOP('labelPosition')]: P.Enum.Position, - [QT_TR_NOOP('displayMode')]: new P.Enum('application', 'function'), - [QT_TR_NOOP('labelX')]: 'number', - 'comment2': 'The following parameters are used when the definition domain is a non-continuous set. (Ex: ℕ, ℤ, sets like {0;3}...)', - [QT_TR_NOOP('drawPoints')]: 'boolean', - [QT_TR_NOOP('drawDashedLines')]: 'boolean' }}*/ + static properties() {return { + [QT_TRANSLATE_NOOP('prop','expression')]: 'Expression', + [QT_TRANSLATE_NOOP('prop','definitionDomain')]: 'Domain', + [QT_TRANSLATE_NOOP('prop','destinationDomain')]: 'Domain', + 'comment1': QT_TRANSLATE_NOOP( + 'comment', + 'Ex: R+* (ℝ⁺*), N (ℕ), Z-* (ℤ⁻*), ]0;1[, {3;4;5}' + ), + [QT_TRANSLATE_NOOP('prop','labelPosition')]: P.Enum.Position, + [QT_TRANSLATE_NOOP('prop','displayMode')]: P.Enum.FunctionDisplayType, + [QT_TRANSLATE_NOOP('prop','labelX')]: 'number', + 'comment2': QT_TRANSLATE_NOOP( + 'comment', + 'The following parameters are used when the definition domain is a non-continuous set. (Ex: ℕ, ℤ, sets like {0;3}...)' + ), + [QT_TRANSLATE_NOOP('prop','drawPoints')]: 'boolean', + [QT_TRANSLATE_NOOP('prop','drawDashedLines')]: 'boolean' + }} constructor(name = null, visible = true, color = null, labelContent = 'name + value', expression = 'x', definitionDomain = 'RPE', destinationDomain = 'R', diff --git a/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/js/parameters.js b/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/js/parameters.js index b9d6690..c57c9e0 100644 --- a/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/js/parameters.js +++ b/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/js/parameters.js @@ -20,6 +20,7 @@ class Enum { constructor(...values) { this.type = 'Enum' this.values = values + this.translatedValues = values.map(x => qsTr(x)) } } @@ -55,7 +56,7 @@ class Dictionary { } } -// Common parameters of them: +// Common parameters for Enums Enum.Position = new Enum( QT_TR_NOOP('above'), @@ -67,3 +68,8 @@ Enum.Position = new Enum( QT_TR_NOOP('below-left'), QT_TR_NOOP('below-right') ) + +Enum.FunctionDisplayType = new Enum( + QT_TR_NOOP('application'), + QT_TR_NOOP('function') +);