FakerPHP / Faker

Faker is a PHP library that generates fake data for you
https://fakerphp.github.io
Other
3.61k stars 351 forks source link

Curses/profanities in dutch realText #891

Open TomasDePomas opened 4 months ago

TomasDePomas commented 4 months ago

Summary

The source for dutch realtext includes translations for gdamn and gdamned. Since we use the library to seed a acceptance that we wish to share with customers, this is not ok for us. For now the workaround is setting the locale to Flemish.

Versions

Version
PHP 8.2.13
fakerphp/faker 1.23.1

Self-enclosed code snippet for reproduction

return [
    'title' => fake()->realText(),
]

Expected output

Something that does not contain profanities

Actual output

[
    "title" =>  "Een man die geld kwam ophalen voor de Partijkas, dan gaf hij hun een 
sigaar op, van mij, een sigaar in z'n kamer, hardop:\"Een groot dichter zijn en dan vallen, 
Godverdomme.\" "
]
pimjansen commented 4 months ago

You have a proposal for something else? Thing is that is always opiniated in some sort.

You could always define your own provider foe this

artifex-media commented 3 months ago

You have a proposal for something else? Thing is that is always opiniated in some sort.

You could always define your own provider foe this

I completely agree with @TomasDePomas, it's not okay - I'm not sure if the text comes from another library but if not, I would suggest something like: realText($maxNbChars = 200, $indexSize = 2, $textType = 'formal')

Being able to have a formal (or non-cursing...) text by default and being able to switch it if a non-formal text is allowed.

bram-pkg commented 3 months ago

It is indeed from a public domain book I believe. Do you have suggestions for any public domain book we can use that is available in plain text?