Conversation
|
PTAL |
|
I think the approach where each source file calls It is not safe to assume that Secondly, we are duplicating We should have a shared file // lib/globalize.js
var SG = require('strong-globalize');
SG.SetRootDir(path.join(__dirname, '..'), { autonomousMsgLoading: 'all' });
module.exports = SG();
// lib/loopback.js
var g = require('./globalize');
// lib/registry.js
var g = require('./globalize');
// etc. |
|
We had this discussion before. I agree with you that it should be in a common file for easy maintenance. However, it breaks the Maybe we can request this feature in |
@0candy oh, I did not read your reply in #2407 (comment) until now - I am unable to keep up with all GH notifications :( I read only those containing my GH handle :) I agree we should request this feature from strong-globalize, could you please open a GH issue to keep track of this request? TBH I think it's very likely we will have to implement it ourselves, but that's fine with me. I am thinking how to fix the problem with the current strong-globalize version. Would the following approach work? // lib/globalize.js
module.exports = function(SG) {
SG.SetRootDir(path.join(__dirname, '..'), { autonomousMsgLoading: 'all' });
return SG();
}
// lib/loopback.js
var g = require('./globalize')(require('strong-globalize'));
// lib/registry.js
var g = require('./globalize')(require('strong-globalize')); |
|
I created an enhancement issue in As for your suggested approach, will need to test it out to find out. @Setogit Do you know if @bajtos suggestion will work? |
|
@0candy @bajtos: With that said, one way to meet your needs is to blindly assume Would you elaborate the value that approach could bring to you, client's side? |
|
Let's move the discussion about strong-globalize enhancements to strongloop/strong-globalize#87 |
|
As for this pull request, I don't fully understand what issue we are trying to fix and whether it's still an issue after strongloop/strong-globalize#86 was landed. I'll leave it up to you @0candy and @Setogit to decide whether this patch is worth landing. |
|
@0candy I think this pull request is ready to be reworked to follow the new approach that's supported by strong-globalize since strongloop/strong-globalize#86. Thoughts? |
|
Closing PR. See #2754 |
Add SetRootDir to lib/loopback.js