Skip to content
This repository has been archived by the owner on Nov 3, 2021. It is now read-only.

Bug 969525 - Wrong message exporting contacts with USBStorage enabled #17657

Merged
merged 1 commit into from
Mar 28, 2014

Conversation

fcampo
Copy link
Contributor

@fcampo fcampo commented Mar 26, 2014

Fixed:

  • Rewrite updateStorageOptions function for better readability
  • Got rid of Settings dependency
  • Fix l10n call to use localize function (recommended by l10n team)
  • Tests added for export, fixed for import

exportSDOption.querySelector('p').textContent =
_(exportSDErrorMessage);
// update the message
navigator.mozL10n.localize(importSDOption.querySelector('p.error-message'),
Copy link
Contributor

Choose a reason for hiding this comment

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

why are we calling here the localize method instead of using the standard '_' . Please use the same code I provided you in my shared commit jmcanterafonseca@7766fd2#diff-45d80111ee5f57643b5a8a07aac2daa9R384

If you need that for test passing you can always create an spy over the '_' method

thanks

Copy link
Contributor Author

Choose a reason for hiding this comment

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

after talking with l10n localizers, they recommend using the mozL10n.localize function instead of '_' code.
We need to change it eventually, but if you rather to use the same for now, I can leave the change for another bug.

@jmcanterafonseca
Copy link
Contributor

general comment about the tests:

can we structure the tests by having a test suite called 'sdCardAvailability' indepedent of import or export. That approach will make tests clearer, simpler and with less lines of code. All in all we are testing settings no import or export themselves

Fixed:
- Rewrite updateStorageOptions function for better readability
- Got rid of Settings dependency
- Tests added for export, fixed for import
fcampo pushed a commit that referenced this pull request Mar 28, 2014
Bug 969525 - Wrong message exporting contacts with USBStorage enabled (r=jmcf)
@fcampo fcampo merged commit 9dd7fbd into mozilla-b2g:master Mar 28, 2014
@fcampo fcampo deleted the 969525-sd-usb-export branch March 28, 2014 10:54
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
2 participants