From 284fe4c594ac61f9e2ac01db8a6f3873203c4f86 Mon Sep 17 00:00:00 2001 From: Timofei Iatsenko Date: Tue, 21 Mar 2023 09:50:14 +0100 Subject: [PATCH] doc(format-po-gettext): add warnings to readme --- packages/format-po-gettext/README.md | 20 +++++++++++++++++++- packages/format-po-gettext/package.json | 2 +- 2 files changed, 20 insertions(+), 2 deletions(-) diff --git a/packages/format-po-gettext/README.md b/packages/format-po-gettext/README.md index 24332b140..e98c8e9de 100644 --- a/packages/format-po-gettext/README.md +++ b/packages/format-po-gettext/README.md @@ -5,10 +5,23 @@ # @lingui/format-po-gettext > 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][linguijs]. See the [documentation][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 + ## Catalog example ```po @@ -56,7 +69,12 @@ export type PoGettextFormatterOptions = { * @default true */ lineNumbers?: boolean - + + /** + * Disable warning about unsupported `Select` feature encountered in catalogs + * + * @default false + */ disableSelectWarning?: boolean } ``` diff --git a/packages/format-po-gettext/package.json b/packages/format-po-gettext/package.json index c3189f450..b0b31fd4e 100644 --- a/packages/format-po-gettext/package.json +++ b/packages/format-po-gettext/package.json @@ -1,7 +1,7 @@ { "name": "@lingui/format-po-gettext", "version": "4.0.0-next.2", - "description": "Gettext PO format for Lingui Catalogs", + "description": "Gettext PO format with gettext-style plurals for Lingui Catalogs", "main": "./dist/po-gettext.cjs", "module": "./dist/po-gettext.mjs", "types": "./dist/po-gettext.d.ts",