Fixed i18n and naming

This commit is contained in:
Willem Cazander 2022-03-15 00:41:40 +01:00
parent 231abff3fd
commit 2624eb4dea
19 changed files with 244 additions and 75 deletions

View file

@ -10,7 +10,6 @@ import love.distributedrebirth.gdxapp4d.vrgem4.service.VrGem4DeskAppService;
import love.distributedrebirth.gdxapp4d.vrgem4.service.VrGem4LocaleService;
import love.distributedrebirth.gdxapp4d.vrgem4.service.deskapp.DeskAppLauncher;
import love.distributedrebirth.gdxapp4d.vrgem4.service.deskapp.DeskAppMenuSection;
import love.distributedrebirth.gdxapp4d.vrsys5.apps.BaseUnicodePlaneDeskApp;
import love.distributedrebirth.gdxapp4d.vrsys5.apps.BasicConsoleDeskApp;
import love.distributedrebirth.gdxapp4d.vrsys5.apps.ImGuiDeskApp;
@ -27,12 +26,10 @@ public class VrSys5Component {
private VrGem4LocaleService localeService;
private final DeskAppLauncher basicLauncher;
private final DeskAppLauncher unicodeLauncher;
private final DeskAppLauncher imguiLauncher;
public VrSys5Component() {
basicLauncher = new DeskAppLauncher(DeskAppMenuSection.SYSTEM, "Basic Console", () -> new BasicConsoleDeskApp());
unicodeLauncher = new DeskAppLauncher(DeskAppMenuSection.SYSTEM, "Base Unicode Plane", () -> new BaseUnicodePlaneDeskApp(localeService));
imguiLauncher = new DeskAppLauncher(DeskAppMenuSection.PROGRAMMING, "ImGui Demo", () -> new ImGuiDeskApp());
}
@ -40,7 +37,6 @@ public class VrSys5Component {
void open() {
log.debug(this, SystemGdxLog.ACTIVATE);
deskAppService.installDeskApp(basicLauncher);
deskAppService.installDeskApp(unicodeLauncher);
deskAppService.installDeskApp(imguiLauncher);
}
@ -48,7 +44,6 @@ public class VrSys5Component {
void close() {
log.debug(this, SystemGdxLog.DEACTIVATE);
deskAppService.removeDeskApp(basicLauncher);
deskAppService.removeDeskApp(unicodeLauncher);
deskAppService.removeDeskApp(imguiLauncher);
}
}

View file

@ -1,66 +0,0 @@
package love.distributedrebirth.gdxapp4d.vrsys5.apps;
import java.util.Locale;
import java.util.ResourceBundle;
import imgui.ImGui;
import imgui.flag.ImGuiTableFlags;
import love.distributedrebirth.bassboonyd.BãßBȍőnAuthorInfoʸᴰ;
import love.distributedrebirth.gdxapp4d.vrgem4.service.VrGem4LocaleService;
import love.distributedrebirth.gdxapp4d.vrgem4.service.deskapp.AbstractDeskApp;
import love.distributedrebirth.gdxapp4d.vrgem4.service.deskapp.DeskAppContourSection;
import love.distributedrebirth.gdxapp4d.vrgem4.service.deskapp.DeskAppRenderer;
import love.distributedrebirth.unicode4d.UnicodePlaneᶻᴰ;
@BãßBȍőnAuthorInfoʸᴰ(name = "willemtsade", copyright = "©Δ∞ 仙上主天")
public class BaseUnicodePlaneDeskApp extends AbstractDeskApp implements DeskAppRenderer {
private final VrGem4LocaleService localeService;
public BaseUnicodePlaneDeskApp(VrGem4LocaleService localeService) {
this.localeService = localeService;
}
private String getTxt(String key) {
Locale loc = localeService.getTextLocale();
ResourceBundle bundle = ResourceBundle.getBundle("love.distributedrebirth.gdxapp4d.vrsys5.Main", loc);
return bundle.getString("SystemBaseUnicodePlaneApp."+key);
}
public void create() {
getContours().setTitle(getTxt("title"));
getContours().registrateContour(DeskAppContourSection.MAIN, this);
}
@Override
public void render() {
int flags = ImGuiTableFlags.ScrollX | ImGuiTableFlags.RowBg | ImGuiTableFlags.BordersOuter | ImGuiTableFlags.BordersV | ImGuiTableFlags.Resizable;
ImGui.beginTable("base-part", 2, flags);
ImGui.tableSetupColumn(getTxt("colPlane"));
ImGui.tableSetupColumn(getTxt("colText"));
ImGui.tableHeadersRow();
for (UnicodePlaneᶻᴰ plane:UnicodePlaneᶻᴰ.values()) {
if (plane.name().contains("SUPPLE")) {
continue;
}
if (plane.name().contains("EXTEN")) {
continue;
}
ImGui.tableNextRow();
ImGui.tableNextColumn();
ImGui.text(plane.name());
ImGui.tableNextColumn();
StringBuilder buf = new StringBuilder();
int offset = 33;
for (int i=plane.getStart()+offset;i<plane.getStart()+33+offset;i++) {
if (i < 65536) {
buf.append((char)i);
}
buf.append(" ");
}
ImGui.text(buf.toString());
}
ImGui.endTable();
}
}

View file

@ -1,18 +0,0 @@
SystemBaseGlyphApp.title=Sys Glyph Set
SystemBaseGlyphApp.showBase27=Show base27
SystemBaseGlyphApp.colScript=Script
SystemBaseGlyphApp.col10Num=10Numbers
SystemBaseGlyphApp.col16Num=16Numbers
SystemBaseGlyphApp.col27Num=27Numbers
SystemBasePartApp.title=Sys Number Parts
SystemBasePartApp.selectBase=Base
SystemBasePartApp.selectName=Name:
SystemBasePartApp.selectPurpose=Purpose:
SystemBasePartApp.showBase10=Show base10
SystemBasePartApp.showBase16=Show base16
SystemBasePartApp.showBase27=Show base27
SystemBaseUnicodePlaneApp.title=Sys Unicode Plane
SystemBaseUnicodePlaneApp.colPlane=Unicode Plane
SystemBaseUnicodePlaneApp.colText=Example

View file

@ -1,14 +0,0 @@
SystemBaseGlyphApp.title=\uE0C0 \uE13F \uE2F4 \uE3BC \uE0ED \uE1CC \uE191 \uE2F4 \uE20F
SystemBaseGlyphApp.showBase27=\uE219 \uE362 \uE0C0 \uE13F \uE2F4 \uE387 \uE400
SystemBaseGlyphApp.colScript=\uE2F4 \uE3A1 \uE08B \uE1CB \uE2AA \uE20F
SystemBaseGlyphApp.col10Num=\uE386 \uE216 \uE171 \uE153 \uE0C0 \uE08C \uE2F4
SystemBaseGlyphApp.col16Num=\uE386 \uE3FF \uE216 \uE171 \uE153 \uE0C0 \uE08C \uE2F4
SystemBaseGlyphApp.col27Num=\uE387 \uE400 \uE216 \uE171 \uE153 \uE0C0 \uE08C \uE2F4
SystemBasePartApp.title=\uE0C0 \uE13F \uE2F4 \uE203 \uE13F \uE08C \uE20F \uE2F4
SystemBasePartApp.selectBase=\uE0C0 \uE13F \uE2F4
SystemBasePartApp.selectName=\uE216 \uE13F \uE153 \uE3EC
SystemBasePartApp.selectPurpose=\uE203 \uE171 \uE08C \uE203 \uE2F4 \uE3EC
SystemBasePartApp.showBase10=\uE219 \uE362 \uE0C0 \uE13F \uE2F4 \uE386
SystemBasePartApp.showBase16=\uE219 \uE362 \uE0C0 \uE13F \uE2F4 \uE386 \uE3FF
SystemBasePartApp.showBase27=\uE219 \uE362 \uE0C0 \uE13F \uE2F4 \uE387 \uE400