Skip to content

Commit

Permalink
fix: logger and migration logic
Browse files Browse the repository at this point in the history
Signed-off-by: Hiroshi Miura <[email protected]>
  • Loading branch information
miurahr committed Nov 1, 2024
1 parent 4c8a695 commit 063728b
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/org/omegat/core/segmentation/MapRule.java
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@
import java.util.regex.PatternSyntaxException;

import tokyo.northside.logging.ILogger;
import tokyo.northside.logging.LoggerFactory;

import org.omegat.util.Log;
import org.omegat.util.StringUtil;

/**
Expand All @@ -46,7 +46,7 @@
public class MapRule implements Serializable {

private static final long serialVersionUID = -5868132953113679291L;
private static final ILogger LOGGER = LoggerFactory.getLogger(MapRule.class);
private static final ILogger LOGGER = Log.getLogger(MapRule.class);

/** Language Name */
private String languageCode;
Expand Down Expand Up @@ -111,7 +111,6 @@ public void setLanguage(String code) {
String alt = LanguageCodes.getLanguageCodeByName(code);
if (alt != null) {
languageCode = alt;
return;
} else {
// migration heuristics: Germany translation changed in v5.5.
// See:
Expand All @@ -121,8 +120,10 @@ public void setLanguage(String code) {
} else {
LOGGER.atDebug().setMessageRB("CORE_SRX_RULES_UNKNOWN_LANGUAGE_CODE").addArgument(code)
.log();
languageCode = code;
}
}
return;
}
languageCode = code;
}
Expand Down

0 comments on commit 063728b

Please sign in to comment.