Skip to content

Commit 3a29939

Browse files
mokagioiangmaia
authored andcommitted
Remove legacy iOS localization actions and related helpers
We now have newer, better actions to achieve the same results: - `ios_generate_strings_file_from_code` - `ios_extract_keys_from_strings_files` - `ios_download_strings_files_from_glotpress` - `ios_merge_strings_files`
1 parent 7449556 commit 3a29939

File tree

3 files changed

+0
-125
lines changed

3 files changed

+0
-125
lines changed

lib/fastlane/plugin/wpmreleasetoolkit/actions/ios/ios_localize_project.rb

Lines changed: 0 additions & 43 deletions
This file was deleted.

lib/fastlane/plugin/wpmreleasetoolkit/actions/ios/ios_update_metadata.rb

Lines changed: 0 additions & 40 deletions
This file was deleted.

lib/fastlane/plugin/wpmreleasetoolkit/helper/ios/ios_git_helper.rb

Lines changed: 0 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -28,48 +28,6 @@ def self.commit_version_bump(include_deliverfile: true, include_metadata: true)
2828
Fastlane::Helper::GitHelper.commit(message: 'Bump version number', files: files_list, push: true)
2929
end
3030

31-
# Calls the `Scripts/localize.py` script in the project root folder and push the `*.strings` files
32-
#
33-
# That script updates the `.strings` files with translations from GlotPress.
34-
#
35-
# @env PROJECT_ROOT_FOLDER The path to the git root of the project
36-
# @env PROJECT_NAME The name of the directory containing the project code (especially containing the `build.gradle` file)
37-
#
38-
# @deprecated This method is only used by the `ios_localize_project` action, which is itself deprecated
39-
# in favor of the new `ios_generate_strings_file_from_code` action
40-
# @todo [Next Major] Remove this method once we fully remove `ios_localize_project`
41-
#
42-
def self.localize_project
43-
Action.sh("cd #{get_from_env!(key: 'PROJECT_ROOT_FOLDER')} && ./Scripts/localize.py")
44-
45-
Fastlane::Helper::GitHelper.commit(message: 'Update strings for localization', files: strings_files, push: true) || UI.message('No new strings, skipping commit')
46-
end
47-
48-
# Call the `Scripts/update-translations.rb` then the `fastlane/download_metadata` Scripts from the host project folder
49-
#
50-
# @env PROJECT_ROOT_FOLDER The path to the git root of the project
51-
# @env PROJECT_NAME The name of the directory containing the project code (especially containing the `build.gradle` file)
52-
#
53-
# @todo Migrate the scripts, currently in each host repo and called by this method, to be helpers and actions
54-
# in the release-toolkit instead, and move this code away from `ios_git_helper`.
55-
#
56-
def self.update_metadata
57-
Action.sh("cd #{get_from_env!(key: 'PROJECT_ROOT_FOLDER')} && ./Scripts/update-translations.rb")
58-
59-
Fastlane::Helper::GitHelper.commit(message: 'Update translations', files: strings_files, push: false)
60-
61-
Action.sh('cd fastlane && ./download_metadata.swift')
62-
63-
Fastlane::Helper::GitHelper.commit(message: 'Update metadata translations', files: './fastlane/metadata/', push: true)
64-
end
65-
66-
def self.strings_files
67-
project_root = get_from_env!(key: 'PROJECT_ROOT_FOLDER')
68-
project_name = get_from_env!(key: 'PROJECT_NAME')
69-
70-
Dir.glob(File.join(project_root, project_name, '**', '*.strings'))
71-
end
72-
7331
def self.get_from_env!(key:)
7432
ENV.fetch(key) do
7533
UI.user_error! "Could not find value for \"#{key}\" in environment."

0 commit comments

Comments
 (0)