From 83745c923fc0d660730f47c81159ce9b6942f616 Mon Sep 17 00:00:00 2001 From: Takayuki KUSANO <65759+tkusano@users.noreply.github.com> Date: Wed, 26 Jun 2024 23:41:14 +0900 Subject: [PATCH] Fix footer messages in starter pack wizard (#4650) * Fix footer messages in StarterPack wizard and updates ja messages * Updates to minimize diff * Revert "Updates to minimize diff" This reverts commit 4d1dfe131a5ffc31fc5e6162dbcc90e77e042734. * Revert "Fix footer messages in StarterPack wizard and updates ja messages" This reverts commit 9a90898abc66c281f44696347043ce5da5859d60. * Fix labels for plurals in starter packs * Update translations --------- Co-authored-by: Dan Abramov --- src/locale/locales/fr/messages.po | 4 + src/locale/locales/ja/messages.po | 4 + src/screens/StarterPack/Wizard/index.tsx | 116 ++++++++++++++--------- 3 files changed, 77 insertions(+), 47 deletions(-) diff --git a/src/locale/locales/fr/messages.po b/src/locale/locales/fr/messages.po index a4e6fab2..208128fc 100644 --- a/src/locale/locales/fr/messages.po +++ b/src/locale/locales/fr/messages.po @@ -189,6 +189,10 @@ msgstr "<0>{0} {1, plural, one {abonné·e} other {abonné·e·s}}" msgid "<0>{0} {1, plural, one {following} other {following}}" msgstr "<0>{0} {1, plural, one {abonnement} other {abonnements}}" +#: src/screens/StarterPack/Wizard/index.tsx:497 +msgid "<0>{0} and<1> <2>{1} are included in your starter pack" +msgstr "<0>{0} et<1> <2>{1} faites partie de votre pack de démarrage" + #: src/screens/StarterPack/Wizard/index.tsx:478 msgid "<0>{0} is included in your starter pack" msgstr "<0>{0} fait partie de votre kit de démarrage" diff --git a/src/locale/locales/ja/messages.po b/src/locale/locales/ja/messages.po index 908bd5d4..a4a923f6 100644 --- a/src/locale/locales/ja/messages.po +++ b/src/locale/locales/ja/messages.po @@ -185,6 +185,10 @@ msgstr "<0>{0} {1, plural, other {フォロワー}}" msgid "<0>{0} {1, plural, one {following} other {following}}" msgstr "<0>{0} {1, plural, other {フォロー}}" +#: src/screens/StarterPack/Wizard/index.tsx:497 +msgid "<0>{0} and<1> <2>{1} are included in your starter pack" +msgstr "<0>{0}と<2>{1}はあなたのスターターパックに含まれています" + #: src/screens/StarterPack/Wizard/index.tsx:478 msgid "<0>{0} is included in your starter pack" msgstr "<0>{0}はあなたのスターターパックに含まれています" diff --git a/src/screens/StarterPack/Wizard/index.tsx b/src/screens/StarterPack/Wizard/index.tsx index b231e317..2f50e878 100644 --- a/src/screens/StarterPack/Wizard/index.tsx +++ b/src/screens/StarterPack/Wizard/index.tsx @@ -445,7 +445,7 @@ function Footer({ ))} - {items.length === 0 ? ( + {items.length === 0 /* Assuming this can only happen for feeds */ ? ( Add some feeds to your starter pack! @@ -456,52 +456,74 @@ function Footer({ ) : ( - {state.currentStep === 'Profiles' && items.length === 1 ? ( - - It's just you right now! Add more people to your starter pack by - searching above. - - ) : items.length === 1 ? ( - - - {getName(items[initialNamesIndex])} - {' '} - is included in your starter pack - - ) : items.length === 2 ? ( - - You and - - - {getName(items[initialNamesIndex])}{' '} - - are included in your starter pack - - ) : state.currentStep === 'Profiles' ? ( - - - {getName(items[initialNamesIndex])},{' '} - - - {getName(items[initialNamesIndex + 1])},{' '} - - and{' '} - {' '} - are included in your starter pack - - ) : ( - - - {getName(items[initialNamesIndex])},{' '} - - - {getName(items[initialNamesIndex + 1])},{' '} - - and{' '} - {' '} - are included in your starter pack - - )} + { + items.length === 1 && state.currentStep === 'Profiles' ? ( + + It's just you right now! Add more people to your starter pack by + searching above. + + ) : items.length === 1 && state.currentStep === 'Feeds' ? ( + + + {getName(items[initialNamesIndex])} + {' '} + is included in your starter pack + + ) : items.length === 2 && state.currentStep === 'Profiles' ? ( + + You and + + + {getName(items[initialNamesIndex])}{' '} + + are included in your starter pack + + ) : items.length === 2 && state.currentStep === 'Feeds' ? ( + + + {getName(items[initialNamesIndex])} + {' '} + and + + + {getName(items[initialNamesIndex + 1])}{' '} + + are included in your starter pack + + ) : items.length > 2 && state.currentStep === 'Profiles' ? ( + + + {getName(items[initialNamesIndex])},{' '} + + + {getName(items[initialNamesIndex + 1])},{' '} + + and{' '} + {' '} + are included in your starter pack + + ) : items.length > 2 && state.currentStep === 'Feeds' ? ( + + + {getName(items[initialNamesIndex])},{' '} + + + {getName(items[initialNamesIndex + 1])},{' '} + + and{' '} + {' '} + are included in your starter pack + + ) : null /* Should not happen */ + } )}