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

fix transliteration import #1762

Closed
aaronjudd opened this issue Jan 31, 2017 · 0 comments
Closed

fix transliteration import #1762

aaronjudd opened this issue Jan 31, 2017 · 0 comments
Assignees
Milestone

Comments

@aaronjudd
Copy link
Contributor

aaronjudd commented Jan 31, 2017

Where ever getSlug is implemented, in browser and server we should be able to use slugify from transliteration as an import:

import { transliterate as tr, slugify } from "transliteration";

This works server side, but the functions do not work client side.

As a temporary solution to this, we included /client/lib/transliteration.min.js. The goal of this issue is to remove the min.js, and get the imports to work. As is, the import works, but the (tr, slugify) functions do not. As a quick attempt to test this again did not work, this might need some src debugging. It's not ideal to change the transliteration package, as this is the only one that supports some of our Asian languages. Acceptance is that getSlug works everywhere (if it breaks, so will routing).

This might be what causes routing issues #1334 where the prefix doesn't always load and then a 404 is display. This can happen if getSlug doesn't return a value, so if transliteration isn't loaded, we see this issue.

@aaronjudd aaronjudd added this to the v0.20.0 milestone Feb 16, 2017
@aaronjudd aaronjudd self-assigned this Feb 16, 2017
aaronjudd pushed a commit that referenced this issue Feb 17, 2017
- Resolves #1762
- Removes transliteration.min.js (import direct)
- special case handling on PDP handle update
@ghost ghost added the review label Feb 17, 2017
@ghost ghost assigned mikemurray Feb 23, 2017
@ghost ghost removed the review label Feb 23, 2017
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

No branches or pull requests

2 participants