Jump to content

Bug with Translation


EricT

Recommended Posts

Posted

Hi,

In French there is a lot of caracters like this one :

Quote

'

If I use this caracter : 

Quote

 Unicode U+2019

The translation is working with sentences with this caracter

If I use this one : 

Quote

' Unicode U+0027 

It breaks the sentences on front end

The problem is : french keyboards are using U+0027 caracters not the other.

One solution would be to support both.

I have to check all my french translation to find the bad caracter to change it and make it work for the whole site. :cry:

Posted

Thank you !

So no need to do a sql request to replace the bad caracter.

I will download the xml file and replace the bad caracter. There is no risk doing that way

57 minutes ago, bfarber said:

which replacement is causing issues.

It is not a replacement which causing issue, but a caracter I typed with my french keyboard (simple quote)
Now I am going to do a replacement.

Posted

No, what I mean is if you translated a certain key to include an apostrophe, this can result in broken HTML. If you can send me the language pack I can take a look at exactly which translated string is causing the broken HTML and see what adjustments we can make on our end to prevent it from being an issue. Unfortunately right now though, I don't know which string was translated which resulted in the issue.

Posted

I understand.

The only issue I saw about this problem was on a third party app (Classifieds APP). But I didn't write myself the other strings (IPS APP).

I send you by pm the file

Posted

Issue when some string of my classifieds french translation contains the quote caracter

I report to you (if I remember) about this problem a few month ago on your site and you told me it should be a IPS issue

Posted

Hmm, if the issue only occurs in the Classifieds app, then the author of that app will need to take a look. Changing attributes in the HTML to use double quotes instead of single quotes is likely all that is needed. If it was happening in the main Suite release we could take a look at doing that, but we wouldn't have any way of adjusting templates in a third party application, however.

Posted
4 minutes ago, bfarber said:

Hmm, if the issue only occurs in the Classifieds app, then the author of that app will need to take a look. Changing attributes in the HTML to use double quotes instead of single quotes is likely all that is needed. If it was happening in the main Suite release we could take a look at doing that, but we wouldn't have any way of adjusting templates in a third party application, however.

The translation is done in a Core feature, not on my app. I have translated it to Brazilian Portuguese and Ruasian, this one available on marketplace, and no one else had any issue. 

It's funny when someone says the magic word "3rd party" then immediately is  followed by a "not our problem".

How can this be a problem on my app? A translation made by someone else? 

Posted

If your application does this

<a href='URL' title='{lang="some_key"}'>text</a>

and he translates some_key to "this has an 'apostrophe" it will break the resulting HTML. The easy solution is to change attributes to use double quotes. I was going to look at doing this if it was breaking in the core Suite, but he's saying it's only happening in Classifieds which we can't control the templates for.

Posted
On 19/12/2016 at 2:14 PM, Adriano Faria said:

So should I use double quotes everywhere, like:

?

 

On 19/12/2016 at 2:15 PM, bfarber said:

That would prevent this issue, yes. It won't always be needed, but it also won't hurt anything where it isn't needed.

That doesn't work, @bfarber:

 

	'cl_invalid_price2'	=> "You are required to fill the price in all currencies. Visit <a target="_blank" href="http:://www.xe.com" to make currency conversions></a>",

The app doesn't even run anymore:

Quote

ParseError thrown with message "syntax error, unexpected '_blank' (T_STRING), expecting ')'"

Stacktrace:
#8 ParseError in C:\wamp64\www\novo\applications\classifieds\dev\lang.php:443
#7 IPS\_Lang:languageInit in C:\wamp64\www\novo\init.php:443
#6 IPS\cms_hook_Lang:languageInit in C:\wamp64\www\novo\system\Lang\Lang.php:75
#5 IPS\_Lang:load in C:\wamp64\www\novo\system\Member\Member.php:1636
#4 IPS\_Member:language in C:\wamp64\www\novo\system\Dispatcher\Standard.php:75
#3 IPS\Dispatcher\_Standard:baseJs in C:\wamp64\www\novo\system\Dispatcher\Front.php:483
#2 IPS\Dispatcher\_Front:baseJs in C:\wamp64\www\novo\system\Dispatcher\Front.php:67
#1 IPS\Dispatcher\_Front:init in C:\wamp64\www\novo\system\Dispatcher\Dispatcher.php:86
#0 IPS\_Dispatcher:i in C:\wamp64\www\novo\index.php:13

Also used:

<a target=\"_blank\" href=\"http:://www.xe.com\"

The link doesn't appear:

Capturar.PNG

Posted

Escaping the "s that you want to output:

'cl_invalid_price2'	=> "You are required to fill the price in all currencies. Visit <a target=\"_blank\" href=\"http:://www.xe.com\" to make currency conversions></a>",

 

Posted
1 minute ago, Ahmad E. said:

Escaping the "s that you want to output:


'cl_invalid_price2'	=> "You are required to fill the price in all currencies. Visit <a target=\"_blank\" href=\"http:://www.xe.com\" to make currency conversions></a>",

 

Tks, I've done that. My post above is edited. The link does not appear (see the image above).

Posted

'cl_invalid_price2' => "You are required to fill the price in all currencies. Visit <a target=\"_blank\" href=\"http:://www.xe.com\"> to make currency conversions></a>"

Posted
11 minutes ago, Adriano Faria said:

That doesn't work. The app doesn't even run anymore

As I understand, Brandon said about links in HTML templates, not in language strings. So, you can safely use ' inside your a tags in language strings. But if you have {lang=something"} between 's in your template, you should consider replacing them with "s.

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...