mirror of
https://github.com/xpipe-io/xpipe.git
synced 2026-05-29 16:11:03 +00:00
String fixes
This commit is contained in:
@@ -5,6 +5,7 @@ import atlantafx.base.theme.Styles;
|
||||
import io.xpipe.app.browser.action.BrowserAction;
|
||||
import io.xpipe.app.browser.icon.FileIconManager;
|
||||
import io.xpipe.app.comp.base.LazyTextFieldComp;
|
||||
import io.xpipe.app.core.AppI18n;
|
||||
import io.xpipe.app.fxcomps.SimpleComp;
|
||||
import io.xpipe.app.fxcomps.SimpleCompStructure;
|
||||
import io.xpipe.app.fxcomps.augment.ContextMenuAugment;
|
||||
@@ -70,7 +71,8 @@ public final class BrowserFileListComp extends SimpleComp {
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
private TableView<BrowserEntry> createTable() {
|
||||
var filenameCol = new TableColumn<BrowserEntry, String>("Name");
|
||||
var filenameCol = new TableColumn<BrowserEntry, String>();
|
||||
filenameCol.textProperty().bind(AppI18n.observable("name"));
|
||||
filenameCol.setCellValueFactory(param -> new SimpleStringProperty(
|
||||
param.getValue() != null
|
||||
? FileNames.getFileName(
|
||||
@@ -80,17 +82,20 @@ public final class BrowserFileListComp extends SimpleComp {
|
||||
filenameCol.setSortType(ASCENDING);
|
||||
filenameCol.setCellFactory(col -> new FilenameCell(fileList.getEditing()));
|
||||
|
||||
var sizeCol = new TableColumn<BrowserEntry, Number>("Size");
|
||||
var sizeCol = new TableColumn<BrowserEntry, Number>();
|
||||
sizeCol.textProperty().bind(AppI18n.observable("size"));
|
||||
sizeCol.setCellValueFactory(param -> new SimpleLongProperty(
|
||||
param.getValue().getRawFileEntry().resolved().getSize()));
|
||||
sizeCol.setCellFactory(col -> new FileSizeCell());
|
||||
|
||||
var mtimeCol = new TableColumn<BrowserEntry, Instant>("Modified");
|
||||
var mtimeCol = new TableColumn<BrowserEntry, Instant>();
|
||||
mtimeCol.textProperty().bind(AppI18n.observable("modified"));
|
||||
mtimeCol.setCellValueFactory(param -> new SimpleObjectProperty<>(
|
||||
param.getValue().getRawFileEntry().resolved().getDate()));
|
||||
mtimeCol.setCellFactory(col -> new FileTimeCell());
|
||||
|
||||
var modeCol = new TableColumn<BrowserEntry, String>("Attributes");
|
||||
var modeCol = new TableColumn<BrowserEntry, String>();
|
||||
modeCol.textProperty().bind(AppI18n.observable("attributes"));
|
||||
modeCol.setCellValueFactory(param -> new SimpleObjectProperty<>(
|
||||
param.getValue().getRawFileEntry().resolved().getMode()));
|
||||
modeCol.setCellFactory(col -> new FileModeCell());
|
||||
|
||||
@@ -84,7 +84,8 @@ public class StoreCreationMenu {
|
||||
event.consume();
|
||||
});
|
||||
sub.forEach(dataStoreProvider -> {
|
||||
var item = new MenuItem(dataStoreProvider.getDisplayName());
|
||||
var item = new MenuItem();
|
||||
item.textProperty().bind(dataStoreProvider.displayName());
|
||||
item.setGraphic(PrettyImageHelper.ofFixedSizeSquare(dataStoreProvider.getDisplayIconFileName(null), 16)
|
||||
.createRegion());
|
||||
item.setOnAction(event -> {
|
||||
|
||||
@@ -175,8 +175,7 @@ public abstract class StoreEntryComp extends SimpleComp {
|
||||
var imageComp = PrettyImageHelper.ofFixedSize(img, w, h);
|
||||
var storeIcon = imageComp.createRegion();
|
||||
if (wrapper.getValidity().getValue().isUsable()) {
|
||||
new TooltipAugment<>(new SimpleStringProperty(
|
||||
wrapper.getEntry().getProvider().getDisplayName()))
|
||||
new TooltipAugment<>(wrapper.getEntry().getProvider().displayName())
|
||||
.augment(storeIcon);
|
||||
}
|
||||
|
||||
|
||||
@@ -39,7 +39,7 @@ public class StoreProviderChoiceComp extends Comp<CompStructure<ComboBox<DataSto
|
||||
}
|
||||
|
||||
var graphic = provider.getDisplayIconFileName(null);
|
||||
return JfxHelper.createNamedEntry(provider.getDisplayName(), provider.getDisplayDescription(), graphic);
|
||||
return JfxHelper.createNamedEntry(provider.displayName(), provider.displayDescription(), graphic);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -49,8 +49,13 @@ public class StoreProviderChoiceComp extends Comp<CompStructure<ComboBox<DataSto
|
||||
protected void updateItem(DataStoreProvider item, boolean empty) {
|
||||
super.updateItem(item, empty);
|
||||
setGraphic(createGraphic(item));
|
||||
setAccessibleText(item != null ? item.getDisplayName() : null);
|
||||
setAccessibleHelp(item != null ? item.getDisplayDescription() : null);
|
||||
if (item != null) {
|
||||
accessibleTextProperty().bind(item.displayName());
|
||||
accessibleHelpProperty().bind(item.displayDescription());
|
||||
} else {
|
||||
accessibleTextProperty().unbind();
|
||||
accessibleHelpProperty().unbind();
|
||||
}
|
||||
}
|
||||
};
|
||||
var cb = new ComboBox<DataStoreProvider>();
|
||||
|
||||
@@ -88,10 +88,6 @@ public class AppTheme {
|
||||
try {
|
||||
var c = new WindowControl(stage);
|
||||
c.setWindowAttribute(20, AppPrefs.get().theme.getValue().isDark());
|
||||
stage.setWidth(stage.getWidth() + 1);
|
||||
Platform.runLater(() -> {
|
||||
stage.setWidth(stage.getWidth() - 1);
|
||||
});
|
||||
} catch (Throwable e) {
|
||||
ErrorEvent.fromThrowable(e).handle();
|
||||
}
|
||||
|
||||
@@ -22,7 +22,7 @@ public class StoreProviderListExchangeImpl extends StoreProviderListExchange
|
||||
.filter(dataStoreProvider -> category.equals(dataStoreProvider.getCreationCategory()))
|
||||
.map(p -> ProviderEntry.builder()
|
||||
.id(p.getId())
|
||||
.description(p.getDisplayDescription())
|
||||
.description(p.displayDescription().getValue())
|
||||
.hidden(p.getCreationCategory() == null)
|
||||
.build())
|
||||
.toList()));
|
||||
|
||||
@@ -147,19 +147,15 @@ public interface DataStoreProvider {
|
||||
return new SimpleStringProperty(null);
|
||||
}
|
||||
|
||||
default String i18n(String key) {
|
||||
return AppI18n.get(getId() + "." + key);
|
||||
default ObservableValue<String> i18n(String key) {
|
||||
return AppI18n.observable(getId() + "." + key);
|
||||
}
|
||||
|
||||
default String i18nKey(String key) {
|
||||
return getId() + "." + key;
|
||||
}
|
||||
|
||||
default String getDisplayName() {
|
||||
default ObservableValue<String> displayName() {
|
||||
return i18n("displayName");
|
||||
}
|
||||
|
||||
default String getDisplayDescription() {
|
||||
default ObservableValue<String> displayDescription() {
|
||||
return i18n("displayDescription");
|
||||
}
|
||||
|
||||
|
||||
@@ -11,6 +11,7 @@ import io.xpipe.app.fxcomps.impl.VerticalComp;
|
||||
import io.xpipe.app.util.Hyperlinks;
|
||||
import io.xpipe.app.util.JfxHelper;
|
||||
import io.xpipe.app.util.OptionsBuilder;
|
||||
import javafx.beans.property.SimpleStringProperty;
|
||||
import javafx.geometry.Insets;
|
||||
import javafx.scene.control.ScrollPane;
|
||||
import javafx.scene.layout.Region;
|
||||
@@ -101,9 +102,9 @@ public class AboutCategory extends AppPrefsCategory {
|
||||
private Comp<?> createProperties() {
|
||||
var title = Comp.of(() -> {
|
||||
return JfxHelper.createNamedEntry(
|
||||
AppI18n.get("xPipeClient"),
|
||||
"Version " + AppProperties.get().getVersion() + " ("
|
||||
+ AppProperties.get().getArch() + ")",
|
||||
AppI18n.observable("xPipeClient"),
|
||||
new SimpleStringProperty("Version " + AppProperties.get().getVersion() + " ("
|
||||
+ AppProperties.get().getArch() + ")"),
|
||||
"logo.png");
|
||||
})
|
||||
.styleClass(Styles.TEXT_BOLD);
|
||||
|
||||
@@ -3,6 +3,7 @@ package io.xpipe.app.util;
|
||||
import atlantafx.base.controls.Spacer;
|
||||
import io.xpipe.app.core.AppFont;
|
||||
import io.xpipe.app.fxcomps.impl.PrettyImageHelper;
|
||||
import javafx.beans.value.ObservableValue;
|
||||
import javafx.geometry.Pos;
|
||||
import javafx.scene.control.Label;
|
||||
import javafx.scene.layout.HBox;
|
||||
@@ -11,10 +12,12 @@ import javafx.scene.layout.VBox;
|
||||
|
||||
public class JfxHelper {
|
||||
|
||||
public static Region createNamedEntry(String nameString, String descString, String image) {
|
||||
var header = new Label(nameString);
|
||||
public static Region createNamedEntry(ObservableValue<String> nameString, ObservableValue<String> descString, String image) {
|
||||
var header = new Label();
|
||||
header.textProperty().bind(nameString);
|
||||
AppFont.header(header);
|
||||
var desc = new Label(descString);
|
||||
var desc = new Label();
|
||||
desc.textProperty().bind(descString);
|
||||
AppFont.small(desc);
|
||||
var text = new VBox(header, new Spacer(), desc);
|
||||
text.setAlignment(Pos.CENTER_LEFT);
|
||||
|
||||
@@ -428,3 +428,6 @@ goodEvening=Guten Abend
|
||||
addVisual=Visuell ...
|
||||
ssh=SSH
|
||||
sshConfiguration=SSH-Konfiguration
|
||||
size=Größe
|
||||
attributes=Attribute
|
||||
modified=Geändert
|
||||
|
||||
@@ -432,3 +432,7 @@ goodEvening=Good evening
|
||||
addVisual=Visual ...
|
||||
ssh=SSH
|
||||
sshConfiguration=SSH Configuration
|
||||
size=Size
|
||||
attributes=Attributes
|
||||
#context: title, last modified date
|
||||
modified=Modified
|
||||
|
||||
@@ -418,3 +418,6 @@ goodEvening=Buenas noches
|
||||
addVisual=Visual ...
|
||||
ssh=SSH
|
||||
sshConfiguration=Configuración SSH
|
||||
size=Tamaño
|
||||
attributes=Atributos
|
||||
modified=Modificado
|
||||
|
||||
@@ -418,3 +418,6 @@ goodEvening=Bonne soirée
|
||||
addVisual=Visual ...
|
||||
ssh=SSH
|
||||
sshConfiguration=Configuration SSH
|
||||
size=Taille
|
||||
attributes=Attributs
|
||||
modified=Modifié
|
||||
|
||||
@@ -128,7 +128,7 @@ yes=Sì
|
||||
no=No
|
||||
errorOccured=Si è verificato un errore
|
||||
terminalErrorOccured=Si è verificato un errore del terminale
|
||||
errorTypeOccured=È stata lanciata un'eccezione del tipo $TYPE$
|
||||
errorTypeOccured=È stata lanciata un'eccezione del tipo $TYPE$
|
||||
permissionsAlertTitle=Permessi richiesti
|
||||
permissionsAlertHeader=Per eseguire questa operazione sono necessari ulteriori permessi.
|
||||
permissionsAlertContent=Segui il pop-up per dare a XPipe i permessi richiesti nel menu delle impostazioni.
|
||||
@@ -138,7 +138,7 @@ updateReadyAlertHeader=L'aggiornamento alla versione $VERSION$ è pronto per ess
|
||||
updateReadyAlertContent=Questo installerà la nuova versione e riavvierà XPipe al termine dell'installazione.
|
||||
errorNoDetail=Non sono disponibili dettagli sull'errore
|
||||
updateAvailableTitle=Aggiornamento disponibile
|
||||
updateAvailableHeader=È disponibile l'aggiornamento di XPipe alla versione $VERSION$
|
||||
updateAvailableHeader=È disponibile l'aggiornamento di XPipe alla versione $VERSION$
|
||||
updateAvailableContent=Anche se non è stato possibile avviare XPipe, puoi provare a installare l'aggiornamento per risolvere il problema.
|
||||
clipboardActionDetectedTitle=Azione Appunti rilevata
|
||||
clipboardActionDetectedHeader=Vuoi importare il contenuto dei tuoi appunti?
|
||||
@@ -418,3 +418,6 @@ goodEvening=Buona sera
|
||||
addVisual=Visual ...
|
||||
ssh=SSH
|
||||
sshConfiguration=Configurazione SSH
|
||||
size=Dimensione
|
||||
attributes=Attributi
|
||||
modified=Modificato
|
||||
|
||||
@@ -418,3 +418,6 @@ goodEvening=こんばんは
|
||||
addVisual=ビジュアル ...
|
||||
ssh=SSH
|
||||
sshConfiguration=SSHの設定
|
||||
size=サイズ
|
||||
attributes=属性
|
||||
modified=変更された
|
||||
|
||||
@@ -418,3 +418,6 @@ goodEvening=Goedenavond
|
||||
addVisual=Visuele ...
|
||||
ssh=SSH
|
||||
sshConfiguration=SSH-configuratie
|
||||
size=Grootte
|
||||
attributes=Attributen
|
||||
modified=Gewijzigd
|
||||
|
||||
@@ -128,7 +128,7 @@ yes=Sim
|
||||
no=Não
|
||||
errorOccured=Ocorreu um erro
|
||||
terminalErrorOccured=Ocorreu um erro no terminal
|
||||
errorTypeOccured=Foi lançada uma exceção do tipo $TYPE$
|
||||
errorTypeOccured=Foi lançada uma exceção do tipo $TYPE$
|
||||
permissionsAlertTitle=Permissões necessárias
|
||||
permissionsAlertHeader=São necessárias permissões adicionais para efetuar esta operação.
|
||||
permissionsAlertContent=Segue a janela pop-up para dar ao XPipe as permissões necessárias no menu de definições.
|
||||
@@ -138,7 +138,7 @@ updateReadyAlertHeader=Uma atualização para a versão $VERSION$ está pronta p
|
||||
updateReadyAlertContent=Instala a nova versão e reinicia o XPipe quando a instalação estiver concluída.
|
||||
errorNoDetail=Não há detalhes de erro disponíveis
|
||||
updateAvailableTitle=Atualização disponível
|
||||
updateAvailableHeader=Está disponível para instalação uma atualização do XPipe para a versão $VERSION$
|
||||
updateAvailableHeader=Está disponível para instalação uma atualização do XPipe para a versão $VERSION$
|
||||
updateAvailableContent=Apesar de não ter sido possível iniciar o XPipe, podes tentar instalar a atualização para potencialmente corrigir o problema.
|
||||
clipboardActionDetectedTitle=Ação da área de transferência detectada
|
||||
clipboardActionDetectedHeader=Queres importar o conteúdo da tua área de transferência?
|
||||
@@ -418,3 +418,6 @@ goodEvening=Boa noite
|
||||
addVisual=Visual ...
|
||||
ssh=SSH
|
||||
sshConfiguration=Configuração SSH
|
||||
size=Tamanho
|
||||
attributes=Atribui
|
||||
modified=Modificado
|
||||
|
||||
@@ -128,7 +128,7 @@ yes=Да
|
||||
no=Нет
|
||||
errorOccured=Произошла ошибка
|
||||
terminalErrorOccured=Произошла ошибка терминала
|
||||
errorTypeOccured=Возникло исключение типа $TYPE$
|
||||
errorTypeOccured=Возникло исключение типа $TYPE$
|
||||
permissionsAlertTitle=Необходимые разрешения
|
||||
permissionsAlertHeader=Для выполнения этой операции необходимы дополнительные разрешения.
|
||||
permissionsAlertContent=Проследи за всплывающим окном, чтобы дать XPipe необходимые разрешения в меню настроек.
|
||||
@@ -418,3 +418,6 @@ goodEvening=Добрый вечер
|
||||
addVisual=Visual ...
|
||||
ssh=SSH
|
||||
sshConfiguration=Конфигурация SSH
|
||||
size=Размер
|
||||
attributes=Атрибуты
|
||||
modified=Изменено
|
||||
|
||||
@@ -418,3 +418,6 @@ goodEvening=晚上好
|
||||
addVisual=Visual ...
|
||||
ssh=SSH
|
||||
sshConfiguration=SSH 配置
|
||||
size=大小
|
||||
attributes=属性
|
||||
modified=已修改
|
||||
|
||||
@@ -234,7 +234,7 @@ default=Predefinito
|
||||
wslHost=Host WSL
|
||||
timeout=Timeout
|
||||
installLocation=Posizione di installazione
|
||||
installLocationDescription=La posizione in cui è installato l'ambiente $NAME$
|
||||
installLocationDescription=La posizione in cui è installato l'ambiente $NAME$
|
||||
wsl.displayName=Sottosistema Windows per Linux
|
||||
wsl.displayDescription=Connettersi a un'istanza WSL in esecuzione su Windows
|
||||
docker.displayName=Contenitore Docker
|
||||
|
||||
@@ -234,7 +234,7 @@ default=По умолчанию
|
||||
wslHost=WSL Host
|
||||
timeout=Таймаут
|
||||
installLocation=Место установки
|
||||
installLocationDescription=Место, где установлена твоя среда $NAME$
|
||||
installLocationDescription=Место, где установлена твоя среда $NAME$
|
||||
wsl.displayName=Подсистема Windows для Linux
|
||||
wsl.displayDescription=Подключитесь к экземпляру WSL, работающему под Windows
|
||||
docker.displayName=Докер-контейнер
|
||||
|
||||
@@ -28,3 +28,5 @@ activate=Aktivieren Sie
|
||||
validUntil=Gültig bis
|
||||
licenseActivated=Lizenz aktiviert
|
||||
restart=Neustart
|
||||
free=Kostenlos
|
||||
active=Aktiv
|
||||
|
||||
@@ -27,4 +27,8 @@ clear=Clear
|
||||
activate=Activate
|
||||
validUntil=Valid until
|
||||
licenseActivated=License activated
|
||||
restart=Restart
|
||||
restart=Restart
|
||||
#context: No payment required
|
||||
free=Free
|
||||
#context: Currently selected
|
||||
active=Active
|
||||
@@ -28,3 +28,5 @@ activate=Activa
|
||||
validUntil=Válido hasta
|
||||
licenseActivated=Licencia activada
|
||||
restart=Reinicia
|
||||
free=Gratis
|
||||
active=Activo
|
||||
|
||||
@@ -28,3 +28,5 @@ activate=Activer
|
||||
validUntil=Valable jusqu'au
|
||||
licenseActivated=Licence activée
|
||||
restart=Redémarrer
|
||||
free=Gratuit
|
||||
active=Actif
|
||||
|
||||
@@ -28,3 +28,5 @@ activate=Attivare
|
||||
validUntil=Valido fino a
|
||||
licenseActivated=Licenza attivata
|
||||
restart=Riavvio
|
||||
free=Gratuito
|
||||
active=Attivo
|
||||
|
||||
@@ -28,3 +28,5 @@ activate=アクティブにする
|
||||
validUntil=有効期限
|
||||
licenseActivated=ライセンスの有効化
|
||||
restart=リスタート
|
||||
free=無料
|
||||
active=アクティブ
|
||||
|
||||
@@ -28,3 +28,5 @@ activate=Activeren
|
||||
validUntil=Geldig tot
|
||||
licenseActivated=Licentie geactiveerd
|
||||
restart=Herstart
|
||||
free=Gratis
|
||||
active=Actief
|
||||
|
||||
@@ -28,3 +28,5 @@ activate=Ativar
|
||||
validUntil=Válido até
|
||||
licenseActivated=Licença activada
|
||||
restart=Reinicia
|
||||
free=Gratuito
|
||||
active=Ativo
|
||||
|
||||
@@ -28,3 +28,5 @@ activate=Активируй
|
||||
validUntil=Действует до
|
||||
licenseActivated=Активированная лицензия
|
||||
restart=Перезапустите
|
||||
free=Бесплатно
|
||||
active=Активный
|
||||
|
||||
@@ -28,3 +28,5 @@ activate=激活
|
||||
validUntil=有效期至
|
||||
licenseActivated=许可证已激活
|
||||
restart=重新启动
|
||||
free=免费
|
||||
active=活动
|
||||
|
||||
Reference in New Issue
Block a user