Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(PC-7917) (Tech) Lingui, extract unicode characteres from translations #864

Merged
merged 1 commit into from
Apr 9, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/features/bookings/helpers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ export function getBookingLabels(booking: Booking, properties: BookingProperties
}
} else if (properties.isPhysical) {
dateLabel = expirationDatetime
? t`À retirer avant le\u00a0` + formatToCompleteFrenchDate(expirationDatetime, false)
? t`À retirer avant le` + `\u00a0${formatToCompleteFrenchDate(expirationDatetime, false)}`
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

❓comment tu sais si tu les as bien enlevés partout ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

J'ai fais une recherche sur \u, je les ai tous corrigé sauf 3, voir commentaire lingui/js-lingui#1022 (comment)

: ''

const isExpiringToday = expirationDatetime ? isToday(expirationDatetime) : false
Expand Down
2 changes: 1 addition & 1 deletion src/features/bookings/pages/BookingDetails.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ export function BookingDetails() {
) : null}
{shouldDisplayEAN && (
<EANContainer>
<Typo.Caption>{t`EAN\u00a0`}</Typo.Caption>
<Typo.Caption>{t`EAN` + '\u00a0'}</Typo.Caption>
<Typo.Body color={ColorsEnum.GREY_DARK}>{offer.extraData?.isbn}</Typo.Body>
</EANContainer>
)}
Expand Down
3 changes: 2 additions & 1 deletion src/features/profile/components/BeneficiaryCeilings.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,8 @@ export function BeneficiaryCeilings(props: BeneficiaryCeilingsProps) {
const ceilingKey = hasPhysicalCeiling ? 'physicalAndDigital' : 'digital'
const question = ceilingsQuestions[ceilingKey]
const description =
t`Le but du pass Culture est de renforcer tes pratiques culturelles, mais aussi d'en créer de nouvelles.\u0020` +
t`Le but du pass Culture est de renforcer tes pratiques culturelles, mais aussi d'en créer de nouvelles.` +
'\u0020' +
ceilingsDescription[ceilingKey]

return (
Expand Down
2 changes: 1 addition & 1 deletion src/features/profile/components/LoggedOutHeader.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ export function LoggedOutHeader() {
/>
<Spacer.Column numberOfSpaces={4} />
<LoginCta>
<Typo.Body color={ColorsEnum.WHITE}>{t`Tu as déjà un compte ?\u00a0`}</Typo.Body>
<Typo.Body color={ColorsEnum.WHITE}>{t`Tu as déjà un compte ?` + '\u00a0'}</Typo.Body>
<TouchableOpacity
onPress={() => navigate('Login', { preventCancellation: true })}
testID="login-button">
Expand Down
5 changes: 2 additions & 3 deletions src/features/profile/components/NonBeneficiaryHeader.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,8 @@ function NonBeneficiaryHeaderComponent(props: PropsWithChildren<NonBeneficiaryHe
body = (
<BodyContainer testID="body-container-18">
<Typo.Caption>
{t`Tu es éligible jusqu'au\u00a0${formatToSlashedFrenchDate(
eligibilityEndDatetime.toISOString()
)}`}
{t`Tu es éligible jusqu'au` +
`\u00a0${formatToSlashedFrenchDate(eligibilityEndDatetime.toISOString())}`}
</Typo.Caption>
<Spacer.Column numberOfSpaces={1} />
<ModuleBanner
Expand Down
12 changes: 6 additions & 6 deletions src/locales/fr/messages.po
Original file line number Diff line number Diff line change
Expand Up @@ -928,11 +928,11 @@ msgstr "Prix croissant"

#: src/features/profile/components/ExBeneficiaryHeader.tsx:15
#: src/features/profile/components/LoggedOutHeader.tsx:17
#: src/features/profile/components/NonBeneficiaryHeader.tsx:45
#: src/features/profile/components/NonBeneficiaryHeader.tsx:46
msgid "Profil"
msgstr "Profil"

#: src/features/profile/components/NonBeneficiaryHeader.tsx:36
#: src/features/profile/components/NonBeneficiaryHeader.tsx:37
msgid "Profite de {deposit}"
msgstr "Profite de {deposit}"

Expand Down Expand Up @@ -1215,8 +1215,8 @@ msgid "Tu es éligible !"
msgstr "Tu es éligible !"

#: src/features/profile/components/NonBeneficiaryHeader.tsx:30
msgid "Tu es éligible jusqu'au {0}"
msgstr "Tu es éligible jusqu'au {0}"
msgid "Tu es éligible jusqu'au"
msgstr "Tu es éligible jusqu'au"

#: src/features/eighteenBirthday/pages/components/EighteenBirthdayCard.tsx:27
msgid "Tu n'es pas connecté !"
Expand Down Expand Up @@ -1248,7 +1248,7 @@ msgstr "Tu peux activer ou désactiver cette fonctionnalité dans les paramètre
msgid "Tu peux aussi découvrir les autres activités culturelles sur l'application mais leur réservation s'effectuera sur les sites de nos partenaires !"
msgstr "Tu peux aussi découvrir les autres activités culturelles sur l'application mais leur réservation s'effectuera sur les sites de nos partenaires !"

#: src/features/profile/components/BeneficiaryCeilings.tsx:38
#: src/features/profile/components/BeneficiaryCeilings.tsx:39
msgid "Tu peux encore dépenser :"
msgstr "Tu peux encore dépenser :"

Expand Down Expand Up @@ -1518,7 +1518,7 @@ msgstr "Échec de la requête {0}, code: {1}"
msgid "Échec de la requête {url}, code: {0}"
msgstr "Échec de la requête {url}, code: {0}"

#: src/features/profile/components/NonBeneficiaryHeader.tsx:36
#: src/features/profile/components/NonBeneficiaryHeader.tsx:37
msgid "à dépenser dans l'application"
msgstr "à dépenser dans l'application"

Expand Down