fix dialog and translations to allow messages with newlines

This commit is contained in:
Ralf Becker 2014-05-27 12:11:09 +00:00
parent 30ae5f1b81
commit 9ed199261a
2 changed files with 7 additions and 1 deletions

View File

@ -397,6 +397,11 @@ span.et2_date_duration input.et2_date_duration{
.ui-dialog-content { .ui-dialog-content {
vertical-align: middle; vertical-align: middle;
} }
.ui-dialog-content > div {
white-space: pre-wrap;
display: inline-block;
vertical-align: middle;
}
/* These change button alignment, but it seems the standard is right-aligned for /* These change button alignment, but it seems the standard is right-aligned for
action buttons, left aligned for "extra" controls action buttons, left aligned for "extra" controls
.ui-dialog .ui-dialog-buttonpane { .ui-dialog .ui-dialog-buttonpane {

View File

@ -57,7 +57,8 @@ if (!count(translation::$lang_arr))
translation::add_app($_GET['app'], 'en'); translation::add_app($_GET['app'], 'en');
} }
$content = 'egw.set_lang_arr("'.$_GET['app'].'", '.json_encode(translation::$lang_arr).');'; // fix for phrases containing \n
$content = 'egw.set_lang_arr("'.$_GET['app'].'", '.str_replace('\\\\n', '\\n', json_encode(translation::$lang_arr)).');';
// we run our own gzip compression, to set a correct Content-Length of the encoded content // we run our own gzip compression, to set a correct Content-Length of the encoded content
if (in_array('gzip', explode(',',$_SERVER['HTTP_ACCEPT_ENCODING'])) && function_exists('gzencode')) if (in_array('gzip', explode(',',$_SERVER['HTTP_ACCEPT_ENCODING'])) && function_exists('gzencode'))