Results 1 to 3 of 3

Thread: Problems with html special chars

  1. #1
    Devis is offline Sugar Community Member
    Join Date
    Jun 2005
    Location
    Schio - Italy
    Posts
    141

    Default Problems with html special chars

    I am using html encoding codes to encode special characters in our localization, for example I translate

    -> "Activities" with "Attività"

    and encode it as

    -> "Attività" in the localization files.

    I have found that using Grouped Modules Navigation this cause errors, because Javascript doesn't support array keys like this

    SUGAR.themes.subTabs['Attivit&#38;#224;']= '<ul class=\'subTabs\' onclick="SUGAR.themes.chooseTab(\'Attivit&#38;#224 ;\');return true;"><li class="subTab"><a href="index.php?module=Activities&action=index">At tivit&#38;#224;</a></li><li class="subTab"><a href="index.php?module=Calendar&action=index">Cale ndario</a></li><li class="subTab"><a href="index.php?module=Emails&action=index">Email</a></li><li class="subTab"><a href="index.php?module=Calls&action=index">Chiamat e</a></li><li class="subTab"><a href="index.php?module=Meetings&action=index">Riun ioni</a></li><li class="subTab"><a href="index.php?module=Tasks&action=index">Compiti </a></li><li class="subTab"><a href="index.php?module=Notes&action=index">Note</a></li></ul>';

    Is this considered a bug ?

    The string is "LBL_TABGROUP_ACTIVITIES" in "include\language\it_it.lang.php"
    Last edited by Devis; 2008-02-18 at 09:51 AM.
    Devis Lucato
    Ex maintainer Italian Localization
    Senior PHP Developer
    Linux System Admin
    London

  2. #2
    clint's Avatar
    clint is offline Sugar Team Member | Forums Lead Moderator
    Join Date
    Aug 2004
    Location
    Silicon Valley
    Posts
    2,120

    Default Re: Problems with html special chars

    Why are you using HTML encoded characters in the language pack? I don't think this would be a bug as we designed the system to understand all the different code pages and so expect the language packs to include the normal characters and not HTML characters. So we never expect to see HTML encoded characters in the Javascript.

    Be sure to save the language pack file as UTF8 encoding.

    Regards,
    Clint
    Sugar Developer Zone - developer resources | Sugar University - user and admin training
    Sugar Docs - user and admin documentation |
    Sugar Bug Tracker - Enter or view bugs
    SugarForge- open source modules, themes, lang packs | SugarExchange - commercial extensions

    Clint Oram
    Chief Technology Officer and Co-founder
    SugarCRM

  3. #3
    Devis is offline Sugar Community Member
    Join Date
    Jun 2005
    Location
    Schio - Italy
    Posts
    141

    Default Re: Problems with html special chars

    Hi Clint,
    I understand your point of view, but saving text file in UTF8 encoding make possible to break them editing in a normal text editor like wordpad. We choose to use HTML encoding to be more compatible with Apache settings, browser settings, operating system settings and light editors (like Wordpad).
    We will release next packages in UTF8, but I think that using localized strings as JS indexes may cause other problems in future.
    Regards
    Devis Lucato
    Ex maintainer Italian Localization
    Senior PHP Developer
    Linux System Admin
    London

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Replies: 4
    Last Post: 2006-09-26, 04:34 PM
  2. Replies: 0
    Last Post: 2006-05-23, 08:48 AM
  3. HTML Email editor text format problems
    By abodeinterior in forum General Discussion
    Replies: 1
    Last Post: 2005-11-21, 01:17 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •