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

[Multi-language] : Create endpoints to feed the Multi-language Component for the Edit Contentlet sidebar #30591

Closed
2 tasks
Tracked by #30371
jcastro-dotcms opened this issue Nov 6, 2024 · 4 comments · Fixed by #30606
Closed
2 tasks
Tracked by #30371

Comments

@jcastro-dotcms
Copy link
Contributor

jcastro-dotcms commented Nov 6, 2024

Parent Issue

User Story

As a dotCMS User, I want to view locale-related information of the Contentlet that I'm creating or editing.

Acceptance Criteria

Expose the required data via REST:

  • An Endpoint that takes a Contentlet Identifier which returns ALL languages in the dotCMS repo. For each of them, a new attribute will indicate whether the Contentlet is available in such a language or not.
  • An Endpoint that returns the currently selected default Language.
  • The data structure will be the same one used by the soon-to-be-deprecated method in the PageResource class. For instance:
{
    "entity": [
        {
            "country": "United States",
            "countryCode": "US",
            "id": 1,
            "isoCode": "en-us",
            "language": "English",
            "languageCode": "en",
            "translated": true
        },
        {
            "country": "Espana",
            "countryCode": "ES",
            "id": 2,
            "isoCode": "es-es",
            "language": "Espanol",
            "languageCode": "es",
            "translated": false
        }
    ],
    "errors": [],
    "i18nMessagesMap": {},
    "messages": [],
    "pagination": null,
    "permissions": []
}

Proposed Objective

Core Features

Proposed Priority

Priority 2 - Important

External Links... Slack Conversations, Support Tickets, Figma Designs, etc.

https://dotcms.slack.com/archives/C058GCQ7T39/p1730827058966279

Assumptions & Initiation Needs

No response

Quality Assurance Notes & Workarounds

No response

Sub-Tasks & Estimates

@jcastro-dotcms jcastro-dotcms self-assigned this Nov 6, 2024
@jcastro-dotcms jcastro-dotcms moved this from New to Current Sprint Backlog in dotCMS - Product Planning Nov 6, 2024
@jcastro-dotcms jcastro-dotcms changed the title [Multi-language] : Create BE service to feed the Multi-language Component for the Edit Contentlet sidebar [Multi-language] : Create endpoints to feed the Multi-language Component for the Edit Contentlet sidebar Nov 7, 2024
jcastro-dotcms added a commit that referenced this issue Nov 7, 2024
…uage Component for the Edit Contentlet sidebar
@jcastro-dotcms jcastro-dotcms moved this from Current Sprint Backlog to In Review in dotCMS - Product Planning Nov 7, 2024
github-merge-queue bot pushed a commit that referenced this issue Nov 10, 2024
…uage Component for the Edit Contentlet sidebar (#30606)

### Proposed Changes
* A new Endpoint has been added to retrieve the languages that a
contentlet is available on: `/api/v1/content//{identifier}/languages`
* A new Endpoint has been added to retrieve the default language:
`/api/v2/languages/_getdefault`
* The existing Endpoint that retrieved the languages that an HTML Page
is available on has been marked as `Deprecated` -- as well as its
related code -- in order to favor the new Endpoint.
@github-project-automation github-project-automation bot moved this from In Review to Internal QA in dotCMS - Product Planning Nov 10, 2024
@github-project-automation github-project-automation bot moved this from Internal QA to Current Sprint Backlog in dotCMS - Product Planning Nov 11, 2024
@jcastro-dotcms jcastro-dotcms removed their assignment Nov 11, 2024
@jcastro-dotcms jcastro-dotcms moved this from Current Sprint Backlog to Internal QA in dotCMS - Product Planning Nov 11, 2024
@oidacra
Copy link
Member

oidacra commented Nov 11, 2024

Endpoint to get the langs
/api/v1/content//{identifier}/languages
Endpoint to get the default language:
/api/v2/languages/_getdefault

@hmoreras hmoreras self-assigned this Nov 11, 2024
@hmoreras
Copy link
Contributor

hmoreras commented Nov 11, 2024

Pass internal QA:

Languages of specific content: http://localhost:8080/api/v1/content/a41e5207ac4f373fccd68325603ec526/languages

image

Default language: http://localhost:8080/api/v2/languages/_getdefault

image

@hmoreras hmoreras moved this from Internal QA to QA - Backlog in dotCMS - Product Planning Nov 11, 2024
@josemejias11
Copy link
Contributor

Approved: Tested on trunk_786c18d, Docker, macOS 14.5, FF v126.0.1

@josemejias11 josemejias11 moved this from QA - In Progress to Done in dotCMS - Product Planning Nov 12, 2024
@dsilvam dsilvam closed this as completed Nov 13, 2024
@github-project-automation github-project-automation bot moved this from Done to Internal QA in dotCMS - Product Planning Nov 13, 2024
@dsilvam dsilvam moved this from Internal QA to Done in dotCMS - Product Planning Nov 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment