Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove legacy localisation script references and actions #447

Conversation

iangmaia
Copy link
Contributor

@iangmaia iangmaia commented Jan 30, 2023

What does it do?

This is a clean up removing the remainder references to the legacy localisation tooling, following up #443.

It contains:

  • Removal of the actions ios_localize_project and ios_update_metadata.
  • Removal of the methods localize_project, update_metadata and strings_files on Ios::GitHelper
  • Removal of the parameter include_metadata from the method Ios::GitHelper.commit_version_bump(include_deliverfile:)

Related PRs

Checklist before requesting a review

  • Run bundle exec rubocop to test for code style violations and recommendations
  • Add Unit Tests (aka specs/*_spec.rb) if applicable
  • Run bundle exec rspec to run the whole test suite and ensure all your tests pass
  • Make sure you added an entry in the CHANGELOG.md file to describe your changes under the approprioate existing ### subsection of the existing ## Trunk section.

mokagio and others added 4 commits January 29, 2023 17:36
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`
@iangmaia iangmaia changed the title Cleanup/remove legacy localization tooling Remove legacy localisation script references and actions Jan 30, 2023
Copy link
Contributor

@AliSoftware AliSoftware left a comment

Choose a reason for hiding this comment

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

The diff looks good to me, and I checked the various call sites of the helper methods that you deleted and confirm that they were not used elsewhere outside of the actions you also removed. Great cleanup!! 🧹 🧹 🧹

Dropped an idea about starting a quick migration guide for all the things we're breaking in those various cleanups you're doing. But isn't a blocker for this to land.

CHANGELOG.md Outdated Show resolved Hide resolved
files_list.append File.join('fastlane', 'Deliverfile') if include_deliverfile
if include_metadata
files_list.append File.join('fastlane', 'download_metadata.swift')
files_list.append File.join(ENV['PROJECT_ROOT_FOLDER'], ENV['PROJECT_NAME'], 'Resources', ENV['APP_STORE_STRINGS_FILE_NAME'])
Copy link
Contributor

Choose a reason for hiding this comment

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

Seeing this, I wonder if it would be worth it to document somewhere the changes potentially needed in client projects when migrating to the next major version that will contain this change.

We don't really have a "Migration Guides" documentation so far in release-toolkit (because most of our past breaking changes were usually things we already adopted in all client projects before getting rid of them in the toolkit). But for all these changes we're making here, given how it can be easy to lose track, maybe that would be worth it to make a list of things to check when migrating? (Not sure where, maybe in a docs/MigrationGuide.md file for example?)


Typical examples of things we could remind people to check on their client projects when migrating it to the future new toolkit:

  • Ensure that any call to ios_bump_version_release in their Fastfile already passed skip_glotpress: true. If they passed false or didn't provide a value (false being the default for this ConfigItem), that means they'll have to ensure (1) they don't use download_metadata.swift anymore, or if not, it'd be high time for them to migrate to the new tooling instead [link to my Project Thread maybe], and (2) that they don't rely on this ios_bump_version_release for commiting the .po/.pot file
  • Note that they can delete the ENV['APP_STORE_STRINGS_FILE_NAME'] from their Fastfile, if they still have it defined, because it's not used by anything anymore.

Mentioning all this because, while reviewing your PR, I wanted to check the status of WordPress-iOS to validate this wouldn't break it, and while I confirmed that the only place where it calls ios_bump_version_release it also passes skip_glotpress: true—so we're good there—I also noticed that we kept the declaration of that now-unused env var while it is not needed anymore and would make for a good occasion of a quick cleanup.

Copy link
Contributor Author

@iangmaia iangmaia Feb 3, 2023

Choose a reason for hiding this comment

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

Seeing this, I wonder if it would be worth it to document somewhere the changes potentially needed in client projects when migrating to the next major version that will contain this change.

This is a nice idea! It's a good point on cases where there isn't necessarily a breaking change but still the client projects could do a clean up on unnecessary things they previously had to do, or to implement a different behaviour than they'd previously have.
I think the examples you gave for this PR sound like a good starting point.

What about a MIGRATION.md file in the root, next to the CHANGELOG.md?
The way I see it, the structure and the process would be very similar to the change log, with sections for each version containing each a bullet list of items that require attention during the migration from the previous version. Then all PRs making such changes would include something in the list.
What do you think? I can kick it off for this PR, it shouldn't take long :-)

Co-authored-by: Olivier Halligon <[email protected]>
@AliSoftware
Copy link
Contributor

I've created and pushed a new branch iangmaia/trial that points to the same commit as what trunk currently points to. If you re-target your PR to this branch, we can land this PR right now (and when we'll be ready to start landing breaking changes like this one in trunk, we'll just land all the PRs of yours that landed in iangmaia/trial back to trunk in one swoop) 🙂

@iangmaia iangmaia changed the base branch from trunk to iangmaia/trial February 10, 2023 17:42
@AliSoftware AliSoftware merged commit 4b398ed into wordpress-mobile:iangmaia/trial Feb 10, 2023
@iangmaia iangmaia deleted the cleanup/remove-legacy-localization-tooling branch February 10, 2023 18:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants