Skip to content

Commit

Permalink
translation example
Browse files Browse the repository at this point in the history
  • Loading branch information
kanzitelli committed Jan 10, 2022
1 parent ff20cf2 commit 8a91160
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 8 deletions.
15 changes: 7 additions & 8 deletions src/screens/index.ts
Original file line number Diff line number Diff line change
@@ -1,19 +1,18 @@
import {generateRNNScreens} from 'rnn-screens';
import {gestureHandlerRootHOC as withGestureHandler} from 'react-native-gesture-handler';

import {withBottomTab, withRightButtons, withTitle} from '../services/navigation/options';
import {withStores} from '../stores';
import {withServices} from '../services';
import {withServices, services} from '../services';
import {withBottomTab, withRightButtons, withTitle} from '../services/navigation/options';

import {Main} from './main';
import {Settings} from './settings';
import {Example} from './screen-sample';
import {services} from '../services';

// Describe your screens here
export const screens = generateRNNScreens(
{
Main: {
Main: () => ({
component: Main,
options: {
topBar: {
Expand All @@ -22,7 +21,7 @@ export const screens = generateRNNScreens(
},
...withBottomTab('Main', 'newspaper'),
},
},
}),
Settings: {
component: Settings,
options: {
Expand All @@ -33,15 +32,15 @@ export const screens = generateRNNScreens(
},
},

Example: {
Example: () => ({
component: Example,
options: {
topBar: {
...withTitle('Example'),
...withTitle(services.t.do('example.title')),
},
...withBottomTab('Example', 'construct'),
},
},
}),
},
[withGestureHandler, withStores, withServices],
);
6 changes: 6 additions & 0 deletions src/services/translate/translations.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@ export const en = {
home: {
title: 'Home',
},
example: {
title: 'Example',
},
section: {
navigation: {
title: 'Navigation',
Expand All @@ -20,6 +23,9 @@ export const ru = {
home: {
title: 'Хоум',
},
example: {
title: 'Пример',
},
section: {
navigation: {
title: 'Навигация',
Expand Down

0 comments on commit 8a91160

Please sign in to comment.