]> BookStack Code Mirror - devops/commitdiff
Updated translators update to only update if words contributed
authorDan Brown <redacted>
Mon, 30 Oct 2023 11:40:05 +0000 (11:40 +0000)
committerDan Brown <redacted>
Mon, 30 Oct 2023 11:40:05 +0000 (11:40 +0000)
Was getting entries for users with just single approvals within Crowdin

meta-scripts/bookstack-update-translators

index 9c998fb1c95a0e0812121a7186a582457380e93f..435137e2431fb078fd4738c89883e61f48744eae 100755 (executable)
@@ -42,6 +42,9 @@ function formatAndWriteOutput(string $reportLocation, array $reportMap, string $
 
 function mergeCsvDataIntoReportMap(array &$reportMap, array $csvData, string $reportDelimiter) {
     foreach ($csvData as $csvLine) {
+        if (intval($csvLine['Target Words']) == 0) {
+            continue;
+        }
         $name = $csvLine['Name'];
         $name = str_replace($reportDelimiter, '', $name);
         $languages = explode('; ', $csvLine['Languages']);