Add extra PNP string to settings

This commit is contained in:
Fedor Indutny 2024-02-05 16:33:46 -08:00 committed by GitHub
parent 395c67f6c4
commit 1a74da0c26
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 22 additions and 7 deletions

View file

@ -5800,8 +5800,12 @@
"description": "Description for the phone number sharing setting row when the value is Everyone"
},
"icu:Preferences__pnp__sharing--description--nobody": {
"messageformat": "Nobody will see your phone number on Signal, even when you're messaging them.",
"description": "Description for the phone number sharing setting row when the value is Nobody"
"messageformat": "Your phone number will not be visible to anyone unless they have it saved in their phones contacts.",
"description": "Description for the phone number sharing setting row when the value is Nobody and phone number discoverability setting is Everyone"
},
"icu:Preferences__pnp__sharing--description--nobody--not-discoverable": {
"messageformat": "Your phone number will not be visible to anyone.",
"description": "Description for the phone number sharing setting row when the value is Nobody and phone number discoverability setting is Nobody"
},
"icu:Preferences__pnp--page-title": {
"messageformat": "Phone Number",

View file

@ -1416,6 +1416,21 @@ export function Preferences({
</>
);
} else if (page === Page.PNP) {
let sharingDescription: string;
if (whoCanSeeMe === PhoneNumberSharingMode.Everybody) {
sharingDescription = i18n(
'icu:Preferences__pnp__sharing--description--everyone'
);
} else if (whoCanFindMe === PhoneNumberDiscoverability.Discoverable) {
sharingDescription = i18n(
'icu:Preferences__pnp__sharing--description--nobody'
);
} else {
sharingDescription = i18n(
'icu:Preferences__pnp__sharing--description--nobody--not-discoverable'
);
}
settings = (
<>
<div className="Preferences__title">
@ -1452,11 +1467,7 @@ export function Preferences({
value={whoCanSeeMe}
/>
<div className="Preferences__padding">
<div className="Preferences__description">
{whoCanSeeMe === PhoneNumberSharingMode.Everybody
? i18n('icu:Preferences__pnp__sharing--description--everyone')
: i18n('icu:Preferences__pnp__sharing--description--nobody')}
</div>
<div className="Preferences__description">{sharingDescription}</div>
</div>
</SettingsRow>