-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
Fix on Localized elements not updating on currency/language change #2742
Conversation
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.
There's some conflicts to resolve here too.
@@ -119,7 +119,7 @@ Meteor.startup(() => { | |||
locale.language = getBrowserLanguage(); | |||
moment.locale(locale.language); | |||
// flag in case the locale currency isn't enabled | |||
locale.currencyEnabled = locale.currencyEnabled; | |||
locale.currencyEnabled = locale.currency.enabled; |
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 feel like @jm-wanja just changed this to fix another bug. Can you check with her?
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.
sure
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.
@zenweasel the reason for the change was because locale
does not have a currencyEnabled
field so it was always undefined
. Just checked in with her and had her test if it affected the bug she worked on. She said it did not.
client/modules/core/main.js
Outdated
@@ -755,4 +751,4 @@ function createCountryCollection(countries) { | |||
Countries.insert(country); | |||
} | |||
return countryOptions; | |||
} | |||
} |
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.
Missing newline
@rhenshaw56 This PR could probably use a better title. |
@aaronjudd Can you take a look at this when you have a chance? |
So it was my (possibly incorrect) understanding that elements on the PDP should always be in the shop currency for an admin. Either way I see that it's inconsistent, but want to make sure we correct to the right way. |
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.
Review currency conversion as admin in the PDP.
It's actually reasonable to say that the originally reported behaviour might have been two different issue -> one, the "edit mode" component, among others not changing on translations. and b) that the currency change, at least as reported in the screenshot was the expected behaviour, per @zenweasel's comment - as that was in edit mode. If the assumptions are, that when you are an admin you are editing in the base currency (which is true, and is good, and IS the way this should work), then yes, the real issue is that there are inconsistencies in the currency handling across the board. @rymorgan I feel this is also a user experience issue, perhaps currency and languages should be disabled when you are in edit mode, (we discussed that in the future world, we could use the currency/i18n navbar components to switch context of the edit mode, and since that's not what happens now... we should indicate this). @ |
@zenweasel let's open a separate issue for the side bar currency issue.. and then merge this.. |
Opened separate issue for PDP currency issues
Resolves #2593
TEST BY:
reaction.json
to have the open exchange rates API key or use the standardreaction.json