Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Revert "[addon] Fix localisation of suggested Add-ons" #3907

Closed
wants to merge 1 commit into from
Closed
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 @@ -32,9 +32,6 @@
*/
@NonNullByDefault
public class AddonInfo implements Identifiable<String> {

public static final String NA = "n/a";

private static final Set<String> SUPPORTED_ADDON_TYPES = Set.of("automation", "binding", "misc", "persistence",
"transformation", "ui", "voice");

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -97,15 +97,8 @@ public void removeAddonInfoProvider(AddonInfoProvider addonInfoProvider) {
return a;
}
AddonInfo.Builder builder = AddonInfo.builder(a);
if (AddonInfo.NA.equals(a.getName())) {
builder.withName(b.getName());
} else if (AddonInfo.NA.equals(b.getName())) {
builder.withName(a.getName());
}
if (AddonInfo.NA.equals(a.getDescription())) {
if (a.getDescription().isEmpty()) {
builder.withDescription(b.getDescription());
} else if (AddonInfo.NA.equals(b.getDescription())) {
builder.withDescription(a.getDescription());
}
if (a.getConnection() == null && b.getConnection() != null) {
builder.withConnection(b.getConnection());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -94,9 +94,7 @@ private void initialize() {
try {
String xml = Files.readString(f.toPath());
if (xml != null && !xml.isBlank()) {
addonInfos.addAll(reader.readFromXML(xml).getAddons().stream()
.map(a -> AddonInfo.builder(a).withName(AddonInfo.NA).withDescription(AddonInfo.NA).build())
.collect(Collectors.toSet()));
addonInfos.addAll(reader.readFromXML(xml).getAddons().stream().collect(Collectors.toSet()));
} else {
logger.warn("File '{}' contents are null or empty", f.getName());
}
Expand Down