diff --git a/QBImagePicker.xcodeproj/project.pbxproj b/QBImagePicker.xcodeproj/project.pbxproj index 56a6f42e..5d82e89e 100644 --- a/QBImagePicker.xcodeproj/project.pbxproj +++ b/QBImagePicker.xcodeproj/project.pbxproj @@ -124,6 +124,8 @@ AAF1CA401ACE8A8B005F6295 /* ja */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = ja; path = ja.lproj/QBImagePicker.strings; sourceTree = ""; }; E521B0A11B01D6810079461F /* zh-Hans */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = "zh-Hans"; path = "zh-Hans.lproj/QBImagePicker.strings"; sourceTree = ""; }; F167DB441C086AB90045AD5B /* pl */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = pl; path = pl.lproj/QBImagePicker.strings; sourceTree = ""; }; + FE931D551CEC597D00D343BD /* ru */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = ru; path = ru.lproj/QBImagePicker.strings; sourceTree = ""; }; + FE931D561CEC5D8100D343BD /* uk */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = uk; path = uk.lproj/QBImagePicker.strings; sourceTree = ""; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ @@ -441,6 +443,8 @@ es, de, pl, + ru, + uk, ); mainGroup = AAA8FDF91ACDA079002A9710; productRefGroup = AAA8FE041ACDA079002A9710 /* Products */; @@ -580,6 +584,8 @@ 07A50A481B331A840010E048 /* es */, 74BB93661B2CE91A0044EB60 /* de */, F167DB441C086AB90045AD5B /* pl */, + FE931D551CEC597D00D343BD /* ru */, + FE931D561CEC5D8100D343BD /* uk */, ); name = QBImagePicker.strings; sourceTree = ""; diff --git a/QBImagePicker/QBAssetsViewController.m b/QBImagePicker/QBAssetsViewController.m index 37381715..afebc1e8 100644 --- a/QBImagePicker/QBAssetsViewController.m +++ b/QBImagePicker/QBAssetsViewController.m @@ -317,7 +317,7 @@ - (void)updateCachedAssets NSArray *assetsToStartCaching = [self assetsAtIndexPaths:addedIndexPaths]; NSArray *assetsToStopCaching = [self assetsAtIndexPaths:removedIndexPaths]; - CGSize itemSize = [(UICollectionViewFlowLayout *)self.collectionViewLayout itemSize]; + CGSize itemSize = [self collectionView:self.collectionView layout:self.collectionViewLayout sizeForItemAtIndexPath:[NSIndexPath indexPathForRow:0 inSection:0]]; CGSize targetSize = CGSizeScale(itemSize, [[UIScreen mainScreen] scale]); [self.imageManager startCachingImagesForAssets:assetsToStartCaching @@ -446,7 +446,7 @@ - (UICollectionViewCell *)collectionView:(UICollectionView *)collectionView cell // Image PHAsset *asset = self.fetchResult[indexPath.item]; - CGSize itemSize = [(UICollectionViewFlowLayout *)collectionView.collectionViewLayout itemSize]; + CGSize itemSize = cell.frame.size; CGSize targetSize = CGSizeScale(itemSize, [[UIScreen mainScreen] scale]); [self.imageManager requestImageForAsset:asset diff --git a/QBImagePicker/ru.lproj/QBImagePicker.strings b/QBImagePicker/ru.lproj/QBImagePicker.strings new file mode 100644 index 00000000..c40369fc --- /dev/null +++ b/QBImagePicker/ru.lproj/QBImagePicker.strings @@ -0,0 +1,21 @@ +/* + QBImagePicker.strings + QBImagePicker + + Created by Katsuma Tanaka on 2015/04/03. + Copyright (c) 2015 Katsuma Tanaka. All rights reserved. +*/ + +"albums.title" = "Фото"; + +"assets.footer.photo" = "%ld фото"; +"assets.footer.photos" = "%ld фото"; +"assets.footer.video" = "%ld видео"; +"assets.footer.videos" = "%ld видео"; +"assets.footer.photo-and-video" = "%ld фото, %ld видео"; +"assets.footer.photos-and-video" = "%ld фото, %ld видео"; +"assets.footer.photo-and-videos" = "%ld фото, %ld видео"; +"assets.footer.photos-and-videos" = "%ld фото, %ld видео"; + +"assets.toolbar.item-selected" = "%ld объект выбран"; +"assets.toolbar.items-selected" = "%ld объектов выбрано"; diff --git a/QBImagePicker/uk.lproj/QBImagePicker.strings b/QBImagePicker/uk.lproj/QBImagePicker.strings new file mode 100644 index 00000000..08296510 --- /dev/null +++ b/QBImagePicker/uk.lproj/QBImagePicker.strings @@ -0,0 +1,21 @@ +/* + QBImagePicker.strings + QBImagePicker + + Created by Katsuma Tanaka on 2015/04/03. + Copyright (c) 2015 Katsuma Tanaka. All rights reserved. +*/ + +"albums.title" = "Фото"; + +"assets.footer.photo" = "%ld фото"; +"assets.footer.photos" = "%ld фото"; +"assets.footer.video" = "%ld вiдео"; +"assets.footer.videos" = "%ld вiдео"; +"assets.footer.photo-and-video" = "%ld фото, %ld вiдео"; +"assets.footer.photos-and-video" = "%ld фото, %ld вiдео"; +"assets.footer.photo-and-videos" = "%ld фото, %ld вiдео"; +"assets.footer.photos-and-videos" = "%ld фото, %ld вiдео"; + +"assets.toolbar.item-selected" = "%ld об'єкт выбрано"; +"assets.toolbar.items-selected" = "%ld об'єктiв выбрано";