Skip to content

Commit ac57799

Browse files
committed
Revert "Remove unused method associated with removed ios_localize_project"
This reverts commit fa390b6.
1 parent fae13ff commit ac57799

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

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

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,23 @@ 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+
3148
# Call the `Scripts/update-translations.rb` then the `fastlane/download_metadata` Scripts from the host project folder
3249
#
3350
# @env PROJECT_ROOT_FOLDER The path to the git root of the project

0 commit comments

Comments
 (0)