CRM icon indicating copy to clipboard operation
CRM copied to clipboard

config_cfg locale warnings

Open DawoudIO opened this issue 8 years ago • 3 comments

running vagrant@scotchbox:/vagrant$ scripts/update-locale.sh returns the following warnings

/vagrant/src/locale/messages.po: warning: Charset "CHARSET" is not a portable encoding name.
                                          Message conversion to user's charset might not work.
./config_cfg.php:31: warning: Empty msgid.  It is reserved by GNU gettext:
                              gettext("") returns the header entry with
                              meta information, not the empty string.
./config_cfg.php:2: warning: internationalized messages should not contain the '\r' escape sequence
./config_cfg.php:2: warning: internationalized messages should not contain the '\r' escape sequence
./config_cfg.php:2: warning: internationalized messages should not contain the '\r' escape sequence
./config_cfg.php:2: warning: internationalized messages should not contain the '\r' escape sequence
./config_cfg.php:11: warning: internationalized messages should not contain the '\r' escape sequence
./config_cfg.php:16: warning: internationalized messages should not contain the '\r' escape sequence
./config_cfg.php:18: warning: internationalized messages should not contain the '\r' escape sequence
./config_cfg.php:18: warning: internationalized messages should not contain the '\r' escape sequence
./config_cfg.php:18: warning: internationalized messages should not contain the '\r' escape sequence
./config_cfg.php:19: warning: internationalized messages should not contain the '\r' escape sequence
./config_cfg.php:19: warning: internationalized messages should not contain the '\r' escape sequence
./config_cfg.php:23: warning: internationalized messages should not contain the '\r' escape sequence
./config_cfg.php:30: warning: internationalized messages should not contain the '\r' escape sequence
./config_cfg.php:30: warning: internationalized messages should not contain the '\r' escape sequence
./config_cfg.php:32: warning: internationalized messages should not contain the '\r' escape sequence

DawoudIO avatar Nov 22 '16 15:11 DawoudIO

in 2.5.0 RC

./config_cfg.php:31: warning: Empty msgid. It is reserved by GNU gettext: gettext("") returns the header entry with meta information, not the empty string. ./config_cfg.php:2: warning: internationalized messages should not contain the '\r' escape sequence ./config_cfg.php:2: warning: internationalized messages should not contain the '\r' escape sequence ./config_cfg.php:2: warning: internationalized messages should not contain the '\r' escape sequence ./config_cfg.php:2: warning: internationalized messages should not contain the '\r' escape sequence ./config_cfg.php:11: warning: internationalized messages should not contain the '\r' escape sequence ./config_cfg.php:16: warning: internationalized messages should not contain the '\r' escape sequence ./config_cfg.php:18: warning: internationalized messages should not contain the '\r' escape sequence ./config_cfg.php:18: warning: internationalized messages should not contain the '\r' escape sequence ./config_cfg.php:18: warning: internationalized messages should not contain the '\r' escape sequence ./config_cfg.php:19: warning: internationalized messages should not contain the '\r' escape sequence ./config_cfg.php:19: warning: internationalized messages should not contain the '\r' escape sequence ./config_cfg.php:23: warning: internationalized messages should not contain the '\r' escape sequence ./config_cfg.php:30: warning: internationalized messages should not contain the '\r' escape sequence ./config_cfg.php:30: warning: internationalized messages should not contain the '\r' escape sequence ./config_cfg.php:32: warning: internationalized messages should not contain the '\r' escape sequence

DawoudIO avatar Jan 14 '17 17:01 DawoudIO

@DawoudIO Found the issue with this. we are doing gettext with newlines in it, when it should be different translations for each line

DAcodedBEAT avatar May 08 '24 18:05 DAcodedBEAT

@DawoudIO Found the issue with this. we are doing gettext with newlines in it, when it should be different translations for each line

Replace \r with \n and those warnings go away.

Splitting the translation up only makes sense if each line is a complete sentence.

I just checked on the my installation using en-gb and the \r has been stripped out and replaced with a space. So it looks like it isn't even surviving translation. Do we really need it?

respencer avatar May 08 '24 19:05 respencer