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

dotCMS/core#26520 Add translations to AI Extensions on Block Editor #26871

Merged
merged 11 commits into from
Dec 4, 2023

Conversation

oidacra
Copy link
Member

@oidacra oidacra commented Dec 1, 2023

Proposed Changes

  • Add translations to AI Extensions on Block Editor

Checklist

  • Tests
  • Translations
  • Security Implications Contemplated (add notes if applicable)

Description

🤖[deprecated] Generated by Copilot at 36b21d5

The pull request adds and updates components, services, and templates for the block editor module and its extensions. It also uses the DotMessageService and the dm pipe to provide localization for the texts in the block editor UI. Additionally, it modifies the DotAiService interface and its mock implementation to match the changes in the API. Finally, it adds the message keys and values for the block editor extension to the Language.properties file.

Related Issue

Fixes #26520

Explanation of Changes

🤖[deprecated] Generated by Copilot at 36b21d5

  • Reorder imports alphabetically and add blank line to separate them from module declaration in app.module.ts (link,link)
  • Import APP_INITIALIZER token and use it to initialize DotMessageService before app starts in block-editor.module.ts (link,link)
  • Add BubbleFormComponent and FloatingButtonComponent to declarations and entryComponents arrays of block-editor.module.ts to register and create them as custom elements (link,link)
  • Move EditorDirective from declarations to shared folder and export DotMessagePipe from block-editor.module.ts (link,link)
  • Remove accidental copy and paste of middleware.js code in app.module.ts (link)
  • Import DotMessageService and use it to get message values for actionOptions array in AIContentActionsComponent (link,link,link,link)
  • Use dm pipe to display message values for placeholder, icon, header, label, and message attributes in component templates (link,link,link,link,link,link,link,link,link)
  • Import DotMessagePipe and add it to providers array of AIImagePromptComponent (link,link)
  • Add DotMessageServiceMock class to provide mock messages for testing (link)
  • Rename getIAContent method to generateContent and change return type to Observable<string> in DotAiService interface and mock class (link,link)
  • Add message keys and values for block editor extension to Language.properties file in dotCMS project (link)
  • Move and align parameters with annotations for readability and consistency in dot-messages.service.ts (link,link)

@oidacra oidacra force-pushed the issue-26520-implement-translations-on-block-editor branch from d30e4c9 to 8f28284 Compare December 4, 2023 15:34
@oidacra oidacra force-pushed the issue-26520-implement-translations-on-block-editor branch from 8f28284 to ceef948 Compare December 4, 2023 16:48
Copy link

Quality Gate passed Quality Gate passed

The SonarQube Quality Gate passed, but some issues were introduced.

1 New issue
0 Security Hotspots
0.0% 0.0% Coverage on New Code
0.0% 0.0% Duplication on New Code

See analysis details on SonarQube

Copy link

Quality Gate passed Quality Gate passed

Kudos, no new issues were introduced!

0 New issues
0 Security Hotspots
No Coverage information No data about Coverage
No Duplication information No data about Duplication

See analysis details on SonarQube

@oidacra oidacra added this pull request to the merge queue Dec 4, 2023
Merged via the queue into master with commit 1814d9e Dec 4, 2023
42 checks passed
@oidacra oidacra deleted the issue-26520-implement-translations-on-block-editor branch December 4, 2023 21:31
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.

[UI] Add DotMessageService to Block Editor to able translate the labels/messages
3 participants