Skip to content

Commit 0b48848

Browse files
committed
Add new lane to download both .strings and metadata from GlotPress
1 parent 7bf3411 commit 0b48848

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

fastlane/Fastfile

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -691,6 +691,27 @@ platform :ios do
691691
Snapshot::ReportsGenerator.new.generate
692692
end
693693

694+
desc 'Downloads localized strings and App Store Connect metadata from GlotPress'
695+
lane :download_localized_strings_and_metadata_from_glotpress do
696+
download_localized_strings_from_glotpress
697+
download_localized_metadata_from_glotpress
698+
end
699+
700+
desc 'Downloads localized `.strings` from GlotPress'
701+
lane :download_localized_strings_from_glotpress do
702+
# FIXME: This is a copy of what the release toolkit `ios_update_metadata` action does.
703+
# We'll soon replace this with the new `ios_download_strings_files_from_glotpress`-based workflow.
704+
sh("cd #{PROJECT_ROOT_FOLDER} && ./Scripts/update-translations.rb")
705+
706+
files_to_commit = Dir.glob(File.join(RESOURCES_FOLDER, '**', '*.strings'))
707+
git_add(path: files_to_commit, shell_escape: false)
708+
git_commit(
709+
path: files_to_commit,
710+
message: 'Update translations',
711+
allow_nothing_to_commit: true
712+
)
713+
end
714+
694715
desc 'Downloads localized metadata for App Store Connect from GlotPress'
695716
lane :download_localized_metadata_from_glotpress do
696717
metadata_directory = File.join(PROJECT_ROOT_FOLDER, 'fastlane', 'metadata')

0 commit comments

Comments
 (0)