@@ -766,79 +766,6 @@ platform :ios do
766766 )
767767 end
768768
769- desc 'Download App Store Translations'
770- lane :download_app_store_translations do
771- files = {
772-
773- # Metadata fields
774- 'app_store_desc' => { desc : 'description.txt' } ,
775- 'app_store_keywords' => { desc : 'keywords.txt' } ,
776- 'app_store_subtitle' => { desc : 'subtitle.txt' } ,
777- 'app_store_promo_text' => { desc : 'promotional_text.txt' } ,
778- 'whats_new' => { desc : 'whats_new.txt' } ,
779-
780- # Screenshots
781- 'app_store_screenshot-1' => { desc : 'app_store_screenshot_1.txt' } ,
782- 'app_store_screenshot-2' => { desc : 'app_store_screenshot_2.txt' } ,
783- 'app_store_screenshot-3' => { desc : 'app_store_screenshot_3.txt' } ,
784- 'app_store_screenshot-4' => { desc : 'app_store_screenshot_4.txt' } ,
785- 'app_store_screenshot-5' => { desc : 'app_store_screenshot_5.txt' }
786- }
787-
788- metadata_locales = GLOTPRESS_LOCALES
789-
790- gp_downloadmetadata ( project_url : 'https://translate.wordpress.com/projects/woocommerce%2Fwoocommerce-ios%2Frelease-notes/' ,
791- target_files : files ,
792- locales : metadata_locales ,
793- source_locale : 'en-US' ,
794- download_path : './fastlane/metadata' )
795-
796- # Ensure that localizations are present in the right places (some locale codes aren't correct)
797- {
798- 'ar' => 'ar-SA' ,
799- 'de' => 'de-DE' ,
800- 'es' => 'es-ES' ,
801- 'fr' => 'fr-FR' ,
802- 'nl' => 'nl-NL' ,
803- 'zh-cn' => 'zh-Hans' ,
804- 'zh-tw' => 'zh-Hant'
805- } . each do |source , destination |
806- source_dir = File . join ( Dir . pwd , 'metadata' , source )
807- Dir . children ( source_dir ) . each do |file |
808- source_file = File . join ( source_dir , file )
809- destination_file = File . join ( Dir . pwd , 'metadata' , destination , file )
810- FileUtils . mv ( source_file , destination_file )
811- end
812- FileUtils . remove_dir ( source_dir )
813- end
814-
815- # Copy source files into `en-US`
816- enUS_path = File . join ( Dir . pwd , 'metadata' , 'en-US' )
817-
818- FileUtils . mkdir_p ( enUS_path )
819-
820- [
821- 'promo_screenshot_1.txt' ,
822- 'promo_screenshot_2.txt' ,
823- 'promo_screenshot_3.txt' ,
824- 'promo_screenshot_4.txt' ,
825- 'promo_screenshot_5.txt'
826- ] . each do |filename |
827- source = File . join ( Dir . pwd , 'appstoreres' , 'metadata' , 'source' , filename )
828- destination = File . join ( enUS_path , filename )
829- FileUtils . cp ( source , destination )
830- end
831-
832- # Replace the `default` directory with the contents of `en-US`
833- default_path = File . join ( Dir . pwd , 'metadata' , 'default' )
834- FileUtils . remove_dir ( default_path ) if File . directory? ( default_path )
835- FileUtils . copy_entry ( enUS_path , default_path )
836-
837- # Never store review information (it contains passwords and PII)
838- review_info_path = File . join ( Dir . pwd , 'metadata' , 'review_information' )
839- FileUtils . remove_dir ( review_info_path ) if File . directory? ( review_info_path )
840- end
841-
842769 desc 'Create Promo Screenshots'
843770 lane :create_promo_screenshots do |options |
844771 unless Fastlane ::Helper ::GitHelper . has_git_lfs
0 commit comments