This is an automated email from the ASF dual-hosted git repository. markt pushed a commit to branch 7.0.x in repository https://gitbox.apache.org/repos/asf/tomcat.git
The following commit(s) were added to refs/heads/7.0.x by this push: new b0c0243 Skip untranslated values on import b0c0243 is described below commit b0c02431e1ccd5f4e991f03f48a87844bae2d870 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 f02d751..031dda2 100644 --- a/java/org/apache/tomcat/buildutil/translate/Import.java +++ b/java/org/apache/tomcat/buildutil/translate/Import.java @@ -57,6 +57,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)) { @@ -75,7 +80,7 @@ public class Import { w.write(LINE_SEP); } - w.write(cKey.key + "=" + Utils.formatValue(props.getProperty(key))); + w.write(cKey.key + "=" + Utils.formatValue(value)); w.write(LINE_SEP); } if (w != null) { --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org