From: colemanw Date: Wed, 24 May 2023 15:43:07 +0000 (-0400) Subject: APIv4 Explorer - Don't translate empty strings X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=fba735a2839bcdc2331fdc55cedd401ad9dce32b;p=civicrm-core.git APIv4 Explorer - Don't translate empty strings --- diff --git a/ang/api4Explorer/Explorer.js b/ang/api4Explorer/Explorer.js index 4cc2fadb04..894de01ef3 100644 --- a/ang/api4Explorer/Explorer.js +++ b/ang/api4Explorer/Explorer.js @@ -1024,7 +1024,7 @@ return '[]'; } $.each(val, function(k, v) { - var ts = localizable && localizable.includes(k) && _.isString(v) ? 'E::ts(' : ''; + var ts = localizable && localizable.includes(k) && _.isString(v) && v.length ? 'E::ts(' : ''; ret += (ret ? ', ' : '') + newLine + indent + "'" + k + "' => " + ts + phpFormat(v, indentChild, indentChildren, localizable) + (ts ? ')' : ''); }); return '[' + ret + trailingComma + newLine + baseLine + ']';