You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by ma...@apache.org on 2020/05/01 09:42:53 UTC
[tomcat] branch 8.5.x updated: Skip untranslated values on import
This is an automated email from the ASF dual-hosted git repository.
markt pushed a commit to branch 8.5.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git
The following commit(s) were added to refs/heads/8.5.x by this push:
new db47aa4 Skip untranslated values on import
db47aa4 is described below
commit db47aa425f5c63548f9c7fc8926a546b6798df2f
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 b471f8c..3733248 100644
--- a/java/org/apache/tomcat/buildutil/translate/Import.java
+++ b/java/org/apache/tomcat/buildutil/translate/Import.java
@@ -55,6 +55,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)) {
@@ -73,7 +78,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-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org