Rework license names

This commit is contained in:
crschnick 2024-08-25 19:56:05 +00:00
parent 7aa92b437f
commit 6c21529789
28 changed files with 45 additions and 54 deletions

View file

@ -16,6 +16,8 @@ public abstract class LicenseProvider {
return INSTANCE;
}
public abstract String formatExceptionMessage(String name, boolean plural, LicensedFeature licensedFeature);
public abstract boolean hasLicense();
public abstract ObservableValue<String> licenseTitle();

View file

@ -1,7 +1,5 @@
package io.xpipe.app.util;
import io.xpipe.app.core.AppI18n;
import lombok.Getter;
@Getter
@ -10,21 +8,12 @@ public class LicenseRequiredException extends RuntimeException {
private final LicensedFeature feature;
public LicenseRequiredException(LicensedFeature feature) {
super(feature.getDisplayName() + " "
+ (feature.isPlural() ? AppI18n.get("areOnlySupported") : AppI18n.get("isOnlySupported")));
this.feature = feature;
}
public LicenseRequiredException(LicensedFeature feature, int limit) {
super(feature.getDisplayName() + " "
+ (feature.isPlural()
? AppI18n.get("areOnlySupportedLimit", limit)
: AppI18n.get("isOnlySupportedLimit", limit)));
super(LicenseProvider.get().formatExceptionMessage(feature.getDisplayName(), feature.isPlural(), feature));
this.feature = feature;
}
public LicenseRequiredException(String featureName, boolean plural, LicensedFeature feature) {
super(featureName + " " + (plural ? AppI18n.get("areOnlySupported") : AppI18n.get("isOnlySupported")));
super(LicenseProvider.get().formatExceptionMessage(featureName, plural, feature));
this.feature = feature;
}
}

View file

