You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hop.apache.org by ha...@apache.org on 2020/11/20 12:50:22 UTC
[incubator-hop] branch master updated: Creating Constants for i18n
messages (#401)
This is an automated email from the ASF dual-hosted git repository.
hansva pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-hop.git
The following commit(s) were added to refs/heads/master by this push:
new 941838b Creating Constants for i18n messages (#401)
941838b is described below
commit 941838b4b185d3e635a51375cdf2f37963356bcf
Author: Mahendran Mookkiah <ma...@gmail.com>
AuthorDate: Fri Nov 20 07:50:12 2020 -0500
Creating Constants for i18n messages (#401)
* Creating Constants for i18n messages
Signed-off-by: Mahendran Mookkiah <ma...@apache.org>
* Change proposal
Co-authored-by: Mahendran Mookkiah <ma...@apache.org>
Co-authored-by: Hans Van Akelyen <ha...@gmail.com>
---
.../java/org/apache/hop/i18n/ConstMessages.java | 30 ++++++++++++++++++++++
.../replacestring/ReplaceStringMeta.java | 9 ++++---
2 files changed, 35 insertions(+), 4 deletions(-)
diff --git a/core/src/main/java/org/apache/hop/i18n/ConstMessages.java b/core/src/main/java/org/apache/hop/i18n/ConstMessages.java
new file mode 100644
index 0000000..8fa75e9
--- /dev/null
+++ b/core/src/main/java/org/apache/hop/i18n/ConstMessages.java
@@ -0,0 +1,30 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.hop.i18n;
+
+public final class ConstMessages {
+
+ /**
+ * Private constructor to avoid instantiation
+ */
+ private ConstMessages(){
+ }
+
+ public static final String SYSTEM_COMBO_YES = "System.Combo.Yes";
+ public static final String SYSTEM_COMBO_NO = "System.Combo.No";
+}
diff --git a/plugins/transforms/replacestring/src/main/java/org/apache/hop/pipeline/transforms/replacestring/ReplaceStringMeta.java b/plugins/transforms/replacestring/src/main/java/org/apache/hop/pipeline/transforms/replacestring/ReplaceStringMeta.java
index 78f1193..120b7f5 100644
--- a/plugins/transforms/replacestring/src/main/java/org/apache/hop/pipeline/transforms/replacestring/ReplaceStringMeta.java
+++ b/plugins/transforms/replacestring/src/main/java/org/apache/hop/pipeline/transforms/replacestring/ReplaceStringMeta.java
@@ -24,6 +24,7 @@
package org.apache.hop.pipeline.transforms.replacestring;
import static org.apache.hop.core.ICheckResult.*;
+import static org.apache.hop.i18n.ConstMessages.*;
import org.apache.commons.lang.StringUtils;
import org.apache.hop.core.CheckResult;
@@ -103,10 +104,10 @@ public class ReplaceStringMeta extends BaseTransformMeta implements ITransformMe
protected static final String[] isUnicodeCode = { "no", "yes" };
protected static final String[] caseSensitiveDesc = new String[] {
- BaseMessages.getString( PKG, "System.Combo.No" ), BaseMessages.getString( PKG, "System.Combo.Yes" ) };
+ BaseMessages.getString( PKG, SYSTEM_COMBO_NO ), BaseMessages.getString( PKG, SYSTEM_COMBO_YES ) };
protected static final String[] isUnicodeDesc = new String[] {
- BaseMessages.getString( PKG, "System.Combo.No" ), BaseMessages.getString( PKG, "System.Combo.Yes" ) };
+ BaseMessages.getString( PKG, SYSTEM_COMBO_NO ), BaseMessages.getString( PKG, SYSTEM_COMBO_YES ) };
public static final int CASE_SENSITIVE_NO = 0;
@@ -117,7 +118,7 @@ public class ReplaceStringMeta extends BaseTransformMeta implements ITransformMe
public static final int IS_UNICODE_YES = 1;
protected static final String[] wholeWordDesc = new String[] {
- BaseMessages.getString( PKG, "System.Combo.No" ), BaseMessages.getString( PKG, "System.Combo.Yes" ) };
+ BaseMessages.getString( PKG, SYSTEM_COMBO_NO ), BaseMessages.getString( PKG, SYSTEM_COMBO_YES ) };
protected static final String[] wholeWordCode = { "no", "yes" };
@@ -126,7 +127,7 @@ public class ReplaceStringMeta extends BaseTransformMeta implements ITransformMe
public static final int WHOLE_WORD_YES = 1;
protected static final String[] useRegExDesc = new String[] {
- BaseMessages.getString( PKG, "System.Combo.No" ), BaseMessages.getString( PKG, "System.Combo.Yes" ) };
+ BaseMessages.getString( PKG, SYSTEM_COMBO_NO ), BaseMessages.getString( PKG, SYSTEM_COMBO_YES ) };
protected static final String[] useRegExCode = { "no", "yes" };