forked from joke2k/faker
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add new currency provider
pricetag()
(joke2k#1180)
Add cs_CZ, de_AT, de_DE, en_AU, en_CA, en_US, es_ES, fr_CA, fr_FR, it_IT, pl_PL, ru_RU, and sk_SK localizations with their respective currencies.
- Loading branch information
Showing
15 changed files
with
326 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
from .. import Provider as CurrencyProvider | ||
|
||
|
||
class Provider(CurrencyProvider): | ||
|
||
price_formats = ["#,#0", "%#,#0", "%##,#0", "%.###,#0", "%#.###,#0"] | ||
|
||
def pricetag(self): | ||
return ( | ||
self.numerify(self.random_element(self.price_formats)) | ||
+ "\N{no-break space}Kč" | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
from .. import Provider as CurrencyProvider | ||
|
||
|
||
class Provider(CurrencyProvider): | ||
|
||
price_formats = ["#,##", "%#,##", "%##,##", "%.###,##", "%#.###,##"] | ||
|
||
def pricetag(self): | ||
return ( | ||
self.numerify(self.random_element(self.price_formats)) | ||
+ "\N{no-break space}\N{euro sign}" | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
from .. import Provider as CurrencyProvider | ||
|
||
|
||
class Provider(CurrencyProvider): | ||
|
||
price_formats = ["#,##", "%#,##", "%##,##", "%.###,##", "%#.###,##"] | ||
|
||
def pricetag(self): | ||
return ( | ||
self.numerify(self.random_element(self.price_formats)) | ||
+ "\N{no-break space}\N{euro sign}" | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
from .. import Provider as CurrencyProvider | ||
|
||
|
||
class Provider(CurrencyProvider): | ||
|
||
price_formats = ["#.##", "%#.##", "%##.##", "%,###.##", "%#,###.##"] | ||
|
||
def pricetag(self): | ||
return ( | ||
"$\N{no-break space}" | ||
+ self.numerify(self.random_element(self.price_formats)) | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
from .. import Provider as CurrencyProvider | ||
|
||
|
||
class Provider(CurrencyProvider): | ||
|
||
price_formats = ["#.##", "%#.##", "%##.##", "%,###.##", "%#,###.##"] | ||
|
||
def pricetag(self): | ||
return ( | ||
"$\N{no-break space}" | ||
+ self.numerify(self.random_element(self.price_formats)) | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
from .. import Provider as CurrencyProvider | ||
|
||
|
||
class Provider(CurrencyProvider): | ||
|
||
price_formats = ["#,##", "%#,##", "%##,##", "%.###,##", "%#.###,##"] | ||
|
||
def pricetag(self): | ||
return ( | ||
self.numerify(self.random_element(self.price_formats)) | ||
+ "\N{no-break space}$" | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
from .. import Provider as CurrencyProvider | ||
|
||
|
||
class Provider(CurrencyProvider): | ||
|
||
price_formats = ["#,##", "%#,##", "%##,##", "%.###,##", "%#.###,##"] | ||
|
||
def pricetag(self): | ||
return ( | ||
self.numerify(self.random_element(self.price_formats)) | ||
+ "\N{no-break space}\N{euro sign}" | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
from .. import Provider as CurrencyProvider | ||
|
||
|
||
class Provider(CurrencyProvider): | ||
|
||
price_formats = ["#,##", "%#,##", "%##,##", "%.###,##", "%#.###,##"] | ||
|
||
def pricetag(self): | ||
return ( | ||
self.numerify(self.random_element(self.price_formats)) | ||
+ "\N{no-break space}\N{euro sign}" | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
from .. import Provider as CurrencyProvider | ||
|
||
|
||
class Provider(CurrencyProvider): | ||
|
||
price_formats = ["#,##", "%#,##", "%##,##", "%.###,##", "%#.###,##"] | ||
|
||
def pricetag(self): | ||
return ( | ||
self.numerify(self.random_element(self.price_formats)) | ||
+ "\N{no-break space}zł" | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
from .. import Provider as CurrencyProvider | ||
|
||
|
||
class Provider(CurrencyProvider): | ||
|
||
price_formats = ["#,##", "%#,##", "%##,##", "%.###,##", "%#.###,##"] | ||
|
||
def pricetag(self): | ||
return ( | ||
self.numerify(self.random_element(self.price_formats)) | ||
+ "\N{no-break space}\N{euro sign}" | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters