Skip to content

Commit

Permalink
Merge pull request #981 from tchapgouv/975-rewording-du-switch-couper…
Browse files Browse the repository at this point in the history
…-les-notifications

Changement de la formulation du bouton des réglages pour autoriser le…
  • Loading branch information
NicolasBuquet authored Mar 5, 2024
2 parents afce04e + dbc1396 commit 085d3dc
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 6 deletions.
2 changes: 1 addition & 1 deletion Riot/Assets/en.lproj/Vector.strings
Original file line number Diff line number Diff line change
Expand Up @@ -759,7 +759,7 @@ Tap the + to start adding people.";

"settings_security" = "SECURITY";

"settings_enable_push_notif" = "Notifications on this device";
"settings_enable_push_notif" = "Enable notifications on this device"; // Tchap
"settings_device_notifications" = "Device notifications";
"settings_show_decrypted_content" = "Show decrypted content";
"settings_global_settings_info" = "Global notification settings are available on your %@ web client";
Expand Down
2 changes: 1 addition & 1 deletion Riot/Assets/fr.lproj/Vector.strings
Original file line number Diff line number Diff line change
Expand Up @@ -279,7 +279,7 @@
"settings_add_phone_number" = "Ajouter un numéro de téléphone";
"settings_night_mode" = "Mode nuit";
"settings_fail_to_update_profile" = "Échec de la mise à jour du profil";
"settings_enable_push_notif" = "Notifications sur cet appareil";
"settings_enable_push_notif" = "Autoriser les notifications sur cet appareil"; // Tchap
"settings_global_settings_info" = "Les paramètres de notification globaux sont disponibles sur votre client web %@";
"settings_pin_rooms_with_missed_notif" = "Épingler les salons avec des notifications non lues";
"settings_pin_rooms_with_unread" = "Épingler les salons avec des messages non lus";
Expand Down
17 changes: 14 additions & 3 deletions Riot/Modules/Settings/SettingsViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -2107,8 +2107,8 @@ - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(N
// Tchap: Add Hide User from directory
MXKTableViewCellWithLabelAndSwitch* labelAndSwitchCell = [self getLabelAndSwitchCell:tableView forIndexPath:indexPath];

NSString *title = NSLocalizedStringFromTable(@"settings_hide_from_users_directory_title", @"Tchap", nil);
NSString *summary = NSLocalizedStringFromTable(@"settings_hide_from_users_directory_summary", @"Tchap", nil);
NSString *title = TchapL10n.settingsHideFromUsersDirectoryTitle;
NSString *summary = TchapL10n.settingsHideFromUsersDirectorySummary;
NSMutableAttributedString *attributedText = [[NSMutableAttributedString alloc] initWithString: title
attributes:@{NSForegroundColorAttributeName : ThemeService.shared.theme.textPrimaryColor,
NSFontAttributeName: [UIFont systemFontOfSize:17.0]}];
Expand Down Expand Up @@ -2171,7 +2171,18 @@ - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(N
{
MXKTableViewCellWithLabelAndSwitch* labelAndSwitchCell = [self getLabelAndSwitchCell:tableView forIndexPath:indexPath];

labelAndSwitchCell.mxkLabel.text = [VectorL10n settingsEnablePushNotif];
// Tchap: adapt "Enable notifications" label and text.
// labelAndSwitchCell.mxkLabel.text = [VectorL10n settingsEnablePushNotif];

NSMutableAttributedString *attributedText = [[NSMutableAttributedString alloc] initWithString: VectorL10n.settingsEnablePushNotif
attributes:@{NSForegroundColorAttributeName : ThemeService.shared.theme.textPrimaryColor,
NSFontAttributeName: [UIFont systemFontOfSize:17.0]}];
[attributedText appendAttributedString:[[NSAttributedString alloc] initWithString:@"\n\n" attributes:@{NSFontAttributeName: [UIFont systemFontOfSize:4]}]];
[attributedText appendAttributedString:[[NSMutableAttributedString alloc] initWithString: TchapL10n.settingsEnablePushNotifText
attributes:@{NSForegroundColorAttributeName : ThemeService.shared.theme.textSecondaryColor,
NSFontAttributeName: [UIFont systemFontOfSize:14.0]}]];

labelAndSwitchCell.mxkLabel.attributedText = attributedText;
labelAndSwitchCell.mxkSwitch.onTintColor = ThemeService.shared.theme.tintColor;
labelAndSwitchCell.mxkSwitch.enabled = YES;
[labelAndSwitchCell.mxkSwitch addTarget:self action:@selector(togglePushNotifications:) forControlEvents:UIControlEventTouchUpInside];
Expand Down
6 changes: 5 additions & 1 deletion Tchap/Assets/Localizations/fr.lproj/Tchap.strings
Original file line number Diff line number Diff line change
Expand Up @@ -326,7 +326,7 @@
////////////////////////////////////////////////////////////////////////////////
// MARK: Room Invite
"security_cross_signing_setup_title" = "Activer la signature croisée";
"security_cross_signing_reset_title" = "Êtes-vous sur ?";
"security_cross_signing_reset_title" = "Êtes-vous sûr ?";
"security_cross_signing_reset_message" = "Faites cette opération seulement si vous avez perdu tous vos autres appareils vérifiés.";
"security_cross_signing_reset_action_title" = "Réinitialiser";

Expand All @@ -335,3 +335,7 @@
"event_formatter_report_incident" = "Signaler un problème";
"void_report_incident_title" = "Signaler un problème VoIP";
"void_report_incident_description" = "Vous avez rencontré un souci durant votre appel VoIP. Dites-nous ce qui s'est passé :";

////////////////////////////////////////////////////////////////////////////////
// MARK: Settings
"settings_enable_push_notif_text" = "Sans cette autorisation, les appels entrants ne seront pas notifiés.";
1 change: 1 addition & 0 deletions changelog.d/975.change
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Changement de la formulation du bouton des réglages pour autoriser les notifications sur l'appareil. Ajout d'un texte explicatif.

0 comments on commit 085d3dc

Please sign in to comment.