]> git.mxchange.org Git - friendica-addons.git/commitdiff
Cleaned up code
authorMichael <heluecht@pirati.ca>
Sat, 30 Sep 2023 16:00:26 +0000 (16:00 +0000)
committerHypolite Petovan <hypolite@mrpetovan.com>
Sat, 7 Oct 2023 05:07:00 +0000 (07:07 +0200)
cld/cld.php

index 4c54b2d0c525e99760b2e299862743e45f48a1c3..56bca64f771a99f7cf4ba93efd3d9d5d78660359 100644 (file)
@@ -53,11 +53,6 @@ function cld_get_language(array &$data)
        }
 
        if ($original == $detected) {
-//             return;
-       }
-
-       // Nur aus Testgründen
-       if (in_array($detected, ['xx-Qaai', 'ht', 'ga'])) {
                return;
        }
 
@@ -68,8 +63,6 @@ function cld_get_language(array &$data)
                return;
        }
 
-       Logger::debug('Detected', ['original' => $original, 'detected' => $detected, 'name' => $result['language_name'], 'probability' => $result['language_probability'], 'text' => $data['text']]);
-
-//     Logger::debug('Detected different language', ['original' => $original, 'detected' => $detected, 'name' => $result['language_name'], 'probability' => $result['language_probability'], 'text' => $data['text']]);
+       Logger::debug('Detected different language', ['original' => $original, 'detected' => $detected, 'name' => $result['language_name'], 'probability' => $result['language_probability'], 'text' => $data['text']]);
        $data['detected'] = [$detected => $result['language_probability'] / 100];
 }