Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ajout d'un label sous le bouton "Activer les notifs dans l'application" #1106

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Riot/Assets/en.lproj/Vector.strings
Original file line number Diff line number Diff line change
Expand Up @@ -2792,7 +2792,7 @@ To enable access, tap Settings> Location and select Always"; // Tchap

// Settings
"settings" = "Settings";
"settings_enable_inapp_notifications" = "Enable in-app notifications";
"settings_enable_inapp_notifications" = "Enable in-app notifications for this account"; // Tchap
"settings_enable_push_notifications" = "Enable push notifications";
"settings_enter_validation_token_for" = "Enter validation token for %@:";

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 @@ -1814,7 +1814,7 @@
"room_displayname_two_members" = "%@ et %@";
// Settings
"settings" = "Paramètres";
"settings_enable_inapp_notifications" = "Activer les notifications dans l’application";
"settings_enable_inapp_notifications" = "Activer les notifications pour ce compte"; // Tchap
"settings_enable_push_notifications" = "Activer les notifications push";
"settings_enter_validation_token_for" = "Saisir le jeton de validation pour %@ :";
"notification_settings_room_rule_title" = "Salon : « %@ »";
Expand Down
15 changes: 13 additions & 2 deletions Riot/Modules/Settings/SettingsViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -2211,7 +2211,18 @@ - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(N
{
MXKTableViewCellWithLabelAndSwitch* labelAndSwitchCell = [self getLabelAndSwitchCell:tableView forIndexPath:indexPath];

labelAndSwitchCell.mxkLabel.text = VectorL10n.settingsEnableInappNotifications;
// Tchap: add explanation to "enable notifications by email"
// labelAndSwitchCell.mxkLabel.text = VectorL10n.settingsEnableInappNotifications;

NSMutableAttributedString *attributedText = [[NSMutableAttributedString alloc] initWithString: VectorL10n.settingsEnableInappNotifications
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.settingsEnableInappNotificationsDescription
attributes:@{NSForegroundColorAttributeName : ThemeService.shared.theme.textSecondaryColor,
NSFontAttributeName: [UIFont systemFontOfSize:14.0]}]];
labelAndSwitchCell.mxkLabel.attributedText = attributedText;

labelAndSwitchCell.mxkSwitch.on = RiotSettings.shared.showInAppNotifications;
labelAndSwitchCell.mxkSwitch.onTintColor = ThemeService.shared.theme.tintColor;
labelAndSwitchCell.mxkSwitch.enabled = account.pushNotificationServiceIsActive;
Expand All @@ -2237,7 +2248,7 @@ - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(N



// Tchap: add explanation to "enable notiofications by email"
// Tchap: add explanation to "enable notifications by email"
// labelAndSwitchCell.mxkLabel.text = TchapL10n.settingsNotificationEmail;

NSMutableAttributedString *attributedText = [[NSMutableAttributedString alloc] initWithString: TchapL10n.settingsNotificationEmail
Expand Down
1 change: 1 addition & 0 deletions Tchap/Assets/Localizations/fr.lproj/Tchap.strings
Original file line number Diff line number Diff line change
Expand Up @@ -355,3 +355,4 @@
"settings_enable_push_notif_text" = "Sans cette autorisation, les appels entrants ne seront pas notifiés.";
"settings_enable_email_notif_text" = "Recevez un e-mail si au moins un message récent non lu pendant 72h.";
"settings_enable_email_notif_link" = "En savoir plus.";
"settings_enable_inapp_notifications_description" = "Le compte correspond à tous vos appareils connectés à Tchap.";
1 change: 1 addition & 0 deletions changelog.d/1103.change
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Ajout d'un label sous le bouton "Activer les notifs dans l'application"
Loading