EricT Posted December 14, 2016 Posted December 14, 2016 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.
Ilya Hoilik Posted December 14, 2016 Posted December 14, 2016 Hi! I'd recommend you to submit a support ticket here. Otherwise, this bug may not be fixed in the future releases.
bfarber Posted December 19, 2016 Posted December 19, 2016 Please send me a copy of the broken language pack so I can confirm which replacement is causing issues.
EricT Posted December 19, 2016 Author Posted December 19, 2016 How can I extract a langage pack ? I don't know how to do that on ACP Thank you
Taddei Jean-Baptiste Posted December 19, 2016 Posted December 19, 2016 You can do it by going to the ACP → Customization → Languages. Then, click on the arrow at the right of the screen and "Download". It will give you an XML file ;-)
EricT Posted December 19, 2016 Author Posted December 19, 2016 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.
bfarber Posted December 19, 2016 Posted December 19, 2016 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.
EricT Posted December 19, 2016 Author Posted December 19, 2016 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
Adriano Faria Posted December 19, 2016 Posted December 19, 2016 21 minutes ago, EricT said: The only issue I saw about this problem was on a third party app (Classifieds APP). Issue in the app or in your translation to French?
EricT Posted December 19, 2016 Author Posted December 19, 2016 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
EricT Posted December 19, 2016 Author Posted December 19, 2016 @Adriano Faria http://www.sosinvision.com.br/ips4/index.php?/tracker/classifieds/classifieds_6_8/langage-issue-r152/
bfarber Posted December 19, 2016 Posted December 19, 2016 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.
Adriano Faria Posted December 19, 2016 Posted December 19, 2016 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?
bfarber Posted December 19, 2016 Posted December 19, 2016 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.
Adriano Faria Posted December 19, 2016 Posted December 19, 2016 5 minutes ago, bfarber said: <a href='URL' title='{lang="some_key"}'>text</a> So should I use double quotes everywhere, like: 6 minutes ago, bfarber said: <a href="URL" title="{lang="some_key"}">text</a> ?
bfarber Posted December 19, 2016 Posted December 19, 2016 That would prevent this issue, yes. It won't always be needed, but it also won't hurt anything where it isn't needed.
Adriano Faria Posted December 26, 2016 Posted December 26, 2016 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:
Ahmad E. Posted December 26, 2016 Posted December 26, 2016 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>",
Adriano Faria Posted December 26, 2016 Posted December 26, 2016 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).
EricT Posted December 26, 2016 Author Posted December 26, 2016 '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>"
Ilya Hoilik Posted December 26, 2016 Posted December 26, 2016 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.
Ilya Hoilik Posted December 26, 2016 Posted December 26, 2016 So, for example, this is causing an issue if string album_owner has ' symbol: <a href='{lang="album_owner"}'>hello</a> But this is not: <a href="{lang="album_owner"}">hello</a>
Adriano Faria Posted December 26, 2016 Posted December 26, 2016 38 minutes ago, Ilya Hoilik said: As I understand, Brandon said about links in HTML templates, not in language strings. The topic is about a user translation. Probably Brandon misunderstood it then.
Recommended Posts
Archived
This topic is now archived and is closed to further replies.