Problem/Motivation

The module builds sentences around the translated type label, such as "Describe the @what", "Generate @what" and "How to add the @what". AiMediaGeneration::noun() lower-cases the label and inserts it. A translator cannot get gender, articles or case right. In French, "Describe the @what" becomes "Décrivez le @what", which reads "Décrivez le image" for the feminine "image" and is only right for "SVG".

Steps to reproduce

  1. Add French.
  2. Translate "Describe the @what" as "Décrivez le @what" and "Generate @what" as "Générer @what".
  3. Open /fr/media/add/image?ai_media=1. The field reads "Décrivez le image" and the button reads "Générer image".

Proposed resolution

Each generator declares its own whole t() strings: "Generate image", "Describe the image", "How to add the image", "Generating image...". The SVG, Audio and Video generators declare theirs too, and so do the "not offered" and "not set up" messages.

Remaining tasks

  • ✅ File an issue
  • ❌ Addition/Change/Update/Fix
  • ❌ Testing to ensure no regression
  • ➖ Automated unit/functional testing coverage
  • ➖ Developer Documentation support
  • ➖ User Guide Documentation support
  • ➖ UX/UI designer responsibilities
  • ➖ Accessibility and Readability
  • ❌ Reviewed by a human
  • ❌ Code review by maintainers
  • ❌ Full testing and approval
  • ❌ Credit contributors
  • ❌ Review with the product owner
  • ✅ Update Release Notes
  • ✅ Release

User interface changes

  • Before (1.0.x): "Décrivez le image", the article cannot follow the noun. Varbase Starter, Gin, French, Image and SVG pages.
     Décrivez le image and Générer image on the Image page, Décrivez le SVG and Générer SVG on the SVG page.
  • After: "Décrivez l'image" and "Générer une image" as whole French strings. Varbase Starter, Gin, French, Image and SVG pages.
     Décrivez l'image and Générer une image on the Image page, Décrivez le SVG and Générer un SVG on the SVG page.

API changes

  • N/A

Data model changes

  • N/A

Release notes snippet

  • N/A

AI-Generated: Yes

Issue fork ai_media-3634875

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

rajab natshah created an issue. See original summary.

rajab natshah’s picture

Issue summary: View changes
StatusFileSize
new61.9 KB
new60.33 KB
rajab natshah’s picture

Issue summary: View changes
StatusFileSize
new29.3 KB
new29.27 KB

  • rajab natshah committed 15f7b49b on 1.0.x
    fix: #3634875 Use whole translatable strings per generator instead of...
rajab natshah’s picture

Issue summary: View changes
Status: Active » Fixed
Issue tags: +ai_media-1.0.0-rc1

✅ Released ai_media-1.0.0-rc1

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.