Commit b72897b2 authored by 肖兰月's avatar 肖兰月

完善视频裁剪页面语言国际化以及优化视频裁剪页面iCloud无法同步的问题

parent 0ab502fb
......@@ -23,3 +23,4 @@
"Select a minimum of %zd photos" = "الرجاء تحديد %zd صورة على الأقل";
"Allow %@ to access your album in \"Settings -> Privacy -> Photos\"" = "السماح لـ %@ بالوصول إلى الألبوم في \"الإعدادات > الخصوصية > الصور\"";
"Please allow %@ to access your camera in \"Settings -> Privacy -> Camera\"" = "الرجاء السماح لـ %@ بالوصول إلى الكاميرا في \"الإعدادات > الخصوصية > الكاميرا\"";
"Selected for %ld seconds" = "محدد لمدة %ld ثانية";
......@@ -17,3 +17,4 @@
"Can not use camera" = "Не може да се използва камера";
"Can not choose both video and photo" = "Не можете да изберете видео и снимка";
"Can not choose both photo and GIF" = "Не може да се избере снимка и GIF";
"Selected for %ld seconds" = "Избрано за %ld секунди";
......@@ -17,3 +17,4 @@
"Can not use camera" = "Nelze použít fotoaparát";
"Can not choose both video and photo" = "Nelze vybrat video ani fotografii";
"Can not choose both photo and GIF" = "Nelze vybrat fotografie a GIF";
"Selected for %ld seconds" = "Vybráno na %ld sekund";
......@@ -23,3 +23,4 @@
"Select a minimum of %zd photos" = "Bitte wählen Sie mindestens %zd Fotos aus";
"Allow %@ to access your album in \"Settings -> Privacy -> Photos\"" = "Erlauben Sie %@ den Zugriff auf Ihr Album unter: „Einstellungen > Datenschutz > Fotos“";
"Please allow %@ to access your camera in \"Settings -> Privacy -> Camera\"" = "Erlauben Sie %@ den Zugriff auf Ihre Kamera unter: „Einstellungen > Datenschutz > Kamera“";
"Selected for %ld seconds" = "Ausgewählt für %ld Sekunden";
......@@ -17,3 +17,4 @@
"Can not use camera" = "Δεν είναι δυνατή η χρήση της κάμερας";
"Can not choose both video and photo" = "Δεν είναι δυνατή η επιλογή του βίντεο και της φωτογραφίας";
"Can not choose both photo and GIF" = "Δεν είναι δυνατή η επιλογή φωτογραφίας και GIF";
"Selected for %ld seconds" = "Selected for %ld seconds";
......@@ -23,3 +23,4 @@
"Select a minimum of %zd photos" = "Seleccione al menos %zd fotografías";
"Allow %@ to access your album in \"Settings -> Privacy -> Photos\"" = "Permita que %@ acceda a su galería en \"Ajustes > Privacidad > Fotografías\"";
"Please allow %@ to access your camera in \"Settings -> Privacy -> Camera\"" = "Permita que %@ acceda a su cámara en \"Ajustes > Privacidad > Cámara\"";
"Selected for %ld seconds" = "Seleccionado para %ld segundos";
......@@ -23,3 +23,4 @@
"Select a minimum of %zd photos" = "Veuillez sélectionner un minimum de %zd photos";
"Allow %@ to access your album in \"Settings -> Privacy -> Photos\"" = "Autorisez %@ à accéder à votre album dans « Paramètres > Confidentialité > Photos »";
"Please allow %@ to access your camera in \"Settings -> Privacy -> Camera\"" = "Autorisez %@ à accéder à votre appareil photo dans « Paramètres > Confidentialité > Appareil photo »";
"Selected for %ld seconds" = "Sélectionné pendant %ld secondes";
......@@ -17,3 +17,4 @@
"Can not use camera" = "לא ניתן להשתמש במצלמה";
"Can not choose both video and photo" = "לא ניתן לבחור הן בסרטון והן בתמונה";
"Can not choose both photo and GIF" = "לא ניתן לבחור גם תמונה וגם קובץ GIF";
"Selected for %ld seconds" = "נבחר למשך %ld שניות";
......@@ -17,3 +17,4 @@
"Can not use camera" = "Non è possibile utilizzare la fotocamera";
"Can not choose both video and photo" = "Non è possibile scegliere sia video che foto";
"Can not choose both photo and GIF" = "Non è possibile scegliere sia foto che GIF";
"Selected for %ld seconds" = "Selezionato per %ld secondi";
......@@ -23,3 +23,4 @@
"Select a minimum of %zd photos" = "少なくとも %zd 枚の写真を選択してください。";
"Allow %@ to access your album in \"Settings -> Privacy -> Photos\"" = "iPhoneの「設定-プライバシー-写真」のオプションで、r%@の携帯電話のアルバムへのアクセス権限を許可してください。";
"Please allow %@ to access your camera in \"Settings -> Privacy -> Camera\"" = "iPhoneの「設定-プライバシー-カメラ」で、%@のカメラへのアクセス権限を許可してください。";
"Selected for %ld seconds" = "%ld 秒間選択されました";
......@@ -23,3 +23,4 @@
"Select a minimum of %zd photos" = "최소 %zd장의 사진을 선택해 주세요.";
"Allow %@ to access your album in \"Settings -> Privacy -> Photos\"" = "\"설정 > 개인 정보 보호 > 사진\"에서 %@이(가) 앨범에 접근할 수 있도록 허용하세요.";
"Please allow %@ to access your camera in \"Settings -> Privacy -> Camera\"" = "\"설정 > 개인 정보 보호 > 카메라\"에서 %@이(가) 카메라에 접근할 수 있도록 허용하세요.";
"Selected for %ld seconds" = "%ld 초 동안 선택됨";
......@@ -17,3 +17,4 @@
"Can not use camera" = "카메라를 사용할 수 없습니다.";
"Can not choose both video and photo" = "동영상과 사진을 모두 선택할 수 없습니다.";
"Can not choose both photo and GIF" = "사진과 GIF를 모두 선택할 수 없습니다.";
"Selected for %ld seconds" = "%ld 초 동안 선택됨";
......@@ -17,3 +17,4 @@
"Can not use camera" = "Kan de camera niet gebruiken";
"Can not choose both video and photo" = "Kan niet zowel video als foto kiezen";
"Can not choose both photo and GIF" = "Kan niet zowel foto als GIF kiezen";
"Selected for %ld seconds" = "Geselecteerd voor %ld seconden";
......@@ -17,3 +17,4 @@
"Can not use camera" = "Nie można używać aparatu";
"Can not choose both video and photo" = "Nie można wybrać zarówno wideo,jak i zdjęcia";
"Can not choose both photo and GIF" = "Nie można wybrać zarówno zdjęcia,jak i GIF";
"Selected for %ld seconds" = "Wybrany przez %ld sekund";
......@@ -23,3 +23,4 @@
"Select a minimum of %zd photos" = "Selecione %zd fotos,no mínimo";
"Allow %@ to access your album in \"Settings -> Privacy -> Photos\"" = "Permita a %@ aceder ao seu álbum em “Definições > Privacidade > Fotos”";
"Please allow %@ to access your camera in \"Settings -> Privacy -> Camera\"" = "Permita a %@ aceder à sua câmara em “Definições > Privacidade > Câmara”";
"Selected for %ld seconds" = "Selecionado por %ld segundos";
......@@ -17,3 +17,4 @@
"Can not use camera" = "Nu pot folosi camera";
"Can not choose both video and photo" = "Nu puteți alege atât videoclipul,cât și fotografia";
"Can not choose both photo and GIF" = "Nu puteți alege atât fotografia,cât și GIF";
"Selected for %ld seconds" = "Selectat pentru %ld secunde";
......@@ -23,3 +23,4 @@
"Select a minimum of %zd photos" = "Вы можете выбрать не менее %zd изображений";
"Allow %@ to access your album in \"Settings -> Privacy -> Photos\"" = "Разрешите доступ %@ к вашему альбому,перейдя в Настройки > Конфиденциальность > Фото";
"Please allow %@ to access your camera in \"Settings -> Privacy -> Camera\"" = "Разрешите доступ %@ к камере вашего устройства,перейдя в Настройки > Конфиденциальность > Камера";
"Selected for %ld seconds" = "Выбрано для %ld секунд";
......@@ -17,3 +17,4 @@
"Can not use camera" = "Fotoaparát nie je možné používať";
"Can not choose both video and photo" = "Nie je možné vybrať video aj fotografiu";
"Can not choose both photo and GIF" = "Nie je možné vybrať fotografie a obrázky GIF";
"Selected for %ld seconds" = "Vybraté na %ld sekundy";
......@@ -17,3 +17,4 @@
"Can not use camera" = "Kan inte använda kamera";
"Can not choose both video and photo" = "Kan inte välja både video och foto";
"Can not choose both photo and GIF" = "Kan inte välja både foto och GIF";
"Selected for %ld seconds" = "Vald för %ld sekunder";
......@@ -17,3 +17,4 @@
"Can not use camera" = "ไม่สามารถใช้กล้องถ่ายรูป";
"Can not choose both video and photo" = "ไม่สามารถเลือกได้ทั้งวิดีโอและภาพถ่าย";
"Can not choose both photo and GIF" = "ไม่สามารถเลือกได้ทั้งภาพถ่ายและ GIF";
"Selected for %ld seconds" = "เลือกไว้เป็นเวลา %ld วินาที";
......@@ -17,3 +17,4 @@
"Can not use camera" = "Kamera kullanılamaz";
"Can not choose both video and photo" = "Hem video hem de fotoğraf seçilemiyor";
"Can not choose both photo and GIF" = "Hem fotoğraf hem de GIF seçilemiyor";
"Selected for %ld seconds" = "%ld saniye için seçildi";
......@@ -17,3 +17,4 @@
"Can not use camera" = "Не можна використовувати камеру";
"Can not choose both video and photo" = "Неможливо вибрати як відео,так і фото";
"Can not choose both photo and GIF" = "Неможливо вибрати як фото,так і GIF";
"Selected for %ld seconds" = "Đã chọn cho %ld giây";
......@@ -24,3 +24,4 @@
"Select a minimum of %zd photos" = "Chọn ít nhất %zd tấm hình";
"Allow %@ to access your album in \"Settings -> Privacy -> Photos\"" = "Vui lòng tại mục iPhone \" Cài đặt – quyền riêng tư - Ảnh\" mở quyền cho phép %@ truy cập ảnh.";
"Please allow %@ to access your camera in \"Settings -> Privacy -> Camera\"" = "Vui lòng tại mục iPhone \" Cài đặt – quyền riêng tư - Ảnh\" mở quyền cho phép %@ truy cập máy ảnh";
"Selected for %ld seconds" = "Đã chọn cho %ld giây";
......@@ -78,6 +78,7 @@
[[TZImageManager manager] getPhotoWithAsset:_model.asset completion:^(UIImage *photo, NSDictionary *info, BOOL isDegraded) {
BOOL iCloudSyncFailed = !photo && [TZCommonTools isICloudSyncError:info[PHImageErrorKey]];
self.iCloudErrorView.hidden = !iCloudSyncFailed;
self->_doneButton.enabled = !iCloudSyncFailed;
}];
[[TZImageManager manager] getVideoWithAsset:_model.asset completion:^(AVPlayerItem *playerItem, NSDictionary *info) {
dispatch_async(dispatch_get_main_queue(), ^{
......@@ -125,6 +126,7 @@
[_doneButton addTarget:self action:@selector(doneButtonClick) forControlEvents:UIControlEventTouchUpInside];
[_doneButton setTitle:self.imagePickerVc.doneBtnTitleStr forState:UIControlStateNormal];
[_doneButton setTitleColor:UIColor.whiteColor forState:UIControlStateNormal];
[_doneButton setTitleColor:self.imagePickerVc.oKButtonTitleColorDisabled forState:UIControlStateDisabled];
[self.view addSubview:_doneButton];
if (self.imagePickerVc.videoEditViewPageUIConfigBlock) {
......@@ -175,8 +177,10 @@
CGFloat statusBarAndNaviBarHeight = statusBarHeight + self.navigationController.navigationBar.tz_height;
CGFloat toolBarHeight = 44 + [TZCommonTools tz_safeAreaInsets].bottom;
CGFloat doneButtonWidth = [_doneButton.currentTitle boundingRectWithSize:CGSizeMake(CGFLOAT_MAX, CGFLOAT_MAX) options:NSStringDrawingUsesFontLeading attributes:@{NSFontAttributeName:[UIFont systemFontOfSize:16]} context:nil].size.width;
_cancelButton.frame = CGRectMake(12, self.view.tz_height - toolBarHeight, 44, 44);
_doneButton.frame = CGRectMake(self.view.tz_width - 44 - 12, self.view.tz_height - toolBarHeight, 44, 44);
[_cancelButton sizeToFit];
_doneButton.frame = CGRectMake(self.view.tz_width - doneButtonWidth - 12, self.view.tz_height - toolBarHeight, doneButtonWidth, 44);
_playButton.frame = CGRectMake(0, statusBarAndNaviBarHeight, self.view.tz_width, self.view.tz_height - statusBarAndNaviBarHeight - toolBarHeight);
CGFloat collectionViewH = (self.view.tz_width - VideoEditLeftMargin * 2 - 2 * PanImageWidth) / 10.0 * 2;
......@@ -212,15 +216,21 @@
if (durationSeconds <= self.imagePickerVc.maxCropVideoDuration) {
imageCount = 10;
self.videoEditView.allImgWidth = maxCropWidth;
_cropVideoDurationLabel.text = [NSString stringWithFormat:@"已选取%.fs",durationSeconds];
_cropVideoDurationLabel.text = [NSString stringWithFormat:[NSBundle tz_localizedStringForKey:@"Selected for %ld seconds"], (NSInteger)durationSeconds];
} else {
CGFloat singleWidthSecond = maxCropWidth / self.imagePickerVc.maxCropVideoDuration;
CGFloat allImgWidth = singleWidthSecond * durationSeconds;
self.videoEditView.allImgWidth = allImgWidth;
imageCount = allImgWidth / _itemW;
_cropVideoDurationLabel.text = [NSString stringWithFormat:@"已选取%lds",(long)self.imagePickerVc.maxCropVideoDuration];
_cropVideoDurationLabel.text = [NSString stringWithFormat:[NSBundle tz_localizedStringForKey:@"Selected for %ld seconds"],(long)self.imagePickerVc.maxCropVideoDuration];
}
NSArray *assetTracks = [_asset tracksWithMediaType:AVMediaTypeVideo];
if (!assetTracks.count) {
self.iCloudErrorView.hidden = NO;
_doneButton.enabled = NO;
_cropVideoDurationLabel.hidden = YES;
return;
};
Float64 frameRate = [[_asset tracksWithMediaType:AVMediaTypeVideo][0] nominalFrameRate];;
NSMutableArray *times = NSMutableArray.array;
NSTimeInterval intervalSecond = durationSeconds/imageCount;
......@@ -287,7 +297,7 @@
[_playerLayer.player seekToTime:[self getCropStartTime] toleranceBefore:kCMTimeZero toleranceAfter:kCMTimeZero];
NSTimeInterval second = [self getCropVideoDuration];
_cropVideoDurationLabel.text = [NSString stringWithFormat:@"已选取%.fs",second];
_cropVideoDurationLabel.text = [NSString stringWithFormat:[NSBundle tz_localizedStringForKey:@"Selected for %ld seconds"], (NSInteger)second];
}
- (void)editViewCropRectEndChange {
......
......@@ -178,6 +178,7 @@
_playButton.frame = CGRectMake(0, statusBarAndNaviBarHeight, self.view.tz_width, self.view.tz_height - statusBarAndNaviBarHeight - toolBarHeight);
if (tzImagePickerVc.allowEditVideo) {
_editButton.frame = CGRectMake(12, 0, 44, 44);
[_editButton sizeToFit];
}
if (tzImagePickerVc.videoPreviewPageDidLayoutSubviewsBlock) {
tzImagePickerVc.videoPreviewPageDidLayoutSubviewsBlock(_playButton, _toolBar, _editButton, _doneButton);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment