Add Japanese localization and fix split card view

This commit is contained in:
Alumi
2021-02-19 04:05:22 +00:00
committed by Michael Kamensky
parent cbc72ef2e5
commit 92d9bebc58
10 changed files with 23457 additions and 35 deletions

View File

@@ -25,12 +25,16 @@ import java.awt.event.ActionListener;
import java.io.File;
import java.io.IOException;
import javax.swing.JLabel;
import javax.swing.JMenu;
import javax.swing.JMenuItem;
import javax.swing.JPopupMenu;
import javax.swing.JSeparator;
import javax.swing.KeyStroke;
import forge.model.FModel;
import forge.properties.ForgePreferences.FPref;
/**
* <p>
* GuiUtils class.
@@ -66,6 +70,13 @@ public final class GuiUtils {
} catch (final IOException e) {
System.err.println("GuiUtils > newFont: can't find \"" + filename + "\"");
}
if ("ja-JP".equals(FModel.getPreferences().getPref(FPref.UI_LANGUAGE)) && !ttf.canDisplay('鍮') ||
"zh-CN".equals(FModel.getPreferences().getPref(FPref.UI_LANGUAGE)) && !ttf.canDisplay('鹫')) {
// Use the system default font if can't display the above character
ttf = new JLabel().getFont();
}
return ttf;
}