From ac2baee0887bb3c4df3a4887f0994f64f3d0a237 Mon Sep 17 00:00:00 2001 From: Squidly271 Date: Wed, 8 Jul 2020 08:30:53 -0400 Subject: [PATCH] Multi-language support Language update checks were not working. --- plugins/dynamix.plugin.manager/scripts/languagecheck | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/plugins/dynamix.plugin.manager/scripts/languagecheck b/plugins/dynamix.plugin.manager/scripts/languagecheck index 2a6d23bb6..877309abe 100755 --- a/plugins/dynamix.plugin.manager/scripts/languagecheck +++ b/plugins/dynamix.plugin.manager/scripts/languagecheck @@ -30,11 +30,11 @@ $tmp = '/tmp/plugins'; $plugins = '/var/log/plugins'; language('checkall'); -foreach (glob("/$tmp/dynamix.*.xml", GLOB_NOSORT) as $file) { - $name = str_replace('dynamix.', '', basename($file)); +foreach (glob("/$tmp/lang-*.xml", GLOB_NOSORT) as $file) { + $name = basename($file); $lang = language('Language', $file); $new = language('Version', $file); - $old = language('Version', "$plugins/dynamix.$name"); + $old = language('Version', "$plugins/$name"); // silently suppress bad download of XML file if (strcmp($new, $old) > 0) { exec("$notify -e ".escapeshellarg("Language - $lang [$new]")." -s ".escapeshellarg("Notice [$server] - Version update $new")." -d ".escapeshellarg("A new version of $lang is available")." -i ".escapeshellarg("normal $output")." -x");