mapbox / mapbox/mapbox-gl-language

Localize expressions

Open
#20 5 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
JavaScript
Stars
204
Forks
51
PR merge metrics
No merged PRs in 30d

Description

adaptPropertyLanguage() should attempt to localize expressions used as text-fields. Currently, it only works for constant strings and style functions.

mapbox/mapbox-gl-js#6197 is a proposal to make label localization a built-in feature of the style specification. In the meantime, mapbox/mapbox-gl-native#11651 has a comprehensive implementation of label localization in Objective-C. While that implementation targets NSExpression’s syntax, the same logic should more or less apply when working with style JSON objects.

/cc @lukasmartinelli @tristen @anandthakker

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with adaptPropertyLanguage() in index.js lines 126-140 and review the linked mapbox-gl-native Objective-C implementation for label localization. Extend the behavior to expressions used as text-fields, then verify that constant strings, style functions, and expression-based labels are localized.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
localization
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.