Package Exports
- @lingui/format-po
- @lingui/format-po/dist/po.cjs
- @lingui/format-po/dist/po.mjs
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@lingui/format-po) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
@lingui/format-po
Read and write message catalogs in Gettext PO format with ICU plurals
@lingui/format-po is part of LinguiJS. See the
documentation for all information, tutorials and examples.
Catalog example
#, Comment for translators
#: src/App.js:4, src/Component.js:2
msgid "MessageID"
msgstr "Translated Message"Installation
npm install --save-dev @lingui/format-po
# yarn add --dev @lingui/format-poUsage
// lingui.config.{js,ts}
import {formatter} from "@lingui/format-po"
export default {
[...]
format: formatter({lineNumbers: false}),
}Possible options:
export type PoFormatterOptions = {
/**
* Print places where message is used
*
* @default true
*/
origins?: boolean
/**
* Print line numbers in origins
*
* @default true
*/
lineNumbers?: boolean
/**
* Print `js-lingui-id: Xs4as` statement in extracted comments section
*
* @default false
*/
printLinguiId?: boolean
}License
This package is licensed under MIT license.