Skip to content
This repository was archived by the owner on May 17, 2019. It is now read-only.
This repository was archived by the owner on May 17, 2019. It is now read-only.

Allow translation outside of React #172

@lhorie

Description

@lhorie

Type of issue

feature

Description

Some internal Uber stakeholders rely on the ability to translate files from Redux actions. Currently there's no clean way to access the translation API from there.

Current behavior

Currently one needs to do something like this:

class Foo extends React.Component {
  doStuff() {
    this.props.doStuff(this.props.translate('foo'));
  }
  render() {
    return <button onClick={this.doStuff}>Click me</button>
  }
}
export default compose(
  withTranslations(['foo']),
  // ... other stuff
)(Foo)

Expected behavior

Some way to provide translations to actions without having to refactor all the components in an app

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions