Skip to content

Conversation

@ginnyTheCat
Copy link
Contributor

@ginnyTheCat ginnyTheCat commented Oct 20, 2025

This adds a option to use units in the "number-format" expression.

I encountered this when trying to format heights of mountains as "1,200 m". This works well when just using latin languages, but cyrillic uses a м and other languages change the unit based on number (pluralization rules).

Therefore I think it's worth adding this since units are quite common to find on maps.

Launch Checklist

  • Confirm your changes do not include backports from Mapbox projects (unless with compliant license) - if you are not sure about this, please ask!
  • Briefly describe the changes in this PR.
  • Link to related issues.
  • Include before/after visuals or gifs if this PR includes visual changes.
  • Write tests for all new functionality.
  • Document any changes to public APIs.
  • Post benchmark scores.
  • Add an entry to CHANGELOG.md under the ## main section.

@codecov-commenter
Copy link

codecov-commenter commented Oct 20, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 95.38%. Comparing base (81c1efe) to head (e970fb8).
⚠️ Report is 10 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1335   +/-   ##
=======================================
  Coverage   95.37%   95.38%           
=======================================
  Files         114      114           
  Lines        7398     7412   +14     
  Branches     2245     2253    +8     
=======================================
+ Hits         7056     7070   +14     
  Misses        342      342           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@HarelM
Copy link
Collaborator

HarelM commented Oct 20, 2025

Thanks for taking the time to open this PR!
It is advised to create a proposal first and explain why this is needed and how this will change the style spec.
Once the proposal is agreed upon, then you can continue with implementation.
You can see other proposal that as described with issues here in this repo.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants