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

Allow The Passthru of Missing Properties File #51

Open
wants to merge 1 commit into
base: v0.2.x
Choose a base branch
from

Conversation

xjamundx
Copy link

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
@@ -40,7 +40,7 @@ exports.create = function (config) {
global = context.global;
locals = context.get('context');
locality = util.localityFromLocals(locals);
props = res.resolve(name, locality).file || i18n.contentPath;
Copy link
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
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.

None yet

1 participant