Skip to content
Merged
Show file tree
Hide file tree
Changes from 6 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ _None_

* Removes the `drawText` binary from the gem (instead depending on it being installed via `brew`). Because this update can not be safely applied with no side effects, it's considered a breaking change. [#312]
* When doing Git operations, if no branch is provided, we'll use `trunk` as a default instead of `develop` [#335]
* Remove deprecated `android_merge_translators_strings`, `android_update_metadata`, and `ios_merge_translators_strings` actions [#337]

### New Features

Expand Down

This file was deleted.

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -27,26 +27,6 @@ def self.commit_version_bump
)
end
end

# Calls the `tools/update-translations.sh` script from the project repo, then lint them using the provided gradle task
#
# Deprecated. Use the `android_download_translations` action instead.
#
# @env PROJECT_ROOT_FOLDER The path to the git root of the project
# @env PROJECT_NAME The name of the directory containing the project code (especially containing the `build.gradle` file)
#
# @param [String] validate_translation_command The name of the gradle task to run to validate the translations
#
# @todo Remove this once every client has migrated to `android_download_translations` and we got rid of that legacy action.
#
def self.update_metadata(validate_translation_command)
Action.sh('./tools/update-translations.sh')
Action.sh('git', 'submodule', 'update', '--init', '--recursive')
Action.sh('./gradlew', validate_translation_command)

res_dir = File.join(ENV['PROJECT_ROOT_FOLDER'], ENV['PROJECT_NAME'], 'src', 'main', 'res')
Fastlane::Helper::GitHelper.commit(message: 'Update translations', files: res_dir, push: true)
end
end
end
end
Expand Down
17 changes: 0 additions & 17 deletions lib/fastlane/plugin/wpmreleasetoolkit/helper/ios/ios_git_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -28,23 +28,6 @@ def self.commit_version_bump(include_deliverfile: true, include_metadata: true)
Fastlane::Helper::GitHelper.commit(message: 'Bump version number', files: files_list, push: true)
end

# Calls the `Scripts/localize.py` script in the project root folder and push the `*.strings` files
#
# That script updates the `.strings` files with translations from GlotPress.
#
# @env PROJECT_ROOT_FOLDER The path to the git root of the project
# @env PROJECT_NAME The name of the directory containing the project code (especially containing the `build.gradle` file)
#
# @deprecated This method is only used by the `ios_localize_project` action, which is itself deprecated
# in favor of the new `ios_generate_strings_file_from_code` action
# @todo [Next Major] Remove this method once we fully remove `ios_localize_project`
Copy link
Copy Markdown
Contributor

@AliSoftware AliSoftware Feb 8, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Isn't ios_localize_project still used though (not for long, but until we finish our work on the Localization Tooling Modernization and finally migrate all client apps to the new actions)?

There's another deprecated action still in the codebase: ios_localized_project. It's used in WooCommerce (e.g. here) and Simplenote (which is less pressing because that's on pause).

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ouch! I'm so glad we have code review 😓

I did run the tests after removing this, but I guess it was a naive of just being happy with that given how old this code is.

#
def self.localize_project
Action.sh("cd #{get_from_env!(key: 'PROJECT_ROOT_FOLDER')} && ./Scripts/localize.py")

Fastlane::Helper::GitHelper.commit(message: 'Update strings for localization', files: strings_files, push: true) || UI.message('No new strings, skipping commit')
end

# Call the `Scripts/update-translations.rb` then the `fastlane/download_metadata` Scripts from the host project folder
#
# @env PROJECT_ROOT_FOLDER The path to the git root of the project
Expand Down
Loading