Skip to content

Commit

Permalink
add tiny changes
Browse files Browse the repository at this point in the history
  • Loading branch information
robindemourat committed Dec 12, 2024
1 parent ee36140 commit 9af341e
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 14 deletions.
19 changes: 11 additions & 8 deletions src/i18n/messages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ viz-1-B:
exportations-sud-est:
title-top:
fr: Province d'origine des produits exportés par la France
en: Province of origin from products exported by France
en: Province of origin of products exported by France
title-bottom:
fr: Province d'origine des produits exportés par Marseille
en: Province of origin of products exported by Marseille
Expand Down Expand Up @@ -466,12 +466,15 @@ PartDesEtrangersDansNavigation:
ins:
fr: entrées
en: in
top-barchart-tooltip:
fr: En 1787, ${share}% du tonnage cumulé des navires partis du port de ${port} avaient un pavillon étranger.
en: In 1787, ${share}% of the total tonnage departed from the port of ${port} had a foreign (Non-French) flag
top-row-tooltip:
fr: En 1789, un total de ${tonnage} tonneaux arrivant à Marseille a été pris en charge par des ${label} (${pct}% du total des étrangers).
en: In 1789, a total of ${tonnage} tonneaux arriving in Marseille were handled by ${label} (${pct}% of the total number of foreigners).
fr: En 1789, un total de ${tonnage} tonneaux arrivant à Marseille a été pris en charge par des ${label} (${pct}% du total de tonnage des étrangers).
en: In 1789, a total of ${tonnage} tonneaux arriving in Marseille were handled by ${label} (${pct}% of the total foreign tonnage).
bottom-row-tooltip:
fr: En 1789, un total de ${tonnage} tonneaux arrivant à Marseille a été pris en charge par des ${label} ((${pct}% du total des étrangers).
en: In 1789, a total of ${tonnage} tonneaux arriving in Marseille were handled by ${label} (${pct}% of the total number of foreigners).
fr: En 1789, un total de ${tonnage} tonneaux arrivant à Marseille a été pris en charge par des ${label} ((${pct}% du total de tonnage des étrangers).
en: In 1789, a total of ${tonnage} tonneaux arriving in Marseille were handled by ${label} ships (${pct}% of the total foreign tonnage).
gênois:
fr: gênois
en: genoese
Expand All @@ -480,7 +483,7 @@ PartDesEtrangersDansNavigation:
en: british
italians:
fr: napolitains, gênois, vénitiens, toscans, carrarais, romains, savoyards
en: napolitans, genoese, venitians, toscans, carraras, romans, savoyards
en: neapolitan, genoese, venitian, tuscan, carrara's, roman, Savoyard
espagnols:
fr: espagnols
en: spanish
Expand Down Expand Up @@ -524,13 +527,13 @@ PartDesFrancaisDansProvenance:
en: Share of french sh.
top-tooltip:
fr: En ${year}, ${share}% des voyages partis de ports de ${state} et arrivés à Marseille étaient assurés par des navires français (${tonnage} tx. cumulés)
en: In ${year}, ${share}% of travels from ports of ${state} to Marseille were done by french ships (cumulative tonnage of ${tonnage})
en: In ${year}, ${share}% of travels from ports of ${state} to Marseille were done by French ships (total estimated tonnage of ${tonnage} tx)
bottom-title:
fr: Tonnage estimé des navires français dans les provenances de voyages arrivés à Marseille
en: Estimated tonnage of French ships in the origins of voyages arriving in Marseille
bottom-tooltip:
fr: En ${year}, ${share}% des voyages partis de ports de ${state} et arrivés à Marseille étaient assurés par des navires français (${tonnage} tx. cumulés)
en: In ${year}, ${share}% of travels from ports of ${state} to Marseille were done by french ships (cumulative tonnage of ${tonnage})
en: In ${year}, ${share}% of travels from ports of ${state} to Marseille were done by French ships (total estimated tonnage of ${tonnage} tx)
bottom-y-axis:
fr: Tonnage cum.
en: Cumulative t.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -277,7 +277,7 @@ const MapObjects = ({
}

export default function MarseillePortStructurant({
data: inputData,
data: inputData = new Map(),
width,
height,
lang,
Expand Down Expand Up @@ -378,7 +378,8 @@ export default function MarseillePortStructurant({
{
type: 'custom',
renderObjects: (props) => {
const squareSize = width / 10;
let squareSize = width / 10;
squareSize = squareSize < 150 ? 150 : squareSize;
return (
<g className="legend" transform={`translate(${gutter}, ${height - squareSize - gutter * 8})`}>
<foreignObject
Expand Down Expand Up @@ -444,9 +445,9 @@ export default function MarseillePortStructurant({
</p>
</foreignObject>
<foreignObject
x={squareSize / 3}
x={squareSize / 2}
y={squareSize + gutter}
width={squareSize * 2 / 3}
width={squareSize / 2}
height={squareSize}
>
<p
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,13 @@ const flagToNationality = {
key={port}
transform={`translate(${x}, 0)`}
data-for={'part-etrangers-tooltip'}
data-tip={`En 1787, ${(share_of_strangers * 100).toFixed(2)}% du tonnage cumulé des navires partis du port de ${port} avaient un pavillon étranger.`}
data-tip={
translate('PartDesEtrangersDansNavigation', 'top-barchart-tooltip', lang, {
share: (share_of_strangers * 100).toFixed(2),
port
})
// `En 1787, ${(share_of_strangers * 100).toFixed(2)}% du tonnage cumulé des navires partis du port de ${port} avaient un pavillon étranger.`
}
>
<rect
x={0}
Expand All @@ -204,7 +210,7 @@ const flagToNationality = {
fontSize={comparisonLabelsHeight / 4}
fontWeight={port === 'Marseille' ? 'bold' : undefined}
>
{port + (port === 'Marseille' ? ` (${translate('PartDesEtrangersDansNavigation', 'ins', lang)})` : '')}
{(port === 'Dunkerque' && lang === 'en' ? 'Dunkirk' : port) + (port === 'Marseille' ? ` (${translate('PartDesEtrangersDansNavigation', 'ins', lang)})` : '')}
</text>
</g>
{
Expand Down

0 comments on commit 9af341e

Please sign in to comment.