if token is a card clone,still translate it(e.g momir basic token).

This commit is contained in:
CCTV-1
2020-02-03 08:50:30 +08:00
parent e09faa3b9f
commit 143ca4ad41
2 changed files with 10 additions and 2 deletions

View File

@@ -271,7 +271,11 @@ public class CardImageRenderer {
g.drawImage(image, x + (w - iconSize) / 2, y + (h - iconSize) / 2, iconSize, iconSize); g.drawImage(image, x + (w - iconSize) / 2, y + (h - iconSize) / 2, iconSize, iconSize);
} }
else { else {
boolean needTranslation = !card.isToken(); boolean needTranslation = true;
if (card.isToken()) {
if (card.getCloneOrigin() == null)
needTranslation = false;
}
final String text = card.getText(state, final String text = card.getText(state,
needTranslation ? CardTranslation.getTranslationTexts(state.getName(), "") : null); needTranslation ? CardTranslation.getTranslationTexts(state.getName(), "") : null);
if (StringUtils.isEmpty(text)) { return; } if (StringUtils.isEmpty(text)) { return; }

View File

@@ -280,7 +280,11 @@ public class CardDetailUtil {
area.append("\n"); area.append("\n");
} }
boolean needTranslation = !card.isToken(); boolean needTranslation = true;
if (card.isToken()) {
if (card.getCloneOrigin() == null)
needTranslation = false;
}
String text = card.getText(state, needTranslation ? CardTranslation.getTranslationTexts(state.getName(), "") : null); String text = card.getText(state, needTranslation ? CardTranslation.getTranslationTexts(state.getName(), "") : null);
// LEVEL [0-9]+-[0-9]+ // LEVEL [0-9]+-[0-9]+