diff --git a/server/zanata-war/src/main/java/org/zanata/webtrans/client/editor/table/SourcePanel.java b/server/zanata-war/src/main/java/org/zanata/webtrans/client/editor/table/SourcePanel.java index 07c79ce389..bdbf358dcb 100644 --- a/server/zanata-war/src/main/java/org/zanata/webtrans/client/editor/table/SourcePanel.java +++ b/server/zanata-war/src/main/java/org/zanata/webtrans/client/editor/table/SourcePanel.java @@ -33,7 +33,6 @@ import com.google.gwt.user.client.ui.Composite; import com.google.gwt.user.client.ui.FlowPanel; import com.google.gwt.user.client.ui.HasValue; -import com.google.gwt.user.client.ui.Label; import com.google.gwt.user.client.ui.VerticalPanel; public class SourcePanel extends Composite implements HasValue, HasClickHandlers @@ -55,20 +54,13 @@ public SourcePanel(TransUnit value, TableResources resources, NavigationMessages sourceLabels = new VerticalPanel(); sourceLabels.setSize("100%", "100%"); - // for (String source : value.getSources) - // { - // HighlightingLabel sourceLabel = new HighlightingLabel(source); - // sourceLabel.setStylePrimaryName("TableEditorContent"); - // sourceLabel.setTitle(messages.sourceCommentLabel() + - // value.getSourceComment()); - // sourceLabels.add(sourceLabel); - // } - - HighlightingLabel sourceLabel = new HighlightingLabel(value.getSource()); - sourceLabel.setStylePrimaryName("TableEditorContent"); - sourceLabel.setTitle(messages.sourceCommentLabel() + value.getSourceComment()); - - sourceLabels.add(sourceLabel); + for (int i = 0; i < value.getSources().size(); i++) + { + HighlightingLabel sourceLabel = new HighlightingLabel(value.getSources().get(i)); + sourceLabel.setStylePrimaryName("TableEditorContent"); + sourceLabel.setTitle(messages.sourceCommentLabel() + value.getSourceComments().get(i)); + sourceLabels.add(sourceLabel); + } panel.add(sourceLabels); } diff --git a/server/zanata-war/src/main/java/org/zanata/webtrans/client/editor/table/TableEditorTableDefinition.java b/server/zanata-war/src/main/java/org/zanata/webtrans/client/editor/table/TableEditorTableDefinition.java index 1ccb6324f5..aa7cf96116 100644 --- a/server/zanata-war/src/main/java/org/zanata/webtrans/client/editor/table/TableEditorTableDefinition.java +++ b/server/zanata-war/src/main/java/org/zanata/webtrans/client/editor/table/TableEditorTableDefinition.java @@ -109,8 +109,8 @@ public TransUnit getCellValue(TransUnit rowValue) @Override public void setCellValue(TransUnit rowValue, TransUnit cellValue) { - cellValue.setSource(rowValue.getSource()); - cellValue.setSourceComment(rowValue.getSourceComment()); + cellValue.setSources(rowValue.getSources()); + cellValue.setSourceComments(rowValue.getSourceComments()); } }; @@ -131,18 +131,6 @@ public void renderRowValue(final TransUnit rowValue, ColumnDefinition sources; + private List sourceComments; + private List targets; private String msgContext; private String lastModifiedBy; private String lastModifiedTime; @@ -32,14 +33,14 @@ private TransUnit() { } - public TransUnit(TransUnitId id, String resId, LocaleId localeId, String source, String sourceComment, String target, ContentState status, String lastModifiedBy, String lastModifiedTime, String msgContext, int rowIndex) + public TransUnit(TransUnitId id, String resId, LocaleId localeId, List sources, List sourceComments, List targets, ContentState status, String lastModifiedBy, String lastModifiedTime, String msgContext, int rowIndex) { this.id = id; this.resId = resId; this.localeId = localeId; - this.source = source; - this.sourceComment = sourceComment; - this.target = target; + this.sources = sources; + this.sourceComments = sourceComments; + this.targets = targets; this.status = status; this.lastModifiedBy = lastModifiedBy; this.lastModifiedTime = lastModifiedTime; @@ -62,34 +63,34 @@ public LocaleId getLocaleId() return localeId; } - public String getSource() + public List getSources() { - return source; + return sources; } - public String getSourceComment() + public void setSources(List sources) { - return sourceComment; + this.sources = sources; } - public void setSource(String source) + public List getSourceComments() { - this.source = source; + return sourceComments; } - public void setSourceComment(String sourceComment) + public void setSourceComments(List sourceComments) { - this.sourceComment = sourceComment; + this.sourceComments = sourceComments; } - public String getTarget() + public List getTargets() { - return target; + return targets; } - public void setTarget(String target) + public void setTargets(List targets) { - this.target = target; + this.targets = targets; } public ContentState getStatus()