Skip to content

Commit

Permalink
Zero-width spaces
Browse files Browse the repository at this point in the history
  • Loading branch information
rmunate authored and rmunate committed Nov 28, 2023
1 parent 63e58a8 commit 3077e3d
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 13 deletions.
2 changes: 1 addition & 1 deletion docs/.vitepress/config.mts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ export default defineConfig({
},
logo: '/img/logo.png',
nav: [
{text: 'v4.2.1', link: '/'},
{text: 'v4.2.2', link: '/'},
],
sidebar: [
{
Expand Down
8 changes: 7 additions & 1 deletion docs/getting-started/changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,4 +34,10 @@ return [
return \Illuminate\Support\Str::title($data->getWords());
},
]
```
```

## [4.2.2] - 2023-11-28

### Changed

- **Zero-width spaces:** Characters (\u{AD}, \u{200B}) are removed from the translation outputs.
20 changes: 10 additions & 10 deletions src/Langs/Replaces.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ final class Replaces
// 'illion' => 'illion Von',
],
'en' => [
'illion' => 'illion Of',
'illion' => 'illion of',
],
'es' => [
'veintiuno' => 'veintiún',
Expand Down Expand Up @@ -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',
],
];

Expand Down
2 changes: 1 addition & 1 deletion src/Wrappers/NumberFormatterWrapper.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}

0 comments on commit 3077e3d

Please sign in to comment.