Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit ecce252

Browse files
bug #46779 [String] Add an invariable word in french (lemonlab)
This PR was merged into the 5.4 branch. Discussion ---------- [String] Add an invariable word in french | Q | A | ------------- | --- | Branch? | 5.4 | Bug fix? | yes | New feature? | no | Deprecations? | no | Tickets | none | License | MIT | Doc PR | none In french, the word "sans" is invariable. The singular form of "sans" is "sans", not "san". (PS : i'm french) Commits ------- 9ed79ce Add an invariable word in french
2 parents 50e384a + 9ed79ce commit ecce252

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

src/Symfony/Component/String/Inflector/FrenchInflector.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ final class FrenchInflector implements InflectorInterface
108108
* A list of words which should not be inflected.
109109
* This list is only used by singularize.
110110
*/
111-
private const UNINFLECTED = '/^(abcès|accès|abus|albatros|anchois|anglais|autobus|bois|brebis|carquois|cas|chas|colis|concours|corps|cours|cyprès|décès|devis|discours|dos|embarras|engrais|entrelacs|excès|fils|fois|gâchis|gars|glas|héros|intrus|jars|jus|kermès|lacis|legs|lilas|marais|mars|matelas|mépris|mets|mois|mors|obus|os|palais|paradis|parcours|pardessus|pays|plusieurs|poids|pois|pouls|printemps|processus|progrès|puits|pus|rabais|radis|recors|recours|refus|relais|remords|remous|rictus|rhinocéros|repas|rubis|sas|secours|sens|souris|succès|talus|tapis|tas|taudis|temps|tiers|univers|velours|verglas|vernis|virus)$/i';
111+
private const UNINFLECTED = '/^(abcès|accès|abus|albatros|anchois|anglais|autobus|bois|brebis|carquois|cas|chas|colis|concours|corps|cours|cyprès|décès|devis|discours|dos|embarras|engrais|entrelacs|excès|fils|fois|gâchis|gars|glas|héros|intrus|jars|jus|kermès|lacis|legs|lilas|marais|mars|matelas|mépris|mets|mois|mors|obus|os|palais|paradis|parcours|pardessus|pays|plusieurs|poids|pois|pouls|printemps|processus|progrès|puits|pus|rabais|radis|recors|recours|refus|relais|remords|remous|rictus|rhinocéros|repas|rubis|sans|sas|secours|sens|souris|succès|talus|tapis|tas|taudis|temps|tiers|univers|velours|verglas|vernis|virus)$/i';
112112

113113
/**
114114
* {@inheritdoc}

src/Symfony/Component/String/Tests/Inflector/FrenchInflectorTest.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ public function pluralizeProvider()
3131
['héros', 'héros'],
3232
['nez', 'nez'],
3333
['rictus', 'rictus'],
34+
['sans', 'sans'],
3435
['souris', 'souris'],
3536
['tas', 'tas'],
3637
['toux', 'toux'],

0 commit comments

Comments
 (0)