Skip to content

fix bug where terms/aliases are not expanded for en.json#280

Merged
tyrasd merged 2 commits intomainfrom
kh/bug-terms
Mar 18, 2026
Merged

fix bug where terms/aliases are not expanded for en.json#280
tyrasd merged 2 commits intomainfrom
kh/bug-terms

Conversation

@k-yle
Copy link
Copy Markdown
Collaborator

@k-yle k-yle commented Mar 18, 2026

Fixes a bug caused by #227 (which hasn't been released yet).

en.json is special, it uses different code compared to all the translation files. The logic in #227 didn't affect en.json, which is a bug.

The git diff looks big, but the changes in this PR are actually quite small: 60 lines were just copied into a helper function, so that it can be re-used in a different place.


testing log

Testing anything in this repo is a real pain. In iD tagging schema, I ran:

# first commit the changes from schema builder v7: 
npm i @ideditor/schema-builder@github:ideditor/schema-builder#main
npm i 
npm run build # manually fixed various errors during this step
npm run dist
npm run translations

git add .
git commit -m "commiting the baseline"


# now commit the changes from this PR:
npm i @ideditor/schema-builder@github:ideditor/schema-builder#kh/sort-obj
npm i 
npm run build
npm run dist
npm run translations

git add .
git commit -m "commiting the changes from this PR"

and then check the diff between the two commits. f2b680 is the result when i ran these steps. The only affected files are en.json and en.min.json

@matkoniecz
Copy link
Copy Markdown
Contributor

looking at changes like this...

I think it would be nice to have some tests in this repo

@k-yle
Copy link
Copy Markdown
Collaborator Author

k-yle commented Mar 18, 2026

if we merged this repo into id-tagging-schema, we wouldn't need tests, because you could just run npm run build, and immediately see what code was changed.

so i hope that this is is one of the last few PRs where we have to deal with this weird repo setup...

@tyrasd tyrasd merged commit c346829 into main Mar 18, 2026
2 checks passed
@tyrasd tyrasd added bug Something isn't working build Issue concerning build scripts and their "dist" output labels Mar 18, 2026
@k-yle k-yle deleted the kh/bug-terms branch March 18, 2026 23:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working build Issue concerning build scripts and their "dist" output

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants