-
Notifications
You must be signed in to change notification settings - Fork 986
Improved Currency Module #127
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
AustinRow1
wants to merge
7
commits into
swapagarwal:master
Choose a base branch
from
AustinRow1:currency-module-improvement
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
08843fe
Implemented functionality to let user use currency names other than o…
AustinRow1 42c397e
Added CURRENCIES_SOURCE_FILE path to config.py
AustinRow1 98377e3
Implemented functionality to let user use currency names other than o…
AustinRow1 0d89d65
Added more names for different currencies.
AustinRow1 44642e5
Merge remote-tracking branch 'origin/currency-module-improvement' int…
AustinRow1 b2a0b5c
Update config.py
AustinRow1 254b367
Deleting Extra File
AustinRow1 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 hidden or 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,34 @@ | ||
{ | ||
"USD": "USD", "DOLLAR": "USD", "BUCK": "USD", "US DOLLAR": "USD", | ||
"GBP": "GBP", "POUND": "GBP", "BRITISH POUND": "GBP", "LB": "GBP", | ||
"IDR": "IDR", "RUPIAH": "IDR", "INDONESIAN RUPIAH": "IDR", "PERAK": "IDR", "RP": "IDR", | ||
"BGN": "BGN", "LEV": "BGN", "BULGARIAN LEV": "BGN", | ||
"ILS": "ILS", "SHEKEL": "ILS", "ISRAELI SHEKEL": "ILS", | ||
"DKK": "DKK", "KRONE": "DKK", "DANISH KRONE": "DKK", "DANISH CROWN": "DKK", | ||
"CAD": "CAD", "LOONIE": "CAD", "CANADIAN DOLLAR": "CAD", | ||
"MXN": "MXN", "PESO": "MXN", "MEXICAN PESO": "MXN", | ||
"HUF": "HUF", "FORINT": "HUF", "HUNGARIAN FORINT": "HUF", | ||
"RON": "RON", "LEI": "RON", "LEU": "RON", "ROMANIAN LEU": "RON", "ROMANIAN LEI": "RON", | ||
"MYR": "MYR", "RINGGIT": "MYR", "MALAYSIAN RINGGIT": "MYR", "MALAYSIAN DOLLAR": "MYR", | ||
"SEK": "SEK", "KRONA": "SEK", "KRONOR": "SEK", "SWEDISH KRONA": "SEK", "SWEDISH KRONOR": "SEK", "SWEDISH CROWNS": "SEK", | ||
"SGD": "SGD", "SINGAPORE DOLLAR": "SGD", "DOLAR SIGNAPURRA": "SGD", | ||
"HKD": "HKD", "HONG KONG DOLLAR": "HKD", "HK DOLLAR": "HKD", | ||
"AUD": "AUD", "AUSTRALIAN DOLLAR": "AUD", "AUSSIE DOLLAR": "AUD", | ||
"CHF": "CHF", "FRANC": "CHF", "SWISS FRANC": "CHF", | ||
"KRW": "KRW", "WON": "KRW", "KOREAN WON": "KRW", "KOREAN REPUBLIC WON": "KRW", | ||
"CNY": "CNY", "RENMINBI": "CNY", "YUAN": "CNY", "CHINESE YUAN": "CNY", | ||
"TRY": "TRY", "TL": "TRY", "TURKISH LIRA": "TRY", "LIRA": "TRY", | ||
"HRK": "HRK", "KUNA": "HRK", "CROATIAN KUNA": "HRK", | ||
"NZD": "NZD", "NEW ZEALAND DOLLAR": "NZD", "KIWI": "NZD", | ||
"THB": "THB", "BAHT": "THB", "THAI BAHT": "THB", | ||
"EUR": "EUR", "EURO": "EUR", | ||
"NOK": "NOK", "NORWEGIAN KRONE": "NOK", | ||
"RUB": "RUB", "ROUBLE": "RUB", "RUBLE": "RUB", "RUSSIAN ROUBLE": "RUB", "RUSSIAN RUBLE": "RUB", | ||
"INR": "INR", "RUPEE": "INR", "INDIAN RUPEE": "INR", | ||
"JPY": "JPY", "YEN": "JPY", "JAPANESE YEN": "JPY", | ||
"CZK": "CZK", "KORUNA": "CZK", "CZECH CROWN": "CZK", | ||
"BRL": "BRL", "REAL": "BRL", "BRAZILIAN REAL": "BRL", | ||
"PLN": "PLN", "ZLOTY": "PLN", "POLISH ZLOTY": "PLN", | ||
"PHP": "PHP", "PHILIPPINE PESO": "PHP", | ||
"ZAR": "ZAR", "RAND": "ZAR", "SOUTH AFRICAN RAND": "ZAR" | ||
} |
This file contains hidden or 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
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can there be a more concise way of storing this information?
I don't like USD being repeated.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wrote it this way so that it would always require constant time to check for a translation. I could implement it in the following format:
{ "USD": ["DOLLAR", "BUCK", "US DOLLAR"] }
This would make it more concise, but it would also slow it down. The slowdown would be negligible in times with little usage, but if Jarvis ever came under heavy load it may be nice to have faster translation.
What do you think?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A quick search gave this: http://stackoverflow.com/questions/2974022
Can you explore more on this? The ideal solution would have a constant time lookup for a key, while removing the duplication of values.