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:
Geoffrey Goh 2016-08-06 07:27:20 -07:00 committed by Facebook Github Bot 6
parent a2417065b1
commit 1168d0db45
2 changed files with 2 additions and 2 deletions

View File

@ -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', () => {

View File

@ -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;
} }
); );