mirror of
https://gitlab.linphone.org/BC/public/linphone-desktop.git
synced 2026-01-22 22:28:08 +00:00
fix(ui/scripts/Utils/utils): escape properly quotes in openConfirmDialog
This commit is contained in:
parent
21120bd172
commit
9d44ccec6d
3 changed files with 22 additions and 27 deletions
|
|
@ -135,11 +135,11 @@
|
|||
</message>
|
||||
<message>
|
||||
<source>removeAllEntriesDescription</source>
|
||||
<translation type="unfinished"></translation>
|
||||
<translation>Êtes-vous sûr de vouloir supprimer cet historique ?</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>removeAllEntriesTitle</source>
|
||||
<translation type="unfinished"></translation>
|
||||
<translation>Suppression de l'historique</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
|
|
@ -161,7 +161,7 @@
|
|||
</message>
|
||||
<message>
|
||||
<source>attachmentTooltip</source>
|
||||
<translation type="unfinished"></translation>
|
||||
<translation>Envoyer un fichier</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
|
|
@ -170,41 +170,29 @@
|
|||
<source>incomingCall</source>
|
||||
<translation>Appel entrant</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>hangup</source>
|
||||
<translation type="vanished">Fin d'appel</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>lostIncomingCall</source>
|
||||
<translation type="vanished">Appel entrant manqué</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>lostOutgoingCall</source>
|
||||
<translation type="vanished">Appel sortant manqué</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>outgoingCall</source>
|
||||
<translation type="unfinished"></translation>
|
||||
<translation>Appel sortant</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>declinedIncomingCall</source>
|
||||
<translation type="unfinished"></translation>
|
||||
<translation>Appel entrant refusé</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>declinedOutgoingCall</source>
|
||||
<translation type="unfinished"></translation>
|
||||
<translation>Appel sortant refusé</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>endedCall</source>
|
||||
<translation type="unfinished"></translation>
|
||||
<translation>Fin d'appel</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>missedIncomingCall</source>
|
||||
<translation type="unfinished"></translation>
|
||||
<translation>Appel entrant manqué</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>missedOutgoingCall</source>
|
||||
<translation type="unfinished"></translation>
|
||||
<translation>Appel sortant sans réponse</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
|
|
@ -319,7 +307,7 @@
|
|||
<name>PresenceString</name>
|
||||
<message>
|
||||
<source>presenceOnline</source>
|
||||
<translation type="unfinished"></translation>
|
||||
<translation>En ligne</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>presenceOutToLunch</source>
|
||||
|
|
@ -339,7 +327,7 @@
|
|||
</message>
|
||||
<message>
|
||||
<source>presenceOffline</source>
|
||||
<translation type="unfinished"></translation>
|
||||
<translation>Hors-ligne</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>presenceUnknown</source>
|
||||
|
|
|
|||
|
|
@ -28,7 +28,7 @@ QtObject {
|
|||
}
|
||||
|
||||
property QtObject text: QtObject {
|
||||
property int fontSize: 13
|
||||
property int fontSize: 11
|
||||
|
||||
property QtObject color: QtObject {
|
||||
property color normal: Colors.k50
|
||||
|
|
|
|||
|
|
@ -80,7 +80,6 @@ function getTopParent (object, useFakeParent) {
|
|||
|
||||
var parent = _getTopParent(object, useFakeParent)
|
||||
var p
|
||||
|
||||
while ((p = _getTopParent(parent, useFakeParent)) != null) {
|
||||
parent = p
|
||||
}
|
||||
|
|
@ -97,8 +96,8 @@ function openConfirmDialog (parent, options) {
|
|||
'import QtQuick 2.7;' +
|
||||
'import Common 1.0;' +
|
||||
'ConfirmDialog {' +
|
||||
'descriptionText: \'' + options.descriptionText + '\';' +
|
||||
'title: \'' + options.title + '\'' +
|
||||
'descriptionText: \'' + escapeQuotes(options.descriptionText) + '\';' +
|
||||
'title: \'' + escapeQuotes(options.title) + '\'' +
|
||||
'}',
|
||||
parent, {
|
||||
isString: true,
|
||||
|
|
@ -268,6 +267,14 @@ function ensureArray (obj) {
|
|||
|
||||
// -------------------------------------------------------------------
|
||||
|
||||
function escapeQuotes (str) {
|
||||
return str != null
|
||||
? str.replace(/([^'\\]*(?:\\.[^'\\]*)*)'/g, '$1\\\'')
|
||||
: ''
|
||||
}
|
||||
|
||||
// -------------------------------------------------------------------
|
||||
|
||||
// Get the first matching value in a array or object.
|
||||
// The matching value is obtained if `cb` returns true.
|
||||
function find (obj, cb, context) {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue