From 3077e3dd884f130b81e4138a19b9054b9654dabf Mon Sep 17 00:00:00 2001 From: rmunate Date: Tue, 28 Nov 2023 06:25:24 -0500 Subject: [PATCH] Zero-width spaces --- docs/.vitepress/config.mts | 2 +- docs/getting-started/changelog.md | 8 +++++++- src/Langs/Replaces.php | 20 ++++++++++---------- src/Wrappers/NumberFormatterWrapper.php | 2 +- 4 files changed, 19 insertions(+), 13 deletions(-) diff --git a/docs/.vitepress/config.mts b/docs/.vitepress/config.mts index 78fb199..c3d2e0f 100644 --- a/docs/.vitepress/config.mts +++ b/docs/.vitepress/config.mts @@ -16,7 +16,7 @@ export default defineConfig({ }, logo: '/img/logo.png', nav: [ - {text: 'v4.2.1', link: '/'}, + {text: 'v4.2.2', link: '/'}, ], sidebar: [ { diff --git a/docs/getting-started/changelog.md b/docs/getting-started/changelog.md index 9bbe15b..2aaa703 100644 --- a/docs/getting-started/changelog.md +++ b/docs/getting-started/changelog.md @@ -34,4 +34,10 @@ return [ return \Illuminate\Support\Str::title($data->getWords()); }, ] -``` \ No newline at end of file +``` + +## [4.2.2] - 2023-11-28 + +### Changed + +- **Zero-width spaces:** Characters (\u{AD}, \u{200B}) are removed from the translation outputs. \ No newline at end of file diff --git a/src/Langs/Replaces.php b/src/Langs/Replaces.php index 1c88ad1..22cdf9d 100644 --- a/src/Langs/Replaces.php +++ b/src/Langs/Replaces.php @@ -17,7 +17,7 @@ final class Replaces // 'illion' => 'illion Von', ], 'en' => [ - 'illion' => 'illion Of', + 'illion' => 'illion of', ], 'es' => [ 'veintiuno' => 'veintiún', @@ -62,29 +62,29 @@ final class Replaces 'ilion' => 'میلیون و', ], 'fr' => [ - 'illion' => 'illion De', - 'illions' => 'illions De', + 'illion' => 'illion de', + 'illions' => 'illions de', ], 'hi' => [ //... ], 'it' => [ - 'ilione' => 'ilione Di', - 'ilioni' => 'ilioni Di', + 'ilione' => 'ilione di', + 'ilioni' => 'ilioni di', ], 'pl' => [ //... ], 'pt' => [ - 'ilhão' => 'ilhão De', - 'ilhões' => 'ilhões De', + 'ilhão' => 'ilhão de', + 'ilhões' => 'ilhões de', ], 'ro' => [ - 'ilion' => 'ilion De', - 'ilioane' => 'ilioane De', + 'ilion' => 'ilion de', + 'ilioane' => 'ilioane de', ], 'vi' => [ - 'illion' => 'illion Của', + 'illion' => 'illion của', ], ]; diff --git a/src/Wrappers/NumberFormatterWrapper.php b/src/Wrappers/NumberFormatterWrapper.php index 78470ae..90a8f87 100644 --- a/src/Wrappers/NumberFormatterWrapper.php +++ b/src/Wrappers/NumberFormatterWrapper.php @@ -30,6 +30,6 @@ public static function format(float|int $value, string $locale = null, bool $rul // Format the given numeric value as a spelled-out string. $value = $numberFormatter->format($value); - return str_replace("\u{AD}", '', $value); + return str_replace(["\u{AD}", "\u{200B}"], '', $value); } }