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 2021/09/09 11:30:40 UTC
[incubator-hop] branch master updated: HOP-3239 - Manage harcoded
strings in HopGuiPipelineTransformContext (and
HopGuiWorkflowTransformContext) + other minor fixes to translations
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 ba2bb7a HOP-3239 - Manage harcoded strings in HopGuiPipelineTransformContext (and HopGuiWorkflowTransformContext) + other minor fixes to translations
new 5b6c03a Merge pull request #1048 from sramazzina/HOP-3239
ba2bb7a is described below
commit ba2bb7a40cd168b1b14ce59c0bdcfb6ca50189ba
Author: sergio.ramazzina <se...@serasoft.it>
AuthorDate: Wed Sep 8 19:08:21 2021 +0200
HOP-3239 - Manage harcoded strings in HopGuiPipelineTransformContext (and HopGuiWorkflowTransformContext) + other minor fixes to translations
---
.../apache/hop/ui/core/dialog/ContextDialog.java | 2 +-
.../context/HopGuiPipelineTransformContext.java | 14 +++++++++-----
.../context/HopGuiWorkflowActionContext.java | 13 ++++++++-----
.../core/dialog/messages/messages_fr_FR.properties | 2 +-
.../core/dialog/messages/messages_it_IT.properties | 9 +++++++--
.../context/messages/messages_en_US.properties | 19 +++++++++++++++++++
.../context/messages/messages_it_IT.properties | 21 +++++++++++++++++++++
.../context/messages/messages_en_US.properties | 19 +++++++++++++++++++
.../context/messages/messages_it_IT.properties | 21 +++++++++++++++++++++
9 files changed, 106 insertions(+), 14 deletions(-)
diff --git a/ui/src/main/java/org/apache/hop/ui/core/dialog/ContextDialog.java b/ui/src/main/java/org/apache/hop/ui/core/dialog/ContextDialog.java
index fa7c2af..975a7c3 100644
--- a/ui/src/main/java/org/apache/hop/ui/core/dialog/ContextDialog.java
+++ b/ui/src/main/java/org/apache/hop/ui/core/dialog/ContextDialog.java
@@ -641,7 +641,7 @@ public class ContextDialog extends Dialog {
@GuiToolbarElement(
root = GUI_PLUGIN_TOOLBAR_PARENT_ID,
id = TOOLBAR_ITEM_EXPAND_ALL,
- toolTip = "i18n::ContextDialog.GuiAction.ExpandCategories",
+ toolTip = "i18n::ContextDialog.GuiAction.ExpandCategories.Tooltip",
image = "ui/images/expand-all.svg")
public void expandAll() {
for (CategoryAndOrder category : categories) {
diff --git a/ui/src/main/java/org/apache/hop/ui/hopgui/file/pipeline/context/HopGuiPipelineTransformContext.java b/ui/src/main/java/org/apache/hop/ui/hopgui/file/pipeline/context/HopGuiPipelineTransformContext.java
index ca60bdc..924abe2 100644
--- a/ui/src/main/java/org/apache/hop/ui/hopgui/file/pipeline/context/HopGuiPipelineTransformContext.java
+++ b/ui/src/main/java/org/apache/hop/ui/hopgui/file/pipeline/context/HopGuiPipelineTransformContext.java
@@ -17,13 +17,13 @@
package org.apache.hop.ui.hopgui.file.pipeline.context;
-import org.apache.hop.core.Const;
import org.apache.hop.core.file.IHasFilename;
import org.apache.hop.core.gui.Point;
import org.apache.hop.core.gui.plugin.action.GuiAction;
import org.apache.hop.core.gui.plugin.action.GuiActionLambdaBuilder;
import org.apache.hop.core.gui.plugin.action.GuiActionType;
import org.apache.hop.core.variables.IVariables;
+import org.apache.hop.i18n.BaseMessages;
import org.apache.hop.pipeline.PipelineMeta;
import org.apache.hop.pipeline.transform.ITransformMeta;
import org.apache.hop.pipeline.transform.TransformMeta;
@@ -41,6 +41,8 @@ import java.util.List;
public class HopGuiPipelineTransformContext extends BaseGuiContextHandler
implements IGuiContextHandler {
+ public static final Class<?> PKG = HopGuiPipelineTransformContext.class; // i18n
+
public static final String CONTEXT_ID = "HopGuiPipelineTransformContext";
private PipelineMeta pipelineMeta;
@@ -90,10 +92,12 @@ public class HopGuiPipelineTransformContext extends BaseGuiContextHandler
new GuiAction(
"transform-open-referenced-" + objectDescription,
GuiActionType.Info,
- "open: " + objectDescription,
- "This opens up the file referenced in the transform."
- + Const.CR
- + "You can hit key 'z' with the cursor over an Action icon or use CTRL+SHIFT+Click",
+ BaseMessages.getString(
+ PKG,
+ "HopGuiPipelineTransformContext.OpenReferencedAction.Name",
+ objectDescription),
+ BaseMessages.getString(
+ PKG, "HopGuiPipelineTransformContext.OpenReferencedAction.Tooltip"),
"ui/images/open.svg",
(shiftAction, controlAction, t) ->
openReferencedObject(
diff --git a/ui/src/main/java/org/apache/hop/ui/hopgui/file/workflow/context/HopGuiWorkflowActionContext.java b/ui/src/main/java/org/apache/hop/ui/hopgui/file/workflow/context/HopGuiWorkflowActionContext.java
index 37b2fcd..cb4213c 100644
--- a/ui/src/main/java/org/apache/hop/ui/hopgui/file/workflow/context/HopGuiWorkflowActionContext.java
+++ b/ui/src/main/java/org/apache/hop/ui/hopgui/file/workflow/context/HopGuiWorkflowActionContext.java
@@ -17,13 +17,13 @@
package org.apache.hop.ui.hopgui.file.workflow.context;
-import org.apache.hop.core.Const;
import org.apache.hop.core.file.IHasFilename;
import org.apache.hop.core.gui.Point;
import org.apache.hop.core.gui.plugin.action.GuiAction;
import org.apache.hop.core.gui.plugin.action.GuiActionLambdaBuilder;
import org.apache.hop.core.gui.plugin.action.GuiActionType;
import org.apache.hop.core.variables.IVariables;
+import org.apache.hop.i18n.BaseMessages;
import org.apache.hop.ui.core.dialog.ErrorDialog;
import org.apache.hop.ui.hopgui.HopGui;
import org.apache.hop.ui.hopgui.context.BaseGuiContextHandler;
@@ -41,6 +41,7 @@ import java.util.List;
public class HopGuiWorkflowActionContext extends BaseGuiContextHandler
implements IGuiContextHandler {
+ public static final Class<?> PKG = HopGuiWorkflowActionContext.class; // i18n
public static final String CONTEXT_ID = "HopGuiWorkflowActionContext";
private WorkflowMeta workflowMeta;
@@ -88,10 +89,12 @@ public class HopGuiWorkflowActionContext extends BaseGuiContextHandler
new GuiAction(
"action-open-referenced-" + objectDescription,
GuiActionType.Info,
- "open: " + objectDescription,
- "This opens up the file referenced in the action."
- + Const.CR
- + "You can hit key 'z' with the cursor over an Action icon or use CTRL+SHIFT+Click",
+ BaseMessages.getString(
+ PKG,
+ "HopGuiWorkflowTransformContext.OpenReferencedAction.Name",
+ objectDescription),
+ BaseMessages.getString(
+ PKG, "HopGuiWorkflowTransformContext.OpenReferencedAction.Tooltip"),
"ui/images/open.svg",
(shiftAction, controlAction, t) ->
openReferencedObject(
diff --git a/ui/src/main/resources/org/apache/hop/ui/core/dialog/messages/messages_fr_FR.properties b/ui/src/main/resources/org/apache/hop/ui/core/dialog/messages/messages_fr_FR.properties
index e31d85e..1edc077 100644
--- a/ui/src/main/resources/org/apache/hop/ui/core/dialog/messages/messages_fr_FR.properties
+++ b/ui/src/main/resources/org/apache/hop/ui/core/dialog/messages/messages_fr_FR.properties
@@ -42,7 +42,7 @@ CheckResultDialog.TransformName.Label=Nom de la transformation
CheckResultDialog.WarningsErrors.Label=Alertes et erreurs\:
ConditionDialog.Title=Saisissez Condition
ContextDialog.GuiAction.CollapseCategories.Tooltip=R\u00E9duire les cat\u00E9gories
-ContextDialog.GuiAction.ExpandCategories=D\u00E9velopper les cat\u00E9gories
+ContextDialog.GuiAction.ExpandCategories.Tooltip=D\u00E9velopper les cat\u00E9gories
ContextDialog.GuiAction.FixedWidth.Label=Largeur fixe
ContextDialog.GuiAction.FixedWidth.Tooltip=Afficher les ic\u00F4nes avec la m\u00EAme largeur
ContextDialog.GuiAction.ShowCategories.Label=Afficher les cat\u00E9gories
diff --git a/ui/src/main/resources/org/apache/hop/ui/core/dialog/messages/messages_it_IT.properties b/ui/src/main/resources/org/apache/hop/ui/core/dialog/messages/messages_it_IT.properties
index 73ffcfa..fdbba05 100644
--- a/ui/src/main/resources/org/apache/hop/ui/core/dialog/messages/messages_it_IT.properties
+++ b/ui/src/main/resources/org/apache/hop/ui/core/dialog/messages/messages_it_IT.properties
@@ -271,5 +271,10 @@ ContextDialog.SaveConfig.Error.Dialog.Header=Errore
ContextDialog.SaveConfig.Error.Dialog.Message=Si \u00E8 verificato un errore durante il salvataggio delle opzioni della GUI nel file hop-config.json
ContextDialog.GuiAction.CollapseCategories.Tooltip=Chiudi tutte le categorie
ContextDialog.GuiAction.ExpandCategories.Tooltip=Espandi tutte le categorie
-ContextDialog.GuiAction.ShowCategories.Tooltip=Mostra le categorie
-ContextDialog.GuiAction.ClearSearchFilter.Tooltip=Cancella il filtro di ricerca
\ No newline at end of file
+ContextDialog.GuiAction.ShowCategories.Label=Mostra categorie
+ContextDialog.GuiAction.ShowCategories.Tooltip=Se selezionato mostra le categorie
+ContextDialog.GuiAction.ClearSearchFilter.Tooltip=Cancella il filtro di ricerca
+ContextDialog.GuiAction.FixedWidth.Tooltip=Mostra le icone usando una larghezza fissa
+ContextDialog.GuiAction.FixedWidth.Label=Larghezza fissa
+
+
diff --git a/ui/src/main/resources/org/apache/hop/ui/hopgui/file/pipeline/context/messages/messages_en_US.properties b/ui/src/main/resources/org/apache/hop/ui/hopgui/file/pipeline/context/messages/messages_en_US.properties
new file mode 100644
index 0000000..553a625
--- /dev/null
+++ b/ui/src/main/resources/org/apache/hop/ui/hopgui/file/pipeline/context/messages/messages_en_US.properties
@@ -0,0 +1,19 @@
+#
+# 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.
+#
+
+HopGuiPipelineTransformContext.OpenReferencedAction.Name=Open: {0}
+HopGuiPipelineTransformContext.OpenReferencedAction.Tooltip=This opens up the file referenced in the Transform.\nYou can hit key 'z' with the cursor over a Transform icon or use CTRL+SHIFT+Click
\ No newline at end of file
diff --git a/ui/src/main/resources/org/apache/hop/ui/hopgui/file/pipeline/context/messages/messages_it_IT.properties b/ui/src/main/resources/org/apache/hop/ui/hopgui/file/pipeline/context/messages/messages_it_IT.properties
new file mode 100644
index 0000000..72d0d3f
--- /dev/null
+++ b/ui/src/main/resources/org/apache/hop/ui/hopgui/file/pipeline/context/messages/messages_it_IT.properties
@@ -0,0 +1,21 @@
+#
+#
+# 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.
+#
+#
+#
+HopGuiPipelineTransformContext.OpenReferencedAction.Name=Apri: {0}
+HopGuiPipelineTransformContext.OpenReferencedAction.Tooltip=Apre il file referenziato nel Transform. \nPuoi premere ''z'' con il cursore sopra l''icona di un Transform oppure usa CTRL+SHIFT+Click
\ No newline at end of file
diff --git a/ui/src/main/resources/org/apache/hop/ui/hopgui/file/workflow/context/messages/messages_en_US.properties b/ui/src/main/resources/org/apache/hop/ui/hopgui/file/workflow/context/messages/messages_en_US.properties
new file mode 100644
index 0000000..a97e10a
--- /dev/null
+++ b/ui/src/main/resources/org/apache/hop/ui/hopgui/file/workflow/context/messages/messages_en_US.properties
@@ -0,0 +1,19 @@
+#
+# 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.
+#
+
+HopGuiWorkflowTransformContext.OpenReferencedAction.Name=Open: {0}
+HopGuiWorkflowTransformContext.OpenReferencedAction.Tooltip=This opens up the file referenced in the Action.\nYou can hit key 'z' with the cursor over an Action icon or use CTRL+SHIFT+Click
\ No newline at end of file
diff --git a/ui/src/main/resources/org/apache/hop/ui/hopgui/file/workflow/context/messages/messages_it_IT.properties b/ui/src/main/resources/org/apache/hop/ui/hopgui/file/workflow/context/messages/messages_it_IT.properties
new file mode 100644
index 0000000..d90b7e0
--- /dev/null
+++ b/ui/src/main/resources/org/apache/hop/ui/hopgui/file/workflow/context/messages/messages_it_IT.properties
@@ -0,0 +1,21 @@
+#
+#
+# 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.
+#
+#
+#
+HopGuiWorkflowTransformContext.OpenReferencedAction.Name=Apri: {0}
+HopGuiWorkflowTransformContext.OpenReferencedAction.Tooltip=Apre il file referenziato nell''Action. \nPuoi premere ''z'' con il cursore sopra l''icona di un''Action oppure usa CTRL+SHIFT+Click
\ No newline at end of file