fix: memory related English translations missing.
This commit is contained in:
@@ -178,7 +178,7 @@ public final class VersionSettingsPage extends StackPane implements DecoratorPag
|
|||||||
|
|
||||||
HBox lowerBoundPane = new HBox();
|
HBox lowerBoundPane = new HBox();
|
||||||
lowerBoundPane.setAlignment(Pos.CENTER);
|
lowerBoundPane.setAlignment(Pos.CENTER);
|
||||||
VBox.setMargin(lowerBoundPane, new Insets(8, 0, 0, 16));
|
VBox.setMargin(lowerBoundPane, new Insets(0, 0, 0, 16));
|
||||||
{
|
{
|
||||||
Label label = new Label();
|
Label label = new Label();
|
||||||
label.textProperty().bind(Bindings.createStringBinding(() -> {
|
label.textProperty().bind(Bindings.createStringBinding(() -> {
|
||||||
@@ -213,28 +213,9 @@ public final class VersionSettingsPage extends StackPane implements DecoratorPag
|
|||||||
lowerBoundPane.getChildren().setAll(label, slider, txtMaxMemory, new Label("MB"));
|
lowerBoundPane.getChildren().setAll(label, slider, txtMaxMemory, new Label("MB"));
|
||||||
}
|
}
|
||||||
|
|
||||||
BorderPane titlePane = new BorderPane();
|
|
||||||
VBox.setMargin(titlePane, new Insets(0, 0, 0, 16));
|
|
||||||
{
|
|
||||||
Label left = new Label(i18n("settings.memory.used_per_total"));
|
|
||||||
left.getStyleClass().add("subtitle-label");
|
|
||||||
titlePane.setLeft(left);
|
|
||||||
|
|
||||||
Label right = new Label();
|
|
||||||
right.textProperty().bind(Bindings.createStringBinding(() -> {
|
|
||||||
if (chkAutoAllocate.isSelected()) {
|
|
||||||
return i18n("settings.memory.allocate.auto");
|
|
||||||
} else {
|
|
||||||
return i18n("settings.memory.allocate.manual");
|
|
||||||
}
|
|
||||||
}, chkAutoAllocate.selectedProperty()));
|
|
||||||
right.getStyleClass().add("subtitle-label");
|
|
||||||
titlePane.setRight(right);
|
|
||||||
}
|
|
||||||
|
|
||||||
StackPane progressBarPane = new StackPane();
|
StackPane progressBarPane = new StackPane();
|
||||||
progressBarPane.setAlignment(Pos.CENTER_LEFT);
|
progressBarPane.setAlignment(Pos.CENTER_LEFT);
|
||||||
VBox.setMargin(progressBarPane, new Insets(0, 0, 0, 16));
|
VBox.setMargin(progressBarPane, new Insets(8, 0, 0, 16));
|
||||||
{
|
{
|
||||||
progressBarPane.setMinHeight(4);
|
progressBarPane.setMinHeight(4);
|
||||||
progressBarPane.getStyleClass().add("memory-total");
|
progressBarPane.getStyleClass().add("memory-total");
|
||||||
@@ -264,15 +245,15 @@ public final class VersionSettingsPage extends StackPane implements DecoratorPag
|
|||||||
lblPhysicalMemory.getStyleClass().add("memory-label");
|
lblPhysicalMemory.getStyleClass().add("memory-label");
|
||||||
digitalPane.setLeft(lblPhysicalMemory);
|
digitalPane.setLeft(lblPhysicalMemory);
|
||||||
lblPhysicalMemory.textProperty().bind(Bindings.createStringBinding(() -> {
|
lblPhysicalMemory.textProperty().bind(Bindings.createStringBinding(() -> {
|
||||||
return i18n("settings.memory.used_per_total.format", memoryStatusProperty.get().getUsedGB(), memoryStatusProperty.get().getTotalGB());
|
return i18n("settings.memory.used_per_total", memoryStatusProperty.get().getUsedGB(), memoryStatusProperty.get().getTotalGB());
|
||||||
}, memoryStatusProperty));
|
}, memoryStatusProperty));
|
||||||
|
|
||||||
Label lblAllocateMemory = new Label();
|
Label lblAllocateMemory = new Label();
|
||||||
lblAllocateMemory.textProperty().bind(Bindings.createStringBinding(() -> {
|
lblAllocateMemory.textProperty().bind(Bindings.createStringBinding(() -> {
|
||||||
long maxMemory = Lang.parseInt(maxMemoryProperty.get(), 0) * 1024L * 1024L;
|
long maxMemory = Lang.parseInt(maxMemoryProperty.get(), 0) * 1024L * 1024L;
|
||||||
return i18n(memoryStatusProperty.get().hasAvailable() && maxMemory > memoryStatusProperty.get().getAvailable()
|
return i18n(memoryStatusProperty.get().hasAvailable() && maxMemory > memoryStatusProperty.get().getAvailable()
|
||||||
? (chkAutoAllocate.isSelected() ? "settings.memory.allocate.format.auto.exceeded" : "settings.memory.allocate.format.manual.exceeded")
|
? (chkAutoAllocate.isSelected() ? "settings.memory.allocate.auto.exceeded" : "settings.memory.allocate.manual.exceeded")
|
||||||
: (chkAutoAllocate.isSelected() ? "settings.memory.allocate.format.auto" : "settings.memory.allocate.format.manual"),
|
: (chkAutoAllocate.isSelected() ? "settings.memory.allocate.auto" : "settings.memory.allocate.manual"),
|
||||||
OperatingSystem.PhysicalMemoryStatus.toGigaBytes(maxMemory),
|
OperatingSystem.PhysicalMemoryStatus.toGigaBytes(maxMemory),
|
||||||
OperatingSystem.PhysicalMemoryStatus.toGigaBytes(HMCLGameRepository.getAllocatedMemory(maxMemory, memoryStatusProperty.get().getAvailable(), chkAutoAllocate.isSelected())),
|
OperatingSystem.PhysicalMemoryStatus.toGigaBytes(HMCLGameRepository.getAllocatedMemory(maxMemory, memoryStatusProperty.get().getAvailable(), chkAutoAllocate.isSelected())),
|
||||||
OperatingSystem.PhysicalMemoryStatus.toGigaBytes(memoryStatusProperty.get().getAvailable()));
|
OperatingSystem.PhysicalMemoryStatus.toGigaBytes(memoryStatusProperty.get().getAvailable()));
|
||||||
@@ -281,7 +262,7 @@ public final class VersionSettingsPage extends StackPane implements DecoratorPag
|
|||||||
digitalPane.setRight(lblAllocateMemory);
|
digitalPane.setRight(lblAllocateMemory);
|
||||||
}
|
}
|
||||||
|
|
||||||
maxMemoryPane.getChildren().setAll(title, chkAutoAllocate, lowerBoundPane, titlePane, progressBarPane, digitalPane);
|
maxMemoryPane.getChildren().setAll(title, chkAutoAllocate, lowerBoundPane, progressBarPane, digitalPane);
|
||||||
}
|
}
|
||||||
|
|
||||||
BorderPane launcherVisibilityPane = new BorderPane();
|
BorderPane launcherVisibilityPane = new BorderPane();
|
||||||
|
|||||||
@@ -43,7 +43,6 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.memory-label {
|
.memory-label {
|
||||||
-fx-font-size: 14px;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.memory-used {
|
.memory-used {
|
||||||
|
|||||||
@@ -518,8 +518,14 @@ settings.launcher.proxy.socks=Socks
|
|||||||
settings.launcher.proxy.username=Account
|
settings.launcher.proxy.username=Account
|
||||||
settings.launcher.theme=Theme
|
settings.launcher.theme=Theme
|
||||||
|
|
||||||
settings.min_memory=Min Memory/MB
|
settings.memory=Game Memory
|
||||||
settings.max_memory=Max Memory/MB
|
settings.memory.allocate.auto=Minimum %1$.1f GB / Actual %2$.1f GB
|
||||||
|
settings.memory.allocate.auto.exceeded=Minimum %1$.1f GB / Actual %2$.1f GB (%3$.1f GB Available)
|
||||||
|
settings.memory.allocate.manual=Allocate %1$.1f GB
|
||||||
|
settings.memory.allocate.manual.exceeded=Allocate %1$.1f GB (%3$.1f GB Available)
|
||||||
|
settings.memory.auto_allocate=Memory size determined automatically
|
||||||
|
settings.memory.lower_bound=Minimum Memory
|
||||||
|
settings.memory.used_per_total=%1$.1f GB Used / %2$.1f GB Total
|
||||||
settings.physical_memory=Physical Memory Size
|
settings.physical_memory=Physical Memory Size
|
||||||
settings.show_log=Show Logs
|
settings.show_log=Show Logs
|
||||||
settings.tabs.installers=Installers
|
settings.tabs.installers=Installers
|
||||||
|
|||||||
@@ -524,16 +524,13 @@ settings.launcher.proxy.username=账户
|
|||||||
settings.launcher.theme=主题
|
settings.launcher.theme=主题
|
||||||
|
|
||||||
settings.memory=游戏内存
|
settings.memory=游戏内存
|
||||||
settings.memory.allocate.auto=最低分配 / 实际分配
|
settings.memory.allocate.auto=最低分配 %1$.1f GB / 实际分配 %2$.1f GB
|
||||||
settings.memory.allocate.manual=游戏分配
|
settings.memory.allocate.auto.exceeded=最低分配 %1$.1f GB / 实际分配 %2$.1f GB (%3$.1f GB 可用)
|
||||||
settings.memory.allocate.format.auto=%1$.1f GB / %2$.1f GB
|
settings.memory.allocate.manual=游戏分配 %1$.1f GB
|
||||||
settings.memory.allocate.format.auto.exceeded=%1$.1f GB / %2$.1f GB (可用 %3$.1f GB)
|
settings.memory.allocate.manual.exceeded=游戏分配 %1$.1f GB (%3$.1f GB 可用)
|
||||||
settings.memory.allocate.format.manual=%1$.1f GB
|
|
||||||
settings.memory.allocate.format.manual.exceeded=%1$.1f GB (可用 %3$.1f GB)
|
|
||||||
settings.memory.auto_allocate=自动分配
|
settings.memory.auto_allocate=自动分配
|
||||||
settings.memory.lower_bound=最低分配
|
settings.memory.lower_bound=最低分配
|
||||||
settings.memory.used_per_total=已使用 / 总内存
|
settings.memory.used_per_total=已使用 %1$.1f GB / 总内存 %2$.1f GB
|
||||||
settings.memory.used_per_total.format=%1$.1f GB / %2$.1f GB
|
|
||||||
settings.physical_memory=物理内存大小
|
settings.physical_memory=物理内存大小
|
||||||
settings.show_log=查看日志
|
settings.show_log=查看日志
|
||||||
settings.tabs.installers=自动安装
|
settings.tabs.installers=自动安装
|
||||||
|
|||||||
Reference in New Issue
Block a user