Commit b716d8ed authored by Aaron Wells's avatar Aaron Wells
Browse files

Change theme lang files to follow naming convention of plugin naming files

Bug 1362871
e.g.: theme/primaryschool/lang/en.utf8/theme.primaryschool.php

Change-Id: I267822316494778bd4fc879ccff8dfba97a29c1b
parent ee37a85f
......@@ -468,8 +468,8 @@ function get_string_location($identifier, $section, $variables, $replacefunc='fo
$langdirectory = 'lang/';
}
else {
if (false === strpos($section, 'theme.')) {
$extras = plugin_types(); // more later..
$extras = plugin_types();
$extras[] = 'theme'; // Allow themes to have lang files the same as plugins
foreach ($extras as $tocheck) {
if (strpos($section, $tocheck . '.') === 0) {
$pluginname = substr($section ,strlen($tocheck) + 1);
......@@ -485,12 +485,6 @@ function get_string_location($identifier, $section, $variables, $replacefunc='fo
}
}
}
else {
$bits = explode('.', $section);
$langdirectory = 'theme/' . $bits[1] . '/lang/';
$section = $bits[1];
}
}
// First check all the normal locations for the string in the current language
$result = get_string_local($langstringroot . $langdirectory, $lang . '/' . $section . '.php', $identifier);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment