Skip to content

Comments

Fix ordering and improve South Korean labels in English/non-Korean#59

Merged
orangejulius merged 6 commits intomasterfrom
korean-label-ordering
Aug 27, 2025
Merged

Fix ordering and improve South Korean labels in English/non-Korean#59
orangejulius merged 6 commits intomasterfrom
korean-label-ordering

Conversation

@missinglink
Copy link
Member

@missinglink missinglink commented Aug 22, 2025

We received a bug report that label fields are returned in reverse order for Korean documents in the English language:

https://pelias.github.io/compare/#/v1/search?text=seoul%2C+korea

Screenshot 2025-08-22 at 11 16 48

I believe the intention of the original PR was to only display the fields in inverse order when displaying them in the Korean language such as this:

Screenshot 2025-08-22 at 11 18 34

This PR uses the multi-language configuration options introduced in #51 to build better default labels for South Korean places. These will be used whenever the desired language is not Korean.

ref: https://github.com/pelias/api/blob/f7735b9117633f8bb8d30ffd3a905326b9a450ee/middleware/assignLabels.js#L21

@missinglink missinglink force-pushed the korean-label-ordering branch 3 times, most recently from f716151 to 76af7d0 Compare August 26, 2025 12:00

return language.toUpperCase();
}

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this block was unused

@orangejulius orangejulius force-pushed the korean-label-ordering branch from 76af7d0 to e707273 Compare August 26, 2025 17:33
@orangejulius orangejulius changed the title only use Korean generator when requested lang is "kor" Fix ordering and improve South Korean labels in English Aug 26, 2025
@orangejulius orangejulius changed the title Fix ordering and improve South Korean labels in English Fix ordering and improve South Korean labels in English/non-Korean Aug 26, 2025
@missinglink
Copy link
Member Author

Looks good to me :shipit:

@missinglink
Copy link
Member Author

I tested this out and it's much improved now.

One thought I had was about how users requesting East Asian languages view each other's labels, for instance in this example the target geography is Korean but target language is Japanese, the result is the default English decorator despite both having custom decorators.

Screenshot 2025-08-27 at 09 58 39

@orangejulius orangejulius merged commit 8b8a6fe into master Aug 27, 2025
5 checks passed
@orangejulius orangejulius deleted the korean-label-ordering branch August 27, 2025 17:08
orangejulius added a commit to pelias/api that referenced this pull request Aug 27, 2025
This includes Korean label fixes from pelias/labels#59
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.

2 participants