Merge pull request #1057 from strongloop/backport/globalize-kv-mem-connector
Globalize KeyValue Memory connector
This commit is contained in:
commit
de84a8bc7d
|
@ -1,4 +1,6 @@
|
||||||
{
|
{
|
||||||
|
"0bd753a8944ad0af85a939bb25273887": "Cannot expire unknown key {0}",
|
||||||
|
"bec226891a505828bfc76c5cfd73b336": "Cannot get TTL for unknown key {0}",
|
||||||
"4c78325cedbb826db3a05bf5df0e8546": "You must provide an {{id}} when replacing!",
|
"4c78325cedbb826db3a05bf5df0e8546": "You must provide an {{id}} when replacing!",
|
||||||
"a0cf0e09c26df14283223e84e6a10f00": "Could not update attributes. {{Object}} with {{id}} {0} does not exist!",
|
"a0cf0e09c26df14283223e84e6a10f00": "Could not update attributes. {{Object}} with {{id}} {0} does not exist!",
|
||||||
"e54d944c2a2c85a23caa86027ae307cf": "Cannot migrate models not attached to this datasource: {0}",
|
"e54d944c2a2c85a23caa86027ae307cf": "Cannot migrate models not attached to this datasource: {0}",
|
||||||
|
@ -13,6 +15,7 @@
|
||||||
"5ec8efeb715a2c34b440f2d76e2cf87d": " {0}",
|
"5ec8efeb715a2c34b440f2d76e2cf87d": " {0}",
|
||||||
"62a2d80c405b7fec5f547c448ab1b6ff": "The {{order}} {0} has invalid direction",
|
"62a2d80c405b7fec5f547c448ab1b6ff": "The {{order}} {0} has invalid direction",
|
||||||
"63f503acabdc4c7588aab741b8466862": "The {0} property has invalid clause {1}",
|
"63f503acabdc4c7588aab741b8466862": "The {0} property has invalid clause {1}",
|
||||||
|
"67c2bf43b5281ab929617423ea8a6f3e": "The connector {0} does not support {{replaceById}} operation. This is not a bug in LoopBack. Please contact the authors of the connector, preferably via GitHub issues.",
|
||||||
"6c3234937d69763fc7f6bcafccc59bbc": "{{Model::deleteById}} requires the {{id}} argument",
|
"6c3234937d69763fc7f6bcafccc59bbc": "{{Model::deleteById}} requires the {{id}} argument",
|
||||||
"6eb6fd4fbd73394000bc25f5776fd20c": "{{Model::exists}} requires the {{id}} argument",
|
"6eb6fd4fbd73394000bc25f5776fd20c": "{{Model::exists}} requires the {{id}} argument",
|
||||||
"7bbbdece4eea90e42aa5c0bce295e503": "{{Model::findById}} requires the {{id}} argument",
|
"7bbbdece4eea90e42aa5c0bce295e503": "{{Model::findById}} requires the {{id}} argument",
|
||||||
|
@ -27,11 +30,11 @@
|
||||||
"0be2d39d225b1d8b2a0f92ad5c65c9ac": "No model specified for {{polymorphic}} {0}: {1}",
|
"0be2d39d225b1d8b2a0f92ad5c65c9ac": "No model specified for {{polymorphic}} {0}: {1}",
|
||||||
"2f4af31c144bbfab1bbf479866acd820": "\nWARNING: {{LoopBack}} connector \"{0}\" is not installed as any of the following modules:\n\n {1}\n\nTo fix, run:\n\n {{npm install {2} --save}}\n",
|
"2f4af31c144bbfab1bbf479866acd820": "\nWARNING: {{LoopBack}} connector \"{0}\" is not installed as any of the following modules:\n\n {1}\n\nTo fix, run:\n\n {{npm install {2} --save}}\n",
|
||||||
"6111399276924ffa3bc9a410cdfcb2e5": "No {{id}} name {0}",
|
"6111399276924ffa3bc9a410cdfcb2e5": "No {{id}} name {0}",
|
||||||
|
"75518263527c423b8a12f908a2730b0f": "{{className}} is required",
|
||||||
"791ab3031a73ede03f7d6299a85e8289": "Timeout in connecting after {0} ms",
|
"791ab3031a73ede03f7d6299a85e8289": "Timeout in connecting after {0} ms",
|
||||||
"7b277018e43d41bc445731092b91547d": "Not connected",
|
"7b277018e43d41bc445731092b91547d": "Not connected",
|
||||||
"a2487abefef4259c2131d96cdb8543b1": "Connection fails: {0}\nIt will be retried for the next request.",
|
"a2487abefef4259c2131d96cdb8543b1": "Connection fails: {0}\nIt will be retried for the next request.",
|
||||||
"b15b20280211ad258d92947f05b6e4a5": "The connector has not been initialized.",
|
"b15b20280211ad258d92947f05b6e4a5": "The connector has not been initialized.",
|
||||||
"ddf0aa14803f1c84f4a97f3803f7471c": "Class name required",
|
|
||||||
"e0e9504e137a3c3339144b51ed76fef2": "Connector is not defined correctly: it should create `{{connector}}` member of dataSource",
|
"e0e9504e137a3c3339144b51ed76fef2": "Connector is not defined correctly: it should create `{{connector}}` member of dataSource",
|
||||||
"ec42dca074f1818c447f7ad16e2d01af": "{0} is not provided by the attached connector",
|
"ec42dca074f1818c447f7ad16e2d01af": "{0} is not provided by the attached connector",
|
||||||
"ba0fd8106eb54de4d003a844206431fd": "Model hook \"{0}\" is deprecated, use Operation hooks instead. {{http://docs.strongloop.com/display/LB/Operation+hooks}}",
|
"ba0fd8106eb54de4d003a844206431fd": "Model hook \"{0}\" is deprecated, use Operation hooks instead. {{http://docs.strongloop.com/display/LB/Operation+hooks}}",
|
||||||
|
@ -43,6 +46,7 @@
|
||||||
"514985b2327f061ffb1c932f6b909979": "Model {0} is not defined.",
|
"514985b2327f061ffb1c932f6b909979": "Model {0} is not defined.",
|
||||||
"cc09e361de7b0f3dc1687515c5713885": "Property names containing a dot are not supported. Model: {0}, property: {1}",
|
"cc09e361de7b0f3dc1687515c5713885": "Property names containing a dot are not supported. Model: {0}, property: {1}",
|
||||||
"da02dd6c53d4148320eeb31718a7aebe": "Invalid type for property {0}",
|
"da02dd6c53d4148320eeb31718a7aebe": "Invalid type for property {0}",
|
||||||
|
"ddf0aa14803f1c84f4a97f3803f7471c": "Class name required",
|
||||||
"1853f9414bc61ed196952f5c81e41802": "Property names containing a dot are not supported. Model: {0}, dynamic property: {1}",
|
"1853f9414bc61ed196952f5c81e41802": "Property names containing a dot are not supported. Model: {0}, dynamic property: {1}",
|
||||||
"bdb11cc1c780c9ccac33c316cfdc9d82": "Type not defined for property {0}.{1}",
|
"bdb11cc1c780c9ccac33c316cfdc9d82": "Type not defined for property {0}.{1}",
|
||||||
"cd930369e86cdd222f7bd117c6f9fa94": "Unknown default value provider {0}",
|
"cd930369e86cdd222f7bd117c6f9fa94": "Unknown default value provider {0}",
|
||||||
|
|
|
@ -1,5 +1,7 @@
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
|
var g = require('strong-globalize')();
|
||||||
|
|
||||||
var assert = require('assert');
|
var assert = require('assert');
|
||||||
var Connector = require('loopback-connector').Connector;
|
var Connector = require('loopback-connector').Connector;
|
||||||
var debug = require('debug')('loopback:connector:kv-memory');
|
var debug = require('debug')('loopback:connector:kv-memory');
|
||||||
|
@ -123,7 +125,7 @@ function(modelName, key, ttl, options, callback) {
|
||||||
|
|
||||||
if (!(key in store)) {
|
if (!(key in store)) {
|
||||||
return process.nextTick(function() {
|
return process.nextTick(function() {
|
||||||
var err = new Error('Cannot expire unknown key ' + key);
|
var err = new Error(g.f('Cannot expire unknown key %j', key));
|
||||||
err.statusCode = 404;
|
err.statusCode = 404;
|
||||||
callback(err);
|
callback(err);
|
||||||
});
|
});
|
||||||
|
@ -143,7 +145,7 @@ function(modelName, key, options, callback) {
|
||||||
// key is unknown
|
// key is unknown
|
||||||
if (!(key in store)) {
|
if (!(key in store)) {
|
||||||
return process.nextTick(function() {
|
return process.nextTick(function() {
|
||||||
var err = new Error('Cannot get TTL for unknown key ' + key);
|
var err = new Error(g.f('Cannot get TTL for unknown key %j', key));
|
||||||
err.statusCode = 404;
|
err.statusCode = 404;
|
||||||
callback(err);
|
callback(err);
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in New Issue