Skip to content

Conversation

@mokagio
Copy link
Contributor

@mokagio mokagio commented Nov 23, 2022

While testing the syntax for Automattic/a8c-ci-toolkit-buildkite-plugin#36, I noticed that ios_generate_strings_file_from_code on trunk (33e65ab7e9) printed:

Key "readerDetail.backButton.accessibilityLabel" used with multiple values.
  Value "Back" kept. Value "Open in Safari" ignored.`

This is my fault from #19635 🤦‍♂️ . Double, because I thought to run the command but clearly didn't do it before the final merge.

But, it reveals an interesting thing about genstrings and our ongoing effort to lint strings in CI (see Automattic/a8c-ci-toolkit-buildkite-plugin#36, #19624, #19553), namely yet another piece of early feedback point we can give to developers.

The current implementation, evidently, doesn't pick this up, because genstrings doesn't throw this as an error. At least, I'm pretty sure that's the explanation because if genstrings failed so would the action. cc @AliSoftware I think we should update the action to capture this particular case and treat it as an error. What do you think? If that sounds good, I'll add it to my list.

Testing

Running bundle exec fastlane generate_strings_file_for_glotpress skip_commit:true on this branch should not print any warning.

image

Regression Notes

  1. Potential unintended areas of impact – N.A.
  2. What I did to test those areas of impact (or what existing automated tests I relied on) – N.A.
  3. What automated tests I added (or what prevented me from doing so) – N.A.

  • I have completed the Regression Notes.
  • I have considered adding unit tests for my changes. N.A.
  • I have considered adding accessibility improvements for my changes. N.A.
  • I have considered if this change warrants user-facing release notes and have added them to RELEASE-NOTES.txt if necessary. N.A.

Running `ios_generate_strings_file_from_code` printed:

```
Key "readerDetail.backButton.accessibilityLabel" used with multiple values. Value "Back" kept. Value "Open in Safari" ignored.`
```
@peril-wordpress-mobile
Copy link

Warnings
⚠️ PR is missing at least one label.

Generated by 🚫 dangerJS

@AliSoftware
Copy link
Contributor

I think we should update the action to capture this particular case and treat it as an error. What do you think? If that sounds good, I'll add it to my list.

💯 👍

@mokagio mokagio self-assigned this Nov 24, 2022
@mokagio mokagio added this to the 21.3 milestone Nov 24, 2022
@wpmobilebot
Copy link
Contributor

You can test the changes in WordPress from this Pull Request by:
  • Clicking here or scanning the QR code below to access App Center
  • Then installing the build number pr19651-714989a on your iPhone

If you need access to App Center, please ask a maintainer to add you.

@wpmobilebot
Copy link
Contributor

You can test the changes in Jetpack from this Pull Request by:
  • Clicking here or scanning the QR code below to access App Center
  • Then installing the build number pr19651-714989a on your iPhone

If you need access to App Center, please ask a maintainer to add you.

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.

5 participants