Skip to content
This repository has been archived by the owner on Mar 14, 2024. It is now read-only.

throw on missing i18n string #6170

Merged
merged 1 commit into from Sep 9, 2021
Merged

throw on missing i18n string #6170

merged 1 commit into from Sep 9, 2021

Conversation

samthor
Copy link
Contributor

@samthor samthor commented Sep 8, 2021

I found strange (probably intended?) behavior in Nunjucks, that it was falling back to the previous {{ title }} when the result of calling the i18n filter was undefined.

Anyway, the solution here is to actually barf on missing i18n strings. This was hitting us when a user tried to access a string like "i18n.courses.foo", when strings "i18n.courses.foo.bar" was actually defined (since the parent object existed, it just has no 'en' prop).

@netlify
Copy link

netlify bot commented Sep 8, 2021

✔️ Deploy Preview for web-dev-staging ready!

🔨 Explore the source changes: 357dadd

🔍 Inspect the deploy log: https://app.netlify.com/sites/web-dev-staging/deploys/613945016272d7000772cac1

😎 Browse the preview: https://deploy-preview-6170--web-dev-staging.netlify.app

@google-cla google-cla bot added the cla: yes Contributor has signed the CLA label Sep 8, 2021
@samthor samthor merged commit 17e8961 into main Sep 9, 2021
@samthor samthor deleted the throw-i18n-bad branch September 9, 2021 00:06
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
cla: yes Contributor has signed the CLA
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants