Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-28489

Site News forum name is not translated on index.php

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 2.0.2, 2.1.1, 2.2
    • Fix Version/s: 2.0.5, 2.1.2
    • Component/s: Language
    • Labels:
    • Database:
      Any
    • Testing Instructions:
      Hide

      Replicate:
      1. Enable multi-lang filter

      • Go to "Site administration -> Plugins -> Filters -> Manage filters"
      • Enable "Multi-Language Content"
      • Set "Apply to" to "Content and headings"

      2. Edit the Site News forum and change the forum name to:
      <span lang="en" class="multilang">Site News</span><span lang="fr_ca" class="multilang">Nouvelles</span>

      3. Save the changes and view index.php.
      4. The forum title should display as "Site News" or "Nouvelles" (depending on Language set)

      Make sure forum title is not "Site NewsNouvelles".

      Show
      Replicate: 1. Enable multi-lang filter Go to "Site administration -> Plugins -> Filters -> Manage filters" Enable "Multi-Language Content" Set "Apply to" to "Content and headings" 2. Edit the Site News forum and change the forum name to: <span lang="en" class="multilang">Site News</span><span lang="fr_ca" class="multilang">Nouvelles</span> 3. Save the changes and view index.php. 4. The forum title should display as "Site News" or "Nouvelles" (depending on Language set) Make sure forum title is not "Site NewsNouvelles".
    • Workaround:
      Hide

      Apply attached patch

      Show
      Apply attached patch
    • Difficulty:
      Easy
    • Affected Branches:
      MOODLE_20_STABLE, MOODLE_21_STABLE, MOODLE_22_STABLE
    • Fixed Branches:
      MOODLE_20_STABLE, MOODLE_21_STABLE
    • Pull from Repository:
    • Pull Master Branch:
      MDL-28489_master

      Description

      When viewing the front page of a Moodle site, the Site News header does not get translated based on the user's selected language.

        Gliffy Diagrams

          Issue Links

            Activity

            Hide
            salvetore Michael de Raadt added a comment -

            Thanks for reporting this and providing a solution.

            Show
            salvetore Michael de Raadt added a comment - Thanks for reporting this and providing a solution.
            Hide
            rajeshtaneja Rajesh Taneja added a comment -

            Looks Good to me
            Thanks for fixing this Sam.

            Show
            rajeshtaneja Rajesh Taneja added a comment - Looks Good to me Thanks for fixing this Sam.
            Hide
            samhemelryk Sam Hemelryk added a comment -

            Thanks for looking at that Raj, its up for integration now

            Show
            samhemelryk Sam Hemelryk added a comment - Thanks for looking at that Raj, its up for integration now
            Hide
            stronk7 Eloy Lafuente (stronk7) added a comment -

            Uhm... am I missing anything or we can reduce the solution a lot by simply using get_coursemodule_from_instance() and get_context_instance() ?

            Here there is one alternative patch using them (master only). Please comment, because I cannot find the reason for those explicit SQLs there.

            https://github.com/stronk7/moodle/compare/master...MDL-28489_master

            Ciao

            Show
            stronk7 Eloy Lafuente (stronk7) added a comment - Uhm... am I missing anything or we can reduce the solution a lot by simply using get_coursemodule_from_instance() and get_context_instance() ? Here there is one alternative patch using them (master only). Please comment, because I cannot find the reason for those explicit SQLs there. https://github.com/stronk7/moodle/compare/master...MDL-28489_master Ciao
            Hide
            samhemelryk Sam Hemelryk added a comment -

            Hi Eloy
            I had used the explicit SQL only because I wasn't interested in the whole cm object.
            I wasn't 100% sure I was going about that correctly however so +1 for your patch! Although there is a small typo $foumcm (missing the r, would you like to integrate it or shall I now? I'm happy either way.

            Cheers Sam

            Show
            samhemelryk Sam Hemelryk added a comment - Hi Eloy I had used the explicit SQL only because I wasn't interested in the whole cm object. I wasn't 100% sure I was going about that correctly however so +1 for your patch! Although there is a small typo $foumcm (missing the r, would you like to integrate it or shall I now? I'm happy either way. Cheers Sam
            Hide
            stronk7 Eloy Lafuente (stronk7) added a comment -

            Let's interchange the roles, lol. So all yours. I've amended the typo.

            Thanks and ciao

            Show
            stronk7 Eloy Lafuente (stronk7) added a comment - Let's interchange the roles, lol. So all yours. I've amended the typo. Thanks and ciao
            Hide
            stronk7 Eloy Lafuente (stronk7) added a comment -

            Modified the repo & branches. This should apply perfectly to 20 & 21 stable by cherry-picking.

            Ciao

            Show
            stronk7 Eloy Lafuente (stronk7) added a comment - Modified the repo & branches. This should apply perfectly to 20 & 21 stable by cherry-picking. Ciao
            Hide
            samhemelryk Sam Hemelryk added a comment -

            Thanks Eloy, this has been integrated now

            Show
            samhemelryk Sam Hemelryk added a comment - Thanks Eloy, this has been integrated now
            Hide
            samhemelryk Sam Hemelryk added a comment -

            And also tested

            Show
            samhemelryk Sam Hemelryk added a comment - And also tested
            Hide
            stronk7 Eloy Lafuente (stronk7) added a comment -

            git & cvs repositories have been populated with this solution. Many thanks for your collaboration, yay!

            Closing, ciao

            Show
            stronk7 Eloy Lafuente (stronk7) added a comment - git & cvs repositories have been populated with this solution. Many thanks for your collaboration, yay! Closing, ciao

              People

              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Fix Release Date:
                  10/Oct/11