// Example ExamplesRegistry.addPluginExample('I18n', () => <View> <Text style={{color: '#ffffff'}}>Locale: {I18n.defaultLocale}</Text> </View> )
renderLoginButton () { return ( <RoundedButton onPress={NavigationActions.login}> {I18n.t('signIn')} </RoundedButton> ) }
const CancelButton = ({ onClose }) => ( <TouchableHighlight underlayColor="#2f0001" onPress={onClose}> <Text style={styles.cancel}>{I18n.t('cancel')}</Text> </TouchableHighlight> )
const buildConstants = (translations, namespace, locale) => { const constants = {}; Object.keys(translations[locale]).forEach( key => (constants[constantCase(key)] = (...configArgs) => I18n.t(getI18key(namespace, key), arrayToObject(configArgs))) ); return constants; }
const SoundStatusButton = ({ value, onPress }: Props) => ( <TouchableHighlight onPress={onPress} underlayColor="#eee"> <View style={styles.container}> <Text style={styles.label}>{I18n.t('onfinish')}</Text> <View style={styles.sound}> <Text style={styles.soundText}>{I18n.t(soundLabel(value))}</Text> <Text style={styles.soundTextArrow}>></Text> </View> </View> </TouchableHighlight> )
renderLogoutButton () { return ( <RoundedButton onPress={this.props.logout}> {I18n.t('logOut')} </RoundedButton> ) }
// Example // prettier-ignore ExamplesRegistry.addPluginExample('I18n', () => <View> <Text style={{color: '#ffffff'}}>Default Locale: {I18n.defaultLocale}</Text> <Text style={{color: '#ffffff'}}>Current Locale: {I18n.locale}</Text> </View> )
const DoneButton = ({ onClose }) => ( <TouchableHighlight underlayColor="#2f0001" onPress={onClose}> <Text style={styles.done}>{I18n.t('done')}</Text> </TouchableHighlight> )
// Example ExamplesRegistry.addPluginExample('I18n', () => <View> <Text style={{color: '#ffffff'}}>Locale: {I18n.defaultLocale}</Text> </View> )
// Example ExamplesRegistry.addPluginExample('I18n', () => <View> <Text style={{color: '#ffffff'}}>Locale: {I18n.defaultLocale}</Text> </View> )
renderLoginButton () { return ( <RoundedButton onPress={NavigationActions.login}> {I18n.t('signIn')} </RoundedButton> ) }
// Example ExamplesRegistry.addPluginExample('I18n', () => <View> <Text style={{color: '#ffffff'}}>Locale: {I18n.defaultLocale}</Text> </View> )
renderLogoutButton () { return ( <RoundedButton onPress={this.props.logout}> {I18n.t('logOut')} </RoundedButton> ) }
// Example ExamplesRegistry.addPluginExample('I18n', () => <View> <Text style={{color: '#ffffff'}}>Locale: {I18n.defaultLocale}</Text> </View> )