diff --git a/scripts/lang_functions.php b/scripts/lang_functions.php index 3f1011955..a0cd6f9ba 100644 --- a/scripts/lang_functions.php +++ b/scripts/lang_functions.php @@ -385,16 +385,18 @@ function override_component_lang_files($keys, $translations) { } switch($type) { case 'core': - case 'addon': switch($component) { case 'moodle': - $path .= 'lang.json'; + $path .= 'core/lang.json'; break; default: - $path .= $type.'/'.str_replace('_', '/', $component).'/lang.json'; + $path .= 'core/features/'.str_replace('_', '/', $component).'/lang.json'; break; } break; + case 'addon': + $path .= 'addons/'.str_replace('_', '/', $component).'/lang.json'; + break; case 'assets': $path .= $type.'/'.$component.'.json'; break; @@ -406,6 +408,8 @@ function override_component_lang_files($keys, $translations) { if (is_file($path)) { save_key($plainid, $value, $path); + } else { + echo "Cannot override: $path not found.\n"; } } }