Skip to content

Commit

Permalink
Fix footer messages in starter pack wizard (#4650)
Browse files Browse the repository at this point in the history
* Fix footer messages in StarterPack wizard and updates ja messages

* Updates to minimize diff

* Revert "Updates to minimize diff"

This reverts commit 4d1dfe1.

* Revert "Fix footer messages in StarterPack wizard and updates ja messages"

This reverts commit 9a90898.

* Fix labels for plurals in starter packs

* Update translations

---------

Co-authored-by: Dan Abramov <[email protected]>
  • Loading branch information
tkusano and gaearon authored Jun 26, 2024
1 parent 8621ecd commit 83745c9
Show file tree
Hide file tree
Showing 3 changed files with 77 additions and 47 deletions.
4 changes: 4 additions & 0 deletions src/locale/locales/fr/messages.po
Original file line number Diff line number Diff line change
Expand Up @@ -189,6 +189,10 @@ msgstr "<0>{0}</0> {1, plural, one {abonné·e} other {abonné·e·s}}"
msgid "<0>{0}</0> {1, plural, one {following} other {following}}"
msgstr "<0>{0}</0> {1, plural, one {abonnement} other {abonnements}}"

#: src/screens/StarterPack/Wizard/index.tsx:497
msgid "<0>{0}</0> and<1> </1><2>{1} </2>are included in your starter pack"
msgstr "<0>{0}</0> et<1> </1><2>{1} </2>faites partie de votre pack de démarrage"

#: src/screens/StarterPack/Wizard/index.tsx:478
msgid "<0>{0}</0> is included in your starter pack"
msgstr "<0>{0}</0> fait partie de votre kit de démarrage"
Expand Down
4 changes: 4 additions & 0 deletions src/locale/locales/ja/messages.po
Original file line number Diff line number Diff line change
Expand Up @@ -185,6 +185,10 @@ msgstr "<0>{0}</0> {1, plural, other {フォロワー}}"
msgid "<0>{0}</0> {1, plural, one {following} other {following}}"
msgstr "<0>{0}</0> {1, plural, other {フォロー}}"

#: src/screens/StarterPack/Wizard/index.tsx:497
msgid "<0>{0}</0> and<1> </1><2>{1} </2>are included in your starter pack"
msgstr "<0>{0}</0>と<2>{1}</2>はあなたのスターターパックに含まれています"

#: src/screens/StarterPack/Wizard/index.tsx:478
msgid "<0>{0}</0> is included in your starter pack"
msgstr "<0>{0}</0>はあなたのスターターパックに含まれています"
Expand Down
116 changes: 69 additions & 47 deletions src/screens/StarterPack/Wizard/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -445,7 +445,7 @@ function Footer({
))}
</View>

{items.length === 0 ? (
{items.length === 0 /* Assuming this can only happen for feeds */ ? (
<View style={[a.gap_sm]}>
<Text style={[a.font_bold, a.text_center, textStyles]}>
<Trans>Add some feeds to your starter pack!</Trans>
Expand All @@ -456,52 +456,74 @@ function Footer({
</View>
) : (
<Text style={[a.text_center, textStyles]}>
{state.currentStep === 'Profiles' && items.length === 1 ? (
<Trans>
It's just you right now! Add more people to your starter pack by
searching above.
</Trans>
) : items.length === 1 ? (
<Trans>
<Text style={[a.font_bold, textStyles]}>
{getName(items[initialNamesIndex])}
</Text>{' '}
is included in your starter pack
</Trans>
) : items.length === 2 ? (
<Trans>
<Text style={[a.font_bold, textStyles]}>You</Text> and
<Text> </Text>
<Text style={[a.font_bold, textStyles]}>
{getName(items[initialNamesIndex])}{' '}
</Text>
are included in your starter pack
</Trans>
) : state.currentStep === 'Profiles' ? (
<Trans context="profiles">
<Text style={[a.font_bold, textStyles]}>
{getName(items[initialNamesIndex])},{' '}
</Text>
<Text style={[a.font_bold, textStyles]}>
{getName(items[initialNamesIndex + 1])},{' '}
</Text>
and{' '}
<Plural value={items.length - 2} one="# other" other="# others" />{' '}
are included in your starter pack
</Trans>
) : (
<Trans context="feeds">
<Text style={[a.font_bold, textStyles]}>
{getName(items[initialNamesIndex])},{' '}
</Text>
<Text style={[a.font_bold, textStyles]}>
{getName(items[initialNamesIndex + 1])},{' '}
</Text>
and{' '}
<Plural value={items.length - 2} one="# other" other="# others" />{' '}
are included in your starter pack
</Trans>
)}
{
items.length === 1 && state.currentStep === 'Profiles' ? (
<Trans>
It's just you right now! Add more people to your starter pack by
searching above.
</Trans>
) : items.length === 1 && state.currentStep === 'Feeds' ? (
<Trans>
<Text style={[a.font_bold, textStyles]}>
{getName(items[initialNamesIndex])}
</Text>{' '}
is included in your starter pack
</Trans>
) : items.length === 2 && state.currentStep === 'Profiles' ? (
<Trans>
<Text style={[a.font_bold, textStyles]}>You</Text> and
<Text> </Text>
<Text style={[a.font_bold, textStyles]}>
{getName(items[initialNamesIndex])}{' '}
</Text>
are included in your starter pack
</Trans>
) : items.length === 2 && state.currentStep === 'Feeds' ? (
<Trans>
<Text style={[a.font_bold, textStyles]}>
{getName(items[initialNamesIndex])}
</Text>{' '}
and
<Text> </Text>
<Text style={[a.font_bold, textStyles]}>
{getName(items[initialNamesIndex + 1])}{' '}
</Text>
are included in your starter pack
</Trans>
) : items.length > 2 && state.currentStep === 'Profiles' ? (
<Trans context="profiles">
<Text style={[a.font_bold, textStyles]}>
{getName(items[initialNamesIndex])},{' '}
</Text>
<Text style={[a.font_bold, textStyles]}>
{getName(items[initialNamesIndex + 1])},{' '}
</Text>
and{' '}
<Plural
value={items.length - 2}
one="# other"
other="# others"
/>{' '}
are included in your starter pack
</Trans>
) : items.length > 2 && state.currentStep === 'Feeds' ? (
<Trans context="feeds">
<Text style={[a.font_bold, textStyles]}>
{getName(items[initialNamesIndex])},{' '}
</Text>
<Text style={[a.font_bold, textStyles]}>
{getName(items[initialNamesIndex + 1])},{' '}
</Text>
and{' '}
<Plural
value={items.length - 2}
one="# other"
other="# others"
/>{' '}
are included in your starter pack
</Trans>
) : null /* Should not happen */
}
</Text>
)}

Expand Down

0 comments on commit 83745c9

Please sign in to comment.