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

Make configurable callback exceptions #189

Open
rafa-suagu opened this issue Jan 10, 2019 · 2 comments
Open

Make configurable callback exceptions #189

rafa-suagu opened this issue Jan 10, 2019 · 2 comments

Comments

@rafa-suagu
Copy link

I'm submitting a ... (check one with "x")

[ ] Regression (a behavior that used to work and stopped working in a new release)
[ ] Bug report  <!-- Please check the repository for a similar issue or PR before submitting -->
[ ] Support request => <!-- Please check the repository for a similar issue or PR before submitting -->
[x] Feature request
[ ] Documentation issue or request

Current behavior
Currently only two metas has the "exception" status, 'og:locale' and 'og:locale:alternate'

Expected/desired behavior
Configure the callback exceptions.

What is the motivation / use case for changing the behavior?
It's impossible or undesired, suppose or predict the metas that the projects wants to exclude from callback function. In our case, we have for example 'og:type' or 'og:image' that doesn't need translation (thought the callback function).
The workaround for this situation in our case it's the next:

callback: (key: string) => /^[^a-z\s]+$/.test(key) ? translateService.get(key) : key
@rafa-suagu
Copy link
Author

If you accept this suggestion and a PR is needed or wanted, I can do it.

@fulls1z3
Copy link
Owner

@rafa-as sorry for the delay, had busy times. feel free to fire a PR and i'll approve.

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

No branches or pull requests

2 participants