CRM-12135 Title of list of events page on front-end is not translated

    Details

    • Type: Bug
    • Status: Done/Fixed
    • Priority: Minor
    • Resolution: Fixed/Completed
    • Affects Version/s: 4.2.8
    • Fix Version/s: 4.4.6
    • Component/s: CiviEvent
    • Labels:

      Description

      We have change the défault language to French France.
      In the front-end, the title of the public list of events is not translated in French
      The CMS used is joomla 2.5.9

        Attachments

          Activity

          [CRM-12135] Title of list of events page on front-end is not translated
          Donald A. Lobo added a comment -

          bgm:

          i investigated this and i think this is what is happening:

          a. the title is being derived from the menu system, in this case it comes from: CRM/Event/xml/Menu/Event.xml

          b. We do the right thing and send in the variable string to be translated

          c. However in transifex, I cannot find the exact string "Current and Upcoming Events"

          I suspect this is due to the language parser not extracting the title fields from the xml files. BGM: this might involve a change in how we extract strings etc.Not sure how big/small a task this is

          Sebastien: For the short term, you can potentially use word replacements to get around this issue

          Mathieu Lutfy added a comment -

          The string is in menu.po, and is translated:
          https://github.com/civicrm/l10n/blob/master/po/fr/menu.po
          https://www.transifex.com/projects/p/civicrm/translate/#fr/menu/903524?q=Current%20and%20Upcoming

          All menu titles are extracted from create-pot-files.sh (CRM//xml/Menu/.xml).

          The string is used in two places: in the search criteria of the Event dashboard, and in the ical feed of events:

          <path>civicrm/event/ical</path>
          <title>Current and Upcoming Events</title>

          I'm not familiar with this feature of Joomla, is it possible that it's an ical/rss import of events, and it needs to be translated in Joomla?

          Mathieu Lutfy added a comment -

          Debugged this online with lobo, and is related to ts() needing the gettext 'context', since these strings are in menu.po, which have an explicit context to avoid situations where a string in a page title may be translated differently than the same string in a page content.

          see CRM/Core/I18n.php, function localizeTitles().

          @ Sébastien PETIT: can you test / apply the patch locally to your installation?

          The exact line is in civicrm/CRM/Core/I18n.php, function localizeTitles() :
          https://github.com/mlutfy/civicrm-core/commit/eb7d6f395eee76e939509a63a409a91ce2fbbc84

          Sébastien PETIT added a comment -

          Hello,

          I have test the proposed patch oin file civicrm/CRM/Core/I18n.php, function localizeTitles().
          The title is displayed translated, the patch solve the bug.

          Regards.
          Sébastien.

          Mathieu Lutfy added a comment -

          The patch was merged somewhere in 4.4.x, closing the issue.

            People

            • Assignee:
              Mathieu Lutfy
              Reporter:
              Sébastien PETIT

              Dates

              • Created:
                Updated:
                Resolved: