NetTalk Central

Author Topic: Loc:alert messages with double quotes.  (Read 3293 times)

Rob Kolanko

  • Sr. Member
  • ****
  • Posts: 253
    • View Profile
Loc:alert messages with double quotes.
« on: July 18, 2012, 11:34:18 AM »
Messages that contain double quotes which are copied to loc:alert are displayed in the popup window with " rather than ".
Is there a way to permit the double quote to appear normally?

Thanks,
Rob Kolanko

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11244
    • View Profile
Re: Loc:alert messages with double quotes.
« Reply #1 on: July 19, 2012, 12:01:41 AM »
Hi Rob,

I've tried to duplicate here in the "Validation" example, but I'm getting the quotes in the popup message fine.
Can you maybe tweak an example to show the effect?

cheers
Bruce

Rob Kolanko

  • Sr. Member
  • ****
  • Posts: 253
    • View Profile
Re: Loc:alert messages with double quotes.
« Reply #2 on: July 19, 2012, 11:28:07 AM »
Hi Bruce,
I found that the issue is being caused by p_web.Translate() method. In the validation example change the loc:alert line in the embed in MailboxesFormControl to:
loc:alert = p_web.Translate('The nickname Must be longer than "4" characters')
Then trigger the error message and you will see that the quotes are being changed on the pop-up message but not on the web page.
As you likely know the solution is to add the “AllowHTML” parameter as follows:
loc:alert = p_web.Translate('The nickname Must be longer than "4" characters',1)
My immediate problem has been solved.

However, my application will eventually have both an English and French interface. My current application which I converting to NetTalk is bilingual, thus I have most of the phrases all ready translated.  I have been using Translate method wherever possible.  I will need to put my translation code in the WebHandler embed before the parent call. But should I let the translated string pass to the parent? What is the purpose of the converting the string to HTML here?   

Thanks,
Rob Kolanko

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11244
    • View Profile
Re: Loc:alert messages with double quotes.
« Reply #3 on: July 20, 2012, 03:55:39 AM »
let me see what I can do for the next build...

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11244
    • View Profile
Re: Loc:alert messages with double quotes.
« Reply #4 on: July 20, 2012, 04:40:40 AM »
ok, sorted for the next build. (6.38)

cheers
Bruce