mirror of
https://github.com/status-im/react-native.git
synced 2025-02-25 15:45:32 +00:00
Should be R.string, not R.strings
Summary: Fix regression of https://github.com/rnpm/rnpm-plugin-link/pull/88. Closes https://github.com/facebook/react-native/pull/9252 Differential Revision: D3680785 fbshipit-source-id: a6ea63295ae8f61b17c0a1b2ca5e6a5f5da7437a
This commit is contained in:
parent
a2417065b1
commit
1168d0db45
@ -8,7 +8,7 @@ describe('applyParams', () => {
|
|||||||
it('apply params to the string', () => {
|
it('apply params to the string', () => {
|
||||||
expect(
|
expect(
|
||||||
applyParams('${foo}', {foo: 'foo'}, 'react-native')
|
applyParams('${foo}', {foo: 'foo'}, 'react-native')
|
||||||
).toEqual('this.getResources().getString(R.strings.reactNative_foo)');
|
).toEqual('this.getResources().getString(R.string.reactNative_foo)');
|
||||||
});
|
});
|
||||||
|
|
||||||
it('use null if no params provided', () => {
|
it('use null if no params provided', () => {
|
||||||
|
@ -7,7 +7,7 @@ module.exports = function applyParams(str, params, prefix) {
|
|||||||
const name = toCamelCase(prefix) + '_' + param;
|
const name = toCamelCase(prefix) + '_' + param;
|
||||||
|
|
||||||
return params[param]
|
return params[param]
|
||||||
? `this.getResources().getString(R.strings.${name})`
|
? `this.getResources().getString(R.string.${name})`
|
||||||
: null;
|
: null;
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user