Skip to content

Commit

Permalink
verbose naming
Browse files Browse the repository at this point in the history
Signed-off-by: Prince Mendiratta <prince.mendi@gmail.com>
  • Loading branch information
Prince-Mendiratta committed Feb 20, 2023
1 parent d293fe0 commit 1618249
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 5 deletions.
2 changes: 2 additions & 0 deletions src/CONST.js
Original file line number Diff line number Diff line change
Expand Up @@ -1175,6 +1175,8 @@ const CONST = {
'Zambia',
'Zimbabwe',
],

// Values for checking if polyfill is required on a platform
POLYFILL_TEST: {
STYLE: 'currency',
CURRENCY: 'XAF',
Expand Down
4 changes: 2 additions & 2 deletions src/libs/polyfill/index.js → src/libs/IntlPolyfill/index.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import shouldPolyfill from './intl-polyfill';
import shouldPolyfill from './shouldPolyfill';

/**
* Polyfill the Intl API if the ICU version is old.
* This ensures that the currency data is consistent across platforms and browsers.
*/
export default function polyfill() {
export default function intlPolyfill() {
if (!shouldPolyfill()) {
return;
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import shouldPolyfill from './intl-polyfill';
import shouldPolyfill from './shouldPolyfill';

/**
* Polyfill the Intl API, always performed for native devices.
Expand Down
File renamed without changes.
4 changes: 2 additions & 2 deletions src/setup/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import CONST from '../CONST';
import platformSetup from './platformSetup';
import * as Metrics from '../libs/Metrics';
import * as Device from '../libs/actions/Device';
import polyfill from '../libs/polyfill';
import intlPolyfill from '../libs/IntlPolyfill';

export default function () {
/*
Expand Down Expand Up @@ -49,7 +49,7 @@ export default function () {
I18nManager.forceRTL(false);

// Polyfill the Intl API if locale data is not as expected
polyfill();
intlPolyfill();

// Perform any other platform-specific setup
platformSetup();
Expand Down

0 comments on commit 1618249

Please sign in to comment.