Moodle

Filter language packs are not pluggable

Details

  • Type: Improvement Improvement
  • Status: Closed Closed
  • Priority: Major Major
  • Resolution: Fixed
  • Affects Version/s: 1.9.3, 2.0
  • Fix Version/s: 2.0
  • Component/s: Filters, Language
  • Labels:
    None
  • Affected Branches:
    MOODLE_19_STABLE, MOODLE_20_STABLE
  • Fixed Branches:
    MOODLE_20_STABLE

Description

Although "filter_' is specified in the places to search for filter language files it doesn't actually work as the filter language files are not correctly named nor properly searched for. For example, it should be "filter_mediaplugins.php" not just "mediaplugins.php". As it stands it is impossible to add language packs to non-core filters.

I guess this could just be fixed in 2.0 but I'd really like something sorted in 1.9. It basically means searching for both get_string( '...',$filtername) and for get_string( '...',"filter_$filtername")

Issue Links

Activity

Hide
Howard Miller added a comment -

Actually forget that last bit about 1.9... too much bother. This should really be sorted for 2.0 though.

Show
Howard Miller added a comment - Actually forget that last bit about 1.9... too much bother. This should really be sorted for 2.0 though.
Hide
Tim Hunt added a comment -

What I have implemented is explained in the commit comment, and on http://docs.moodle.org/en/Development:Filters.

Show
Tim Hunt added a comment - What I have implemented is explained in the commit comment, and on http://docs.moodle.org/en/Development:Filters.
Hide
Mike Churchward added a comment -

I am re-opening this (rather than opening a new issue) because I don't think it works the way the solution seems to state. The document page referred to (http://docs.moodle.org/en/Development:Filters#A_note_on_language_strings) indicates that the language strings should be in the filter language directory in a file named 'filter_[myfilter].php' and contain a 'filtername' string. Yet, in 1.9, this still does not seem to work. The document page does not seem to be 2.0 specific.

Apologies if I read this wrong and it is supposed to be 2.0 specific.

Show
Mike Churchward added a comment - I am re-opening this (rather than opening a new issue) because I don't think it works the way the solution seems to state. The document page referred to (http://docs.moodle.org/en/Development:Filters#A_note_on_language_strings) indicates that the language strings should be in the filter language directory in a file named 'filter_[myfilter].php' and contain a 'filtername' string. Yet, in 1.9, this still does not seem to work. The document page does not seem to be 2.0 specific. Apologies if I read this wrong and it is supposed to be 2.0 specific.
Hide
Tim Hunt added a comment -

My fix is Moodle 2.0 only, and since the changes are quite large I don't want to backport them. I will fix the docs for now. Re-closing this bug.

Show
Tim Hunt added a comment - My fix is Moodle 2.0 only, and since the changes are quite large I don't want to backport them. I will fix the docs for now. Re-closing this bug.

People

Vote (0)
Watch (2)

Dates

  • Created:
    Updated:
    Resolved: