{"_id":"@cloarec/transloco-mf2","_rev":"4-f9a866b439b8ff4de14dcb55ade2b3a8","name":"@cloarec/transloco-mf2","dist-tags":{"latest":"0.0.4"},"versions":{"0.0.1":{"name":"@cloarec/transloco-mf2","version":"0.0.1","_id":"@cloarec/transloco-mf2@0.0.1","maintainers":[{"name":"lucascloarec","email":"lucas.cloarec@gmail.com"}],"dist":{"shasum":"09c3af843a28b715bc9d1835055eb76fa25c31cc","tarball":"https://registry.npmjs.org/@cloarec/transloco-mf2/-/transloco-mf2-0.0.1.tgz","fileCount":8,"integrity":"sha512-2qogQ5fDB/yTNMUnVJMolx9VTk87pVqySSDIj/45phIRxJQxtCtEaHJu8+jfoEIP+JsPFzxwf4iS/En/361F5g==","signatures":[{"sig":"MEUCIQDkd/9GF/pBy6RHlFPSyRGjAHcPU5o3bwCjVWkE7IuDIAIgWV5jhkS4tWYfmiwPeiT6L52TvqHHnae6kZY8nfoXWpo=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":10105},"_from":"file:cloarec-transloco-mf2-0.0.1.tgz","module":"fesm2022/cloarec-transloco-mf2.mjs","exports":{".":{"types":"./index.d.ts","default":"./fesm2022/cloarec-transloco-mf2.mjs"},"./package.json":{"default":"./package.json"}},"typings":"index.d.ts","_npmUser":{"name":"lucascloarec","email":"lucas.cloarec@gmail.com"},"_resolved":"/private/var/folders/y3/5b3gfb6d35389n_b3_7zttt00000gn/T/4a5c54d666d8f37f12b1ebb15ee2569e/cloarec-transloco-mf2-0.0.1.tgz","_integrity":"sha512-2qogQ5fDB/yTNMUnVJMolx9VTk87pVqySSDIj/45phIRxJQxtCtEaHJu8+jfoEIP+JsPFzxwf4iS/En/361F5g==","_npmVersion":"10.9.2","description":"[Read instructions on GitHub.](https://github.com/lucascloarec/transloco-mf2)","directories":{},"sideEffects":false,"_nodeVersion":"22.14.0","dependencies":{"tslib":"^2.3.0"},"_hasShrinkwrap":false,"peerDependencies":{"@angular/core":"^19.2.0","@angular/common":"^19.2.0"},"_npmOperationalInternal":{"tmp":"tmp/transloco-mf2_0.0.1_1745447553676_0.1477748631114868","host":"s3://npm-registry-packages-npm-production"}},"0.0.2":{"name":"@cloarec/transloco-mf2","version":"0.0.2","keywords":["transloco","messageformat","messageformat 2","mf2","angular","i18n","translate","pluralization","gender","translate"],"_id":"@cloarec/transloco-mf2@0.0.2","maintainers":[{"name":"lucascloarec","email":"lucas.cloarec@gmail.com"}],"dist":{"shasum":"d40aac63e69f50577bc00919f95b04141f195968","tarball":"https://registry.npmjs.org/@cloarec/transloco-mf2/-/transloco-mf2-0.0.2.tgz","fileCount":8,"integrity":"sha512-IVAXw7xY4Z/3hcrldnDqOsia+8wULQ3dlT5Kc4aMw7sjRELD0fvuYQQkrdbj5vNq7qYH88UKZtUIS5ezMxpHmA==","signatures":[{"sig":"MEYCIQC6DZ52hBp2h0unkKTYhpW8SOBSkkkPY2WhanJAMGtTHAIhAPd5h3hECNxppTnfcX2ksXW8JAO49rPT+m/nMyqiEkJh","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":10293},"_from":"file:cloarec-transloco-mf2-0.0.2.tgz","module":"fesm2022/cloarec-transloco-mf2.mjs","exports":{".":{"types":"./index.d.ts","default":"./fesm2022/cloarec-transloco-mf2.mjs"},"./package.json":{"default":"./package.json"}},"typings":"index.d.ts","_npmUser":{"name":"lucascloarec","email":"lucas.cloarec@gmail.com"},"_resolved":"/private/var/folders/y3/5b3gfb6d35389n_b3_7zttt00000gn/T/8ff1a2cf74825006816a5c330bc2b26a/cloarec-transloco-mf2-0.0.2.tgz","_integrity":"sha512-IVAXw7xY4Z/3hcrldnDqOsia+8wULQ3dlT5Kc4aMw7sjRELD0fvuYQQkrdbj5vNq7qYH88UKZtUIS5ezMxpHmA==","_npmVersion":"10.9.2","description":"[Read instructions on GitHub.](https://github.com/lucascloarec/transloco-mf2)","directories":{},"sideEffects":false,"_nodeVersion":"22.14.0","dependencies":{"tslib":"^2.3.0"},"_hasShrinkwrap":false,"peerDependencies":{"@angular/core":"^19.2.0","@angular/common":"^19.2.0"},"_npmOperationalInternal":{"tmp":"tmp/transloco-mf2_0.0.2_1745448311958_0.3312415154659163","host":"s3://npm-registry-packages-npm-production"}},"0.0.3":{"name":"@cloarec/transloco-mf2","version":"0.0.3","keywords":["transloco","messageformat","messageformat 2","mf2","angular","i18n","translate","pluralization","gender","translate"],"_id":"@cloarec/transloco-mf2@0.0.3","maintainers":[{"name":"lucascloarec","email":"lucas.cloarec@gmail.com"}],"homepage":"https://github.com/lucascloarec/transloco-mf2#readme","bugs":{"url":"https://github.com/lucascloarec/transloco-mf2/issues"},"dist":{"shasum":"6b0d9f41f3c832af812f918b8d68503023f8f209","tarball":"https://registry.npmjs.org/@cloarec/transloco-mf2/-/transloco-mf2-0.0.3.tgz","fileCount":9,"integrity":"sha512-9wPuU0e8ZG9xqzL/vd0BwEIT4mljm0Ca9HILLcIXvy0L5NFuY+VKiZ+vZ/RKMl6gTCY8gsRQZO3ZlECdjjb3VA==","signatures":[{"sig":"MEQCIHw9hVQRUgyDCHzzKtTjvi94X8Xlyw4J0mCLo2HLq2CtAiAes2+jdRcJWwvdZ7doWnMYCOeFloMXLCksnEZF31eYng==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":13367},"_from":"file:cloarec-transloco-mf2-0.0.3.tgz","module":"fesm2022/cloarec-transloco-mf2.mjs","exports":{".":{"types":"./index.d.ts","default":"./fesm2022/cloarec-transloco-mf2.mjs"},"./package.json":{"default":"./package.json"}},"typings":"index.d.ts","_npmUser":{"name":"lucascloarec","email":"lucas.cloarec@gmail.com"},"_resolved":"/private/var/folders/y3/5b3gfb6d35389n_b3_7zttt00000gn/T/b4964bb52413ca2bed78f77fa28f0657/cloarec-transloco-mf2-0.0.3.tgz","_integrity":"sha512-9wPuU0e8ZG9xqzL/vd0BwEIT4mljm0Ca9HILLcIXvy0L5NFuY+VKiZ+vZ/RKMl6gTCY8gsRQZO3ZlECdjjb3VA==","repository":{"url":"git+https://github.com/lucascloarec/transloco-mf2.git"},"_npmVersion":"10.9.2","description":"The implementation of the TranslocoTranspiler interface in this project uses [messageformat V4](https://messageformat.github.io/documents/Project_Overview.html). Since V4, the library [messageformat](https://github.com/messageformat/messageformat) provide","directories":{},"sideEffects":false,"_nodeVersion":"22.14.0","dependencies":{"tslib":"^2.3.0"},"_hasShrinkwrap":false,"peerDependencies":{"@angular/core":"^19.2.0","messageformat":"^4.0.0-10","@angular/common":"^19.2.0","@jsverse/transloco":"^7.6.1"},"_npmOperationalInternal":{"tmp":"tmp/transloco-mf2_0.0.3_1745450814465_0.745771508964866","host":"s3://npm-registry-packages-npm-production"}},"0.0.4":{"name":"@cloarec/transloco-mf2","version":"0.0.4","repository":{"url":"git+https://github.com/lucascloarec/transloco-mf2.git"},"peerDependencies":{"@angular/common":"^19.2.0","@angular/core":"^19.2.0","@jsverse/transloco":"^7.6.1","messageformat":"^4.0.0-10"},"dependencies":{"tslib":"^2.3.0"},"sideEffects":false,"keywords":["transloco","messageformat","messageformat 2","mf2","angular","i18n","translate","pluralization","gender","translate"],"module":"fesm2022/cloarec-transloco-mf2.mjs","typings":"index.d.ts","exports":{"./package.json":{"default":"./package.json"},".":{"types":"./index.d.ts","default":"./fesm2022/cloarec-transloco-mf2.mjs"}},"_id":"@cloarec/transloco-mf2@0.0.4","description":"The implementation of the TranslocoTranspiler interface in this project\r uses [messageformat V4](https://messageformat.github.io/documents/Project_Overview.html).\r Since V4, the library [messageformat](https://github.com/messageformat/messageformat) provi","bugs":{"url":"https://github.com/lucascloarec/transloco-mf2/issues"},"homepage":"https://github.com/lucascloarec/transloco-mf2#readme","_integrity":"sha512-c1hjpVbCB/foA4ZFCxBs1JIyFGXoK0AsC4ZBBOVx7gqSQrwlqyXsWYSiJF4m/7iavDVFE0z5tIh1xvx8LMfAJQ==","_resolved":"C:\\Users\\HLML3961\\AppData\\Local\\Temp\\1\\7cca8cbd1951901c6b07a614f5dd0f09\\cloarec-transloco-mf2-0.0.4.tgz","_from":"file:cloarec-transloco-mf2-0.0.4.tgz","_nodeVersion":"22.14.0","_npmVersion":"10.9.2","dist":{"integrity":"sha512-c1hjpVbCB/foA4ZFCxBs1JIyFGXoK0AsC4ZBBOVx7gqSQrwlqyXsWYSiJF4m/7iavDVFE0z5tIh1xvx8LMfAJQ==","shasum":"c92fdd0f116ff34d0a8317d4fa5c2c56cabe0f65","tarball":"https://registry.npmjs.org/@cloarec/transloco-mf2/-/transloco-mf2-0.0.4.tgz","fileCount":9,"unpackedSize":13762,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQDRTukC9/Kj+k/htaKP7zyCH8ka4vD+7fUvbVaiTBOmNAIgVrkgwpnsPDLqOOktKvkof3MxU5ELb9TQH0aEdZJQT+Q="}]},"_npmUser":{"name":"lucascloarec","email":"lucas.cloarec@gmail.com"},"directories":{},"maintainers":[{"name":"lucascloarec","email":"lucas.cloarec@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/transloco-mf2_0.0.4_1745492596755_0.6353210146507524"},"_hasShrinkwrap":false}},"time":{"created":"2025-04-23T22:32:33.613Z","modified":"2025-04-24T11:03:17.167Z","0.0.1":"2025-04-23T22:32:33.863Z","0.0.2":"2025-04-23T22:45:12.216Z","0.0.3":"2025-04-23T23:26:54.721Z","0.0.4":"2025-04-24T11:03:16.950Z"},"bugs":{"url":"https://github.com/lucascloarec/transloco-mf2/issues"},"homepage":"https://github.com/lucascloarec/transloco-mf2#readme","keywords":["transloco","messageformat","messageformat 2","mf2","angular","i18n","translate","pluralization","gender","translate"],"repository":{"url":"git+https://github.com/lucascloarec/transloco-mf2.git"},"description":"The implementation of the TranslocoTranspiler interface in this project\r uses [messageformat V4](https://messageformat.github.io/documents/Project_Overview.html).\r Since V4, the library [messageformat](https://github.com/messageformat/messageformat) provi","maintainers":[{"name":"lucascloarec","email":"lucas.cloarec@gmail.com"}],"readme":"# Transloco MF2\r\n\r\nThe implementation of the TranslocoTranspiler interface in this project\r\nuses [messageformat V4](https://messageformat.github.io/documents/Project_Overview.html).\r\nSince V4, the library [messageformat](https://github.com/messageformat/messageformat) provides an implementation\r\nof [the Unicode standard MessageFormat 2 (MF2)](https://messageformat.unicode.org/).\r\n\r\nThe code in this project is inspired by\r\n[the current implementation in the Transloco project](https://github.com/jsverse/transloco/blob/transloco-7.6.1/libs/transloco-messageformat/src/lib/messageformat.transpiler.ts),\r\nwhich uses [messageformat V3](https://messageformat.github.io/messageformat/api/).\r\n\r\nFor more details, you can read\r\n[this great article](https://blogs.igalia.com/compilers/2024/05/06/messageformat-2-0-a-new-standard-for-translatable-messages/).\r\n\r\n## Installation in your project\r\n\r\nTransloco must be installed and configured in your application.\r\n\r\nYou also must install the latest version of [messageformat](https://www.npmjs.com/package/messageformat).\r\n\r\n```\r\npnpm add @cloarec/transloco-mf2\r\n```\r\n\r\nThen in your `main.config.ts` :\r\n\r\n```typescript\r\n\r\nexport const appConfig: ApplicationConfig = {\r\n    providers: [\r\n        //...\r\n        provideTransloco({\r\n            //... your configuration\r\n            // change default transloco interpolation to prevent conflict\r\n            interpolation: ['<<<', '>>>'],\r\n        }),\r\n        provideTranslocoMF2Transpiler({\r\n            // https://messageformat.github.io/variables/messageformat_functions.DraftFunctions.html\r\n            includeDraftFunctions: true\r\n        }),\r\n    ],\r\n};\r\n```\r\n\r\n## Development of the library\r\n\r\n### Dev server\r\n\r\n```bash\r\n# Compile the library in watch mode\r\npnpm watch\r\n# Run the dev server\r\npnpm serve\r\n```\r\n\r\n### Building\r\n\r\n```bash\r\npnpm install\r\npnpm run build\r\n```\r\n\r\n#### Publishing the Library\r\n\r\n```bash\r\ncd dist/transloco-mf2\r\n# remove dry-run option to really publish the package ;)\r\npnpm publish --access=public --dry-run\r\n```\r\n\r\n### TODO\r\n\r\n* Adapt tests\r\n* Recreate cache feature (deleted for simplicity reasons)\r\n","readmeFilename":"README.md"}