Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade to id-tagging-schema v3.1.0 #8600

Closed
1ec5 opened this issue Jul 28, 2021 · 6 comments
Closed

Upgrade to id-tagging-schema v3.1.0 #8600

1ec5 opened this issue Jul 28, 2021 · 6 comments
Labels
localization Adapting iD across languages, regions, and cultures

Comments

@1ec5
Copy link
Collaborator

1ec5 commented Jul 28, 2021

Translatable labels of fields always show up in English even when a translation is available.

For example, when viewing the Vietnamese localization, the Surface field’s hard-coded options are all in English, including “Artificial Turf” for surface=artificial_turf, even though the corresponding message in Transifex has already been translated. These fields were added in openstreetmap/id-tagging-schema@92ae856, which was released as v3.0.0. cb7f1c2 upgraded to v3.0.0.

@1ec5 1ec5 added the localization Adapting iD across languages, regions, and cultures label Jul 28, 2021
@1ec5
Copy link
Collaborator Author

1ec5 commented Jul 28, 2021

Oh, I think the issue is that v2.20.0 didn’t pull the latest translations from Transifex. Only a Transifex project administrator can do that, unfortunately.

@mbrzakovic
Copy link
Collaborator

It seems you are partially correct. I did run fresh translations prior to release in iD however it seems that preset translations are pulled in runtime from id-tagging-schema release. I am looking into this now, if this is the case just updating translations on id-tagging-schema side should resolve this.

@1ec5
Copy link
Collaborator Author

1ec5 commented Oct 23, 2021

if this is the case just updating translations on id-tagging-schema side should resolve this

Thanks for doing this in openstreetmap/id-tagging-schema@bde8a41. It did add the translations to the id-tagging-schema files. However, ideditor.netlify.app still isn’t showing the translations:

surface

This line is returning untranslated strings like “Asphalt”:

var label = field.t('options.' + k, { default: k });

@1ec5
Copy link
Collaborator Author

1ec5 commented Oct 24, 2021

openstreetmap/id-tagging-schema@bde8a41 went into v3.1.0, but @openstreetmap/id-tagging-schema v3.1.0 hasn’t been released to NPM yet. @quincylvania @bhousel @Firefishy are the maintainers of that package.

@1ec5 1ec5 changed the title Translatable option labels are untranslated Upgrade to id-tagging-schema v3.1.0 Nov 3, 2021
@tyrasd
Copy link
Member

tyrasd commented Dec 13, 2021

v3.1.0 was finally released a few days ago (see https://www.npmjs.com/package/@openstreetmap/id-tagging-schema?activeTab=versions) and the CDN's cache now has the new version available. It could be that browsers still have the old version cached locally (expiry is set to 7 days AFAICS), but essentially this specific issue should be solved now.

I must say that I don't feel too good about the current setup for releasing the tagging database. Having to "deal" with two layers of caches which are out of our control on top of the existing build pipeline is not really ideal. For example, if at any point a release went wrong, it could take up to two weeks until end users get the fix. 😒

I think the way forward would be to move away from distributing the id-tagging-schema via a npm-based CDN to something else – potentially something self hosted on osm.org.

@tyrasd tyrasd closed this as completed Dec 13, 2021
@tyrasd tyrasd removed the wip Work in progress label Dec 13, 2021
@bhousel
Copy link
Member

bhousel commented Dec 13, 2021

There is a simple way to purge the JSDelivr CDN cache and I am happy to share it with you.
The JSDelivr folks have asked me not to share it widely, otherwise I would just post it here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
localization Adapting iD across languages, regions, and cultures
Projects
None yet
Development

No branches or pull requests

4 participants