Skip to content
This repository was archived by the owner on Jan 25, 2020. It is now read-only.

Allow The Passthru of Missing Properties File - #51

Open
xjamundx wants to merge 1 commit into
krakenjs:v0.2.xfrom
xjamundx:patch-3
Open

Allow The Passthru of Missing Properties File#51
xjamundx wants to merge 1 commit into
krakenjs:v0.2.xfrom
xjamundx:patch-3

Conversation

@xjamundx

Copy link
Copy Markdown

Combined with this change to localizr we'll get a much better error message in the case that the props are missing:
krakenjs/localizr#20

Combined with this change to localizr we'll get a much better error message in the case that the props are missing:
krakenjs/localizr#20
@xjamundx xjamundx mentioned this pull request May 11, 2016
@xjamundx xjamundx changed the title Allow The Passthru of Missing Propeties File Allow The Passthru of Missing Properties File May 11, 2016
Comment thread view/dust.js
global = context.global;
locals = context.get('context');
locality = util.localityFromLocals(locals);
props = res.resolve(name, locality).file || i18n.contentPath;

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In the case that the content supplied is missing we will just pass along undefined to signal that we couldn't find any properties file. This only matters if we call {@pre} somewhere in the file. Dust files don't need have content, so we preserve this and then if localizr is called to get the content we can say there with confidence: "Someone is asking for content and we can't find it"

@xjamundx

Copy link
Copy Markdown
Author

Tests will fail here, but pass after we get the localizr changes

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant