Skip to content

Nonstandard underscores, lowercase in localized name properties #1257

Closed

Description

@1ec5

The main vector tiles use a format for localized name properties that contains underscores instead of hyphens. For example, name:zh-Hant-TW=* becomes name_zh_hant_tw. This is inconsistent with the IETF BCP 47 standard. Even other tilesets that use underscores, like Shortbread and Mapbox Streets, still use hyphens and mixed case inside language tags, for example name_zh-Hant-TW. The unusual format means a tileset-agnostic plugin such as Diplomat is unable to discover localized name properties that contain script or country codes.

Apparently the use of underscores and lowercase is due to a literal translation from columns to property names: #679 (comment). Would it be possible to somehow preserve the hyphens and mixed case, or recover it at a later stage of the pipeline? (The first underscore after name is fine, but subsequent underscores are causing this incompatibility.)

Activity

  1. added
    internationalization
    on Jan 15, 2026
  2. changed the title [-]Hyphens become underscores in localized name properties[/-] [+]Nonstandard underscores, lowercase in localized name properties[/+] on Jan 15, 2026
  3. Rub21 commented on Jan 28, 2026

    @Rub21
    Member
  4. 1ec5 commented on Jan 28, 2026

    @1ec5
    MemberAuthor

    Oh, that’s great. The main thing is restoring the hyphens in, for example, sr-Cyrl and su-Latn. Replacing name_ with name: does make the tileset more compatible with OpenMapTiles, which would be a nice added bonus. In that case, we’ll need to update the embed site and similarly set getLanguageField when initializing MapboxLanguage in the website. Once we upgrade both codebases to Diplomat (OpenHistoricalMap/openhistoricalmap-embed#39), these compatibility shims can go away.

  5. self-assigned this
    on Jan 29, 2026
  6. Rub21 commented on May 6, 2026

    @Rub21
    Member

    Om my previous comment #1257 (comment) , the changes was made for tegola , but that doee not support anymore for the martin pipeline, so instead of using name: we are going to use name_ only : -> _

    Here a example in staging:
    https://www.openhistoricalmap.org/relation/2861348
    Image

  7. 1ec5 commented on May 6, 2026

    @1ec5
    MemberAuthor

    name_* is fine as long as we use - after that. 👍 This change would be backwards compatible (actually a bug fix), so we don’t have to worry about tracking down affected data consumers. If we later replace the first _ with : for compatibility with OpenMapTiles, then we’d need to tread more carefully.

  8. Rub21 commented on May 27, 2026

    @Rub21
    Member

    This features has been deployed in production !

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

Metadata

Metadata

Assignees

Labels

internationalizationvtiles

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions