Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Translation not shown properly #2902

Open
jurajkapsz opened this issue May 12, 2019 · 3 comments
Open

Translation not shown properly #2902

jurajkapsz opened this issue May 12, 2019 · 3 comments

Comments

@jurajkapsz
Copy link
Contributor

jurajkapsz commented May 12, 2019

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.

@wdebusschere
Copy link

wdebusschere commented Mar 27, 2020

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

@nitriques
Copy link
Member

@wdebusschere any ideas on how to fix it ?

@wdebusschere
Copy link

wdebusschere commented Apr 2, 2020

@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..

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants