dist/index.js.map in i18n_screwdriver-10.7.2 vs dist/index.js.map in i18n_screwdriver-12.0.0
- old
+ new
@@ -1 +1 @@
-{"version":3,"file":"index.js","sources":["../package/src/index.js"],"sourcesContent":["import md5 from \"md5\";\n\nfunction onMissingTranslation(I18n, md5, message) {\n return `translation missing: ${I18n.locale}.${message}`;\n}\n\nconst interpolate = (message, data) =>\n message.replace(/%{([^{}]*)}/g, (a, b) => data[b]);\n\nexport default function configure(I18n) {\n I18n.screw = function screw(message, data) {\n const hash = md5(message);\n let translation = I18n.translations[I18n.locale]?.[hash];\n if (typeof translation === \"undefined\") {\n translation = onMissingTranslation(I18n, hash, message);\n }\n return interpolate(translation, data);\n };\n}\n"],"names":["I18n","screw","message","data","hash","md5","translation","translations","locale","_I18n$translations$I","onMissingTranslation","replace","a","b","interpolate"],"mappings":"kGASkCA,GAChCA,EAAKC,MAAQ,SAAeC,EAASC,SAC7BC,EAAOC,EAAIH,GACbI,YAAcN,EAAKO,aAAaP,EAAKQ,4BAAvBC,EAAiCL,GAInD,YAH2B,IAAhBE,IACTA,EAZN,SAA8BN,EAAMK,EAAKH,GACvC,8BAA+BF,EAAKQ,WAAUN,EAW5BQ,CAAqBV,EAAMI,EAAMF,IARjC,SAACA,EAASC,UAC5BD,EAAQS,QAAQ,eAAgB,SAACC,EAAGC,UAAMV,EAAKU,KAStCC,CAAYR,EAAaH"}
+{"version":3,"file":"index.js","sources":["../package/src/index.js"],"sourcesContent":["import md5 from \"md5\";\n\nfunction onMissingTranslation(I18n, md5, message) {\n return `translation missing: ${I18n.locale}.${message}`;\n}\n\nconst interpolate = (message, data) =>\n message.replace(/%{([^{}]*)}/g, (a, b) => data[b]);\n\nexport default function configure(I18n) {\n I18n.screw = function screw(message, data) {\n const hash = md5(message);\n let translation = I18n.translations[I18n.locale]?.[hash];\n if (typeof translation === \"undefined\") {\n translation = onMissingTranslation(I18n, hash, message);\n }\n\n const [context, phrase] = translation.split(\"|\");\n return interpolate(phrase ?? context ?? \"\", data);\n };\n}\n"],"names":["I18n","screw","message","data","hash","md5","translation","translations","locale","_I18n$translations$I","onMissingTranslation","split","phrase","replace","a","b","interpolate"],"mappings":"kGASkCA,GAChCA,EAAKC,MAAQ,SAAeC,EAASC,WAC7BC,EAAOC,EAAIH,GACbI,YAAcN,EAAKO,aAAaP,EAAKQ,4BAAvBC,EAAiCL,QACxB,IAAhBE,IACTA,EAZN,SAA8BN,EAAMK,EAAKH,GACvC,8BAA+BF,EAAKQ,WAAUN,EAW5BQ,CAAqBV,EAAMI,EAAMF,IAJR,MAOfI,EAAYK,MAAM,KAA5BC,OAChB,OAZgB,SAACV,EAASC,UAC5BD,EAAQW,QAAQ,eAAgB,SAACC,EAAGC,UAAMZ,EAAKY,KAWtCC,gBAAYJ,EAAAA,UAAqB,GAAIT"}
\ No newline at end of file