David Mudrák 47cf9455d9 MDL-60209 mathjax: Fix mapping of the Moodle language to the MathJax
While working on the issue, I noticed that the current implementation of
the method filter_mathjaxloader::map_language_code() is suboptimal and
does not work well for many Moodle language packs such as pt_br or de_du
and other variants. It did not give particularly wrong results. It just
fell back to the default English too early without trying more hard.

This patch improves the mapping logic and adds a unit test for the
method.
2017-10-09 12:31:21 +02:00
..