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

Locale Support #261

Closed
mfriesen opened this issue Aug 15, 2024 · 0 comments
Closed

Locale Support #261

mfriesen opened this issue Aug 15, 2024 · 0 comments
Assignees
Labels
enhancement New feature or request
Milestone

Comments

@mfriesen
Copy link
Member

mfriesen commented Aug 15, 2024

Currently, FormKiQ does not include locale support, and all localization and value customization is done externally.

Ideally, FormKiQ will enable localization and customization of all interface and API values, beginning with "allowedValues" for schema/classification attributes, as well as "interfaceKey" values for use in user interfaces.

Design:

POST /sites/{siteId}/locales/{locale}/resourceItems/
{
  "itemType": "interface|schema|classification",
  "localizedValue": "",
  "interfaceKey": "",
  "classificationId": "",
  "attributeKey": "",
  "allowedValue": "",
}
POST /sites/{siteId}/locales/{locale}/resourceItems/
{
  "itemType": "interface",
  "interfaceKey": "cancel",
  "localizedValue": "Cancel"
}

For more robust organization of interfaceKeys, users can use periods to organize, e.g., "loadingError", "admin.loadingError"
(This will likely be used to organize in the FormKiQ Document Console)

DELETE /sites/{siteId}/locales/{locale}/resourceItems/{itemKey}
PUT /sites/{siteId}/locales/{locale}/resourceItems/{itemKey}
GET /sites/{siteId}/locales/{locale}/resourceItems/
[
  {
    "itemKey": "schema##{attributeKey}##{allowedValue}",
    "localizedValue": "",
  },
 {
    "itemKey": "classification##{classificationId}##{attributeKey}##{allowedValue}",
    "localizedValue": "",
  },
 {
    "itemKey": "interface##{interfaceKey}"
    "localizedValue": "",
  }
]

Locale param or Accept-Language header would also be used for these endpoints:
e.g., ?locale=fr
e.g., Accept-Language=en-US,en;q=0.9 (or just en, or en-001, etc.)

GET /sites/{siteId}/schema/document
{
  "name": "string",
  "attributes": {
    "required": [
      {
        "attributeKey": "string",
        "allowedValues": [
          "string"
        ],
        "localizedAllowedValues":{
           "allowedValue":"localizedValue"
        }
      }
    ]
  }
}

GET /sites/{siteId}/schema/document/attributes/{key}/allowedValues
GET /sites/{siteId}/classifications/{classificationId}
GET /sites/{siteId}/classifications/{classificationId}/attributes/{key}/allowedValues

Locale create/edit/delete
GET /sites/{siteId}/locales
POST /sites/{siteId}/locales
DELETE /sites/{siteId}/locales

@mfriesen mfriesen self-assigned this Aug 15, 2024
@reganwolfrom reganwolfrom added the enhancement New feature or request label Dec 10, 2024
@reganwolfrom reganwolfrom added this to the v1.17.0 milestone Dec 10, 2024
mfriesen added a commit that referenced this issue Feb 14, 2025
mfriesen added a commit that referenced this issue Feb 15, 2025
mfriesen added a commit that referenced this issue Feb 16, 2025
mfriesen added a commit that referenced this issue Feb 16, 2025
mfriesen added a commit that referenced this issue Feb 17, 2025
mfriesen added a commit that referenced this issue Mar 10, 2025
Features

* #319 - Add EventBridge Document Events

* #338 - Enable S3 Deeplinks to Private Buckets

* #326 - Mappings: Enable MANUAL attribute mapping for KEY_ONLY (i.e., no defaultValue or defaultValues required)

* #325 - Add width and height standard metadata properties

* #261 - Add Locale API (/sites/{siteId}/locales)

* #302 - Schemas: Add minNumberOfValues/maxNumberOfValues

* Add New Endpoint to Delete All Objects in S3 (DELETE /documents/{documentId}/purge)

* #349 - CloudFormation Field to set WAF ACL for Console CloudFront

* #354 - Add logging for Websocket API Gateway

Updates

* #296 - Update runtime to Amazon Linux 2023

* #342 - When retrieving a deeplink document from S3, provide a content type reflecting "best guess" for object

* #348 - VPC template allows Enable/Disable Public Subnets

* Updated console 3.8.1

Bug Fixes

* #324 - Use contentUrl on GET /documents/{documentId}/content for text that exceeds 6MB

* #331 - Fixed error "missing attribute", when attribute already exists on document

* #332 - Changing case of path (e.g., uppercase to lowercase) results in path index losing document

* #337 - Classification Schema validation circumvented by PUT classification as stringValues

* #339 - Content-Disposition is missing UTF-8 encoding marking
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants