From 36e3964de2be618bcdba6339965510099f6ff6f6 Mon Sep 17 00:00:00 2001 From: Hernan Grecco Date: Mon, 22 Jan 2024 14:48:03 -0300 Subject: [PATCH] doc: fix docs related to localization --- docs/getting/tutorial.rst | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/docs/getting/tutorial.rst b/docs/getting/tutorial.rst index db0cc5abc..bb80c555b 100644 --- a/docs/getting/tutorial.rst +++ b/docs/getting/tutorial.rst @@ -428,7 +428,7 @@ If Babel_ is installed you can translate unit names to any language .. doctest:: >>> ureg.formatter.format_quantity(accel, locale='fr_FR') - '1,3 mètre / seconde²' + '1,3 mètre/seconde²' You can also specify the format locale at the registry level either at creation: @@ -446,6 +446,7 @@ and by doing that, string formatting is now localized: .. doctest:: + >>> ureg.default_format = 'P' >>> accel = 1.3 * ureg.parse_units('meter/second**2') >>> str(accel) '1,3 mètre / seconde²'