Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,9 @@ public class FormFieldOption {
@Column(name = "label_as")
private String labelAs;

@Column(name = "label_bn")
private String labelBn;

@Column(name = "sort_order")
private Integer sortOrder;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ public class Translation {
private String hindiTranslation;
@Column(name = "assamese_translation")
private String assameseTranslation;
@Column(name = "bengali_translation")
private String bengaliTranslation;
@Column(name = "is_active")
private Boolean isActive;
}
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,9 @@
} else if ("en".equalsIgnoreCase(lang)) {
translatedLabel = label.getEnglish();

}else if ("bn".equalsIgnoreCase(lang)) {
translatedLabel = label.getBengaliTranslation();

}
}

Expand All @@ -171,6 +174,9 @@
} else if ("en".equalsIgnoreCase(lang)) {
translatedPlaceHolder = placeHolder.getEnglish();

} else if ("bn".equalsIgnoreCase(lang)) {
translatedPlaceHolder = placeHolder.getBengaliTranslation();

}
}

Expand Down Expand Up @@ -201,9 +207,10 @@
Map<String, Object> map = new LinkedHashMap<>();
map.put("id", opt.getId());
map.put("value", opt.getValue());
if ("hi".equalsIgnoreCase(lang)) map.put("label", opt.getLabelHi());

Check failure on line 210 in src/main/java/com/iemr/common/service/dynamicForm/FormMasterServiceImpl.java

View check run for this annotation

SonarQubeCloud / SonarCloud Code Analysis

Define a constant instead of duplicating this literal "label" 4 times.

See more on https://sonarcloud.io/project/issues?id=PSMRI_Common-API&issues=AZ39OWgquiNIgbRgsgIB&open=AZ39OWgquiNIgbRgsgIB&pullRequest=406
else if ("as".equalsIgnoreCase(lang)) map.put("label", opt.getLabelAs());
else map.put("label", opt.getLabelEn());
else if("en".equals(lang)) map.put("label", opt.getLabelEn());
else if("bn".equals(lang)) map.put("label", opt.getLabelBn());
return map;
})
.collect(Collectors.toList());
Expand Down
Loading