Add language pack management into admin section

Bug #1884717 reported by Cecilia Vela Gurovic
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Mahara
Fix Released
Wishlist
Cecilia Vela Gurovic

Bug Description

from the forum post https://mahara.org/interaction/forum/topic.php?id=8643&offset=0&limit=10

1. It will have an automated check to see if there's a new language pack for languages installed on the site and the current version of Mahara

2. It will allow the admin to synchronise the language pack if there is a new one available

We will need a new page on the admin section to show the lang pack management section. When this page is loaded we check if there are any new languages that need to be updated on the site (reusing code from sync_langpacks.php)
If there are any, show a list of them on a table, each one can have a checkbox next to it to select it and at the bottom a button that allows the admin to sync all the languages selected. Once this button is clicked we either run the sync_language.php script or reuse some of the code.
After this is done, show a message to the admin to show if the action was successful and refresh the table

In the code we would need to
- Add the item to admin menu
- separate some code from sync_langpacks.php and create functions to be called, so we can reuse them
- create the php file to generate the admin section page. This will:
  - check for new langpacks
  - create a form with a table with all langpacks to be synchronised and a sync button
  - validate and submit function for that form

Tags: newfeature
Changed in mahara:
assignee: nobody → Cecilia Vela Gurovic (ceciliavg)
Changed in mahara:
status: New → In Progress
Revision history for this message
Mahara Bot (dev-mahara) wrote : A patch has been submitted for review

Patch for "master" branch: https://reviews.mahara.org/11052

Changed in mahara:
milestone: 20.10.0 → none
Revision history for this message
Mahara Bot (dev-mahara) wrote :

Patch for "main" branch: https://reviews.mahara.org/12085

Revision history for this message
Robert Lyon (robertl-9) wrote :

To install php intl module
==========================

Installing it should be as simple as doing
 sudo apt-get install php-intl

Check that the int.so file exists

 ls $(php -r "echo ini_get('extension_dir');")/*intl.so

Check that the extenstion is active

 grep -r 'extension=intl' /etc/php/

There should be at least one line returned that is not commented out

Also check phpinfo()

 php -r "phpinfo();" | grep intl

This should return some lines

Also try
 sudo phpennmod intl

Then restart apache2
 sudo service apache2 restart

Revision history for this message
Kristina Hoeppner (kris-hoeppner) wrote :

Test with both sites that have had lang packs for a while and one that doesn't have lang packs.

Revision history for this message
Mahara Bot (dev-mahara) wrote : A change has been merged

Reviewed: https://reviews.mahara.org/12085
Committed: https://git.mahara.org/mahara/mahara/commit/cf52d46fbb5bb72a23c294dfe5ed7bb8fe2addad
Submitter: Robert Lyon (<email address hidden>)
Branch: main

commit cf52d46fbb5bb72a23c294dfe5ed7bb8fe2addad
Author: Cecilia Vela Gurovic <email address hidden>
Date: Wed Jul 1 09:51:40 2020 +1200

Bug 1884717: language pack management into admin section

The new language pack admin page allows for site administrators to:
- Update existing language packs
- Installing new language packs

The page displays when the packs were last updated and if they are up
to date or not

behatnotneeded

Change-Id: I821ebd7a3ffc71ba5d9924922a35fadc8d726e09

Robert Lyon (robertl-9)
Changed in mahara:
milestone: none → 22.04.0
status: In Progress → Fix Committed
tags: added: newfeature
Gold (gold.catalyst)
Changed in mahara:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.