This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch master in repository x2goclient. commit 4d543b06f4c2efa338f3358c6b5fbe298365239b Author: Mihai Moldovan <ionic@ionic.de> Date: Fri Feb 24 13:27:09 2017 +0100 src/onmainwindow.cpp: don't duplicate depth warning message needlessly, use correct plural forms in translations and split string up in a translation-friendly form. I'll leave translators to handle this beast, as languages are unique in the number of plural forms and the like. --- debian/changelog | 4 ++++ src/onmainwindow.cpp | 55 ++++++++++++++++------------------------------------ 2 files changed, 21 insertions(+), 38 deletions(-) diff --git a/debian/changelog b/debian/changelog index 83c08ca..e0603ef 100644 --- a/debian/changelog +++ b/debian/changelog @@ -86,6 +86,10 @@ x2goclient (4.1.0.1-0x2go1) UNRELEASED; urgency=medium - {src/{onmainwindow,httpbrokerclient}.cpp,res/i18n/x2goclient_*.ts}: fix another occurrence of a string missing a space separator between words and update translation files. + - src/onmainwindow.cpp: don't duplicate depth warning message needlessly, + use correct plural forms in translations and split string up in a + translation-friendly form. I'll leave translators to handle this beast, + as languages are unique in the number of plural forms and the like. [ Oleksandr Shneyder ] * New upstream version (4.1.0.1): diff --git a/src/onmainwindow.cpp b/src/onmainwindow.cpp index 40675c0..02bb3e6 100644 --- a/src/onmainwindow.cpp +++ b/src/onmainwindow.cpp @@ -4799,45 +4799,24 @@ void ONMainWindow::slotResumeSess() } else { - QString depth=QString::number ( s.colorDepth ); int res; - if ( s.colorDepth==24 || s.colorDepth==32 ) - { - res=QMessageBox::warning ( - 0l,tr ( "Warning" ), - tr ("Your current color depth is different from " - "the session's color depth. This may cause " - "problems reconnecting to this session and " - "in most cases <b>you will loose the " - "session</b> and have to start a new one! " - "It's highly recommended to change the color " - "depth of your display to " ) + - tr ( "24 or 32" ) + - tr (" bits and restart your X.Org Server before you " - "reconnect to this X2Go session.<br />" - "Do you want to resume this session anyway?" ), - tr ( "Yes" ), - tr ( "No" ) ); - - } - else - { - res=QMessageBox::warning ( - 0l,tr ( "Warning" ), - tr ("Your current color depth is different from " - "the session's color depth. This may cause " - "problems reconnecting to this session and " - "in most cases <b>you will loose the " - "session</b> and have to start a new one! " - "It's highly recommended to change the color " - "depth of your display to " ) + - depth + - tr (" bits and restart your X.Org Server before you " - "reconnect to this X2Go session.<br />" - "Do you want to resume this session anyway?" ), - tr ( "Yes" ), - tr ( "No" ) ); - } + res=QMessageBox::warning ( + 0l,tr ( "Warning" ), + tr ("Your current color depth is different from " + "the session's color depth. This may cause " + "problems reconnecting to this session and " + "in most cases <b>you will loose the " + "session</b> and have to start a new one! ") + + tr ("It's highly recommended to change the color " + "depth of your display to %n bit(s) and " + "restart your X.Org Server before you " + "reconnect to this X2Go session.", + "%n will be replaced with a number", + s.colorDepth) + + tr ("<br />" + "Do you want to resume this session anyway?"), + tr ( "Yes" ), + tr ( "No" ) ); if ( res==0 ) resumeSession ( s ); } -- Alioth's /srv/git/code.x2go.org/x2goclient.git//..//_hooks_/post-receive-email on /srv/git/code.x2go.org/x2goclient.git