Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 28 additions & 0 deletions content/messages/IT/long_term_nq.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
{
"meta": {
"offerCountry": "IT",
"offerType": "PAY_LATER_LONG_TERM",
"offerTerm": "{total_payments}",
"lander": "https://www.paypal.com/credit-presentment/lander/modal",
"variables": {
"offer_id": "${CREDIT_OFFERS_DS.offer_id}",
"vendor_financing_id": "${CREDIT_OFFERS_DS.vendor_financing_id}",
"financing_code": "${CREDIT_OFFERS_DS.financing_code}",
"formattedPeriodicPayment": "${CREDIT_OFFERS_DS.formattedPeriodicPayment}",
"formattedMinAmount": "${CREDIT_OFFERS_DS.formattedMinAmount}",
"formattedMaxAmount": "${CREDIT_OFFERS_DS.formattedMaxAmount}"
}
},
"headline": [
["Acquista ora, paga dopo.", ["default", "xsmall"]],
["Acquista ora e paga dopo.", ["xsmall.2"]],
[
"Paga gli acquisti tra {formattedMinAmount} e {formattedMaxAmount} a rate mensili.",
["small", "medium", "large", "xlarge"]
]
],
"subHeadline": [],
"disclaimer": [
["<span aria-hidden='true'>Scopri di più</span><span class='sr-only'>Scopri di più</span>", ["default"]]
]
}
24 changes: 24 additions & 0 deletions content/messages/IT/long_term_q.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
{
"meta": {
"offerCountry": "IT",
"offerType": "PAY_LATER_LONG_TERM",
"messageType": "LONG_TERM:Q",
"offerTerm": "{total_payments}",
"lander": "https://www.paypal.com/credit-presentment/lander/modal",
"variables": {
"offer_id": "${CREDIT_OFFERS_DS.offer_id}",
"vendor_financing_id": "${CREDIT_OFFERS_DS.vendor_financing_id}",
"financing_code": "${CREDIT_OFFERS_DS.financing_code}",
"formattedPeriodicPayment": "${CREDIT_OFFERS_DS.formattedPeriodicPayment}",
"formattedMinAmount": "${CREDIT_OFFERS_DS.formattedMinAmount}",
"formattedMaxAmount": "${CREDIT_OFFERS_DS.formattedMaxAmount}"
}
},
"headline": [
["Acquista ora, paga dopo.", ["default", "xsmall"]],
["Acquista ora e paga dopo.", ["xsmall.2"]],
[["Paga fino a 24 rate mensili."], ["small", "medium", "large", "xlarge"]]
],
"subHeadline": [],
"disclaimer": [["Scopri di più", ["default"]]]
}
8 changes: 8 additions & 0 deletions src/server/locale/IT/mutations/index.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,18 @@
// mutations import here.
import longTermQ from './long_term_q';
import longTermNq from './long_term_nq';
import shortTermQ from './short_term_q';
import shortTermNq from './short_term_nq';
import shortTermNoAmount from './short_term_no_amount';

export default function getMutations(id, type) {
switch (id) {
case 'LONG_TERM:Q':
case 'PLLT_SQ':
return longTermQ[type];
case 'LONG_TERM:NQ':
case 'PLLT_NQ':
return longTermNq[type];
case 'SHORT_TERM:Q':
case 'PLST_SQ':
return shortTermQ[type];
Expand Down
160 changes: 160 additions & 0 deletions src/server/locale/IT/mutations/long_term_nq.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,160 @@
import { flexLogoMutations, textLogoMutations } from '../../../message/logoMutations';
import Logo from '../../../message/logos';
import {
altNoWrap,
logo20x1,
messageLogoWidth,
setLogoTop,
textWrap,
xSmallFallback
} from '../../../message/mediaQueries';

const headlineBreaks = [
{
sizes: ['xsmall']
},
{
sizes: ['medium'],
breaks: ['rate']
}
].reduce((acc, item) => {
const { sizes, breaks } = item;
sizes.forEach(size => {
acc.push({
tag: size,
br: breaks
});
});
return acc;
}, []);

export default {
'layout:flex': [
[
'default',
{
logo: Logo.PP_PAYPAL.WHITE,
headline: [
{
tag: 'xsmall'
},
{
tag: 'medium'
}
],
disclaimer: ['default'],
styles: []
}
],
[
'ratio:20x1',
{
headline: [...headlineBreaks],
styles: [logo20x1()]
}
],
[
'ratio:8x1',
{
headline: [...headlineBreaks]
}
],
...flexLogoMutations
],
'layout:text': [
[
'default',
({ textSize }) => ({
styles: [
textWrap(textSize * 48.5, textSize, 'IT'),
xSmallFallback(textSize * 23),
messageLogoWidth(false, textSize * 4, textSize * 1.25),
setLogoTop(textSize * 20)
],
logo: Logo.PP_PAYPAL.COLOR,
headline: [
{
tag: 'medium',
br: ['in', 'rate']
},
{ tag: 'xsmall' }
],
disclaimer: ['default']
})
],
[
'logo.type:primary && logo.position:right',
({ textSize }) => ({
styles: [
xSmallFallback(textSize * 17.4),
setLogoTop(textSize * 49),
messageLogoWidth(textSize * 6, textSize * 4, textSize * 1.25)
]
})
],
[
'logo.type:primary && logo.position:top',
({ textSize }) => ({
styles: [xSmallFallback(textSize * 21), messageLogoWidth(textSize * 6, textSize * 4, textSize * 1.25)]
})
],
[
'logo.type:alternative',
({ textSize }) => ({
styles: [
`@media screen and (max-width: ${textSize * 14}px) { .message__content { white-space: nowrap; }}`,
textWrap(textSize * 44, textSize, 'IT'),
xSmallFallback(textSize * 19),
altNoWrap(textSize * 14),
messageLogoWidth(textSize * 1.75, textSize * 4, textSize * 1.25)
],
logo: Logo.PP_PAYPAL.COLOR[0]
})
],
[
'logo.type:none',
({ textSize }) => ({
styles: [xSmallFallback(textSize * 24)],
logo: false,
headline: [
{
tag: 'medium.2',
br: ['rate', 'in\b'],
replace: [
['interessi.', 'interessi'],
['dopo.', 'dopo']
]
},
{
tag: 'xsmall.2',
br: ['dopo.'],
replace: [['dopo.', 'dopo']]
}
]
})
],
[
'logo.type:inline',
({ textSize }) => ({
styles: [xSmallFallback(textSize * 24), `.message__logo { width: ${textSize * 4}px }`],
logo: Logo.NO_PP_MONOGRAM.COLOR,
headline: [
{
tag: 'medium.2',
br: ['rate', 'in\b'],
replace: [
['interessi.', 'interessi'],
['dopo.', 'dopo']
]
},
{
tag: 'xsmall.2',
br: ['dopo.'],
replace: [['dopo.', 'dopo']]
}
]
})
],
...textLogoMutations
]
};
Loading
Loading