Skip to content
GitLab
    • GitLab: the DevOps platform
    • Explore GitLab
    • Install GitLab
    • How GitLab compares
    • Get started
    • GitLab docs
    • GitLab Learn
  • Pricing
  • Talk to an expert
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
    • Switch to GitLab Next
    Projects Groups Topics Snippets
  • Register
  • Sign in
  • Appsemble Appsemble
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributor statistics
    • Graph
    • Compare revisions
    • Locked files
  • Issues 231
    • Issues 231
    • List
    • Boards
    • Service Desk
    • Milestones
    • Iterations
  • Merge requests 31
    • Merge requests 31
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Artifacts
    • Schedules
    • Test cases
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Container Registry
    • Model experiments
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Code review
    • Insights
    • Issue
    • Repository
  • External wiki
    • External wiki
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • AppsembleAppsemble
  • AppsembleAppsemble
  • Issues
  • #158
Closed
Open
Issue created Apr 10, 2019 by Wessel Kuipers@wesselkuipers🐕Maintainer

Internationalize apps

Description

Apps should be internationalized. A big part of this is translations.

Our remappers provide a simple entry point to get started with this. We should encourage all block developers to make user facing texts remappers. They may use a hard coded string to provide English as a last fallback.

Some user facing texts aren’t part of a block, e.g. page titles and block titles. These texts should also be transformed into remappers. These can be targeted by specifying the path in the app definition to the content to translate.

app.yaml

primaryLanguage: en # implied/default

pages:
  - name: Foo # Foo is the title for the primary language.
    blocks:
      - parameters:
          myLabel:
            - string.format:
                messageId: myLabel
                values:
                  foo: Test

messages/en.yaml

myLabel: This is my label {foo} # This is my label Test

# autogenerated/available by default
appsemble:pages.0: Translated Page Name

When uploading languages for an app, the app has an directory named messages. The messages directory contains YAML files named <lang-code>.yaml. These will be uploaded to the translations API when uploading the app.

apps/
 └─ waarnemingen/
     ├─ app.yaml
     └─ messages/
         ├─ en.yaml
         ├─ en-GB.yaml
         ├─ en-US.yaml
         └─ nl-NL.yaml

Requirements

  • Redirect user to appropriate language path (/en-us/page-name)
  • Option to set fallback/primary language for app
    • Check if language name is valid
  • Add messageId to message.format (alternatively, introduce a message remapper)
  • Database table to store translations (AppId, language, content)
  • API endpoint for getting translations
  • API endpoint for setting translations
  • Page name translations
    • Adjust defaultPage to work with this
  • Display warnings/check usage of translation message IDs
  • Set preferred language on user profile (order of preference) #417 (closed)
  • Fall back to {messageId} if no translation can be found #414 (closed)
  • Show warning if no translations can be found on save
    • Merge with base language (nl with nl-NL and nl-BE)
  • When cloning a translated app, translations should be cloned too #415 (closed)
Edited Aug 28, 2020 by Wessel Kuipers
Assignee
Assign to
Time tracking