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

Update v2 language endpoint to add default language property #18969

Closed
fmontes opened this issue Jul 24, 2020 · 3 comments
Closed

Update v2 language endpoint to add default language property #18969

fmontes opened this issue Jul 24, 2020 · 3 comments

Comments

@fmontes
Copy link
Member

fmontes commented Jul 24, 2020

As a FE developer I need to know which language is default to implement multilanguage SPAa

Describe the solution you'd like

In the endpoint /api/v2/languages response we have:

{
    "entity": [
        {
            "country": "United States",
            "countryCode": "US",
            "id": 1,
            "language": "English",
            "languageCode": "en"
        },
        {
            "country": "Espana",
            "countryCode": "ES",
            "id": 2,
            "language": "Espanol",
            "languageCode": "es"
        }
    ],
    "errors": [],
    "i18nMessagesMap": {},
    "messages": [],
    "permissions": []
}

The idea is to add the default like:

        {
            "country": "United States",
            "countryCode": "US",
            "id": 1,
            "language": "English",
            "languageCode": "en",
            "default": true,
        },
 ...

Acceptance Criteria

  1. Update endpoint to get the default language property
  2. Work in all the supported browsers (don't forget IE11 and iPad)
  3. Multilanguage
  4. Unit test
@fmontes fmontes added this to the Lunik Current milestone Jul 24, 2020
@fmontes fmontes changed the title Create v3 language endpoint with default property Update v2 language endpoint to add default language property Jul 24, 2020
@erickgonzalez erickgonzalez self-assigned this Jul 29, 2020
erickgonzalez added a commit that referenced this issue Jul 30, 2020
@erickgonzalez
Copy link
Contributor

PR: #19013

@erickgonzalez
Copy link
Contributor

E.g. how the JSON will look:

"country": "United States",
            "countryCode": "US",
            "defaultLanguage": true,
            "id": 1,
            "language": "English",
            "languageCode": "en"

erickgonzalez added a commit that referenced this issue Jul 30, 2020
erickgonzalez added a commit that referenced this issue Jul 30, 2020
fmontes pushed a commit that referenced this issue Aug 3, 2020
* #18969 languageView to add defaultLanguage property

* #18969 tests

* #18969 feedback

* #18969 remove commented code

* trigger tests
@bryanboza
Copy link
Member

Fixed, tested on release-5.3.7 // Postgres. Need card added in order to allow change this value from UI

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants