Skip to content

Commit cec3a30

Browse files
authored
Merge pull request #14001 from ovh/develop
New release
2 parents 316692a + a74c4ec commit cec3a30

File tree

37 files changed

+91
-90
lines changed

37 files changed

+91
-90
lines changed

packages/manager-react-components/src/components/content/price/translations/Messages_en_GB.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"price_ht_label": "ex. VAT",
3-
"price_ttc_label": "{0} INCL. VAT",
3+
"price_ttc_label": "INCL. VAT",
44
"price_free": "Included",
55
"price_gst_excl_label": "ex. GST",
66
"price_gst_incl_label": "incl. GST",
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
import { HOUR_IN_MONTH, convertHourlyPriceToMonthly } from './useCatalogPrice';
2+
3+
describe('Pricing Function', () => {
4+
describe('convertHourlyPriceToMonthly', () => {
5+
it('should convert hourly price to monthly price', () => {
6+
expect(convertHourlyPriceToMonthly(1)).toBe(HOUR_IN_MONTH);
7+
expect(convertHourlyPriceToMonthly(0.5)).toBe(365);
8+
});
9+
});
10+
});

packages/manager-react-components/src/hooks/useCatalogPrice.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,20 @@ const FRENCH_FORMAT = [
1717
'TN',
1818
];
1919
export const GERMAN_FORMAT = ['DE', 'FI', 'SN'];
20+
export const HOUR_IN_MONTH = 730;
2021

2122
export interface CatalogPriceOptions {
2223
hideTaxLabel?: boolean;
2324
exclVat?: boolean;
2425
}
2526

27+
/**
28+
* Handle the conversion on the frontend side from hourly price to monthly.
29+
* In the future, this conversion should be handled on the backend to improve efficiency and maintainability.
30+
* */
31+
export const convertHourlyPriceToMonthly = (hourlyPrice: number) =>
32+
hourlyPrice * HOUR_IN_MONTH;
33+
2634
export const useCatalogPrice = (
2735
maximumFractionDigits?: number,
2836
options?: CatalogPriceOptions,

packages/manager/apps/dedicated/client/app/components/dedicated-cloud/translations/Messages_de_DE.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,6 @@
188188
"ip_servicetype_ipLoadbalancing": "Loadbalancing-IP",
189189
"ip_servicetype_cloudProject": "Cloud Projekt",
190190
"ip_servicetype_vRack": "vRACK",
191-
"ip_servicetype__PARK": "Parking",
192191
"ip_order_quota_full": "Sie haben das maximale Quota an IPs für diesen Server erreicht.",
193192
"ip_order_noservices": "Sie haben keine Dienste zur Bestellung verfügbar.",
194193
"ip_order_step1_question": "Bitte wählen Sie: Für welchen Dienst möchten Sie ",

packages/manager/apps/dedicated/client/app/components/dedicated-cloud/translations/Messages_en_GB.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,6 @@
188188
"ip_servicetype_ipLoadbalancing": "Load balancing IP",
189189
"ip_servicetype_cloudProject": "Cloud project ",
190190
"ip_servicetype_vRack": "vRack",
191-
"ip_servicetype__PARK": "Parking",
192191
"ip_order_quota_full": "You have reached the maximum quota of IPs for this server.",
193192
"ip_order_noservices": "You don't have any services available to order.",
194193
"ip_order_step1_question": "Select the service for which you want to order ",

packages/manager/apps/dedicated/client/app/components/dedicated-cloud/translations/Messages_es_ES.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,6 @@
188188
"ip_servicetype_ipLoadbalancing": "IP Load Balancing",
189189
"ip_servicetype_cloudProject": "Proyecto cloud",
190190
"ip_servicetype_vRack": "vRack",
191-
"ip_servicetype__PARK": "Aparcamiento",
192191
"ip_order_quota_full": "Ha alcanzado la cantidad máxima de direcciones IP en este servidor.",
193192
"ip_order_noservices": "No hay ningún servicio disponible para contratar.",
194193
"ip_order_step1_question": "Seleccione el servicio para el que quiere adquirir ",

packages/manager/apps/dedicated/client/app/components/dedicated-cloud/translations/Messages_fr_CA.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,6 @@
188188
"ip_servicetype_ipLoadbalancing": "IP Load Balancing",
189189
"ip_servicetype_cloudProject": "Projet Cloud",
190190
"ip_servicetype_vRack": "VRACK",
191-
"ip_servicetype__PARK": "Parking",
192191
"ip_order_quota_full": "Le quota maximal d'IPs a été atteint pour ce serveur.",
193192
"ip_order_noservices": "Vous n'avez aucun service disponible à la commande.",
194193
"ip_order_step1_question": "Sélectionnez le service pour lequel vous désirez acheter des ",
@@ -248,4 +247,4 @@
248247
"dedicatedCloud_premier_sbg_order_warning": "Nous ne sommes pas en mesure de prendre de nouvelles commandes sur notre site de SBG. Nos équipes sont pleinement mobilisées et nous mettons tout en œuvre pour rétablir cette possibilité de commande dans un avenir proche.",
249248
"dedicatedCloud_banner_new_product": "Vous pouvez désormais commander des datacenters correspondants à des packs logiciels VMware différents au sein d'un même environnement Private Cloud.",
250249
"dedicatedCloud_banner_new_product_link": "En savoir plus"
251-
}
250+
}

packages/manager/apps/dedicated/client/app/components/dedicated-cloud/translations/Messages_it_IT.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,6 @@
188188
"ip_servicetype_ipLoadbalancing": "IP Load Balancing",
189189
"ip_servicetype_cloudProject": "Progetto Cloud",
190190
"ip_servicetype_vRack": "vRack",
191-
"ip_servicetype__PARK": "Parking",
192191
"ip_order_quota_full": "Hai raggiunto la quota massima di indirizzi IP per questo server.",
193192
"ip_order_noservices": "Non ci sono servizi disponibili per l'ordine",
194193
"ip_order_step1_question": "Seleziona il servizio per cui vuoi acquistare ",

packages/manager/apps/dedicated/client/app/components/dedicated-cloud/translations/Messages_pl_PL.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,6 @@
188188
"ip_servicetype_ipLoadbalancing": "IP Load Balancing",
189189
"ip_servicetype_cloudProject": "Projekt Cloud",
190190
"ip_servicetype_vRack": "vRack",
191-
"ip_servicetype__PARK": "Parking",
192191
"ip_order_quota_full": "Maksymalna liczba adresów IP dla tego serwera została osiągnięta.",
193192
"ip_order_noservices": "Nie masz możliwości zamówienia usługi.",
194193
"ip_order_step1_question": "Wybierz usługę, dla której chcesz kupić ",

packages/manager/apps/dedicated/client/app/components/dedicated-cloud/translations/Messages_pt_PT.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,6 @@
188188
"ip_servicetype_ipLoadbalancing": "IP Load Balancer",
189189
"ip_servicetype_cloudProject": "Projeto cloud",
190190
"ip_servicetype_vRack": "vRack",
191-
"ip_servicetype__PARK": "Parking",
192191
"ip_order_quota_full": "O limite máximo de endereços IP para este servidor foi atingido.",
193192
"ip_order_noservices": "Nenhum serviço está disponível na encomenda.",
194193
"ip_order_step1_question": "Escolha o serviço para o qual deseja comprar ",

0 commit comments

Comments
 (0)