Skip to content

Commit

Permalink
Should be R.string, not R.strings
Browse files Browse the repository at this point in the history
Summary:
Fix regression of rnpm/rnpm-plugin-link#88.
Closes facebook#9252

Differential Revision: D3680785

fbshipit-source-id: a6ea63295ae8f61b17c0a1b2ca5e6a5f5da7437a
  • Loading branch information
geof90 authored and Facebook Github Bot 6 committed Aug 6, 2016
1 parent a241706 commit 1168d0d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion local-cli/rnpm/link/__tests__/android/applyPatch.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ describe('applyParams', () => {
it('apply params to the string', () => {
expect(
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', () => {
Expand Down
2 changes: 1 addition & 1 deletion local-cli/rnpm/link/src/android/patches/applyParams.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ module.exports = function applyParams(str, params, prefix) {
const name = toCamelCase(prefix) + '_' + param;

return params[param]
? `this.getResources().getString(R.strings.${name})`
? `this.getResources().getString(R.string.${name})`
: null;
}
);
Expand Down

0 comments on commit 1168d0d

Please sign in to comment.