-
Improvement
-
Resolution: Deferred
-
Minor
-
None
-
3.7
-
MOODLE_37_STABLE
We have seen cases where users of H5P who have had versions prior to 1.20, language strings were camelCase, whereas in 1.20.0 (H5P) this was moved to amos compatible lower-case only language strings.
The impact to this, breaks language packs as the LMS is expecting exact matches
This was found in the language pack file: h5p.php
https://github.com/h5p/h5p-moodle-plugin/commit/e3e340043acbbda0521718738c9b04e35a3ead8a
The fix, to not only handle the case change, We found that here:
admin\tool\customlang\locallib.php
On lines 144 we add:
$lcurrent = array_change_key_case($current, CASE_LOWER);
|
if (isset($current[$stringid]) || isset($lcurrent[$stringid])) { |
$current[$stringid] = !isset($current[$stringid]) ? $lcurrent[$stringid] : $current[$stringid];
|
Where now, the checks is against mixed case language strings, and then returns the mixed case string (and updates the existing string with the new name).
As per:
https://github.com/dustinbrisebois/moodle/commit/57a523c459638375b75c67fe7ca62e8de974a7ba
Adding:
on line 171 where:
if (is_null($current[$stringid]->local) && $stringmaster !== $stringlocal) { |
Adds and additional check against unnecessary DB updates – if the local is empty don't run the update.
- has been marked as being related by
-
MDL-67302 Use of upper case in string identifier causes language customisation tool to break
-
- Open
-