@ -63,7 +63,7 @@ public class ShellTemp {
var systemTemp = proc.getSystemTemporaryDirectory();
if (!d.directoryExists(proc, systemTemp.toString()).executeAndCheck()
|| !checkDirectoryPermissions(proc, systemTemp.toString())) {
throw ErrorEvent.expected(new IOException("No permissions to access %s".formatted(systemTemp)));
throw ErrorEvent.expected(new IOException("No permissions to access system temporary directory %s".formatted(systemTemp)));
}
// We don't do this anymore, we hope that all the legacy directories have been cleared now

View file

@ -441,8 +441,6 @@ size=Størrelse
attributes=Attributter
modified=Ændret
owner=Ejer
isOnlySupported=understøttes kun med en licens
areOnlySupported=understøttes kun med en licens
updateReadyTitle=Opdatering til $VERSION$ klar
templates=Skabeloner
retry=Prøv igen

View file

@ -437,8 +437,6 @@ size=Größe
attributes=Attribute
modified=Geändert
owner=Eigentümer
isOnlySupported=wird nur mit einer Lizenz unterstützt
areOnlySupported=werden nur mit einer Lizenz unterstützt
updateReadyTitle=Update auf $VERSION$ bereit
#custom
templates=Vorlagen

View file

@ -440,8 +440,6 @@ attributes=Attributes
#context: title, last modified date
modified=Modified
owner=Owner
isOnlySupported=is only supported with a license
areOnlySupported=are only supported with a license
updateReadyTitle=Update to $VERSION$ ready
#context: digital template
templates=Templates

View file

@ -425,8 +425,6 @@ size=Tamaño
attributes=Atributos
modified=Modificado
owner=Propietario
isOnlySupported=sólo es compatible con una licencia
areOnlySupported=sólo se admiten con licencia
updateReadyTitle=Actualiza a $VERSION$ ready
templates=Plantillas
retry=Reintentar

View file

@ -425,8 +425,6 @@ size=Taille
attributes=Attributs
modified=Modifié
owner=Propriétaire
isOnlySupported=n'est pris en charge qu'avec une licence
areOnlySupported=ne sont prises en charge qu'avec une licence
updateReadyTitle=Mise à jour de $VERSION$ ready
templates=Modèles
retry=Réessayer

View file

@ -425,8 +425,6 @@ size=Dimensione
attributes=Attributi
modified=Modificato
owner=Proprietario
isOnlySupported=è supportato solo con una licenza
areOnlySupported=sono supportati solo con una licenza
updateReadyTitle=Aggiornamento a $VERSION$ ready
templates=Modelli
retry=Riprova

View file

@ -425,8 +425,6 @@ size=サイズ
attributes=属性
modified=変更された
owner=所有者
isOnlySupported=がサポートされているのは、ライセンス
areOnlySupported=がサポートされるのはライセンスが必要である
updateReadyTitle=$VERSION$ に更新
templates=テンプレート
retry=リトライ

View file

@ -425,8 +425,6 @@ size=Grootte
attributes=Attributen
modified=Gewijzigd
owner=Eigenaar
isOnlySupported=wordt alleen ondersteund met een licentie
areOnlySupported=worden alleen ondersteund met een licentie
updateReadyTitle=Bijwerken naar $VERSION$ klaar
templates=Sjablonen
retry=Opnieuw proberen

View file

@ -425,8 +425,6 @@ size=Tamanho
attributes=Atribui
modified=Modificado
owner=Proprietário
isOnlySupported=só é suportado com uma licença
areOnlySupported=só são suportados com uma licença
updateReadyTitle=Actualiza para $VERSION$ ready
templates=Modelos
retry=Repetir

View file

@ -425,8 +425,6 @@ size=Размер
attributes=Атрибуты
modified=Изменено
owner=Владелец
isOnlySupported=поддерживается только при наличии лицензии
areOnlySupported=поддерживаются только при наличии лицензии
updateReadyTitle=Обновление на $VERSION$ готово
templates=Шаблоны
retry=Retry

View file

@ -426,8 +426,6 @@ size=Boyut
attributes=Nitelikler
modified=Değiştirilmiş
owner=Sahibi
isOnlySupported=yalnızca bir lisans ile desteklenir
areOnlySupported=yalnızca bir lisans ile desteklenir
updateReadyTitle=$VERSION$ için güncelleme hazır
templates=Şablonlar
retry=Yeniden Dene

View file

@ -425,8 +425,6 @@ size=大小
attributes=属性
modified=已修改
owner=所有者
isOnlySupported=只有获得许可后才支持
areOnlySupported=只有获得许可后才支持
updateReadyTitle=更新至$VERSION$ ready
templates=模板
retry=重试

View file

@ -1,4 +1,4 @@
community=Community
professional=Professional
proPreview=Pro preview
preview=Professional Preview
proPreview=Preview
preview=Preview

View file

@ -18,7 +18,7 @@ type=Skriv
licenseAlertTitle=Kommerciel brug
useCommunity=Fortsæt med fællesskab
previewDescription=Afprøv nye funktioner i et par uger efter udgivelsen.
tryPreview=Aktiver forhåndsvisning af XPipe
tryPreview=Aktiver forhåndsvisning
previewItem1=Fuld adgang til nyligt udgivne professionelle funktioner i 2 uger efter udgivelsen
previewItem2=Prøv nye funktioner uden nogen forpligtelse
licensedTo=Licenseret til
@ -36,3 +36,5 @@ inactive=Inaktiv
upgradeInfo=Du kan finde oplysninger om opgradering til en professionel licens nedenfor.
upgradeInfoPreview=Du kan finde oplysninger om opgradering til en professionel licens nedenfor eller prøve det nye pro preview.
enterLicenseKey=Indtast licensnøgle for at opgradere
isOnlySupported=understøttes kun med mindst en $TYPE$ -licens
areOnlySupported=understøttes kun med mindst en $TYPE$ -licens

View file

@ -18,7 +18,7 @@ type=Typ
licenseAlertTitle=Kommerzielle Nutzung
useCommunity=Weiter mit Community
previewDescription=Teste die neuen Funktionen ein paar Wochen lang nach der Veröffentlichung.
tryPreview=Aktiviere die XPipe-Vorschau
tryPreview=Vorschau aktivieren
previewItem1=Voller Zugang zu neu veröffentlichten professionellen Funktionen für 2 Wochen nach der Veröffentlichung
previewItem2=Probiere neue Funktionen unverbindlich aus
licensedTo=Lizensiert für
@ -36,3 +36,5 @@ inactive=Inaktiv
upgradeInfo=Informationen zum Upgrade auf eine professionelle Lizenz findest du weiter unten.
upgradeInfoPreview=Informationen zum Upgrade auf eine Professional-Lizenz findest du weiter unten oder du kannst die neue Pro-Vorschau ausprobieren.
enterLicenseKey=Lizenzschlüssel für das Upgrade eingeben
isOnlySupported=wird nur mit mindestens einer $TYPE$ Lizenz unterstützt
areOnlySupported=werden nur mit mindestens einer $TYPE$ Lizenz unterstützt

View file

@ -18,7 +18,7 @@ type=Type
licenseAlertTitle=Commercial usage
useCommunity=Continue with community
previewDescription=Try out new features for a couple of weeks after release.
tryPreview=Activate XPipe preview
tryPreview=Activate preview
previewItem1=Full access to newly released professional features for 2 weeks after release
previewItem2=Try out new features without any commitment
licensedTo=Licensed to
@ -38,5 +38,7 @@ active=Active
#context: Not selected
inactive=Inactive
upgradeInfo=You can find information about upgrading to a professional license below.
upgradeInfoPreview=You can find information about upgrading to a professional license below or try out the new pro preview.
upgradeInfoPreview=You can find information about upgrading to a professional license below or try out the preview.
enterLicenseKey=Enter license key to upgrade
isOnlySupported=is only supported with at least a $TYPE$ license
areOnlySupported=are only supported with at least a $TYPE$ license

View file

@ -18,7 +18,7 @@ type=Escribe
licenseAlertTitle=Uso comercial
useCommunity=Continuar con la comunidad
previewDescription=Prueba las nuevas funciones durante un par de semanas después del lanzamiento.
tryPreview=Activar la vista previa de XPipe
tryPreview=Activar vista previa
previewItem1=Acceso completo a las nuevas funciones profesionales durante 2 semanas después del lanzamiento
previewItem2=Prueba nuevas funciones sin compromiso
licensedTo=Con licencia
@ -35,3 +35,5 @@ inactive=Inactivo
upgradeInfo=A continuación encontrarás información sobre cómo obtener una licencia profesional.
upgradeInfoPreview=A continuación puedes encontrar información sobre cómo actualizar a una licencia profesional o probar la nueva vista previa pro.
enterLicenseKey=Introduce la clave de licencia para actualizar
isOnlySupported=sólo es compatible al menos con la licencia $TYPE$
areOnlySupported=sólo se admiten con una licencia de al menos $TYPE$

View file

@ -18,7 +18,7 @@ type=Type de texte
licenseAlertTitle=Usage commercial
useCommunity=Continue avec la communauté
previewDescription=Essaie les nouvelles fonctionnalités pendant quelques semaines après leur publication.
tryPreview=Activer l'aperçu de XPipe
tryPreview=Activer l'aperçu
previewItem1=Accès complet aux fonctionnalités professionnelles nouvellement publiées pendant 2 semaines après la sortie de la version
previewItem2=Essaie les nouvelles fonctions sans t'engager
licensedTo=Sous licence
@ -35,3 +35,5 @@ inactive=Inactif
upgradeInfo=Tu trouveras ci-dessous des informations sur la mise à niveau vers une licence professionnelle.
upgradeInfoPreview=Tu trouveras ci-dessous des informations sur la mise à niveau vers une licence professionnelle ou tu pourras essayer le nouvel aperçu pro.
enterLicenseKey=Saisis la clé de licence pour la mise à niveau
isOnlySupported=n'est pris en charge qu'avec au moins une licence $TYPE$
areOnlySupported=ne sont pris en charge qu'avec au moins une licence $TYPE$

View file

@ -18,7 +18,7 @@ type=Tipo
licenseAlertTitle=Uso commerciale
useCommunity=Continua con la comunità
previewDescription=Prova le nuove funzionalità per un paio di settimane dopo il rilascio.
tryPreview=Attiva l'anteprima di XPipe
tryPreview=Attiva l'anteprima
previewItem1=Accesso completo alle funzioni professionali appena rilasciate per 2 settimane dal rilascio
previewItem2=Prova nuove funzionalità senza alcun impegno
licensedTo=Con licenza di
@ -35,3 +35,5 @@ inactive=Non attivo
upgradeInfo=Qui di seguito puoi trovare informazioni sull'aggiornamento a una licenza professionale.
upgradeInfoPreview=Puoi trovare informazioni sull'aggiornamento a una licenza professionale qui sotto o provare la nuova anteprima pro.
enterLicenseKey=Inserisci la chiave di licenza per l'aggiornamento
isOnlySupported=è supportato solo con almeno una licenza $TYPE$
areOnlySupported=sono supportati solo con una licenza di almeno $TYPE$

View file

@ -18,7 +18,7 @@ type=タイプ
licenseAlertTitle=商用利用
useCommunity=コミュニティに続く
previewDescription=リリース後数週間は新機能を試す。
tryPreview=XPipeプレビューを有効にする
tryPreview=プレビューを有効にする
previewItem1=リリース後2週間、新しくリリースされたプロフェッショナル機能にフルアクセスできる
previewItem2=コミットメントなしで新機能を試す
licensedTo=ライセンス対象
@ -35,3 +35,5 @@ inactive=非アクティブ
upgradeInfo=プロライセンスへのアップグレードに関する情報は下記を参照のこと。
upgradeInfoPreview=プロライセンスへのアップグレードに関する情報は下記を参照するか、新しいプロプレビューを試すことができる。
enterLicenseKey=ライセンスキーを入力してアップグレードする
isOnlySupported=は、少なくとも$TYPE$ ライセンスでのみサポートされる。
areOnlySupported=は、少なくとも$TYPE$ ライセンスでのみサポートされる。

View file

@ -18,7 +18,7 @@ type=Type
licenseAlertTitle=Commercieel gebruik
useCommunity=Verder met gemeenschap
previewDescription=Probeer nieuwe functies een paar weken na de release uit.
tryPreview=XPipe voorvertoning activeren
tryPreview=Voorbeeld activeren
previewItem1=Volledige toegang tot nieuwe professionele functies gedurende 2 weken na de release
previewItem2=Nieuwe functies uitproberen zonder enige verplichting
licensedTo=Gelicentieerd aan
@ -35,3 +35,5 @@ inactive=Inactief
upgradeInfo=Informatie over het upgraden naar een professionele licentie vind je hieronder.
upgradeInfoPreview=Je kunt hieronder informatie vinden over het upgraden naar een professionele licentie of de nieuwe pro preview uitproberen.
enterLicenseKey=Licentiesleutel invoeren om te upgraden
isOnlySupported=wordt alleen ondersteund met minimaal een $TYPE$ licentie
areOnlySupported=worden alleen ondersteund met minimaal een $TYPE$ licentie

View file

@ -18,7 +18,7 @@ type=Digita
licenseAlertTitle=Utilização comercial
useCommunity=Continua com a comunidade
previewDescription=Experimenta as novas funcionalidades durante algumas semanas após o lançamento.
tryPreview=Ativar a pré-visualização do XPipe
tryPreview=Ativar pré-visualização
previewItem1=Acesso total às novas funcionalidades profissionais durante 2 semanas após o lançamento
previewItem2=Experimenta novas funcionalidades sem qualquer compromisso
licensedTo=Licenciado para
@ -35,3 +35,5 @@ inactive=Inativo
upgradeInfo=Podes encontrar informações sobre a atualização para uma licença profissional abaixo.
upgradeInfoPreview=Podes encontrar informações sobre a atualização para uma licença profissional abaixo ou experimentar a nova pré-visualização profissional.
enterLicenseKey=Introduzir a chave de licença para atualizar
isOnlySupported=só é suportado com, pelo menos, uma licença $TYPE$
areOnlySupported=só são suportados com, pelo menos, uma licença $TYPE$

View file

@ -18,7 +18,7 @@ type=Тип
licenseAlertTitle=Коммерческое использование
useCommunity=Продолжайте общаться
previewDescription=Опробуй новые возможности в течение пары недель после релиза.
tryPreview=Активировать предварительный просмотр XPipe
tryPreview=Активировать предварительный просмотр
previewItem1=Полный доступ к новым профессиональным функциям в течение 2 недель после релиза
previewItem2=Опробуй новые возможности без каких-либо обязательств
licensedTo=Лицензия на
@ -35,3 +35,5 @@ inactive=Неактивный
upgradeInfo=Информацию о переходе на профессиональную лицензию ты найдешь ниже.
upgradeInfoPreview=Ниже ты можешь найти информацию о переходе на профессиональную лицензию или попробовать новую предварительную версию Pro.
enterLicenseKey=Введите лицензионный ключ для обновления
isOnlySupported=поддерживается только при наличии лицензии $TYPE$
areOnlySupported=поддерживаются только при наличии лицензии $TYPE$

View file

@ -18,7 +18,7 @@ type=Tip
licenseAlertTitle=Ticari kullanım
useCommunity=Topluluk ile devam edin
previewDescription=Yayınlandıktan sonra birkaç hafta boyunca yeni özellikleri deneyin.
tryPreview=XPipe önizlemesini etkinleştirme
tryPreview=Önizlemeyi etkinleştir
previewItem1=Piyasaya sürüldükten sonra 2 hafta boyunca yeni çıkan profesyonel özelliklere tam erişim
previewItem2=Herhangi bir taahhütte bulunmadan yeni özellikleri deneyin
licensedTo=Lisanslı
@ -35,3 +35,5 @@ inactive=Aktif değil
upgradeInfo=Profesyonel lisansa yükseltme ile ilgili bilgileri aşağıda bulabilirsiniz.
upgradeInfoPreview=Aşağıda profesyonel lisansa yükseltme hakkında bilgi bulabilir veya yeni pro önizlemeyi deneyebilirsiniz.
enterLicenseKey=Yükseltmek için lisans anahtarını girin
isOnlySupported=yalnızca en az $TYPE$ lisansı ile desteklenir
areOnlySupported=yalnızca en az bir $TYPE$ lisansı ile desteklenir

View file

@ -18,7 +18,7 @@ type=类型
licenseAlertTitle=商业用途
useCommunity=继续社区
previewDescription=新功能发布后试用几周。
tryPreview=激活 XPipe 预览
tryPreview=激活预览
previewItem1=新发布的专业功能发布后两周内可完全访问
previewItem2=无需任何承诺即可试用新功能
licensedTo=授权给
@ -35,3 +35,5 @@ inactive=不活动
upgradeInfo=您可以在下面找到有关升级到专业许可证的信息。
upgradeInfoPreview=您可以在下面找到有关升级到专业许可证的信息,或试用新的专业预览版。
enterLicenseKey=输入许可证密钥进行升级
isOnlySupported=至少要有$TYPE$ 许可证才支持
areOnlySupported=至少需要$TYPE$ 许可证才能支持