mirror of
https://github.com/haveno-dex/haveno.git
synced 2024-10-01 01:35:48 -04:00
fix language support on changing language
This commit is contained in:
parent
02eb2fb005
commit
da0f4f4652
@ -191,7 +191,7 @@ class CoreDisputeAgentsService {
|
||||
String signature) {
|
||||
Mediator mediator = new Mediator(nodeAddress,
|
||||
keyRing.getPubKeyRing(),
|
||||
languageCodes,
|
||||
new ArrayList<>(languageCodes),
|
||||
new Date().getTime(),
|
||||
ecKey.getPubKey(),
|
||||
signature,
|
||||
@ -212,7 +212,7 @@ class CoreDisputeAgentsService {
|
||||
String signature) {
|
||||
RefundAgent refundAgent = new RefundAgent(nodeAddress,
|
||||
keyRing.getPubKeyRing(),
|
||||
languageCodes,
|
||||
new ArrayList<>(languageCodes),
|
||||
new Date().getTime(),
|
||||
ecKey.getPubKey(),
|
||||
signature,
|
||||
|
@ -115,11 +115,11 @@ public class VolumeUtil {
|
||||
return formatVolume(volume, getMonetaryFormat(volume.getCurrencyCode()), false);
|
||||
}
|
||||
|
||||
private static String formatVolume(Volume volume, MonetaryFormat fiatVolumeFormat, boolean appendCurrencyCode) {
|
||||
private static String formatVolume(Volume volume, MonetaryFormat volumeFormat, boolean appendCurrencyCode) {
|
||||
if (volume != null) {
|
||||
Monetary monetary = volume.getMonetary();
|
||||
if (monetary instanceof TraditionalMoney)
|
||||
return FormattingUtils.formatTraditionalMoney((TraditionalMoney) monetary, fiatVolumeFormat, appendCurrencyCode);
|
||||
return FormattingUtils.formatTraditionalMoney((TraditionalMoney) monetary, volumeFormat, appendCurrencyCode);
|
||||
else
|
||||
return FormattingUtils.formatCryptoVolume((CryptoMoney) monetary, appendCurrencyCode);
|
||||
} else {
|
||||
|
@ -1261,7 +1261,7 @@ setting.preferences.denyApiTaker=Deny takers using the API
|
||||
setting.preferences.notifyOnPreRelease=Receive pre-release notifications
|
||||
setting.preferences.resetAllFlags=Reset all \"Don't show again\" flags
|
||||
settings.preferences.languageChange=To apply the language change to all screens requires a restart.
|
||||
settings.preferences.supportLanguageWarning=In case of a dispute, please note that mediation is handled in {0} and arbitration in {1}.
|
||||
settings.preferences.supportLanguageWarning=In case of a dispute, please note that arbitration is handled in {0}.
|
||||
settings.preferences.editCustomExplorer.headline=Explorer Settings
|
||||
settings.preferences.editCustomExplorer.description=Choose a system defined explorer from the list on the left, and/or \
|
||||
customize to suit your own preferences.
|
||||
|
@ -1012,7 +1012,7 @@ setting.preferences.denyApiTaker=Odmítat příjemce, kteří používají API
|
||||
setting.preferences.notifyOnPreRelease=Získávat oznámení o beta verzích
|
||||
setting.preferences.resetAllFlags=Zrušit všechny "Nezobrazovat znovu"
|
||||
settings.preferences.languageChange=Chcete-li použít změnu jazyka na všech obrazovkách, musíte restartovat aplikaci.
|
||||
settings.preferences.supportLanguageWarning=V případě sporu mějte na paměti, že zprostředkování je řešeno v {0} a arbitráž v {1}.
|
||||
settings.preferences.supportLanguageWarning=V případě sporu mějte na paměti, že arbitráž je řešena v {0}.
|
||||
settings.preferences.editCustomExplorer.headline=Nastavení Průzkumníku
|
||||
settings.preferences.editCustomExplorer.description=Ze seznamu vlevo vyberte průzkumníka definovaného systémem nebo si jej přizpůsobte podle svých vlastních preferencí.
|
||||
settings.preferences.editCustomExplorer.available=Dostupní průzkumníci
|
||||
|
@ -1012,7 +1012,7 @@ setting.preferences.denyApiTaker=Taker die das API nutzen vermeiden
|
||||
setting.preferences.notifyOnPreRelease=Pre-Release Benachrichtungen erhalten
|
||||
setting.preferences.resetAllFlags=Alle \"Nicht erneut anzeigen\"-Häkchen zurücksetzen
|
||||
settings.preferences.languageChange=Um den Sprachwechsel auf alle Bildschirme anzuwenden ist ein Neustart nötig.
|
||||
settings.preferences.supportLanguageWarning=Wenn es zu einem Streitfall kommen sollte, beachten Sie bitte, dass die Mediation in {0} und das Vermittlungsverfahren in {1} geregelt wird.
|
||||
settings.preferences.supportLanguageWarning=Wenn es zu einem Streitfall kommen sollte, beachten Sie bitte, dass die Schiedsgerichtsbarkeit in {0} geregelt wird.
|
||||
settings.preferences.editCustomExplorer.headline=Explorer-Einstellungen
|
||||
settings.preferences.editCustomExplorer.description=Wählen Sie auf der linken Liste einen Explorer des Systems aus, und/oder passen Sie ihn an Ihre Vorlieben an.
|
||||
settings.preferences.editCustomExplorer.available=Verfügbare Explorer
|
||||
|
@ -1012,7 +1012,7 @@ setting.preferences.denyApiTaker=Denegar tomadores usando la misma API
|
||||
setting.preferences.notifyOnPreRelease=Recibir notificaciones de pre-lanzamiento
|
||||
setting.preferences.resetAllFlags=Restablecer todas las casillas \"No mostrar de nuevo\"
|
||||
settings.preferences.languageChange=Para aplicar un cambio de idioma en todas las pantallas, se precisa reiniciar.
|
||||
settings.preferences.supportLanguageWarning=En caso de disputa, tenga en cuenta que la mediación se maneja en {0} y el arbitraje en {1}.
|
||||
settings.preferences.supportLanguageWarning=En caso de disputa, tenga en cuenta que el arbitraje se maneja en {0}.
|
||||
settings.preferences.editCustomExplorer.headline=Configuraciones de explorador
|
||||
settings.preferences.editCustomExplorer.description=Elija un explorador definido por el sistema de la lista de la izquierda, y/o personalícelo para ajustarse a sus preferencias.
|
||||
settings.preferences.editCustomExplorer.available=Exploradores disponibles
|
||||
|
@ -1012,7 +1012,7 @@ setting.preferences.denyApiTaker=Deny takers using the API
|
||||
setting.preferences.notifyOnPreRelease=Receive pre-release notifications
|
||||
setting.preferences.resetAllFlags=تنظیم مجدد تمام پرچمهای \"دوباره نشان نده\"
|
||||
settings.preferences.languageChange=اعمال تغییر زبان به تمام صفحات مستلزم یک راهاندازی مجدد است.
|
||||
settings.preferences.supportLanguageWarning=In case of a dispute, please note that mediation is handled in {0} and arbitration in {1}.
|
||||
settings.preferences.supportLanguageWarning=In case of a dispute, please note that arbitration is handled in {0}.
|
||||
settings.preferences.editCustomExplorer.headline=Explorer Settings
|
||||
settings.preferences.editCustomExplorer.description=Choose a system defined explorer from the list on the left, and/or customize to suit your own preferences.
|
||||
settings.preferences.editCustomExplorer.available=Available explorers
|
||||
|
@ -1013,7 +1013,7 @@ setting.preferences.denyApiTaker=Refuser les preneurs utilisant l'API
|
||||
setting.preferences.notifyOnPreRelease=Recevoir les notifications de pré-sortie
|
||||
setting.preferences.resetAllFlags=Réinitialiser toutes les balises de notification \"Don't show again\"
|
||||
settings.preferences.languageChange=Un redémarrage est nécessaire pour appliquer le changement de langue à tous les écrans.
|
||||
settings.preferences.supportLanguageWarning=En cas de litige, veuillez noter que la médiation est traitée en {0} et l'arbitrage en {1}.
|
||||
settings.preferences.supportLanguageWarning=En cas de litige, veuillez noter que l'arbitrage est traité en {0}.
|
||||
settings.preferences.editCustomExplorer.headline=Paramètres de l'explorateur
|
||||
settings.preferences.editCustomExplorer.description=Choisissez un explorateur défini par le système depuis la liste à gauche, et/où customisez-le pour satisfaire vos préférences.
|
||||
settings.preferences.editCustomExplorer.available=Explorateurs disponibles
|
||||
|
@ -1012,7 +1012,7 @@ setting.preferences.denyApiTaker=Deny takers using the API
|
||||
setting.preferences.notifyOnPreRelease=Receive pre-release notifications
|
||||
setting.preferences.resetAllFlags=Ripristina tutti i flag \"Non mostrare più\"
|
||||
settings.preferences.languageChange=Per applicare la modifica della lingua a tutte le schermate è necessario riavviare.
|
||||
settings.preferences.supportLanguageWarning=In caso di controversia, tenere presente che la mediazione è gestita in {0} e l'arbitrato in {1}.
|
||||
settings.preferences.supportLanguageWarning=In caso di controversia, tenere presente che l'arbitrato è gestito in {0}.
|
||||
settings.preferences.editCustomExplorer.headline=Explorer Settings
|
||||
settings.preferences.editCustomExplorer.description=Choose a system defined explorer from the list on the left, and/or customize to suit your own preferences.
|
||||
settings.preferences.editCustomExplorer.available=Available explorers
|
||||
|
@ -1012,7 +1012,7 @@ setting.preferences.denyApiTaker=APIを使用するテイカーを拒否する
|
||||
setting.preferences.notifyOnPreRelease=Receive pre-release notifications
|
||||
setting.preferences.resetAllFlags=「次回から表示しない」フラグを全てリセット
|
||||
settings.preferences.languageChange=言語の変更をすべての画面に適用するには再起動が必要です。
|
||||
settings.preferences.supportLanguageWarning=係争が発生した場合、調停は{0}で、仲裁は{1}で処理されることに注意して下さい。
|
||||
settings.preferences.supportLanguageWarning=係争が発生した場合、仲裁は{0}で処理されることに注意してください。
|
||||
settings.preferences.editCustomExplorer.headline=エクスプローラー設定
|
||||
settings.preferences.editCustomExplorer.description=左のリストからシステム定義エクスプローラを選択、それともニーズや好みに合わせてカスタマイズする。
|
||||
settings.preferences.editCustomExplorer.available=利用可能なエクスプローラ
|
||||
|
@ -1015,7 +1015,7 @@ setting.preferences.denyApiTaker=Deny takers using the API
|
||||
setting.preferences.notifyOnPreRelease=Receive pre-release notifications
|
||||
setting.preferences.resetAllFlags=Esquecer marcações \"Não exibir novamente\"
|
||||
settings.preferences.languageChange=Aplicar a mudança de idioma em todas as telas requer uma reinicialização.
|
||||
settings.preferences.supportLanguageWarning=Em caso de disputa, por favor note que a mediação é feita em {0} e a arbitração em {1}.
|
||||
settings.preferences.supportLanguageWarning=Em caso de disputa, por favor note que a arbitração é feita em {0}.
|
||||
settings.preferences.editCustomExplorer.headline=Explorer Settings
|
||||
settings.preferences.editCustomExplorer.description=Choose a system defined explorer from the list on the left, and/or customize to suit your own preferences.
|
||||
settings.preferences.editCustomExplorer.available=Available explorers
|
||||
|
@ -1012,7 +1012,7 @@ setting.preferences.denyApiTaker=Deny takers using the API
|
||||
setting.preferences.notifyOnPreRelease=Receive pre-release notifications
|
||||
setting.preferences.resetAllFlags=Reiniciar todos os marcadores \"Não mostrar novamente\"
|
||||
settings.preferences.languageChange=Para aplicar a mudança de língua em todas os ecrãs requer uma reinicialização.
|
||||
settings.preferences.supportLanguageWarning=Em caso de disputa, por favor saiba que a mediação será tratada em {0} e a arbitragem em {1}.
|
||||
settings.preferences.supportLanguageWarning=Em caso de disputa, por favor saiba que a arbitragem será tratada em {0}.
|
||||
settings.preferences.editCustomExplorer.headline=Explorer Settings
|
||||
settings.preferences.editCustomExplorer.description=Choose a system defined explorer from the list on the left, and/or customize to suit your own preferences.
|
||||
settings.preferences.editCustomExplorer.available=Available explorers
|
||||
|
@ -1012,7 +1012,7 @@ setting.preferences.denyApiTaker=Deny takers using the API
|
||||
setting.preferences.notifyOnPreRelease=Receive pre-release notifications
|
||||
setting.preferences.resetAllFlags=Сбросить все флажки \«Не показывать снова\»
|
||||
settings.preferences.languageChange=Изменение языка во всех разделах вступит в силу после перезагрузки приложения.
|
||||
settings.preferences.supportLanguageWarning=In case of a dispute, please note that mediation is handled in {0} and arbitration in {1}.
|
||||
settings.preferences.supportLanguageWarning=In case of a dispute, please note that arbitration is handled in {0}.
|
||||
settings.preferences.editCustomExplorer.headline=Explorer Settings
|
||||
settings.preferences.editCustomExplorer.description=Choose a system defined explorer from the list on the left, and/or customize to suit your own preferences.
|
||||
settings.preferences.editCustomExplorer.available=Available explorers
|
||||
|
@ -1012,7 +1012,7 @@ setting.preferences.denyApiTaker=Deny takers using the API
|
||||
setting.preferences.notifyOnPreRelease=Receive pre-release notifications
|
||||
setting.preferences.resetAllFlags=รีเซ็ตทั้งหมด \"ไม่ต้องแสดงอีกครั้ง \" ปักธง
|
||||
settings.preferences.languageChange=หากต้องการเปลี่ยนภาษากับทุกหน้าต้องทำการรีสตาร์ท
|
||||
settings.preferences.supportLanguageWarning=In case of a dispute, please note that mediation is handled in {0} and arbitration in {1}.
|
||||
settings.preferences.supportLanguageWarning=In case of a dispute, please note that arbitration is handled in {0}.
|
||||
settings.preferences.editCustomExplorer.headline=Explorer Settings
|
||||
settings.preferences.editCustomExplorer.description=Choose a system defined explorer from the list on the left, and/or customize to suit your own preferences.
|
||||
settings.preferences.editCustomExplorer.available=Available explorers
|
||||
|
@ -1014,7 +1014,7 @@ setting.preferences.denyApiTaker=Deny takers using the API
|
||||
setting.preferences.notifyOnPreRelease=Receive pre-release notifications
|
||||
setting.preferences.resetAllFlags=Cài đặt lại tất cả nhãn \"Không hiển thị lại\"
|
||||
settings.preferences.languageChange=Áp dụng thay đổi ngôn ngữ cho tất cả màn hình yêu cầu khởi động lại.
|
||||
settings.preferences.supportLanguageWarning=In case of a dispute, please note that mediation is handled in {0} and arbitration in {1}.
|
||||
settings.preferences.supportLanguageWarning=In case of a dispute, please note that arbitration is handled in {0}.
|
||||
settings.preferences.editCustomExplorer.headline=Explorer Settings
|
||||
settings.preferences.editCustomExplorer.description=Choose a system defined explorer from the list on the left, and/or customize to suit your own preferences.
|
||||
settings.preferences.editCustomExplorer.available=Available explorers
|
||||
|
@ -1012,7 +1012,7 @@ setting.preferences.denyApiTaker=Deny takers using the API
|
||||
setting.preferences.notifyOnPreRelease=Receive pre-release notifications
|
||||
setting.preferences.resetAllFlags=重置所有“不再提示”的提示
|
||||
settings.preferences.languageChange=同意重启请求以更换语言
|
||||
settings.preferences.supportLanguageWarning=如有任何争议,请注意调解在 {0} 处理,仲裁在 {1} 处理。
|
||||
settings.preferences.supportLanguageWarning=如有任何争议,请注意仲裁在 {0} 处理。
|
||||
settings.preferences.editCustomExplorer.headline=浏览设置。
|
||||
settings.preferences.editCustomExplorer.description=从左侧列表中选择一个系统默认浏览器,或使用您偏好的自定义设置。
|
||||
settings.preferences.editCustomExplorer.available=可用浏览器
|
||||
|
@ -1012,7 +1012,7 @@ setting.preferences.denyApiTaker=Deny takers using the API
|
||||
setting.preferences.notifyOnPreRelease=Receive pre-release notifications
|
||||
setting.preferences.resetAllFlags=重置所有“不再提示”的提示
|
||||
settings.preferences.languageChange=同意重啟請求以更換語言
|
||||
settings.preferences.supportLanguageWarning=如有任何爭議,請注意調解在 {0} 處理,仲裁在 {1} 處理。
|
||||
settings.preferences.supportLanguageWarning=如有任何爭議,請注意仲裁在 {0} 處理。
|
||||
settings.preferences.editCustomExplorer.headline=瀏覽設置。
|
||||
settings.preferences.editCustomExplorer.description=從左側列表中選擇一個系統默認瀏覽器,或使用您偏好的自定義設置。
|
||||
settings.preferences.editCustomExplorer.available=可用瀏覽器
|
||||
|
@ -616,7 +616,7 @@ public abstract class MutableOfferDataModel extends OfferDataModel {
|
||||
return CurrencyUtil.isCryptoCurrency(tradeCurrencyCode.get());
|
||||
}
|
||||
|
||||
boolean isFiatCurrency() {
|
||||
boolean isTraditionalCurrency() {
|
||||
return CurrencyUtil.isTraditionalCurrency(tradeCurrencyCode.get());
|
||||
}
|
||||
|
||||
|
@ -762,7 +762,7 @@ public abstract class MutableOfferViewModel<M extends MutableOfferDataModel> ext
|
||||
InputValidator.ValidationResult result = PriceUtil.isTriggerPriceValid(triggerPriceAsString,
|
||||
marketPrice,
|
||||
dataModel.isSellOffer(),
|
||||
dataModel.isFiatCurrency()
|
||||
dataModel.isTraditionalCurrency()
|
||||
);
|
||||
triggerPriceValidationResult.set(result);
|
||||
updateButtonDisableState();
|
||||
|
@ -662,7 +662,6 @@ public class PreferencesView extends ActivatableViewAndModel<GridPane, Preferenc
|
||||
|
||||
if (model.needsSupportLanguageWarning()) {
|
||||
new Popup().warning(Res.get("settings.preferences.supportLanguageWarning",
|
||||
model.getMediationLanguages(),
|
||||
model.getArbitrationLanguages()))
|
||||
.closeButtonText(Res.get("shared.ok"))
|
||||
.show();
|
||||
|
@ -20,8 +20,8 @@ package haveno.desktop.main.settings.preferences;
|
||||
|
||||
import com.google.inject.Inject;
|
||||
import haveno.core.locale.LanguageUtil;
|
||||
import haveno.core.support.dispute.arbitration.arbitrator.ArbitratorManager;
|
||||
import haveno.core.support.dispute.mediation.mediator.MediatorManager;
|
||||
import haveno.core.support.dispute.refund.refundagent.RefundAgentManager;
|
||||
import haveno.core.user.Preferences;
|
||||
import haveno.desktop.common.model.ActivatableViewModel;
|
||||
|
||||
@ -29,26 +29,26 @@ import java.util.stream.Collectors;
|
||||
|
||||
public class PreferencesViewModel extends ActivatableViewModel {
|
||||
|
||||
private final RefundAgentManager refundAgentManager;
|
||||
private final ArbitratorManager arbitratorManager;
|
||||
private final MediatorManager mediationManager;
|
||||
private final Preferences preferences;
|
||||
|
||||
@Inject
|
||||
public PreferencesViewModel(Preferences preferences,
|
||||
RefundAgentManager refundAgentManager,
|
||||
ArbitratorManager arbitratorManager,
|
||||
MediatorManager mediationManager) {
|
||||
this.preferences = preferences;
|
||||
this.refundAgentManager = refundAgentManager;
|
||||
this.arbitratorManager = arbitratorManager;
|
||||
this.mediationManager = mediationManager;
|
||||
}
|
||||
|
||||
boolean needsSupportLanguageWarning() {
|
||||
return !refundAgentManager.isAgentAvailableForLanguage(preferences.getUserLanguage()) ||
|
||||
return !arbitratorManager.isAgentAvailableForLanguage(preferences.getUserLanguage()) ||
|
||||
!mediationManager.isAgentAvailableForLanguage(preferences.getUserLanguage());
|
||||
}
|
||||
|
||||
String getArbitrationLanguages() {
|
||||
return refundAgentManager.getObservableMap().values().stream()
|
||||
return arbitratorManager.getObservableMap().values().stream()
|
||||
.flatMap(arbitrator -> arbitrator.getLanguageCodes().stream())
|
||||
.distinct()
|
||||
.map(LanguageUtil::getDisplayName)
|
||||
|
Loading…
Reference in New Issue
Block a user