@angular/localize
Advanced tools
Comparing version 10.0.0-next.3 to 10.0.0-next.4
/** | ||
* @license Angular v10.0.0-next.3 | ||
* @license Angular v10.0.0-next.4 | ||
* (c) 2010-2020 Google LLC. https://angular.io/ | ||
@@ -4,0 +4,0 @@ * License: MIT |
/** | ||
* @license Angular v10.0.0-next.3 | ||
* @license Angular v10.0.0-next.4 | ||
* (c) 2010-2020 Google LLC. https://angular.io/ | ||
@@ -4,0 +4,0 @@ * License: MIT |
/** | ||
* @license Angular v10.0.0-next.3 | ||
* @license Angular v10.0.0-next.4 | ||
* (c) 2010-2020 Google LLC. https://angular.io/ | ||
@@ -290,3 +290,3 @@ * License: MIT | ||
*/ | ||
function parseMessage(messageParts, expressions) { | ||
function parseMessage(messageParts, expressions, location) { | ||
var substitutions = {}; | ||
@@ -307,8 +307,8 @@ var metadata = parseMetadata(messageParts[0], messageParts.raw[0]); | ||
var messageId = metadata.id || compiler.computeMsgId(messageString, metadata.meaning || ''); | ||
var legacyIds = metadata.legacyIds.filter(function (id) { return id !== messageId; }); | ||
var legacyIds = metadata.legacyIds && metadata.legacyIds.filter(function (id) { return id !== messageId; }); | ||
return { | ||
messageId: messageId, | ||
id: messageId, | ||
legacyIds: legacyIds, | ||
substitutions: substitutions, | ||
messageString: messageString, | ||
text: messageString, | ||
meaning: metadata.meaning || '', | ||
@@ -318,2 +318,3 @@ description: metadata.description || '', | ||
placeholderNames: placeholderNames, | ||
location: location, | ||
}; | ||
@@ -348,5 +349,5 @@ } | ||
function parseMetadata(cooked, raw) { | ||
var _a = splitBlock(cooked, raw), text = _a.text, block = _a.block; | ||
var _a = splitBlock(cooked, raw), messageString = _a.text, block = _a.block; | ||
if (block === undefined) { | ||
return { text: text, meaning: undefined, description: undefined, id: undefined, legacyIds: [] }; | ||
return { text: messageString }; | ||
} | ||
@@ -364,3 +365,3 @@ else { | ||
} | ||
return { text: text, meaning: meaning, description: description, id: id, legacyIds: legacyIds }; | ||
return { text: messageString, meaning: meaning, description: description, id: id, legacyIds: legacyIds }; | ||
} | ||
@@ -460,6 +461,8 @@ } | ||
// Look up the translation using the messageId, and then the legacyId if available. | ||
var translation = translations[message.messageId]; | ||
var translation = translations[message.id]; | ||
// If the messageId did not match a translation, try matching the legacy ids instead | ||
for (var i = 0; i < message.legacyIds.length && translation === undefined; i++) { | ||
translation = translations[message.legacyIds[i]]; | ||
if (message.legacyIds !== undefined) { | ||
for (var i = 0; i < message.legacyIds.length && translation === undefined; i++) { | ||
translation = translations[message.legacyIds[i]]; | ||
} | ||
} | ||
@@ -489,4 +492,4 @@ if (translation === undefined) { | ||
*/ | ||
function parseTranslation(message) { | ||
var parts = message.split(/{\$([^}]*)}/); | ||
function parseTranslation(messageString) { | ||
var parts = messageString.split(/{\$([^}]*)}/); | ||
var messageParts = [parts[0]]; | ||
@@ -499,3 +502,7 @@ var placeholderNames = []; | ||
var rawMessageParts = messageParts.map(function (part) { return part.charAt(0) === BLOCK_MARKER ? '\\' + part : part; }); | ||
return { messageParts: makeTemplateObject(messageParts, rawMessageParts), placeholderNames: placeholderNames }; | ||
return { | ||
text: messageString, | ||
messageParts: makeTemplateObject(messageParts, rawMessageParts), | ||
placeholderNames: placeholderNames, | ||
}; | ||
} | ||
@@ -510,3 +517,11 @@ /** | ||
if (placeholderNames === void 0) { placeholderNames = []; } | ||
return { messageParts: makeTemplateObject(messageParts, messageParts), placeholderNames: placeholderNames }; | ||
var messageString = messageParts[0]; | ||
for (var i = 0; i < placeholderNames.length - 1; i++) { | ||
messageString += "{$" + placeholderNames[i] + "}" + messageParts[i + 1]; | ||
} | ||
return { | ||
text: messageString, | ||
messageParts: makeTemplateObject(messageParts, messageParts), | ||
placeholderNames: placeholderNames | ||
}; | ||
} | ||
@@ -525,3 +540,6 @@ /** | ||
var meaningString = message.meaning && " - \"" + message.meaning + "\""; | ||
return "\"" + message.messageId + "\" (\"" + message.messageString + "\"" + meaningString + ")"; | ||
var legacy = message.legacyIds && message.legacyIds.length > 0 ? | ||
" [" + message.legacyIds.map(function (l) { return "\"" + l + "\""; }).join(', ') + "]" : | ||
''; | ||
return "\"" + message.id + "\"" + legacy + " (\"" + message.text + "\"" + meaningString + ")"; | ||
} | ||
@@ -528,0 +546,0 @@ |
/** | ||
* @license Angular v10.0.0-next.3 | ||
* @license Angular v10.0.0-next.4 | ||
* (c) 2010-2020 Google LLC. https://angular.io/ | ||
@@ -13,3 +13,3 @@ * License: MIT | ||
* found in the LICENSE file at https://angular.io/license | ||
*/var r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)};function n(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,a=r.call(e),i=[];try{for(;(void 0===t||t-- >0)&&!(n=a.next()).done;)i.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=a.return)&&r.call(a)}finally{if(o)throw o.error}}return i}function o(e,r){for(var n,o={},s=a(e[0],e.raw[0]),l=[s.text],c=[],u=s.text,f=1;f<e.length;f++){var d=i(e[f],e.raw[f]),p=d.text,g=d.block,m=void 0===g?1===(n=f)?"PH":"PH_"+(n-1):g;u+="{$"+m+"}"+p,void 0!==r&&(o[m]=r[f-1]),c.push(m),l.push(p)}var h=s.id||t.computeMsgId(u,s.meaning||""),v=s.legacyIds.filter((function(e){return e!==h}));return{messageId:h,legacyIds:v,substitutions:o,messageString:u,meaning:s.meaning||"",description:s.description||"",messageParts:l,placeholderNames:c}}function a(e,t){var r=i(e,t),o=r.text,a=r.block;if(void 0===a)return{text:o,meaning:void 0,description:void 0,id:void 0,legacyIds:[]};var s=n(a.split("␟")),l=s[0],c=s.slice(1),u=n(l.split("@@",2),2),f=u[1],d=n(u[0].split("|",2),2),p=d[0],g=d[1];return void 0===g&&(g=p,p=void 0),""===g&&(g=void 0),{text:o,meaning:p,description:g,id:f,legacyIds:c}}function i(e,t){if(":"!==t.charAt(0))return{text:e};var r=s(e,t);return{block:e.substring(1,r),text:e.substring(r+1)}}function s(e,t){for(var r=1,n=1;r<e.length;r++,n++)if("\\"===t[n])n++;else if(":"===e[r])return r;throw new Error('Unterminated $localize metadata block in "'+t+'".')}var l=function(e){function t(t){var r=e.call(this,"No translation found for "+d(t)+".")||this;return r.parsedMessage=t,r.type="MissingTranslationError",r}return function n(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}(t,e),t}(Error);function c(e,t,r){for(var n=o(t,r),a=e[n.messageId],i=0;i<n.legacyIds.length&&void 0===a;i++)a=e[n.legacyIds[i]];if(void 0===a)throw new l(n);return[a.messageParts,a.placeholderNames.map((function(e){if(n.substitutions.hasOwnProperty(e))return n.substitutions[e];throw new Error("There is a placeholder name mismatch with the translation provided for the message "+d(n)+".\nThe translation contains a placeholder with name "+e+", which does not exist in the message.")}))]}function u(e){for(var t=e.split(/{\$([^}]*)}/),r=[t[0]],n=[],o=1;o<t.length-1;o+=2)n.push(t[o]),r.push(""+t[o+1]);var a=r.map((function(e){return":"===e.charAt(0)?"\\"+e:e}));return{messageParts:f(r,a),placeholderNames:n}}function f(e,t){return Object.defineProperty(e,"raw",{value:t}),e}function d(e){return'"'+e.messageId+'" ("'+e.messageString+'"'+(e.meaning&&' - "'+e.meaning+'"')+")"} | ||
*/var r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)};function n(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,a=r.call(e),i=[];try{for(;(void 0===t||t-- >0)&&!(n=a.next()).done;)i.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=a.return)&&r.call(a)}finally{if(o)throw o.error}}return i}function o(e,r,n){for(var o,s={},l=a(e[0],e.raw[0]),c=[l.text],u=[],f=l.text,d=1;d<e.length;d++){var p=i(e[d],e.raw[d]),g=p.text,h=p.block,m=void 0===h?1===(o=d)?"PH":"PH_"+(o-1):h;f+="{$"+m+"}"+g,void 0!==r&&(s[m]=r[d-1]),u.push(m),c.push(g)}var v=l.id||t.computeMsgId(f,l.meaning||""),y=l.legacyIds&&l.legacyIds.filter((function(e){return e!==v}));return{id:v,legacyIds:y,substitutions:s,text:f,meaning:l.meaning||"",description:l.description||"",messageParts:c,placeholderNames:u,location:n}}function a(e,t){var r=i(e,t),o=r.text,a=r.block;if(void 0===a)return{text:o};var s=n(a.split("␟")),l=s[0],c=s.slice(1),u=n(l.split("@@",2),2),f=u[1],d=n(u[0].split("|",2),2),p=d[0],g=d[1];return void 0===g&&(g=p,p=void 0),""===g&&(g=void 0),{text:o,meaning:p,description:g,id:f,legacyIds:c}}function i(e,t){if(":"!==t.charAt(0))return{text:e};var r=s(e,t);return{block:e.substring(1,r),text:e.substring(r+1)}}function s(e,t){for(var r=1,n=1;r<e.length;r++,n++)if("\\"===t[n])n++;else if(":"===e[r])return r;throw new Error('Unterminated $localize metadata block in "'+t+'".')}var l=function(e){function t(t){var r=e.call(this,"No translation found for "+d(t)+".")||this;return r.parsedMessage=t,r.type="MissingTranslationError",r}return function n(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}(t,e),t}(Error);function c(e,t,r){var n=o(t,r),a=e[n.id];if(void 0!==n.legacyIds)for(var i=0;i<n.legacyIds.length&&void 0===a;i++)a=e[n.legacyIds[i]];if(void 0===a)throw new l(n);return[a.messageParts,a.placeholderNames.map((function(e){if(n.substitutions.hasOwnProperty(e))return n.substitutions[e];throw new Error("There is a placeholder name mismatch with the translation provided for the message "+d(n)+".\nThe translation contains a placeholder with name "+e+", which does not exist in the message.")}))]}function u(e){for(var t=e.split(/{\$([^}]*)}/),r=[t[0]],n=[],o=1;o<t.length-1;o+=2)n.push(t[o]),r.push(""+t[o+1]);var a=r.map((function(e){return":"===e.charAt(0)?"\\"+e:e}));return{text:e,messageParts:f(r,a),placeholderNames:n}}function f(e,t){return Object.defineProperty(e,"raw",{value:t}),e}function d(e){var t=e.meaning&&' - "'+e.meaning+'"',r=e.legacyIds&&e.legacyIds.length>0?" ["+e.legacyIds.map((function(e){return'"'+e+'"'})).join(", ")+"]":"";return'"'+e.id+'"'+r+' ("'+e.text+'"'+t+")"} | ||
/** | ||
@@ -42,2 +42,2 @@ * @license | ||
* found in the LICENSE file at https://angular.io/license | ||
*/Object.defineProperty(e,"ɵcomputeMsgId",{enumerable:!0,get:function(){return t.computeMsgId}}),e.clearTranslations=function g(){$localize.translate=void 0,$localize.TRANSLATIONS={}},e.loadTranslations=function m(e){$localize.translate||($localize.translate=p),$localize.TRANSLATIONS||($localize.TRANSLATIONS={}),Object.keys(e).forEach((function(t){$localize.TRANSLATIONS[t]=u(e[t])}))},e.ɵMissingTranslationError=l,e.ɵfindEndOfBlock=s,e.ɵisMissingTranslationError=function h(e){return"MissingTranslationError"===e.type},e.ɵmakeParsedTranslation=function v(e,t){return void 0===t&&(t=[]),{messageParts:f(e,e),placeholderNames:t}},e.ɵmakeTemplateObject=f,e.ɵparseMessage=o,e.ɵparseMetadata=a,e.ɵparseTranslation=u,e.ɵsplitBlock=i,e.ɵtranslate=c,Object.defineProperty(e,"__esModule",{value:!0})})); | ||
*/Object.defineProperty(e,"ɵcomputeMsgId",{enumerable:!0,get:function(){return t.computeMsgId}}),e.clearTranslations=function g(){$localize.translate=void 0,$localize.TRANSLATIONS={}},e.loadTranslations=function h(e){$localize.translate||($localize.translate=p),$localize.TRANSLATIONS||($localize.TRANSLATIONS={}),Object.keys(e).forEach((function(t){$localize.TRANSLATIONS[t]=u(e[t])}))},e.ɵMissingTranslationError=l,e.ɵfindEndOfBlock=s,e.ɵisMissingTranslationError=function m(e){return"MissingTranslationError"===e.type},e.ɵmakeParsedTranslation=function v(e,t){void 0===t&&(t=[]);for(var r=e[0],n=0;n<t.length-1;n++)r+="{$"+t[n]+"}"+e[n+1];return{text:r,messageParts:f(e,e),placeholderNames:t}},e.ɵmakeTemplateObject=f,e.ɵparseMessage=o,e.ɵparseMetadata=a,e.ɵparseTranslation=u,e.ɵsplitBlock=i,e.ɵtranslate=c,Object.defineProperty(e,"__esModule",{value:!0})})); |
@@ -11,2 +11,2 @@ /** | ||
export { computeMsgId as ɵcomputeMsgId, findEndOfBlock as ɵfindEndOfBlock, isMissingTranslationError as ɵisMissingTranslationError, makeParsedTranslation as ɵmakeParsedTranslation, makeTemplateObject as ɵmakeTemplateObject, MissingTranslationError as ɵMissingTranslationError, parseMessage as ɵparseMessage, parseMetadata as ɵparseMetadata, parseTranslation as ɵparseTranslation, splitBlock as ɵsplitBlock, translate as ɵtranslate } from './src/utils'; | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicHJpdmF0ZS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uL3BhY2thZ2VzL2xvY2FsaXplL3ByaXZhdGUudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7Ozs7OztHQU1HO0FBRUgsa0dBQWtHO0FBQ2xHLHdCQUF3QjtBQUN4QixPQUFPLEVBQUMsWUFBWSxJQUFJLGFBQWEsRUFBRSxjQUFjLElBQUksZUFBZSxFQUFFLHlCQUF5QixJQUFJLDBCQUEwQixFQUFFLHFCQUFxQixJQUFJLHNCQUFzQixFQUFFLGtCQUFrQixJQUFJLG1CQUFtQixFQUEyQix1QkFBdUIsSUFBSSx3QkFBd0IsRUFBdUgsWUFBWSxJQUFJLGFBQWEsRUFBRSxhQUFhLElBQUksY0FBYyxFQUFFLGdCQUFnQixJQUFJLGlCQUFpQixFQUFtQyxVQUFVLElBQUksV0FBVyxFQUFtQyxTQUFTLElBQUksVUFBVSxFQUFDLE1BQU0sYUFBYSxDQUFDIiwic291cmNlc0NvbnRlbnQiOlsiLyoqXG4gKiBAbGljZW5zZVxuICogQ29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Tb3VyY2VMb2NhdGlvbiBhcyDJtVNvdXJjZUxvY2F0aW9uLCBTb3VyY2VNZXNzYWdlIGFzIMm1U291cmNlTWVzc2FnZSwgc3BsaXRCbG9jayBhcyDJtXNwbGl0QmxvY2ssIFRhcmdldE1lc3NhZ2UgYXMgybVUYXJnZXRNZXNzYWdlLCB0cmFuc2xhdGUgYXMgybV0cmFuc2xhdGV9IGZyb20gJy4vc3JjL3V0aWxzJztcbiJdfQ== |
@@ -20,3 +20,3 @@ /** | ||
*/ | ||
export function parseMessage(messageParts, expressions) { | ||
export function parseMessage(messageParts, expressions, location) { | ||
const substitutions = {}; | ||
@@ -37,8 +37,8 @@ const metadata = parseMetadata(messageParts[0], messageParts.raw[0]); | ||
const messageId = metadata.id || computeMsgId(messageString, metadata.meaning || ''); | ||
const legacyIds = metadata.legacyIds.filter(id => id !== messageId); | ||
const legacyIds = metadata.legacyIds && metadata.legacyIds.filter(id => id !== messageId); | ||
return { | ||
messageId, | ||
id: messageId, | ||
legacyIds, | ||
substitutions, | ||
messageString, | ||
text: messageString, | ||
meaning: metadata.meaning || '', | ||
@@ -48,2 +48,3 @@ description: metadata.description || '', | ||
placeholderNames, | ||
location, | ||
}; | ||
@@ -78,5 +79,5 @@ } | ||
export function parseMetadata(cooked, raw) { | ||
const { text, block } = splitBlock(cooked, raw); | ||
const { text: messageString, block } = splitBlock(cooked, raw); | ||
if (block === undefined) { | ||
return { text, meaning: undefined, description: undefined, id: undefined, legacyIds: [] }; | ||
return { text: messageString }; | ||
} | ||
@@ -94,3 +95,3 @@ else { | ||
} | ||
return { text, meaning, description, id, legacyIds }; | ||
return { text: messageString, meaning, description, id, legacyIds }; | ||
} | ||
@@ -157,2 +158,2 @@ } | ||
} | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibWVzc2FnZXMuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi8uLi8uLi9w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cpOiBudW1iZXIge1xuICAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqXG4gICAqIFRoaXMgZnVuY3Rpb24gaXMgcmVwZWF0ZWQgaW4gYHNyYy9sb2NhbGl6ZS9zcmMvbG9jYWxpemUudHNgIGFuZCB0aGUgdHdvIHNob3VsZCBiZSBrZXB0IGluIHN5bmMuXG4gICAqIChTZWUgdGhhdCBmaWxlIGZvciBtb3JlIGV4cGxhbmF0aW9uIG9mIHdoeS4pXG4gICAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovXG4gIGZvciAobGV0IGNvb2tlZEluZGV4ID0gMSwgcmF3SW5kZXggPSAxOyBjb29rZWRJbmRleCA8IGNvb2tlZC5sZW5ndGg7IGNvb2tlZEluZGV4KyssIHJhd0luZGV4KyspIHtcbiAgICBpZiAocmF3W3Jhd0luZGV4XSA9PT0gJ1xcXFwnKSB7XG4gICAgICByYXdJbmRleCsrO1xuICAgIH0gZWxzZSBpZiAoY29va2VkW2Nvb2tlZEluZGV4XSA9PT0gQkxPQ0tfTUFSS0VSKSB7XG4gICAgICByZXR1cm4gY29va2VkSW5kZXg7XG4gICAgfVxuICB9XG4gIHRocm93IG5ldyBFcnJvcihgVW50ZXJtaW5hdGVkICRsb2NhbGl6ZSBtZXRhZGF0YSBibG9jayBpbiBcIiR7cmF3fVwiLmApO1xufSJdfQ== | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibWVzc2FnZXMuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi8uLi8uLi9wYWNrYWdlcy9sb2NhbGl6ZS9zcmMvdXRpbHMvc3JjL21lc3NhZ2VzLnRz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8gJ1BIJyA6IGBQSF8ke2luZGV4IC0gMX1gO1xufVxuXG4vKipcbiAqIEZpbmQgdGhlIGVuZCBvZiBhIFwibWFya2VkIGJsb2NrXCIgaW5kaWNhdGVkIGJ5IHRoZSBmaXJzdCBub24tZXNjYXBlZCBjb2xvbi5cbiAqXG4gKiBAcGFyYW0gY29va2VkIFRoZSBjb29rZWQgc3RyaW5nICh3aGVyZSBlc2NhcGVkIGNoYXJzIGhhdmUgYmVlbiBwcm9jZXNzZWQpXG4gKiBAcGFyYW0gcmF3IFRoZSByYXcgc3RyaW5nICh3aGVyZSBlc2NhcGUgc2VxdWVuY2VzIGFyZSBzdGlsbCBpbiBwbGFjZSlcbiAqXG4gKiBAcmV0dXJucyB0aGUgaW5kZXggb2YgdGhlIGVuZCBvZiBibG9jayBtYXJrZXJcbiAqIEB0aHJvd3MgYW4gZXJyb3IgaWYgdGhlIGJsb2NrIGlzIHVudGVybWluYXRlZFxuICovXG5leHBvcnQgZnVuY3Rpb24gZmluZEVuZE9mQmxvY2soY29va2VkOiBzdHJpbmcsIHJhdzogc3RyaW5nKTogbnVtYmVyIHtcbiAgLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKlxuICAgKiBUaGlzIGZ1bmN0aW9uIGlzIHJlcGVhdGVkIGluIGBzcmMvbG9jYWxpemUvc3JjL2xvY2FsaXplLnRzYCBhbmQgdGhlIHR3byBzaG91bGQgYmUga2VwdCBpbiBzeW5jLlxuICAgKiAoU2VlIHRoYXQgZmlsZSBmb3IgbW9yZSBleHBsYW5hdGlvbiBvZiB3aHkuKVxuICAgKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqL1xuICBmb3IgKGxldCBjb29rZWRJbmRleCA9IDEsIHJhd0luZGV4ID0gMTsgY29va2VkSW5kZXggPCBjb29rZWQubGVuZ3RoOyBjb29rZWRJbmRleCsrLCByYXdJbmRleCsrKSB7XG4gICAgaWYgKHJhd1tyYXdJbmRleF0gPT09ICdcXFxcJykge1xuICAgICAgcmF3SW5kZXgrKztcbiAgICB9IGVsc2UgaWYgKGNvb2tlZFtjb29rZWRJbmRleF0gPT09IEJMT0NLX01BUktFUikge1xuICAgICAgcmV0dXJuIGNvb2tlZEluZGV4O1xuICAgIH1cbiAgfVxuICB0aHJvdyBuZXcgRXJyb3IoYFVudGVybWluYXRlZCAkbG9jYWxpemUgbWV0YWRhdGEgYmxvY2sgaW4gXCIke3Jhd31cIi5gKTtcbn0iXX0= |
@@ -39,6 +39,8 @@ /** | ||
// Look up the translation using the messageId, and then the legacyId if available. | ||
let translation = translations[message.messageId]; | ||
let translation = translations[message.id]; | ||
// If the messageId did not match a translation, try matching the legacy ids instead | ||
for (let i = 0; i < message.legacyIds.length && translation === undefined; i++) { | ||
translation = translations[message.legacyIds[i]]; | ||
if (message.legacyIds !== undefined) { | ||
for (let i = 0; i < message.legacyIds.length && translation === undefined; i++) { | ||
translation = translations[message.legacyIds[i]]; | ||
} | ||
} | ||
@@ -68,4 +70,4 @@ if (translation === undefined) { | ||
*/ | ||
export function parseTranslation(message) { | ||
const parts = message.split(/{\$([^}]*)}/); | ||
export function parseTranslation(messageString) { | ||
const parts = messageString.split(/{\$([^}]*)}/); | ||
const messageParts = [parts[0]]; | ||
@@ -78,3 +80,7 @@ const placeholderNames = []; | ||
const rawMessageParts = messageParts.map(part => part.charAt(0) === BLOCK_MARKER ? '\\' + part : part); | ||
return { messageParts: makeTemplateObject(messageParts, rawMessageParts), placeholderNames }; | ||
return { | ||
text: messageString, | ||
messageParts: makeTemplateObject(messageParts, rawMessageParts), | ||
placeholderNames, | ||
}; | ||
} | ||
@@ -88,3 +94,11 @@ /** | ||
export function makeParsedTranslation(messageParts, placeholderNames = []) { | ||
return { messageParts: makeTemplateObject(messageParts, messageParts), placeholderNames }; | ||
let messageString = messageParts[0]; | ||
for (let i = 0; i < placeholderNames.length - 1; i++) { | ||
messageString += `{$${placeholderNames[i]}}${messageParts[i + 1]}`; | ||
} | ||
return { | ||
text: messageString, | ||
messageParts: makeTemplateObject(messageParts, messageParts), | ||
placeholderNames | ||
}; | ||
} | ||
@@ -103,4 +117,7 @@ /** | ||
const meaningString = message.meaning && ` - "${message.meaning}"`; | ||
return `"${message.messageId}" ("${message.messageString}"${meaningString})`; | ||
const legacy = message.legacyIds && message.legacyIds.length > 0 ? | ||
` [${message.legacyIds.map(l => `"${l}"`).join(', ')}]` : | ||
''; | ||
return `"${message.id}"${legacy} ("${message.text}"${meaningString})`; | ||
} | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidHJhbnNsYXRpb25zLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vLi4vLi4vcGFja2FnZXMvbG9jYWxpemUvc3JjL3V0aWxzL3NyYy90cmFuc2xhdGlvbnMudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7Ozs7OztHQU1HO0FBQ0gsT0FBTyxFQUFDLFlBQVksRUFBQyxNQUFNLGFBQWEsQ0FBQztBQUN6QyxPQUFPLEVBQTJCLFlBQVksRUFBZ0IsTUFBTSxZQUFZLENBQUM7QUFnQmpGLE1BQU0sT0FBTyx1QkFBd0IsU0FBUSxLQUFLO0lBRWhELFlBQXFCLGFBQTRCO1FBQy9DLEtBQUssQ0FBQyw0QkFBNEIsZUFBZSxDQUFDLGFBQWEsQ0FBQyxHQUFHLENBQUMsQ0FBQztRQURsRCxrQkFBYSxHQUFiLGFBQWEsQ0FBZTtRQURoQyxTQUFJLEdBQUcseUJBQXlCLENBQUM7SUFHbEQsQ0FBQztDQUNGO0FBRUQsTUFBTSxVQUFVLHlCQUF5QixDQUFDLENBQU07SUFDOUMsT0FBTyxDQU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ICAgYCBbJHttZXNzYWdlLmxlZ2FjeUlkcy5tYXAobCA9PiBgXCIke2x9XCJgKS5qb2luKCcsICcpfV1gIDpcbiAgICAgICcnO1xuICByZXR1cm4gYFwiJHttZXNzYWdlLmlkfVwiJHtsZWdhY3l9IChcIiR7bWVzc2FnZS50ZXh0fVwiJHttZWFuaW5nU3RyaW5nfSlgO1xufSJdfQ== |
@@ -11,2 +11,2 @@ /** | ||
export { computeMsgId as ɵcomputeMsgId, findEndOfBlock as ɵfindEndOfBlock, isMissingTranslationError as ɵisMissingTranslationError, makeParsedTranslation as ɵmakeParsedTranslation, makeTemplateObject as ɵmakeTemplateObject, MissingTranslationError as ɵMissingTranslationError, parseMessage as ɵparseMessage, parseMetadata as ɵparseMetadata, parseTranslation as ɵparseTranslation, splitBlock as ɵsplitBlock, translate as ɵtranslate } from './src/utils'; | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicHJpdmF0ZS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uLy4uLy4uL3BhY2thZ2VzL2xvY2FsaXplL3ByaXZhdGUudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7Ozs7OztHQU1HO0FBRUgsa0dBQWtHO0FBQ2xHLHdCQUF3QjtBQUN4QixPQUFPLEVBQUMsWUFBWSxJQUFJLGFBQWEsRUFBRSxjQUFjLElBQUksZUFBZSxFQUFFLHlCQUF5QixJQUFJLDBCQUEwQixFQUFFLHFCQUFxQixJQUFJLHNCQUFzQixFQUFFLGtCQUFrQixJQUFJLG1CQUFtQixFQUEyQix1QkFBdUIsSUFBSSx3QkFBd0IsRUFBdUgsWUFBWSxJQUFJLGFBQWEsRUFBRSxhQUFhLElBQUksY0FBYyxFQUFFLGdCQUFnQixJQUFJLGlCQUFpQixFQUFtQyxVQUFVLElBQUksV0FBVyxFQUFtQyxTQUFTLElBQUksVUFBVSxFQ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XRhZGF0YSBhcyDJtXBhcnNlTWV0YWRhdGEsIHBhcnNlVHJhbnNsYXRpb24gYXMgybVwYXJzZVRyYW5zbGF0aW9uLCBTb3VyY2VMb2NhdGlvbiBhcyDJtVNvdXJjZUxvY2F0aW9uLCBTb3VyY2VNZXNzYWdlIGFzIMm1U291cmNlTWVzc2FnZSwgc3BsaXRCbG9jayBhcyDJtXNwbGl0QmxvY2ssIFRhcmdldE1lc3NhZ2UgYXMgybVUYXJnZXRNZXNzYWdlLCB0cmFuc2xhdGUgYXMgybV0cmFuc2xhdGV9IGZyb20gJy4vc3JjL3V0aWxzJztcbiJdfQ== |
@@ -21,3 +21,3 @@ import { __read } from "tslib"; | ||
*/ | ||
export function parseMessage(messageParts, expressions) { | ||
export function parseMessage(messageParts, expressions, location) { | ||
var substitutions = {}; | ||
@@ -38,8 +38,8 @@ var metadata = parseMetadata(messageParts[0], messageParts.raw[0]); | ||
var messageId = metadata.id || computeMsgId(messageString, metadata.meaning || ''); | ||
var legacyIds = metadata.legacyIds.filter(function (id) { return id !== messageId; }); | ||
var legacyIds = metadata.legacyIds && metadata.legacyIds.filter(function (id) { return id !== messageId; }); | ||
return { | ||
messageId: messageId, | ||
id: messageId, | ||
legacyIds: legacyIds, | ||
substitutions: substitutions, | ||
messageString: messageString, | ||
text: messageString, | ||
meaning: metadata.meaning || '', | ||
@@ -49,2 +49,3 @@ description: metadata.description || '', | ||
placeholderNames: placeholderNames, | ||
location: location, | ||
}; | ||
@@ -79,5 +80,5 @@ } | ||
export function parseMetadata(cooked, raw) { | ||
var _a = splitBlock(cooked, raw), text = _a.text, block = _a.block; | ||
var _a = splitBlock(cooked, raw), messageString = _a.text, block = _a.block; | ||
if (block === undefined) { | ||
return { text: text, meaning: undefined, description: undefined, id: undefined, legacyIds: [] }; | ||
return { text: messageString }; | ||
} | ||
@@ -95,3 +96,3 @@ else { | ||
} | ||
return { text: text, meaning: meaning, description: description, id: id, legacyIds: legacyIds }; | ||
return { text: messageString, meaning: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qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqXG4gICAqIFRoaXMgZnVuY3Rpb24gaXMgcmVwZWF0ZWQgaW4gYHNyYy9sb2NhbGl6ZS9zcmMvbG9jYWxpemUudHNgIGFuZCB0aGUgdHdvIHNob3VsZCBiZSBrZXB0IGluIHN5bmMuXG4gICAqIChTZWUgdGhhdCBmaWxlIGZvciBtb3JlIGV4cGxhbmF0aW9uIG9mIHdoeS4pXG4gICAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovXG4gIGZvciAobGV0IGNvb2tlZEluZGV4ID0gMSwgcmF3SW5kZXggPSAxOyBjb29rZWRJbmRleCA8IGNvb2tlZC5sZW5ndGg7IGNvb2tlZEluZGV4KyssIHJhd0luZGV4KyspIHtcbiAgICBpZiAocmF3W3Jhd0luZGV4XSA9PT0gJ1xcXFwnKSB7XG4gICAgICByYXdJbmRleCsrO1xuICAgIH0gZWxzZSBpZiAoY29va2VkW2Nvb2tlZEluZGV4XSA9PT0gQkxPQ0tfTUFSS0VSKSB7XG4gICAgICByZXR1cm4gY29va2VkSW5kZXg7XG4gICAgfVxuICB9XG4gIHRocm93IG5ldyBFcnJvcihgVW50ZXJtaW5hdGVkICRsb2NhbGl6ZSBtZXRhZGF0YSBibG9jayBpbiBcIiR7cmF3fVwiLmApO1xufSJdfQ== | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibWVzc2FnZXMuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi8uLi8uLi8uLi8uLi8uLi8uLi8uLi9wYWNrYWdlcy9sb2NhbGl6ZS9zcmMvdXRpbHMvc3JjL21lc3NhZ2VzLnRzIl0sIm5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od2hlcmUgZXNjYXBlIHNlcXVlbmNlcyBhcmUgc3RpbGwgaW4gcGxhY2UpXG4gKlxuICogQHJldHVybnMgdGhlIGluZGV4IG9mIHRoZSBlbmQgb2YgYmxvY2sgbWFya2VyXG4gKiBAdGhyb3dzIGFuIGVycm9yIGlmIHRoZSBibG9jayBpcyB1bnRlcm1pbmF0ZWRcbiAqL1xuZXhwb3J0IGZ1bmN0aW9uIGZpbmRFbmRPZkJsb2NrKGNvb2tlZDogc3RyaW5nLCByYXc6IHN0cmluZyk6IG51bWJlciB7XG4gIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKipcbiAgICogVGhpcyBmdW5jdGlvbiBpcyByZXBlYXRlZCBpbiBgc3JjL2xvY2FsaXplL3NyYy9sb2NhbGl6ZS50c2AgYW5kIHRoZSB0d28gc2hvdWxkIGJlIGtlcHQgaW4gc3luYy5cbiAgICogKFNlZSB0aGF0IGZpbGUgZm9yIG1vcmUgZXhwbGFuYXRpb24gb2Ygd2h5LilcbiAgICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi9cbiAgZm9yIChsZXQgY29va2VkSW5kZXggPSAxLCByYXdJbmRleCA9IDE7IGNvb2tlZEluZGV4IDwgY29va2VkLmxlbmd0aDsgY29va2VkSW5kZXgrKywgcmF3SW5kZXgrKykge1xuICAgIGlmIChyYXdbcmF3SW5kZXhdID09PSAnXFxcXCcpIHtcbiAgICAgIHJhd0luZGV4Kys7XG4gICAgfSBlbHNlIGlmIChjb29rZWRbY29va2VkSW5kZXhdID09PSBCTE9DS19NQVJLRVIpIHtcbiAgICAgIHJldHVybiBjb29rZWRJbmRleDtcbiAgICB9XG4gIH1cbiAgdGhyb3cgbmV3IEVycm9yKGBVbnRlcm1pbmF0ZWQgJGxvY2FsaXplIG1ldGFkYXRhIGJsb2NrIGluIFwiJHtyYXd9XCIuYCk7XG59Il19 |
@@ -44,6 +44,8 @@ import { __extends } from "tslib"; | ||
// Look up the translation using the messageId, and then the legacyId if available. | ||
var translation = translations[message.messageId]; | ||
var translation = translations[message.id]; | ||
// If the messageId did not match a translation, try matching the legacy ids instead | ||
for (var i = 0; i < message.legacyIds.length && translation === undefined; i++) { | ||
translation = translations[message.legacyIds[i]]; | ||
if (message.legacyIds !== undefined) { | ||
for (var i = 0; i < message.legacyIds.length && translation === undefined; i++) { | ||
translation = translations[message.legacyIds[i]]; | ||
} | ||
} | ||
@@ -73,4 +75,4 @@ if (translation === undefined) { | ||
*/ | ||
export function parseTranslation(message) { | ||
var parts = message.split(/{\$([^}]*)}/); | ||
export function parseTranslation(messageString) { | ||
var parts = messageString.split(/{\$([^}]*)}/); | ||
var messageParts = [parts[0]]; | ||
@@ -83,3 +85,7 @@ var placeholderNames = []; | ||
var rawMessageParts = messageParts.map(function (part) { return part.charAt(0) === BLOCK_MARKER ? '\\' + part : part; }); | ||
return { messageParts: makeTemplateObject(messageParts, rawMessageParts), placeholderNames: placeholderNames }; | ||
return { | ||
text: messageString, | ||
messageParts: makeTemplateObject(messageParts, rawMessageParts), | ||
placeholderNames: placeholderNames, | ||
}; | ||
} | ||
@@ -94,3 +100,11 @@ /** | ||
if (placeholderNames === void 0) { placeholderNames = []; } | ||
return { messageParts: makeTemplateObject(messageParts, messageParts), placeholderNames: placeholderNames }; | ||
var messageString = messageParts[0]; | ||
for (var i = 0; i < placeholderNames.length - 1; i++) { | ||
messageString += "{$" + placeholderNames[i] + "}" + messageParts[i + 1]; | ||
} | ||
return { | ||
text: messageString, | ||
messageParts: makeTemplateObject(messageParts, messageParts), | ||
placeholderNames: placeholderNames | ||
}; | ||
} | ||
@@ -109,4 +123,7 @@ /** | ||
var meaningString = message.meaning && " - \"" + message.meaning + "\""; | ||
return "\"" + message.messageId + "\" (\"" + message.messageString + "\"" + meaningString + ")"; | ||
var legacy = message.legacyIds && message.legacyIds.length > 0 ? | ||
" [" + message.legacyIds.map(function (l) { return "\"" + l + "\""; }).join(', ') + "]" : | ||
''; | ||
return "\"" + message.id + "\"" + legacy + " (\"" + message.text + "\"" + meaningString + ")"; | ||
} | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidHJhbnNsYXRpb25zLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vLi4vLi4vLi4vLi4vLi4vLi4vLi4vcGFja2FnZXMvbG9jYWxpemUvc3JjL3V0aWxzL3NyYy90cmFuc2xhdGlvbnMudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IjtBQUFBOzs7Ozs7R0FNRztBQUNILE9BQU8sRUFBQyxZQUFZLEVBQUMsTUFBTSxhQUFhLENBQUM7QUFDekMsT0FBTyxFQUEyQixZQUFZLEVBQWdCLE1BQU0sWUFBWSxDQUFDO0FBZ0JqRjtJQUE2QywyQ0FBSztJQUVoRCxpQ0FBcUIsYUFBNEI7UUFBakQsWUFDRSxrQkFBTSw4QkFBNEIsZUFBZSxDQUFDLGFBQWEsQ0FBQyxNQUFHLENBQUMsU0FDckU7UUFGb0IsbUJBQWEsR0FBYixhQUFhLENBQWU7UUFEaEMsVUFBSSxHQUFHLHlCQUF5QixDQUFDOztJQUdsRCxDQUFDO0lBQ0gsOEJBQUM7QUFBRCxDQUFDLEFBTEQsQ0FBNkMsS0FBSyxHQUtqRDs7QUFFRCxNQUFNLFVBQVUseUJBQXlCLENBQUMsQ0FBTTtJQUM5QyxPQUFPLENBQUMsQ0FBQyxJQUFJLEtBQUsseUJBQXlCLENBQUM7QUFDOUMsQ0FBQztBQUVEOzs7Ozs7Ozs7Ozs7Ozs7R0FlRztBQUNILE1BQU0sVUFBVSxTQUFTLENBQ3JCLFlBQStDLEVBQUUsWUFBa0MsRUFDbkYsYUFBN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WN5SWRzLmxlbmd0aCA+IDAgP1xuICAgICAgYCBbJHttZXNzYWdlLmxlZ2FjeUlkcy5tYXAobCA9PiBgXCIke2x9XCJgKS5qb2luKCcsICcpfV1gIDpcbiAgICAgICcnO1xuICByZXR1cm4gYFwiJHttZXNzYWdlLmlkfVwiJHtsZWdhY3l9IChcIiR7bWVzc2FnZS50ZXh0fVwiJHttZWFuaW5nU3RyaW5nfSlgO1xufSJdfQ== |
/** | ||
* @license Angular v10.0.0-next.3 | ||
* @license Angular v10.0.0-next.4 | ||
* (c) 2010-2020 Google LLC. https://angular.io/ | ||
@@ -4,0 +4,0 @@ * License: MIT |
/** | ||
* @license Angular v10.0.0-next.3 | ||
* @license Angular v10.0.0-next.4 | ||
* (c) 2010-2020 Google LLC. https://angular.io/ | ||
@@ -80,3 +80,3 @@ * License: MIT | ||
*/ | ||
function parseMessage(messageParts, expressions) { | ||
function parseMessage(messageParts, expressions, location) { | ||
const substitutions = {}; | ||
@@ -97,8 +97,8 @@ const metadata = parseMetadata(messageParts[0], messageParts.raw[0]); | ||
const messageId = metadata.id || computeMsgId(messageString, metadata.meaning || ''); | ||
const legacyIds = metadata.legacyIds.filter(id => id !== messageId); | ||
const legacyIds = metadata.legacyIds && metadata.legacyIds.filter(id => id !== messageId); | ||
return { | ||
messageId, | ||
id: messageId, | ||
legacyIds, | ||
substitutions, | ||
messageString, | ||
text: messageString, | ||
meaning: metadata.meaning || '', | ||
@@ -108,2 +108,3 @@ description: metadata.description || '', | ||
placeholderNames, | ||
location, | ||
}; | ||
@@ -138,5 +139,5 @@ } | ||
function parseMetadata(cooked, raw) { | ||
const { text, block } = splitBlock(cooked, raw); | ||
const { text: messageString, block } = splitBlock(cooked, raw); | ||
if (block === undefined) { | ||
return { text, meaning: undefined, description: undefined, id: undefined, legacyIds: [] }; | ||
return { text: messageString }; | ||
} | ||
@@ -154,3 +155,3 @@ else { | ||
} | ||
return { text, meaning, description, id, legacyIds }; | ||
return { text: messageString, meaning, description, id, legacyIds }; | ||
} | ||
@@ -254,6 +255,8 @@ } | ||
// Look up the translation using the messageId, and then the legacyId if available. | ||
let translation = translations[message.messageId]; | ||
let translation = translations[message.id]; | ||
// If the messageId did not match a translation, try matching the legacy ids instead | ||
for (let i = 0; i < message.legacyIds.length && translation === undefined; i++) { | ||
translation = translations[message.legacyIds[i]]; | ||
if (message.legacyIds !== undefined) { | ||
for (let i = 0; i < message.legacyIds.length && translation === undefined; i++) { | ||
translation = translations[message.legacyIds[i]]; | ||
} | ||
} | ||
@@ -283,4 +286,4 @@ if (translation === undefined) { | ||
*/ | ||
function parseTranslation(message) { | ||
const parts = message.split(/{\$([^}]*)}/); | ||
function parseTranslation(messageString) { | ||
const parts = messageString.split(/{\$([^}]*)}/); | ||
const messageParts = [parts[0]]; | ||
@@ -293,3 +296,7 @@ const placeholderNames = []; | ||
const rawMessageParts = messageParts.map(part => part.charAt(0) === BLOCK_MARKER ? '\\' + part : part); | ||
return { messageParts: makeTemplateObject(messageParts, rawMessageParts), placeholderNames }; | ||
return { | ||
text: messageString, | ||
messageParts: makeTemplateObject(messageParts, rawMessageParts), | ||
placeholderNames, | ||
}; | ||
} | ||
@@ -303,3 +310,11 @@ /** | ||
function makeParsedTranslation(messageParts, placeholderNames = []) { | ||
return { messageParts: makeTemplateObject(messageParts, messageParts), placeholderNames }; | ||
let messageString = messageParts[0]; | ||
for (let i = 0; i < placeholderNames.length - 1; i++) { | ||
messageString += `{$${placeholderNames[i]}}${messageParts[i + 1]}`; | ||
} | ||
return { | ||
text: messageString, | ||
messageParts: makeTemplateObject(messageParts, messageParts), | ||
placeholderNames | ||
}; | ||
} | ||
@@ -318,3 +333,6 @@ /** | ||
const meaningString = message.meaning && ` - "${message.meaning}"`; | ||
return `"${message.messageId}" ("${message.messageString}"${meaningString})`; | ||
const legacy = message.legacyIds && message.legacyIds.length > 0 ? | ||
` [${message.legacyIds.map(l => `"${l}"`).join(', ')}]` : | ||
''; | ||
return `"${message.id}"${legacy} ("${message.text}"${meaningString})`; | ||
} | ||
@@ -321,0 +339,0 @@ |
/** | ||
* @license Angular v10.0.0-next.3 | ||
* @license Angular v10.0.0-next.4 | ||
* (c) 2010-2020 Google LLC. https://angular.io/ | ||
@@ -4,0 +4,0 @@ * License: MIT |
/** | ||
* @license Angular v10.0.0-next.3 | ||
* @license Angular v10.0.0-next.4 | ||
* (c) 2010-2020 Google LLC. https://angular.io/ | ||
@@ -74,3 +74,3 @@ * License: MIT | ||
*/ | ||
function parseMessage(messageParts, expressions) { | ||
function parseMessage(messageParts, expressions, location) { | ||
var substitutions = {}; | ||
@@ -91,8 +91,8 @@ var metadata = parseMetadata(messageParts[0], messageParts.raw[0]); | ||
var messageId = metadata.id || computeMsgId(messageString, metadata.meaning || ''); | ||
var legacyIds = metadata.legacyIds.filter(function (id) { return id !== messageId; }); | ||
var legacyIds = metadata.legacyIds && metadata.legacyIds.filter(function (id) { return id !== messageId; }); | ||
return { | ||
messageId: messageId, | ||
id: messageId, | ||
legacyIds: legacyIds, | ||
substitutions: substitutions, | ||
messageString: messageString, | ||
text: messageString, | ||
meaning: metadata.meaning || '', | ||
@@ -102,2 +102,3 @@ description: metadata.description || '', | ||
placeholderNames: placeholderNames, | ||
location: location, | ||
}; | ||
@@ -132,5 +133,5 @@ } | ||
function parseMetadata(cooked, raw) { | ||
var _a = splitBlock(cooked, raw), text = _a.text, block = _a.block; | ||
var _a = splitBlock(cooked, raw), messageString = _a.text, block = _a.block; | ||
if (block === undefined) { | ||
return { text: text, meaning: undefined, description: undefined, id: undefined, legacyIds: [] }; | ||
return { text: messageString }; | ||
} | ||
@@ -148,3 +149,3 @@ else { | ||
} | ||
return { text: text, meaning: meaning, description: description, id: id, legacyIds: legacyIds }; | ||
return { text: messageString, meaning: meaning, description: description, id: id, legacyIds: legacyIds }; | ||
} | ||
@@ -244,6 +245,8 @@ } | ||
// Look up the translation using the messageId, and then the legacyId if available. | ||
var translation = translations[message.messageId]; | ||
var translation = translations[message.id]; | ||
// If the messageId did not match a translation, try matching the legacy ids instead | ||
for (var i = 0; i < message.legacyIds.length && translation === undefined; i++) { | ||
translation = translations[message.legacyIds[i]]; | ||
if (message.legacyIds !== undefined) { | ||
for (var i = 0; i < message.legacyIds.length && translation === undefined; i++) { | ||
translation = translations[message.legacyIds[i]]; | ||
} | ||
} | ||
@@ -273,4 +276,4 @@ if (translation === undefined) { | ||
*/ | ||
function parseTranslation(message) { | ||
var parts = message.split(/{\$([^}]*)}/); | ||
function parseTranslation(messageString) { | ||
var parts = messageString.split(/{\$([^}]*)}/); | ||
var messageParts = [parts[0]]; | ||
@@ -283,3 +286,7 @@ var placeholderNames = []; | ||
var rawMessageParts = messageParts.map(function (part) { return part.charAt(0) === BLOCK_MARKER ? '\\' + part : part; }); | ||
return { messageParts: makeTemplateObject(messageParts, rawMessageParts), placeholderNames: placeholderNames }; | ||
return { | ||
text: messageString, | ||
messageParts: makeTemplateObject(messageParts, rawMessageParts), | ||
placeholderNames: placeholderNames, | ||
}; | ||
} | ||
@@ -294,3 +301,11 @@ /** | ||
if (placeholderNames === void 0) { placeholderNames = []; } | ||
return { messageParts: makeTemplateObject(messageParts, messageParts), placeholderNames: placeholderNames }; | ||
var messageString = messageParts[0]; | ||
for (var i = 0; i < placeholderNames.length - 1; i++) { | ||
messageString += "{$" + placeholderNames[i] + "}" + messageParts[i + 1]; | ||
} | ||
return { | ||
text: messageString, | ||
messageParts: makeTemplateObject(messageParts, messageParts), | ||
placeholderNames: placeholderNames | ||
}; | ||
} | ||
@@ -309,3 +324,6 @@ /** | ||
var meaningString = message.meaning && " - \"" + message.meaning + "\""; | ||
return "\"" + message.messageId + "\" (\"" + message.messageString + "\"" + meaningString + ")"; | ||
var legacy = message.legacyIds && message.legacyIds.length > 0 ? | ||
" [" + message.legacyIds.map(function (l) { return "\"" + l + "\""; }).join(', ') + "]" : | ||
''; | ||
return "\"" + message.id + "\"" + legacy + " (\"" + message.text + "\"" + meaningString + ")"; | ||
} | ||
@@ -312,0 +330,0 @@ |
/** | ||
* @license Angular v10.0.0-next.3 | ||
* @license Angular v10.0.0-next.4 | ||
* (c) 2010-2020 Google LLC. https://angular.io/ | ||
@@ -4,0 +4,0 @@ * License: MIT |
{ | ||
"name": "@angular/localize", | ||
"version": "10.0.0-next.3", | ||
"version": "10.0.0-next.4", | ||
"description": "Angular - library for localizing messages", | ||
@@ -5,0 +5,0 @@ "main": "./bundles/localize.umd.js", |
@@ -8,2 +8,2 @@ /** | ||
*/ | ||
export { computeMsgId as ɵcomputeMsgId, findEndOfBlock as ɵfindEndOfBlock, isMissingTranslationError as ɵisMissingTranslationError, makeParsedTranslation as ɵmakeParsedTranslation, makeTemplateObject as ɵmakeTemplateObject, MessageId as ɵMessageId, MissingTranslationError as ɵMissingTranslationError, ParsedMessage as ɵParsedMessage, ParsedTranslation as ɵParsedTranslation, ParsedTranslations as ɵParsedTranslations, parseMessage as ɵparseMessage, parseMetadata as ɵparseMetadata, parseTranslation as ɵparseTranslation, SourceMessage as ɵSourceMessage, splitBlock as ɵsplitBlock, TargetMessage as ɵTargetMessage, translate as ɵtranslate } from './src/utils'; | ||
export { computeMsgId as ɵcomputeMsgId, findEndOfBlock as ɵfindEndOfBlock, isMissingTranslationError as ɵisMissingTranslationError, makeParsedTranslation as ɵmakeParsedTranslation, makeTemplateObject as ɵmakeTemplateObject, MessageId as ɵMessageId, MissingTranslationError as ɵMissingTranslationError, ParsedMessage as ɵParsedMessage, ParsedTranslation as ɵParsedTranslation, ParsedTranslations as ɵParsedTranslations, parseMessage as ɵparseMessage, parseMetadata as ɵparseMetadata, parseTranslation as ɵparseTranslation, SourceLocation as ɵSourceLocation, SourceMessage as ɵSourceMessage, splitBlock as ɵsplitBlock, TargetMessage as ɵTargetMessage, translate as ɵtranslate } from './src/utils'; |
#!/usr/bin/env node | ||
/// <amd-module name="@angular/localize/src/tools/src/translate/main" /> | ||
import { Diagnostics } from '../diagnostics'; | ||
import { MissingTranslationStrategy } from '../source_file_utils'; | ||
import { OutputPathFn } from './output_path'; | ||
import { MissingTranslationStrategy } from './source_files/source_file_utils'; | ||
import { Diagnostics } from '../diagnostics'; | ||
export interface TranslateFilesOptions { | ||
@@ -7,0 +7,0 @@ /** |
@@ -8,3 +8,3 @@ #!/usr/bin/env node | ||
else if (typeof define === "function" && define.amd) { | ||
define("@angular/localize/src/tools/src/translate/main", ["require", "exports", "glob", "path", "yargs", "@angular/localize/src/tools/src/translate/asset_files/asset_translation_handler", "@angular/localize/src/tools/src/translate/output_path", "@angular/localize/src/tools/src/translate/source_files/source_file_translation_handler", "@angular/localize/src/tools/src/translate/translation_files/translation_loader", "@angular/localize/src/tools/src/translate/translation_files/translation_parsers/simple_json_translation_parser", "@angular/localize/src/tools/src/translate/translation_files/translation_parsers/xliff1_translation_parser", "@angular/localize/src/tools/src/translate/translation_files/translation_parsers/xliff2_translation_parser", "@angular/localize/src/tools/src/translate/translation_files/translation_parsers/xtb_translation_parser", "@angular/localize/src/tools/src/translate/translator", "@angular/localize/src/tools/src/diagnostics"], factory); | ||
define("@angular/localize/src/tools/src/translate/main", ["require", "exports", "glob", "path", "yargs", "@angular/localize/src/tools/src/diagnostics", "@angular/localize/src/tools/src/translate/asset_files/asset_translation_handler", "@angular/localize/src/tools/src/translate/output_path", "@angular/localize/src/tools/src/translate/source_files/source_file_translation_handler", "@angular/localize/src/tools/src/translate/translation_files/translation_loader", "@angular/localize/src/tools/src/translate/translation_files/translation_parsers/simple_json_translation_parser", "@angular/localize/src/tools/src/translate/translation_files/translation_parsers/xliff1_translation_parser", "@angular/localize/src/tools/src/translate/translation_files/translation_parsers/xliff2_translation_parser", "@angular/localize/src/tools/src/translate/translation_files/translation_parsers/xtb_translation_parser", "@angular/localize/src/tools/src/translate/translator"], factory); | ||
} | ||
@@ -24,2 +24,3 @@ })(function (require, exports) { | ||
var yargs = require("yargs"); | ||
var diagnostics_1 = require("@angular/localize/src/tools/src/diagnostics"); | ||
var asset_translation_handler_1 = require("@angular/localize/src/tools/src/translate/asset_files/asset_translation_handler"); | ||
@@ -34,3 +35,2 @@ var output_path_1 = require("@angular/localize/src/tools/src/translate/output_path"); | ||
var translator_1 = require("@angular/localize/src/tools/src/translate/translator"); | ||
var diagnostics_1 = require("@angular/localize/src/tools/src/diagnostics"); | ||
if (require.main === module) { | ||
@@ -118,2 +118,2 @@ var args = process.argv.slice(2); | ||
}); | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibWFpbi5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uLy4uLy4uLy4uL3BhY2thZ2VzL2xvY2FsaXplL3NyYy90b29scy9zcmMvdHJhbnNsYXRlL21haW4udHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7Ozs7Ozs7O0lBQ0E7Ozs7OztPQU1HO0lBQ0gsMkJBQTZCO0lBQzdCLDZCQUE2QjtJQUM3Qiw2QkFBK0I7SUFFL0IsNkhBQWdGO0lBQ2hGLHFGQUE0RDtJQUM1RCwwSUFBNEY7SUFFNUYscUhBQXlFO0lBQ3pFLGlLQUFtSDtJQUNuSCx1SkFBMEc7SUFDMUcsdUpBQTBHO0lBQzFHLGlKQUFvRztJQUNwRyxtRkFBd0M7SUFDeEMsMkVBQTJDO0lBRTNDLElBQUksT0FBTyxDQUFDLElBQUksS0FBSyxNQUFNLEVBQUU7UUFDM0IsSUFBTSxJQUFJLEdBQUcsT0FBTyxDQUFDLElBQUksQ0FBQyxLQUFLLENBQUMsQ0FBQyxDQUFDLENBQUM7UUFDbkMsSUFBTSxPQUFPLEdBQ1QsS0FBSzthQUNBLE1BQU0sQ0FBQyxHQUFHLEVBQUU7WUFDWCxLQUFLLEVBQUUsTUFBTTtZQUNiLFFBQVEsRUFBRSxJQUFJO1lBQ2QsUUFBUSxFQUNKLHdIQUF3SDtTQUM3SCxDQUFDO2FBQ0QsTUFBTSxDQUFDLEdBQUcsRUFBRTtZQUNYLEtBQUssR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NzKTtcblxuICBjb25zdCByZXNvdXJjZVByb2Nlc3NvciA9IG5ldyBUcmFuc2xhdG9yKFxuICAgICAgW1xuICAgICAgICBuZXcgU291cmNlRmlsZVRyYW5zbGF0aW9uSGFuZGxlcih7bWlzc2luZ1RyYW5zbGF0aW9ufSksXG4gICAgICAgIG5ldyBBc3NldFRyYW5zbGF0aW9uSGFuZGxlcigpLFxuICAgICAgXSxcbiAgICAgIGRpYWdub3N0aWNzKTtcblxuICBjb25zdCB0cmFuc2xhdGlvbnMgPSB0cmFuc2xhdGlvbkxvYWRlci5sb2FkQnVuZGxlcyh0cmFuc2xhdGlvbkZpbGVQYXRocywgdHJhbnNsYXRpb25GaWxlTG9jYWxlcyk7XG4gIHNvdXJjZVJvb3RQYXRoID0gcmVzb2x2ZShzb3VyY2VSb290UGF0aCk7XG4gIHJlc291cmNlUHJvY2Vzc29yLnRyYW5zbGF0ZUZpbGVzKFxuICAgICAgc291cmNlRmlsZVBhdGhzLCBzb3VyY2VSb290UGF0aCwgb3V0cHV0UGF0aEZuLCB0cmFuc2xhdGlvbnMsIHNvdXJjZUxvY2FsZSk7XG59XG4iXX0= |
@@ -12,3 +12,3 @@ /// <amd-module name="@angular/localize/src/tools/src/translate/source_files/es2015_translate_plugin" /> | ||
import { Diagnostics } from '../../diagnostics'; | ||
import { TranslatePluginOptions } from './source_file_utils'; | ||
import { TranslatePluginOptions } from '../../source_file_utils'; | ||
export declare function makeEs2015TranslatePlugin(diagnostics: Diagnostics, translations: Record<string, ɵParsedTranslation>, { missingTranslation, localizeName }?: TranslatePluginOptions): PluginObj; |
@@ -7,3 +7,3 @@ (function (factory) { | ||
else if (typeof define === "function" && define.amd) { | ||
define("@angular/localize/src/tools/src/translate/source_files/es2015_translate_plugin", ["require", "exports", "@angular/localize/src/tools/src/translate/source_files/source_file_utils"], factory); | ||
define("@angular/localize/src/tools/src/translate/source_files/es2015_translate_plugin", ["require", "exports", "@angular/localize/src/tools/src/source_file_utils"], factory); | ||
} | ||
@@ -13,3 +13,3 @@ })(function (require, exports) { | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
var source_file_utils_1 = require("@angular/localize/src/tools/src/translate/source_files/source_file_utils"); | ||
var source_file_utils_1 = require("@angular/localize/src/tools/src/source_file_utils"); | ||
function makeEs2015TranslatePlugin(diagnostics, translations, _a) { | ||
@@ -42,2 +42,2 @@ var _b = _a === void 0 ? {} : _a, _c = _b.missingTranslation, missingTranslation = _c === void 0 ? 'error' : _c, _d = _b.localizeName, localizeName = _d === void 0 ? '$localize' : _d; | ||
}); | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZXMyMDE1X3RyYW5zbGF0ZV9wbHVnaW4uanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi8uLi8uLi8uLi8uLi9wYWNrYWdlcy9sb2NhbGl6ZS9zcmMvdG9vbHMvc3JjL3RyYW5zbGF0ZS9zb3VyY2VfZmlsZXMvZXMyMDE1X3RyYW5zbGF0ZV9wbHVnaW4udHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7Ozs7Ozs7SUFhQSw4R0FBMkw7SUFFM0wsU0FBZ0IseUJBQXlCLENBQ3JDLFdBQXdCLEVBQUUsWUFBZ0QsRUFDMUUsRUFBdUY7WUFBdkYsNEJBQXVGLEVBQXRGLDBCQUE0QixFQUE1QixpREFBNEIsRUFBRSxvQkFBMEIsRUFBMUIsK0NBQTBCO1FBRTNELE9BQU87WUFDTCxPQUFPLEVBQUU7Z0JBQ1Asd0JBQXdCLEVBQXhCLFVBQXlCLElBQXdDO29CQUMvRCxJQUFJO3dCQUNGLElBQU0sR0FBRyxHQUFHLElBQUksQ0FBQyxHQUFHLENBQUMsS0FBSyxDQUFDLENBQUM7d0JBQzVCLElBQUksOEJBQVUsQ0FBQyxHQUFHLEVBQUUsWUFBWSxDQUFDLEVBQUU7NEJBQ2pDLElBQU0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ICAgICBwYXRoLnJlcGxhY2VXaXRoKGJ1aWxkTG9jYWxpemVSZXBsYWNlbWVudCh0cmFuc2xhdGVkWzBdLCB0cmFuc2xhdGVkWzFdKSk7XG4gICAgICAgICAgfVxuICAgICAgICB9IGNhdGNoIChlKSB7XG4gICAgICAgICAgaWYgKGlzQmFiZWxQYXJzZUVycm9yKGUpKSB7XG4gICAgICAgICAgICAvLyBJZiB3ZSBnZXQgYSBCYWJlbFBhcnNlRXJyb3IgaGVyZSB0aGVuIHNvbWV0aGluZyB3ZW50IHdyb25nIHdpdGggQmFiZWwgaXRzZWxmXG4gICAgICAgICAgICAvLyBzaW5jZSB0aGVyZSBtdXN0IGJlIHNvbWV0aGluZyB3cm9uZyB3aXRoIHRoZSBzdHJ1Y3R1cmUgb2YgdGhlIEFTVCBnZW5lcmF0ZWRcbiAgICAgICAgICAgIC8vIGJ5IEJhYmVsIHBhcnNpbmcgYSBUYWdnZWRUZW1wbGF0ZUV4cHJlc3Npb24uXG4gICAgICAgICAgICB0aHJvdyBidWlsZENvZGVGcmFtZUVycm9yKHBhdGgsIGUpO1xuICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgICAgfVxuICAgIH1cbiAgfTtcbn1cbiJdfQ== |
@@ -12,3 +12,3 @@ /// <amd-module name="@angular/localize/src/tools/src/translate/source_files/es5_translate_plugin" /> | ||
import { Diagnostics } from '../../diagnostics'; | ||
import { TranslatePluginOptions } from './source_file_utils'; | ||
import { TranslatePluginOptions } from '../../source_file_utils'; | ||
export declare function makeEs5TranslatePlugin(diagnostics: Diagnostics, translations: Record<string, ɵParsedTranslation>, { missingTranslation, localizeName }?: TranslatePluginOptions): PluginObj; |
@@ -7,3 +7,3 @@ (function (factory) { | ||
else if (typeof define === "function" && define.amd) { | ||
define("@angular/localize/src/tools/src/translate/source_files/es5_translate_plugin", ["require", "exports", "@angular/localize/src/tools/src/translate/source_files/source_file_utils"], factory); | ||
define("@angular/localize/src/tools/src/translate/source_files/es5_translate_plugin", ["require", "exports", "@angular/localize/src/tools/src/source_file_utils"], factory); | ||
} | ||
@@ -13,3 +13,3 @@ })(function (require, exports) { | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
var source_file_utils_1 = require("@angular/localize/src/tools/src/translate/source_files/source_file_utils"); | ||
var source_file_utils_1 = require("@angular/localize/src/tools/src/source_file_utils"); | ||
function makeEs5TranslatePlugin(diagnostics, translations, _a) { | ||
@@ -40,2 +40,2 @@ var _b = _a === void 0 ? {} : _a, _c = _b.missingTranslation, missingTranslation = _c === void 0 ? 'error' : _c, _d = _b.localizeName, localizeName = _d === void 0 ? '$localize' : _d; | ||
}); | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZXM1X3RyYW5zbGF0ZV9wbHVnaW4uanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi8uLi8uLi8uLi8uLi9wYWNrYWdlcy9sb2NhbGl6ZS9zcmMvdG9vbHMvc3JjL3RyYW5zbGF0ZS9zb3VyY2VfZmlsZXMvZXM1X3RyYW5zbGF0ZV9wbHVnaW4udHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7Ozs7Ozs7SUFhQSw4R0FBNk47SUFFN04sU0FBZ0Isc0JBQXNCLENBQ2xDLFdBQXdCLEVBQUUsWUFBZ0QsRUFDMUUsRUFBdUY7WUFBdkYsNEJBQXVGLEVBQXRGLDBCQUE0QixFQUE1QixpREFBNEIsRUFBRSxvQkFBMEIsRUFBMUIsK0NBQTBCO1FBRTNELE9BQU87WUFDTCxPQUFPLEVBQUU7Z0JBQ1AsY0FBYyxFQUFkLFVBQWUsUUFBa0M7b0JBQy9DLElBQUk7d0JBQ0YsSUFBTSxVQUFVLEdBQUcsUUFBUSxDQUFDLEdBQUcsQ0FBQyxRQUFRLENBQUMsQ0FBQzt3QkFDMUMsSUFBSSw4QkFBVSxDQUFDLFVBQVUsRUFBRSxZQU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9XG4gICAgICAgIH0gY2F0Y2ggKGUpIHtcbiAgICAgICAgICBpZiAoaXNCYWJlbFBhcnNlRXJyb3IoZSkpIHtcbiAgICAgICAgICAgIGRpYWdub3N0aWNzLmVycm9yKGJ1aWxkQ29kZUZyYW1lRXJyb3IoY2FsbFBhdGgsIGUpKTtcbiAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICAgIH1cbiAgICB9XG4gIH07XG59XG4iXX0= |
@@ -10,3 +10,3 @@ /// <amd-module name="@angular/localize/src/tools/src/translate/source_files/locale_plugin" /> | ||
import { PluginObj } from '@babel/core'; | ||
import { TranslatePluginOptions } from './source_file_utils'; | ||
import { TranslatePluginOptions } from '../../source_file_utils'; | ||
/** | ||
@@ -13,0 +13,0 @@ * This Babel plugin will replace the following code forms with a string literal containing the |
@@ -7,3 +7,3 @@ (function (factory) { | ||
else if (typeof define === "function" && define.amd) { | ||
define("@angular/localize/src/tools/src/translate/source_files/locale_plugin", ["require", "exports", "@babel/types", "@angular/localize/src/tools/src/translate/source_files/source_file_utils"], factory); | ||
define("@angular/localize/src/tools/src/translate/source_files/locale_plugin", ["require", "exports", "@babel/types", "@angular/localize/src/tools/src/source_file_utils"], factory); | ||
} | ||
@@ -14,3 +14,3 @@ })(function (require, exports) { | ||
var types_1 = require("@babel/types"); | ||
var source_file_utils_1 = require("@angular/localize/src/tools/src/translate/source_files/source_file_utils"); | ||
var source_file_utils_1 = require("@angular/localize/src/tools/src/source_file_utils"); | ||
/** | ||
@@ -95,2 +95,2 @@ * This Babel plugin will replace the following code forms with a string literal containing the | ||
}); | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibG9jYWxlX3BsdWdpbi5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uLy4uLy4uLy4uLy4uL3BhY2thZ2VzL2xvY2FsaXplL3NyYy90b29scy9zcmMvdHJhbnNsYXRlL3NvdXJjZV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2tcbiAqIEBwYXJhbSBsb2NhbGl6ZU5hbWUgdGhlIG5hbWUgb2YgdGhlIGAkbG9jYWxpemVgIHN5bWJvbFxuICovXG5mdW5jdGlvbiBpc0xvY2FsaXplR3VhcmQoZXhwcmVzc2lvbjogTm9kZVBhdGgsIGxvY2FsaXplTmFtZTogc3RyaW5nKTogYm9vbGVhbiB7XG4gIGlmICghZXhwcmVzc2lvbi5pc0JpbmFyeUV4cHJlc3Npb24oKSB8fFxuICAgICAgIShleHByZXNzaW9uLm5vZGUub3BlcmF0b3IgPT09ICchPT0nIHx8IGV4cHJlc3Npb24ubm9kZS5vcGVyYXRvciA9PT0gJyE9JykpIHtcbiAgICByZXR1cm4gZmFsc2U7XG4gIH1cbiAgY29uc3QgbGVmdCA9IGV4cHJlc3Npb24uZ2V0KCdsZWZ0Jyk7XG4gIGNvbnN0IHJpZ2h0ID0gZXhwcmVzc2lvbi5nZXQoJ3JpZ2h0Jyk7XG5cbiAgcmV0dXJuIChsZWZ0LmlzVW5hcnlFeHByZXNzaW9uKHtvcGVyYXRvcjogJ3R5cGVvZid9KSAmJlxuICAgICAgICAgIGlzTG9jYWxpemUobGVmdC5nZXQoJ2FyZ3VtZW50JyksIGxvY2FsaXplTmFtZSkgJiZcbiAgICAgICAgICByaWdodC5pc1N0cmluZ0xpdGVyYWwoe3ZhbHVlOiAndW5kZWZpbmVkJ30pKSB8fFxuICAgICAgKHJpZ2h0LmlzVW5hcnlFeHByZXNzaW9uKHtvcGVyYXRvcjogJ3R5cGVvZid9KSAmJlxuICAgICAgIGlzTG9jYWxpemUocmlnaHQuZ2V0KCdhcmd1bWVudCcpLCBsb2NhbGl6ZU5hbWUpICYmXG4gICAgICAgbGVmdC5pc1N0cmluZ0xpdGVyYWwoe3ZhbHVlOiAndW5kZWZpbmVkJ30pKTtcbn1cbiJdfQ== |
/// <amd-module name="@angular/localize/src/tools/src/translate/source_files/source_file_translation_handler" /> | ||
import { Diagnostics } from '../../diagnostics'; | ||
import { TranslatePluginOptions } from '../../source_file_utils'; | ||
import { OutputPathFn } from '../output_path'; | ||
import { TranslationBundle, TranslationHandler } from '../translator'; | ||
import { TranslatePluginOptions } from './source_file_utils'; | ||
/** | ||
@@ -7,0 +7,0 @@ * Translate a file by inlining all messages tagged by `$localize` with the appropriate translated |
@@ -112,2 +112,2 @@ (function (factory) { | ||
}); | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic291cmNlX2ZpbGVfdHJhbnNsYXRpb25faGFuZGxlci5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uLy4uLy4uLy4uLy4uL3BhY2thZ2VzL2xvY2FsaXplL3NyYy90b29scy9zcmMvdHJhbnNsYXRlL3NvdXJjZV9maWxlcy9zb3VyY2VfZmlsZV90cmFuc2xhdGlvbl9oYW5kbGVyLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7Ozs7Ozs7Ozs7OztJQUFBOzs7Ozs7T0FNRztJQUNILG9DQUE0RDtJQUU1RCw2QkFBbUM7SUFFbkMseUVBQTJDO0lBRzNDLDBIQUFvRTtJQUNwRSxvSEFBOEQ7SUFDOUQsc0dBQWlEO0lBR2pEOzs7T0FHRztJQUNIO1FBR0Usc0NBQW9CLGtCQUErQztZQUEvQyxtQ0FBQSxFQUFBLHVCQUErQztZQUEvQyx1QkFBa0IsR0FBbEIsa0JBQWtCLENBQTZCO1lBRjNELHdCQUFtQix5Q0FDTSxJQUFJLENBQUMsa0JBQWtCLEtBQUUsa0JBQWtCLEVBQUUsUUFBUSxJQUFFO1FBQ2xCLENBQUM7UUFFdkUsbURBQVksR0FBWixVQUFhLGdCQUF3QixFQUFFLFNBQWlCO1lBQ3RELE9BQU8sY0FBTyxDQUFDLGdCQUFnQixDQUFDLEtBQUssS0FBSyxDQUFDO1FBQzdDLENBQUM7UUFFRCxnREFBUyxHQUFULFVBQ0ksV0FBd0IsRUFBR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YWtlRXM1VHJhbnNsYXRlUGx1Z2luKGRpYWdub3N0aWNzLCB0cmFuc2xhdGlvbkJ1bmRsZS50cmFuc2xhdGlvbnMsIG9wdGlvbnMpLFxuICAgICAgXSxcbiAgICAgIGZpbGVuYW1lLFxuICAgIH0pO1xuICAgIGlmICh0cmFuc2xhdGVkICYmIHRyYW5zbGF0ZWQuY29kZSkge1xuICAgICAgRmlsZVV0aWxzLndyaXRlRmlsZShvdXRwdXRQYXRoRm4odHJhbnNsYXRpb25CdW5kbGUubG9jYWxlLCBmaWxlbmFtZSksIHRyYW5zbGF0ZWQuY29kZSk7XG4gICAgfSBlbHNlIHtcbiAgICAgIGRpYWdub3N0aWNzLmVycm9yKGBVbmFibGUgdG8gdHJhbnNsYXRlIHNvdXJjZSBmaWxlOiAke2pvaW4oc291cmNlUm9vdCwgZmlsZW5hbWUpfWApO1xuICAgICAgcmV0dXJuO1xuICAgIH1cbiAgfVxufVxuIl19 |
@@ -22,2 +22,1 @@ /** | ||
} | ||
export declare function stripInterpolationMarkers(interpolation: string): string; |
@@ -19,7 +19,3 @@ /** | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
function stripInterpolationMarkers(interpolation) { | ||
return interpolation.replace(/^\{\{/, '').replace(/}}$/, ''); | ||
} | ||
exports.stripInterpolationMarkers = stripInterpolationMarkers; | ||
}); | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibWVzc2FnZV9yZW5kZXJlci5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uLy4uLy4uLy4uLy4uLy4uL3BhY2thZ2VzL2xvY2FsaXplL3NyYy90b29scy9zcmMvdHJhbnNsYXRlL3RyYW5zbGF0aW9uX2ZpbGVzL21lc3NhZ2Vfc2VyaWFsaXphdGlvbi9tZXNzYWdlX3JlbmRlcmVyLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBOz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1bmRlZmluZWQpOiB2b2lkO1xuICBzdGFydFBsYWNlaG9sZGVyKG5hbWU6IHN0cmluZyk6IHZvaWQ7XG4gIGNsb3NlUGxhY2Vob2xkZXIobmFtZTogc3RyaW5nKTogdm9pZDtcbiAgc3RhcnRDb250YWluZXIoKTogdm9pZDtcbiAgY2xvc2VDb250YWluZXIoKTogdm9pZDtcbiAgc3RhcnRJY3UoKTogdm9pZDtcbiAgZW5kSWN1KCk6IHZvaWQ7XG59XG4iXX0= |
@@ -16,5 +16,5 @@ /// <amd-module name="@angular/localize/src/tools/src/translate/translation_files/translation_parsers/simple_json_translation_parser" /> | ||
*/ | ||
export declare class SimpleJsonTranslationParser implements TranslationParser { | ||
canParse(filePath: string, _contents: string): boolean; | ||
parse(_filePath: string, contents: string): ParsedTranslationBundle; | ||
export declare class SimpleJsonTranslationParser implements TranslationParser<Object> { | ||
canParse(filePath: string, contents: string): Object | false; | ||
parse(_filePath: string, contents: string, json?: Object): ParsedTranslationBundle; | ||
} |
@@ -38,7 +38,16 @@ (function (factory) { | ||
} | ||
SimpleJsonTranslationParser.prototype.canParse = function (filePath, _contents) { | ||
return (path_1.extname(filePath) === '.json'); | ||
SimpleJsonTranslationParser.prototype.canParse = function (filePath, contents) { | ||
if (path_1.extname(filePath) !== '.json') { | ||
return false; | ||
} | ||
try { | ||
var json = JSON.parse(contents); | ||
return (typeof json.locale === 'string' && typeof json.translations === 'object') && json; | ||
} | ||
catch (_a) { | ||
return false; | ||
} | ||
}; | ||
SimpleJsonTranslationParser.prototype.parse = function (_filePath, contents) { | ||
var _a = JSON.parse(contents), parsedLocale = _a.locale, translations = _a.translations; | ||
SimpleJsonTranslationParser.prototype.parse = function (_filePath, contents, json) { | ||
var _a = json || JSON.parse(contents), parsedLocale = _a.locale, translations = _a.translations; | ||
var parsedTranslations = {}; | ||
@@ -55,2 +64,2 @@ for (var messageId in translations) { | ||
}); | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaW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ciAoY29uc3QgbWVzc2FnZUlkIGluIHRyYW5zbGF0aW9ucykge1xuICAgICAgY29uc3QgdGFyZ2V0TWVzc2FnZSA9IHRyYW5zbGF0aW9uc1ttZXNzYWdlSWRdO1xuICAgICAgcGFyc2VkVHJhbnNsYXRpb25zW21lc3NhZ2VJZF0gPSDJtXBhcnNlVHJhbnNsYXRpb24odGFyZ2V0TWVzc2FnZSk7XG4gICAgfVxuICAgIHJldHVybiB7bG9jYWxlOiBwYXJzZWRMb2NhbGUsIHRyYW5zbGF0aW9uczogcGFyc2VkVHJhbnNsYXRpb25zLCBkaWFnbm9zdGljczogbmV3IERpYWdub3N0aWNzKCl9O1xuICB9XG59XG4iXX0= |
@@ -27,2 +27,52 @@ /** | ||
/** | ||
* The location of the message | ||
*/ | ||
export interface SourceLocation { | ||
start: { | ||
line: number; | ||
column: number; | ||
}; | ||
end: { | ||
line: number; | ||
column: number; | ||
}; | ||
file: string; | ||
} | ||
/** | ||
* Additional information that can be associated with a message. | ||
*/ | ||
export interface MessageMetadata { | ||
/** | ||
* A human readable rendering of the message | ||
*/ | ||
text: string; | ||
/** | ||
* A unique identifier for this message. | ||
*/ | ||
id?: MessageId; | ||
/** | ||
* Legacy message ids, if provided. | ||
* | ||
* In legacy message formats the message id can only be computed directly from the original | ||
* template source. | ||
* | ||
* Since this information is not available in `$localize` calls, the legacy message ids may be | ||
* attached by the compiler to the `$localize` metablock so it can be used if needed at the point | ||
* of translation if the translations are encoded using the legacy message id. | ||
*/ | ||
legacyIds?: string[]; | ||
/** | ||
* The meaning of the `message`, used to distinguish identical `messageString`s. | ||
*/ | ||
meaning?: string; | ||
/** | ||
* The description of the `message`, used to aid translation. | ||
*/ | ||
description?: string; | ||
/** | ||
* The location of the message in the source. | ||
*/ | ||
location?: SourceLocation; | ||
} | ||
/** | ||
* Information parsed from a `$localize` tagged string that is used to translate it. | ||
@@ -41,3 +91,3 @@ * | ||
* { | ||
* messageId: '6998194507597730591', | ||
* id: '6998194507597730591', | ||
* substitutions: { title: 'Jo Bloggs' }, | ||
@@ -48,18 +98,9 @@ * messageString: 'Hello {$title}!', | ||
*/ | ||
export interface ParsedMessage { | ||
export interface ParsedMessage extends MessageMetadata { | ||
/** | ||
* The key used to look up the appropriate translation target. | ||
*/ | ||
messageId: MessageId; | ||
/** | ||
* Legacy message ids, if provided. | ||
* | ||
* In legacy message formats the message id can only be computed directly from the original | ||
* template source. | ||
* | ||
* Since this information is not available in `$localize` calls, the legacy message ids may be | ||
* attached by the compiler to the `$localize` metablock so it can be used if needed at the point | ||
* of translation if the translations are encoded using the legacy message id. | ||
* In `ParsedMessage` this is a required field, whereas it is optional in `MessageMetadata`. | ||
*/ | ||
legacyIds: MessageId[]; | ||
id: MessageId; | ||
/** | ||
@@ -70,14 +111,2 @@ * A mapping of placeholder names to substitution values. | ||
/** | ||
* A human readable rendering of the message | ||
*/ | ||
messageString: string; | ||
/** | ||
* The meaning of the `message`, used to distinguish identical `messageString`s. | ||
*/ | ||
meaning: string; | ||
/** | ||
* The description of the `message`, used to aid translation. | ||
*/ | ||
description: string; | ||
/** | ||
* The static parts of the message. | ||
@@ -96,10 +125,3 @@ */ | ||
*/ | ||
export declare function parseMessage(messageParts: TemplateStringsArray, expressions?: readonly any[]): ParsedMessage; | ||
export interface MessageMetadata { | ||
text: string; | ||
meaning: string | undefined; | ||
description: string | undefined; | ||
id: string | undefined; | ||
legacyIds: string[]; | ||
} | ||
export declare function parseMessage(messageParts: TemplateStringsArray, expressions?: readonly any[], location?: SourceLocation): ParsedMessage; | ||
/** | ||
@@ -106,0 +128,0 @@ * Parse the given message part (`cooked` + `raw`) to extract the message metadata from the text. |
@@ -1,6 +0,6 @@ | ||
import { MessageId, ParsedMessage, TargetMessage } from './messages'; | ||
import { MessageId, MessageMetadata, ParsedMessage, TargetMessage } from './messages'; | ||
/** | ||
* A translation message that has been processed to extract the message parts and placeholders. | ||
*/ | ||
export interface ParsedTranslation { | ||
export interface ParsedTranslation extends MessageMetadata { | ||
messageParts: TemplateStringsArray; | ||
@@ -44,3 +44,3 @@ placeholderNames: string[]; | ||
*/ | ||
export declare function parseTranslation(message: TargetMessage): ParsedTranslation; | ||
export declare function parseTranslation(messageString: TargetMessage): ParsedTranslation; | ||
/** | ||
@@ -47,0 +47,0 @@ * Create a `ParsedTranslation` from a set of `messageParts` and `placeholderNames`. |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
821948
6859