Skip to content

Commit

Permalink
fix: translations, delete panel height ft in app detail
Browse files Browse the repository at this point in the history
  • Loading branch information
Christian Badura committed Aug 7, 2024
1 parent c45c014 commit c16482b
Show file tree
Hide file tree
Showing 6 changed files with 24 additions and 33 deletions.
10 changes: 0 additions & 10 deletions src/app/product-store/app-detail/app-detail.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,6 @@ export class AppDetailComponent implements OnInit, OnChanges {
if (this.appAbstract?.id) {
if (this.appAbstract.appType === 'MFE') this.getMfe()
if (this.appAbstract.appType === 'MS') this.getMs()
this.preparePanelHeight()
}
}

Expand Down Expand Up @@ -273,16 +272,7 @@ export class AppDetailComponent implements OnInit, OnChanges {

public onTabPanelChange(e: any): void {
this.tabIndex = e.index
this.preparePanelHeight()
}
// use the same height on all TABs
private preparePanelHeight(): void {
if (!this.panelDetail?.el?.nativeElement) return
this.renderer.setStyle(this.panelDetail?.el.nativeElement, 'display', 'block')
if (this.panelHeight === 0) this.panelHeight = this.panelDetail?.el.nativeElement.offsetHeight
this.renderer.setStyle(this.panelDetail?.el.nativeElement, 'height', this.panelHeight - 10 + 'px')
}

private createMfe() {
this.mfeApi.createMicrofrontend({ createMicrofrontendRequest: this.mfe as CreateMicrofrontendRequest }).subscribe({
next: () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
[(ngModel)]="operator"
[ngModelOptions]="{ standalone: true }"
[binary]="true"
[label]="'APP.OPERATOR' | translate"
[label]="'INTERNAL.OPERATOR' | translate"
[pTooltip]="'APP.TOOLTIPS.OPERATOR' | translate"
tooltipPosition="top"
tooltipEvent="hover"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
inputId="product_detail_intern_field_operator"
[(ngModel)]="operator"
[binary]="true"
[label]="'PRODUCT.OPERATOR' | translate"
[label]="'INTERNAL.OPERATOR' | translate"
[pTooltip]="'PRODUCT.TOOLTIPS.OPERATOR' | translate"
tooltipPosition="top"
tooltipEvent="hover"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,17 @@
<div class="surface-section flex flex-column row-gap-4 my-3 sm:my-5">
<div class="flex flex-wrap row-gap-4">
<div class="w-full sm:w-10 md:w-9 lg:w-6 px-3">
<span
controlErrorAnchor
class="p-float-label"
[pTooltip]="'PRODUCT.TOOLTIPS.NAME' | translate"
tooltipPosition="top"
tooltipEvent="hover"
>
>
<input pInputText type="text" class="w-full" id="product_detail_item_name" formControlName="name" />
<span controlErrorAnchor class="p-float-label">
<input
pInputText
type="text"
class="w-full"
id="product_detail_item_name"
formControlName="name"
[pTooltip]="'PRODUCT.TOOLTIPS.NAME' | translate"
tooltipPosition="top"
tooltipEvent="hover"
/>
<label class="ocx-required-label" for="product_detail_item_name">{{ 'PRODUCT.NAME' | translate }}</label>
</span>
<!-- Custom validator message -->
Expand Down
9 changes: 4 additions & 5 deletions src/assets/i18n/de.json
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,7 @@
"CREATION_USER": "Erstellt von",
"MODIFICATION_DATE": "Geändert am",
"MODIFICATION_USER": "Geändert von",
"OPERATOR": "Automatisiert erstellt",
"TOOLTIPS": {
"CREATION_DATE": "Zeitpunkt der Erstellung",
"CREATION_USER": "Name des Benutzers der Erstellung",
Expand Down Expand Up @@ -241,7 +242,6 @@
"GROUP.INTERNALS": "Weitere Details",
"DEPRECATED": "Veraltet",
"UNDEPLOYED": "Unverfügbar",
"OPERATOR": "Automatisch erstellt",
"TOOLTIPS": {
"APP_ID": "Eindeutige ID - Basis Bezeichner der App",
"APP_NAME": "Name der App",
Expand All @@ -253,7 +253,7 @@
"TYPE": "Typ des Microfrontends",
"REMOTE_BASE_URL": "Remote Base URL",
"REMOTE_ENTRY": "Remote Entry",
"REMOTE_NAME": "Einstiegspunkt in der JavaScript-Datei bei WebComponents (Script)",
"REMOTE_NAME": "Einstiegspunkt in der JavaScript-Datei bei WebComponents",
"TAG_NAME": "Name des WebComponent Tags",
"CLASSIFICATIONS": "Kommaseparierte Liste von Begriffen zur Klassifizierung der App, z.b. Game, Tool etc. Kann zur Filterung benutzt werden.",
"CONTACT": "Kontakt zum Anbieter (E-Mail-Adresse o.ä.)",
Expand All @@ -268,7 +268,7 @@
"DEPRECATED_SEARCH": "Diese App ist als veraltet markiert. Sie kann derzeit weiter verwendet werden wird aber in Zukunft nicht mehr zur Verfügung stehen.",
"UNDEPLOYED": "Wenn gesetzt, dann ist diese APP nicht länger nutzbar. Eine weitere Nutzung führt zu Fehlermeldungen.",
"UNDEPLOYED_SEARCH": "Diese App ist nicht länger nutzbar. Eine weitere Nutzung führt zu Fehlermeldungen.",
"OPERATOR": "Wenn gesetzt, dann wurde die App automatisch erstellt. Alle Änderungen gehen beim beim nächsten Deployment verloren."
"OPERATOR": "Wenn gesetzt, dann wurde die App automatisiert erstellt. Alle Änderungen gehen beim beim nächsten Deployment verloren."
},
"WEBCOMPONENT": {
"MODULE": "WebComponent (Modul)",
Expand All @@ -281,7 +281,6 @@
"DESCRIPTION": "Beschreibung",
"DISPLAY_NAME": "Anzeigename",
"PROVIDER": "Anbieter",
"OPERATOR": "Automatisch erstellt",
"IMAGE_URL": "Externe Image URL",
"BASE_PATH": "Basispfad",
"ICON_NAME": "Iconname",
Expand All @@ -294,7 +293,7 @@
"DESCRIPTION": "Beschreibung der Applikation",
"PROVIDER": "Anbieterinformation, sollte bei der Bereitstellung mitgeliefert werden (Helm chart)",
"DISPLAY_NAME": "Anzeigename der Applikation",
"OPERATOR": "Wenn gesetzt, dann wurde die Applikation automatisch erstellt. Alle Änderungen gehen beim beim nächsten Deployment verloren.",
"OPERATOR": "Wenn gesetzt, dann wurde die Applikation automatisiert erstellt. Alle Änderungen gehen beim beim nächsten Deployment verloren.",
"IMAGE_URL": "URL für ein Image ausserhalb des Application Stores",
"BASE_PATH": "Der Basispfad wie die Applikation erreichbar ist. Muss eindeutig über alle Applikationen sein",
"ICON_NAME": "Name eines Icons aus der PrimeNG Icon Bibliothek. Wird z.b. als Default bei Menüeinträgen benutzt",
Expand Down
14 changes: 7 additions & 7 deletions src/assets/i18n/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,21 +42,21 @@
"TOOLTIP": "Delete App",
"NOK": "App could not be deleted",
"OK": "App deleted successfully",
"OPERATOR_TEXT": "This App was created automatically. If still needed it will be restored during the next deployment."
"OPERATOR_TEXT": "This App was created by automation. If still needed it will be restored during the next deployment."
},
"PRODUCT": {
"TOOLTIP": "Delete Application",
"HEADER": "Delete Application",
"NOK": "Application could not be deleted",
"OK": "Application deleted successfully",
"OPERATOR_TEXT": "This Application was created automatically. If still needed it will be restored during the next deployment."
"OPERATOR_TEXT": "This Application was created by automation. If still needed it will be restored during the next deployment."
},
"SLOT": {
"TOOLTIP": "Delete Slot",
"HEADER": "Delete Slot",
"NOK": "Slot could not be deleted",
"OK": "Slot deleted successfully",
"OPERATOR_TEXT": "This Slot was created automatically. If still needed it will be restored during the next deployment."
"OPERATOR_TEXT": "This Slot was created by automation. If still needed it will be restored during the next deployment."
},
"MESSAGE": "Do you want to delete \"{{ITEM}}\"?",
"MESSAGE_INFO": "This action cannot be undone!"
Expand Down Expand Up @@ -157,6 +157,7 @@
"CREATION_USER": "Created by",
"MODIFICATION_DATE": "Changed on",
"MODIFICATION_USER": "Changed by",
"OPERATOR": "Created by automation",
"TOOLTIPS": {
"CREATION_DATE": "Timestamp of the creation",
"CREATION_USER": "Name of the user of the creation",
Expand Down Expand Up @@ -241,7 +242,6 @@
"GROUP.INTERNALS": "More Details",
"DEPRECATED": "Outdated",
"UNDEPLOYED": "Undeployed",
"OPERATOR": "Created by automation",
"TOOLTIPS": {
"APP_ID": "Unique ID - base identifier for this App",
"APP_NAME": "Business name of the App",
Expand All @@ -253,7 +253,7 @@
"TYPE": "Type of the Microfrontends",
"REMOTE_BASE_URL": "Remote Base URL",
"REMOTE_ENTRY": "Remote Entry",
"REMOTE_NAME": "Entry point of JavaScript file used by WebComponents (Script)",
"REMOTE_NAME": "Entry point of JavaScript file used by WebComponents",
"TAG_NAME": "Name of the WebComponent tag",
"CLASSIFICATIONS": "Comma-separated list of terms to classify the App, e.g. Game, Tool etc. Can be used for filtering.",
"CONTACT": "Contact to the provider (email address or similar)",
Expand All @@ -268,7 +268,7 @@
"DEPRECATED_SEARCH": "This App is marked as deprecated. It can currently be used but will no longer be available in the future.",
"UNDEPLOYED": "If set, this App can no longer be used. Further use leads to error messages.",
"UNDEPLOYED_SEARCH": "This App is no longer usable. Further use leads to error messages.",
"OPERATOR": "If set, the App was created automatically. All changes will be lost during the next deployment."
"OPERATOR": "If set, the App was created by automation. All changes will be lost during the next deployment."
},
"WEBCOMPONENT": {
"MODULE": "WebComponent (Module)",
Expand All @@ -294,7 +294,7 @@
"DESCRIPTION": "Description of the Application",
"PROVIDER": "Provider information, should be included in the deployment descriptor (Helm chart)",
"DISPLAY_NAME": "Display Name of the Application",
"OPERATOR": "If set, the Application was created automatically. All changes will be lost during the next deployment.",
"OPERATOR": "If set, the Application was created by automation. All changes will be lost during the next deployment.",
"IMAGE_URL": "URL for an image outside the Application Store",
"BASE_PATH": "The basic path through which the Application can be accessed. It must be unique across all Applications",
"ICON_NAME": "Name of the icons from the PrimeNG icon library. Used, for example, as a default icon for menu entries",
Expand Down

0 comments on commit c16482b

Please sign in to comment.