symphonycms/symphonycms

Translation not shown properly

Opened this issue · 3 comments

Affected Symphony version(s) : 2.7.10
PHP version(s) : 7.2
OS(es) : Ubuntu (Chrome, Firefox)

I have a Symphony translation:

'This request exceeds the maximum allowed request size of %s specified by your host.' =>
'Táto požiadavka prekročila povolenú veľkosť %s stanovenú serverom.',

But in the UI it is shown the following way (see at the beginning):

image

It looks like it is somehow changed by the backend javascript, 'cause in the html source the translation is present as translated, but changed in browser's debugger:

image

No errors in JS.

Ok I have reproduced this.

The problem is because of this line:
https://github.com/symphonycms/symphonycms/blob/master/symphony/assets/js/src/symphony.notify.js#L56

item = $('<p />', {
				'class': type
			}).html(message.replace(Symphony.Language.get('at') + ' ', '')).addClass('notice active').symphonyTimeAgo();

{
Ignore?: "Ignorovať?",
next: "ďalšie",
at: "o",
status: 200
}

Táto požiadavka get Tátpožiadavka

@wdebusschere any ideas on how to fix it ?

@nitriques

only replace if there is a %s (date?) after.. (maybe check if after the space there is a number)

'Author created at %s.' =>'Autor um %s erstellt.',

It's a minor issue, but i guess it can happen often.. example german: at = um, i guess the message could have some words ending in um with a space after and then the next word..