Research
Security News
Quasar RAT Disguised as an npm Package for Detecting Vulnerabilities in Ethereum Smart Contracts
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
@lingui/format-po-gettext
Advanced tools
Gettext PO format with gettext-style plurals for Lingui Catalogs
Read and write message catalogs in Gettext PO format with gettext-style plurals
Converts ICU Plural expressions into native gettext plurals
@lingui/format-po-gettext
is part of LinguiJS. See the
documentation for all information, tutorials and examples.
Warning This formatter is made for compatibility with TMS, which does not support ICU expressions in PO files.
It does not support all features of LinguiJS and should be carefully considered over other formats.
Not supported features (native gettext doesn't support this):
- SelectOrdinal
- Select
- Nested ICU Expressions
- Signed digits and fractions (-5, and 0.15) in plurals
#. js-lingui-id: WGI12K
#. js-lingui:icu=%7BanotherCount%2C+plural%2C+one+%7BSingular+case%7D+other+%7BCase+number+%7BanotherCount%7D%7D%7D&pluralize_on=anotherCount
msgid "Singular case"
msgid_plural "Case number {anotherCount}"
msgstr[0] "Singular case"
msgstr[1] "Case number {anotherCount}"
npm install --save-dev @lingui/format-po-gettext
# yarn add --dev @lingui/format-po-gettext
// lingui.config.{js,ts}
import {formatter} from "@lingui/format-po-gettext"
export default {
[...]
format: formatter({lineNumbers: false}),
}
Possible options:
export type PoGettextFormatterOptions = {
/**
* Print places where message is used
*
* @default true
*/
origins?: boolean
/**
* Print line numbers in origins
*
* @default true
*/
lineNumbers?: boolean
/**
* Disable warning about unsupported `Select` feature encountered in catalogs
*
* @default false
*/
disableSelectWarning?: boolean
}
This package is licensed under MIT license.
4.0.0 (2023-04-xx)
i18n._
/ i18n.t
calls (#1586)defineMessage
+ short alias (#1495)messageId
and support order by message
(#1515)i18._(foo.bar)
without warning (#1492)i18n.setCatalogAndActivate
for easier nextjs integration (#1541)process.env.LINGUI_CONFIG
(#1447)Intl.PluralRules
instead of i18n.loadLocaleData
(#1486)other
as required for ChoiceOptions
(#1527)defaultProps
from Trans component (#1494)I18nProvider
(#1501)withI18n
(#1503)arg
macro (#1581)FAQs
Gettext PO format with gettext-style plurals for Lingui Catalogs
The npm package @lingui/format-po-gettext receives a total of 3,160 weekly downloads. As such, @lingui/format-po-gettext popularity was classified as popular.
We found that @lingui/format-po-gettext demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
Security News
Research
A supply chain attack on Rspack's npm packages injected cryptomining malware, potentially impacting thousands of developers.
Research
Security News
Socket researchers discovered a malware campaign on npm delivering the Skuld infostealer via typosquatted packages, exposing sensitive data.