Moodle

Multilang upgrade to new tags in Moodle 1.8

Details

  • Type: Bug Bug
  • Status: Closed Closed
  • Priority: Minor Minor
  • Resolution: Fixed
  • Affects Version/s: 1.7
  • Fix Version/s: 1.8
  • Component/s: Filters
  • Labels:
    None
  • Affected Branches:
    MOODLE_17_STABLE
  • Fixed Branches:
    MOODLE_18_STABLE

Description

See MDL-7437.

We still need to:

1) Add a routine in the upgrade to convert old multilang tags to the new method:

<span lang="fr">Bonjour!</span> and <lang lang="fr">Bonjour!</lang>

to:

<span lang="fr" class="multilang">Bonjour!</span>

2) Modify the multilang filter to look for the new classes, and optionally to support the old tags as well (filter config setting).

I know these will be easy for you!

  1. multilang_new18_1.patch
    12/Dec/06 6:54 AM
    15 kB
    Petr Škoda (skodak)
  2. multilang_new18_2.patch
    12/Dec/06 6:04 PM
    14 kB
    Petr Škoda (skodak)

Issue Links

Activity

Hide
Petr Škoda (skodak) added a comment -

Attaching first draft:

implemented - needs testing and minor fixes:
1/ old multilang renamed to multilangold
2/ multilang now handles only new syntax
3/ admin/multilangupgrade.php script uses similar technique as admin/replace.php; should be save to run repeatedly (todo: add check that table has id column)

not yet implemented:
4/ notification on admin/index.php that tells users to migrate to new syntax
5/ language strings in lang pack
6/ wiki docs

If somebody wants to use the old syntax:

  • should enable multilangold (can be used also after the new multilang filter)
  • should not migrate the data in database
  • should disable the new lang buttons in editor

I have also fixed whitespace problem after the multilang block in text in the new filter, the regex might be also a bit faster than before.

will continue tomorrow if the proposal above is approved

Show
Petr Škoda (skodak) added a comment - Attaching first draft: implemented - needs testing and minor fixes: 1/ old multilang renamed to multilangold 2/ multilang now handles only new syntax 3/ admin/multilangupgrade.php script uses similar technique as admin/replace.php; should be save to run repeatedly (todo: add check that table has id column) not yet implemented: 4/ notification on admin/index.php that tells users to migrate to new syntax 5/ language strings in lang pack 6/ wiki docs If somebody wants to use the old syntax:
  • should enable multilangold (can be used also after the new multilang filter)
  • should not migrate the data in database
  • should disable the new lang buttons in editor
I have also fixed whitespace problem after the multilang block in text in the new filter, the regex might be also a bit faster than before. will continue tomorrow if the proposal above is approved
Hide
Petr Škoda (skodak) added a comment -

I think it should beready for committing - multilangold is not used, there is a switch to force old syntax instead...

Show
Petr Škoda (skodak) added a comment - I think it should beready for committing - multilangold is not used, there is a switch to force old syntax instead...
Hide
Petr Škoda (skodak) added a comment -

wiki docs at http://docs.moodle.org/en/Multi_language_content should be updated too

fortunatelly the new syntax is backwards compatible with old multilang filter, which means that class="multilang" can be used in 1.6/1.7 too - yay :-D

Show
Petr Škoda (skodak) added a comment - wiki docs at http://docs.moodle.org/en/Multi_language_content should be updated too fortunatelly the new syntax is backwards compatible with old multilang filter, which means that class="multilang" can be used in 1.6/1.7 too - yay :-D
Hide
Petr Škoda (skodak) added a comment -

should be finished, please reopen or fix language strings if needed

Show
Petr Škoda (skodak) added a comment - should be finished, please reopen or fix language strings if needed

People

Vote (0)
Watch (0)

Dates

  • Created:
    Updated:
    Resolved: