This is an automated email from the ASF dual-hosted git repository. markt pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/tomcat.git
The following commit(s) were added to refs/heads/master by this push: new 524cb72 Skip untranslated values on import 524cb72 is described below commit 524cb7213058cd3bce29aac89992eb86ebd8479b Author: Mark Thomas <ma...@apache.org> AuthorDate: Fri May 1 10:41:06 2020 +0100 Skip untranslated values on import This simplifies the export from POEditor.com as the default export is for translated and untranslated values. --- java/org/apache/tomcat/buildutil/translate/Import.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/java/org/apache/tomcat/buildutil/translate/Import.java b/java/org/apache/tomcat/buildutil/translate/Import.java index fe637cc..f15ec4c 100644 --- a/java/org/apache/tomcat/buildutil/translate/Import.java +++ b/java/org/apache/tomcat/buildutil/translate/Import.java @@ -59,6 +59,11 @@ public class Import { for (Object objKey : objKeys) { String key = (String) objKey; + String value = props.getProperty(key); + // Skip untranslated values + if (value.trim().length() == 0) { + continue; + } CompositeKey cKey = new CompositeKey(key); if (!cKey.pkg.equals(currentPkg)) { @@ -77,7 +82,7 @@ public class Import { w.write(System.lineSeparator()); } - w.write(cKey.key + "=" + Utils.formatValue(props.getProperty(key))); + w.write(cKey.key + "=" + Utils.formatValue(value)); w.write(System.lineSeparator()); } if (w != null) { --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org