Moodle

"update all local language packs" fails if local language pack is installed and deletes local pack.

Details

  • Type: Bug Bug
  • Status: Closed Closed
  • Priority: Minor Minor
  • Resolution: Fixed
  • Affects Version/s: 1.8.4, 1.9
  • Fix Version/s: 1.9, 2.0
  • Component/s: Language
  • Labels:
    None
  • Affected Branches:
    MOODLE_18_STABLE, MOODLE_19_STABLE
  • Fixed Branches:
    MOODLE_19_STABLE, MOODLE_20_STABLE

Description

I can use the "update all local language packs" on the "Language packs" panel (langimport.php) if I have only standard languages installed. However, if I add a local language pack (not _local language folder but full language pack), the "update all local language packs" script gives an error: Cannot find component.

The local language pack has the langconfig.php with parent setting pointing to one of the installed languages. It shows in the list and the language switching menu and works fine otherwise.

Moodle 1.9 (beta 3) deletes the folder with the non-standard language !!! Moodle 1.8 at least left it alone.

Sounds like Moodle needs to be able to distinguish local and standard packs or allow us to specify which language to update as an alternative to bulk update (unless having local language packs is not supported anymore).

Activity

Hide
Koen Roggemans added a comment -

Assigning this to Moodle.com

Show
Koen Roggemans added a comment - Assigning this to Moodle.com
Hide
Koen Roggemans added a comment -

I think there is something wrong in the logic.

Additional to this: I have an unknown problem on my server which causes the automatic update to fail. If I try it, the first language pack is always deleted. I think the download, unpack and verify should come before deleting anything. That would solve your problem too.

Show
Koen Roggemans added a comment - I think there is something wrong in the logic. Additional to this: I have an unknown problem on my server which causes the automatic update to fail. If I try it, the first language pack is always deleted. I think the download, unpack and verify should come before deleting anything. That would solve your problem too.
Hide
Robert Brenstein added a comment -

My custom language pack is listed first by angimport.php, so it is likely that I see what Koen reported that the first language is deleted. I would have thought that the update function would skip the languages it couldn't update but continue to update others.

I would also vote to be able to click on a single language in a list and then click a button to update only that specific language. Ideally, language updating should mimic CVS in terms of operation.

Show
Robert Brenstein added a comment - My custom language pack is listed first by angimport.php, so it is likely that I see what Koen reported that the first language is deleted. I would have thought that the update function would skip the languages it couldn't update but continue to update others. I would also vote to be able to click on a single language in a list and then click a button to update only that specific language. Ideally, language updating should mimic CVS in terms of operation.
Hide
Petr Škoda (skodak) added a comment -

fixed in cvs, thanks for the report!

Show
Petr Škoda (skodak) added a comment - fixed in cvs, thanks for the report!
Hide
Robert Brenstein added a comment -

Is there a reason why the fix can't be in 1.8.x branch as well? It is also not clear whether you fixed the deletion problem and/or the update problem.

Show
Robert Brenstein added a comment - Is there a reason why the fix can't be in 1.8.x branch as well? It is also not clear whether you fixed the deletion problem and/or the update problem.
Hide
Petr Škoda (skodak) added a comment -

Both should be fixed, please test it in latest 1.9dev version.

The reason is I did many other changes in langimport.php and unfortunately I do not have enough time now to backport/test all fixes from 1.9.x to 1.8.x, sorry

Show
Petr Škoda (skodak) added a comment - Both should be fixed, please test it in latest 1.9dev version. The reason is I did many other changes in langimport.php and unfortunately I do not have enough time now to backport/test all fixes from 1.9.x to 1.8.x, sorry

People

Vote (0)
Watch (1)

Dates

  • Created:
    Updated:
    Resolved: