Uploaded image for project: 'Ibexa IBX'
  1. Ibexa IBX
  2. IBX-6147

Translations in REST API

    XMLWordPrintable

Details

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Low Low
    • None
    • 4.5
    • API

    Description

      There is two ways to pass translations to the REST API.

      Before, there was Value:

          <names>
              <value languageCode="eng-GB">Custom State</value>
          </names>
      
              "names": {
                  "value": [
                      {
                          "_languageCode": "eng-GB",
                          "#text": "Custom State"
                      }
                  ]
              },
      

      Examples in context: ObjectStateGroup XML & JSON

      Now, there is also an other syntax:

          <names>
              <eng-GB>Bank transfer (updated)</eng-GB>
          </names>
      
          "names": {
              "eng-GB": "Bank transfer (updated)"
          }
      

      Examples in context: PaymentMethodUpdateStruct XML & JSON

      I see two problems:

      • Inconsistency: a developer has to learn 2 syntaxes, and has to check which syntax is accepted by the names, descriptions or other translatable property currently used.
      • XML schema: with the newer syntax, there can't be a proper XML schema if tag names are unpredictables.

      Designs

        Attachments

          Activity

            People

              Unassigned Unassigned
              adrien.dupuis@ibexa.co Adrien Dupuis
              Votes:
              1 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated: