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

#430: Use proper plurals based on image settings #482

Merged

Conversation

jamesmorrison
Copy link
Member

@jamesmorrison jamesmorrison commented Jun 8, 2023

Description of the Change

Adds singular labels where a single image is selected for generation.

Closes #430

How to test the Change

Test 1: Plural:

  • Open Classifai settings:
    • set the number of images to generate between 2 - 10 (i.e. not 1)
    • Check / ensure: Enable image generation is checked
  • Create a new post:
    • Open the media modal (in a new post => featured image / media block) and select Generate Images
    • Confirm the text remains as:
      • Enter a prompt below to generate images.
      • Once images are generated, choose one or more of those to import into your Media Library and then choose one image to insert.

Test 3: Singular:

  • Open Classifai settings:
    • set the number of images to generate 1 (i.e. not 2 - 10)
    • Check / ensure: Enable image generation is checked
  • Create a new post:
    • Open the media modal (in a new post => featured image / media block) and select Generate Images
    • Confirm the text shows singular terminology:
      • Enter a prompt below to generate an image. - new
      • Once an image is generated, you can import it into your Media Library and then select to insert. - new

Changelog Entry

Added - Add singular labels when a single image is selected for generation.

Credits

Props @jamesmorrison

Checklist:

  • I agree to follow this project's Code of Conduct.
  • I have updated the documentation accordingly.
  • I have added tests to cover my change.
  • All new and existing tests pass.

@jamesmorrison jamesmorrison requested review from a team, dkotter and jeffpaul as code owners June 8, 2023 14:17
@jamesmorrison
Copy link
Member Author

@jeffpaul / @dkotter Please could you review this change? If you'd prefer alternative singular test, please let me know what this should be updated to - I added what I thought was appropriate here.

@dkotter dkotter added this to the 2.2.2 milestone Jun 8, 2023
@jeffpaul jeffpaul removed their request for review June 15, 2023 17:42
@dkotter
Copy link
Collaborator

dkotter commented Jun 15, 2023

@jamesmorrison Thanks for the work here! I've left one comment that I think we should address. There's also a few other text strings that we probably want to update.

@dkotter dkotter modified the milestones: 2.2.2, 2.2.3 Jun 27, 2023
@jamesmorrison
Copy link
Member Author

@dkotter I've reverted to if else (rather than _n()) and added singular text where this was missed previously. I've tested and confirmed this works; please could you check this?

@dkotter dkotter merged commit e7d1339 into develop Jul 6, 2023
12 checks passed
@dkotter dkotter deleted the feature/430-use-proper-plurals-based-on-image-setting branch July 6, 2023 14:32
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.

Use proper plurals based on image settings
3 participants