mirror of
https://github.com/vector-im/element-ios.git
synced 2024-09-28 15:22:39 +00:00
Update media settings strings. Update share extension image size prompt.
This commit is contained in:
parent
ad1044cb9a
commit
4a1a58d804
4 changed files with 38 additions and 22 deletions
|
@ -450,7 +450,7 @@ Tap the + to start adding people.";
|
|||
"settings_config_user_id" = "Logged in as %@";
|
||||
|
||||
"settings_user_settings" = "USER SETTINGS";
|
||||
"settings_media" = "MEDIA";
|
||||
"settings_sending_media" = "SENDING IMAGES AND VIDEOS";
|
||||
"settings_notifications_settings" = "NOTIFICATION SETTINGS";
|
||||
"settings_calls_settings" = "CALLS";
|
||||
"settings_discovery_settings" = "DISCOVERY";
|
||||
|
@ -490,7 +490,8 @@ Tap the + to start adding people.";
|
|||
"settings_three_pids_management_information_part2" = "Discovery";
|
||||
"settings_three_pids_management_information_part3" = ".";
|
||||
|
||||
"settings_confirm_media_size" = "Confirm media size before sending";
|
||||
"settings_confirm_media_size" = "Confirm size when sending";
|
||||
"settings_confirm_media_size_description" = "When this is on, you’ll be asked to confirm what size images and videos will be sent as.";
|
||||
|
||||
"settings_security" = "SECURITY";
|
||||
|
||||
|
|
|
@ -4074,10 +4074,14 @@ internal enum VectorL10n {
|
|||
internal static func settingsConfigUserId(_ p1: String) -> String {
|
||||
return VectorL10n.tr("Vector", "settings_config_user_id", p1)
|
||||
}
|
||||
/// Confirm media size before sending
|
||||
/// Confirm size when sending
|
||||
internal static var settingsConfirmMediaSize: String {
|
||||
return VectorL10n.tr("Vector", "settings_confirm_media_size")
|
||||
}
|
||||
/// When this is on, you’ll be asked to confirm what size images and videos will be sent as.
|
||||
internal static var settingsConfirmMediaSizeDescription: String {
|
||||
return VectorL10n.tr("Vector", "settings_confirm_media_size_description")
|
||||
}
|
||||
/// confirm password
|
||||
internal static var settingsConfirmPassword: String {
|
||||
return VectorL10n.tr("Vector", "settings_confirm_password")
|
||||
|
@ -4402,10 +4406,6 @@ internal enum VectorL10n {
|
|||
internal static var settingsMarkAllAsRead: String {
|
||||
return VectorL10n.tr("Vector", "settings_mark_all_as_read")
|
||||
}
|
||||
/// MEDIA
|
||||
internal static var settingsMedia: String {
|
||||
return VectorL10n.tr("Vector", "settings_media")
|
||||
}
|
||||
/// new password
|
||||
internal static var settingsNewPassword: String {
|
||||
return VectorL10n.tr("Vector", "settings_new_password")
|
||||
|
@ -4486,6 +4486,10 @@ internal enum VectorL10n {
|
|||
internal static var settingsSendCrashReport: String {
|
||||
return VectorL10n.tr("Vector", "settings_send_crash_report")
|
||||
}
|
||||
/// SENDING IMAGES AND VIDEOS
|
||||
internal static var settingsSendingMedia: String {
|
||||
return VectorL10n.tr("Vector", "settings_sending_media")
|
||||
}
|
||||
/// Show decrypted content
|
||||
internal static var settingsShowDecryptedContent: String {
|
||||
return VectorL10n.tr("Vector", "settings_show_decrypted_content")
|
||||
|
|
|
@ -51,7 +51,7 @@ enum
|
|||
{
|
||||
SECTION_TAG_SIGN_OUT = 0,
|
||||
SECTION_TAG_USER_SETTINGS,
|
||||
SECTION_TAG_MEDIA,
|
||||
SECTION_TAG_SENDING_MEDIA,
|
||||
SECTION_TAG_SECURITY,
|
||||
SECTION_TAG_NOTIFICATIONS,
|
||||
SECTION_TAG_CALLS,
|
||||
|
@ -89,7 +89,8 @@ enum
|
|||
|
||||
enum
|
||||
{
|
||||
MEDIA_SETTINGS_CONFIRM_MEDIA_SIZE = 0
|
||||
SENDING_MEDIA_CONFIRM_SIZE = 0,
|
||||
SENDING_MEDIA_CONFIRM_SIZE_DESCRIPTION,
|
||||
};
|
||||
|
||||
enum
|
||||
|
@ -357,9 +358,10 @@ TableViewSectionsDelegate>
|
|||
|
||||
if (BuildSettings.settingsScreenShowConfirmMediaSize)
|
||||
{
|
||||
Section *sectionMedia = [Section sectionWithTag:SECTION_TAG_MEDIA];
|
||||
[sectionMedia addRowWithTag:MEDIA_SETTINGS_CONFIRM_MEDIA_SIZE];
|
||||
sectionMedia.headerTitle = NSLocalizedStringFromTable(@"settings_media", @"Vector", nil);
|
||||
Section *sectionMedia = [Section sectionWithTag:SECTION_TAG_SENDING_MEDIA];
|
||||
[sectionMedia addRowWithTag:SENDING_MEDIA_CONFIRM_SIZE];
|
||||
[sectionMedia addRowWithTag:SENDING_MEDIA_CONFIRM_SIZE_DESCRIPTION];
|
||||
sectionMedia.headerTitle = NSLocalizedStringFromTable(@"settings_sending_media", @"Vector", nil);
|
||||
[tmpSections addObject:sectionMedia];
|
||||
}
|
||||
|
||||
|
@ -1821,9 +1823,9 @@ TableViewSectionsDelegate>
|
|||
cell = passwordCell;
|
||||
}
|
||||
}
|
||||
else if (section == SECTION_TAG_MEDIA)
|
||||
else if (section == SECTION_TAG_SENDING_MEDIA)
|
||||
{
|
||||
if (row == MEDIA_SETTINGS_CONFIRM_MEDIA_SIZE)
|
||||
if (row == SENDING_MEDIA_CONFIRM_SIZE)
|
||||
{
|
||||
MXKTableViewCellWithLabelAndSwitch* labelAndSwitchCell = [self getLabelAndSwitchCell:tableView forIndexPath:indexPath];
|
||||
|
||||
|
@ -1835,6 +1837,15 @@ TableViewSectionsDelegate>
|
|||
|
||||
cell = labelAndSwitchCell;
|
||||
}
|
||||
else if (row == SENDING_MEDIA_CONFIRM_SIZE_DESCRIPTION)
|
||||
{
|
||||
MXKTableViewCell *infoCell = [self getDefaultTableViewCell:tableView];
|
||||
infoCell.textLabel.text = NSLocalizedStringFromTable(@"settings_confirm_media_size_description", @"Vector", nil);
|
||||
infoCell.textLabel.numberOfLines = 0;
|
||||
infoCell.selectionStyle = UITableViewCellSelectionStyleNone;
|
||||
|
||||
cell = infoCell;
|
||||
}
|
||||
}
|
||||
else if (section == SECTION_TAG_NOTIFICATIONS)
|
||||
{
|
||||
|
|
|
@ -515,9 +515,9 @@ typedef NS_ENUM(NSInteger, ImageCompressionMode)
|
|||
|
||||
if (compressionSizes.small.fileSize)
|
||||
{
|
||||
NSString *resolution = [NSString stringWithFormat:@"%@ (%d x %d)", [MXTools fileSizeToString:compressionSizes.small.fileSize round:NO], (int)compressionSizes.small.imageSize.width, (int)compressionSizes.small.imageSize.height];
|
||||
NSString *fileSizeString = [MXTools fileSizeToString:compressionSizes.small.fileSize];
|
||||
|
||||
NSString *title = [NSString stringWithFormat:[NSBundle mxk_localizedStringForKey:@"attachment_small"], resolution];
|
||||
NSString *title = [NSString stringWithFormat:[NSBundle mxk_localizedStringForKey:@"attachment_small"], fileSizeString];
|
||||
|
||||
[compressionPrompt addAction:[UIAlertAction actionWithTitle:title
|
||||
style:UIAlertActionStyleDefault
|
||||
|
@ -543,9 +543,9 @@ typedef NS_ENUM(NSInteger, ImageCompressionMode)
|
|||
|
||||
if (compressionSizes.medium.fileSize)
|
||||
{
|
||||
NSString *resolution = [NSString stringWithFormat:@"%@ (%d x %d)", [MXTools fileSizeToString:compressionSizes.medium.fileSize round:NO], (int)compressionSizes.medium.imageSize.width, (int)compressionSizes.medium.imageSize.height];
|
||||
NSString *fileSizeString = [MXTools fileSizeToString:compressionSizes.medium.fileSize];
|
||||
|
||||
NSString *title = [NSString stringWithFormat:[NSBundle mxk_localizedStringForKey:@"attachment_medium"], resolution];
|
||||
NSString *title = [NSString stringWithFormat:[NSBundle mxk_localizedStringForKey:@"attachment_medium"], fileSizeString];
|
||||
|
||||
[compressionPrompt addAction:[UIAlertAction actionWithTitle:title
|
||||
style:UIAlertActionStyleDefault
|
||||
|
@ -573,9 +573,9 @@ typedef NS_ENUM(NSInteger, ImageCompressionMode)
|
|||
// TODO: Remove this condition when issue https://github.com/vector-im/riot-ios/issues/2341 will be fixed.
|
||||
if (compressionSizes.large.fileSize && (MAX(compressionSizes.large.imageSize.width, compressionSizes.large.imageSize.height) <= kLargeImageSizeMaxDimension))
|
||||
{
|
||||
NSString *resolution = [NSString stringWithFormat:@"%@ (%d x %d)", [MXTools fileSizeToString:compressionSizes.large.fileSize round:NO], (int)compressionSizes.large.imageSize.width, (int)compressionSizes.large.imageSize.height];
|
||||
NSString *fileSizeString = [MXTools fileSizeToString:compressionSizes.large.fileSize];
|
||||
|
||||
NSString *title = [NSString stringWithFormat:[NSBundle mxk_localizedStringForKey:@"attachment_large"], resolution];
|
||||
NSString *title = [NSString stringWithFormat:[NSBundle mxk_localizedStringForKey:@"attachment_large"], fileSizeString];
|
||||
|
||||
[compressionPrompt addAction:[UIAlertAction actionWithTitle:title
|
||||
style:UIAlertActionStyleDefault
|
||||
|
@ -603,9 +603,9 @@ typedef NS_ENUM(NSInteger, ImageCompressionMode)
|
|||
// To limit memory consumption, we suggest the original resolution only if the image orientation is up, or if the image size is moderate
|
||||
if (!isAPendingImageNotOrientedUp || !compressionSizes.large.fileSize)
|
||||
{
|
||||
NSString *resolution = [NSString stringWithFormat:@"%@ (%d x %d)", [MXTools fileSizeToString:compressionSizes.original.fileSize round:NO], (int)compressionSizes.original.imageSize.width, (int)compressionSizes.original.imageSize.height];
|
||||
NSString *fileSizeString = [MXTools fileSizeToString:compressionSizes.original.fileSize];
|
||||
|
||||
NSString *title = [NSString stringWithFormat:[NSBundle mxk_localizedStringForKey:@"attachment_original"], resolution];
|
||||
NSString *title = [NSString stringWithFormat:[NSBundle mxk_localizedStringForKey:@"attachment_original"], fileSizeString];
|
||||
|
||||
[compressionPrompt addAction:[UIAlertAction actionWithTitle:title
|
||||
style:UIAlertActionStyleDefault
|
||||
|
|
Loading…
Reference in a new issue