Skip to content
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

Merged
merged 12 commits into from
Sep 19, 2017

Conversation

rhenshaw56
Copy link
Contributor

Resolves #2593

TEST BY:

  • Cloning this branch
  • Setup reaction.json to have the open exchange rates API key or use the standard reaction.json
  • Start reaction and login as admin
  • Change currency or i18n in a page where there are multiple localized elements and notice that components update on currency/language change
  • Test this also as a guest/non-admin user

Copy link
Collaborator

@brent-hoover brent-hoover left a 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;
Copy link
Collaborator

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?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sure

Copy link
Contributor Author

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.

@@ -755,4 +751,4 @@ function createCountryCollection(countries) {
Countries.insert(country);
}
return countryOptions;
}
}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing newline

@brent-hoover
Copy link
Collaborator

@rhenshaw56 This PR could probably use a better title.

@rhenshaw56 rhenshaw56 changed the title Rowland fix issue 2593 Fix on Localized elements not updating on currency/language change Aug 25, 2017
@aaronjudd aaronjudd self-requested a review August 29, 2017 00:07
@brent-hoover
Copy link
Collaborator

@aaronjudd Can you take a look at this when you have a chance?

@aaronjudd
Copy link
Contributor

Verified that logged out / non admin currency and language do seem to be updating. It's a bit hard to tell with translations at the moment though as there are still a lot I'm seeing all over that aren't translated here ("Shop Settings, and more, where I know there were translations).

Here's some clear examples though where I'm not seeing currency translating when I am logged in as an admin:
basic_reaction_product
basic_reaction_product

@brent-hoover
Copy link
Collaborator

brent-hoover commented Sep 14, 2017

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.

Copy link
Contributor

@aaronjudd aaronjudd left a 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.

@aaronjudd
Copy link
Contributor

aaronjudd commented Sep 14, 2017

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). @

@aaronjudd
Copy link
Contributor

@zenweasel let's open a separate issue for the side bar currency issue.. and then merge this..

@brent-hoover brent-hoover dismissed aaronjudd’s stale review September 19, 2017 02:20

Opened separate issue for PDP currency issues

@brent-hoover brent-hoover merged commit fac086b into marketplace Sep 19, 2017
@brent-hoover brent-hoover deleted the rowland-fix-issue-2593 branch September 19, 2017 02:30
@spencern spencern mentioned this pull request Oct 11, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants