Skip to content
This repository has been archived by the owner on Apr 14, 2020. It is now read-only.

Commit

Permalink
buglist/#65
Browse files Browse the repository at this point in the history
  • Loading branch information
huyvt1988 committed Jun 13, 2018
1 parent a921a28 commit 390adb9
Show file tree
Hide file tree
Showing 6 changed files with 28 additions and 15 deletions.
4 changes: 4 additions & 0 deletions app/config/localization.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ export let strings = new LocalizedStrings({
next_topic : "Next Topic",
TOPIC_LIST : "Topic List",
HIRAGANA_TITLE: "Hiragana & Katakana",
HIRAGANA_LIST_TITLE: 'Hiragana',
KATAKANA_LIST_TITLE: 'Katakana',
NUMBER_TITLE : "Number",
GREETING_TITLE : "Greeting",
TOPIC1_TITLE : "Myself",
Expand Down Expand Up @@ -94,6 +96,8 @@ export let strings = new LocalizedStrings({
next_topic : "次のトピック",
TOPIC_LIST : "トピック一覧",
HIRAGANA_TITLE: "ひらがなとカタカナ",
HIRAGANA_LIST_TITLE: 'ひらがな',
KATAKANA_LIST_TITLE: 'カタカナ',
NUMBER_TITLE : "数字",
GREETING_TITLE : "あいさつ",
TOPIC1_TITLE : "自分",
Expand Down
4 changes: 2 additions & 2 deletions app/config/router.js
Original file line number Diff line number Diff line change
Expand Up @@ -180,13 +180,13 @@ export const HiraganaLearnStack = TabNavigator({
Hiragana: {
screen: HiraganaLearnScreen,
navigationOptions: {
tabBarLabel: 'Hiragana',
// tabBarLabel: 'Hiragana',
}
},
Katakana: {
screen: KatakanaLearnScreen,
navigationOptions: {
tabBarLabel: 'Katakana',
// tabBarLabel: 'Katakana',
}
},
},
Expand Down
10 changes: 7 additions & 3 deletions app/screens/Learn/LearnModule.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,12 @@ class LearnHiraganaModule extends Component {
constructor(props) {
super(props);
}
static navigationOptions = {
title: 'Learn',
static navigationOptions = ({ navigation }) => {
// title: 'Learn',
const {state} = navigation;
return {
title: `${strings[state.params.studyType]}`,
};
swipeEnabled: false
};
state = {
Expand Down Expand Up @@ -86,7 +90,7 @@ class LearnHiraganaModule extends Component {
if(this.state.type == 'HL1'){
if(this.state.studyType == 'HIRAGANA_TITLE'){
return (
<HiraganaLearnStack />
<HiraganaLearnStack />
);
}else if(this.state.studyType == 'NUMBER_TITLE'){
return (
Expand Down
13 changes: 7 additions & 6 deletions app/screens/learn/hiraganalearn.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,11 @@ import {
Platform,
} from 'react-native';
import { List, ListItem, Icon } from 'react-native-elements';

import { strings } from '../../config/localization';
import { TabNavigator, StackNavigator } from 'react-navigation';
import { bindActionCreators } from 'redux';
import { connect } from 'react-redux';
import { HiraganaLearnStack } from '../../config/router';
// import { hiraganalearn } from '../../config/hiraganalearn'
import { hiraganaList, katakanaList } from '../../config/data'
import * as Actions from '../../actions/user'; //Import your actions

Expand Down Expand Up @@ -79,11 +78,13 @@ function playSound(testInfo, component) {

export class HiraganaLearnScreen extends Component {

static navigationOptions = {
// header: null,
// title: 'LearnHL1',
tabBarLabel: 'Hiragana',
static navigationOptions = ({ navigation }) => {
const {state} = navigation;
return {
title: `${strings['HIRAGANA_LIST_TITLE']}`,
};
swipeEnabled: false
};

constructor(props) {
super(props);
Expand Down
11 changes: 7 additions & 4 deletions app/screens/learn/katakanalearn.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ import {
import { connect } from 'react-redux';
import { HiraganaLearnStack } from '../../config/router';
import { katakanaList } from '../../config/data'
import { strings } from '../../config/localization';
import * as Actions from '../../actions/user'; //Import your actions

var Sound = require('react-native-sound');
Expand Down Expand Up @@ -80,10 +81,12 @@ function playSound(testInfo, component) {

export class KatakanaLearnScreen extends Component {

static navigationOptions = {
// header: null,
// title: 'LearnHL1',
tabBarLabel: 'Hiragana',
static navigationOptions = ({ navigation }) => {
const {state} = navigation;
return {
title: `${strings['KATAKANA_LIST_TITLE']}`,
};
swipeEnabled: false
};

constructor(props) {
Expand Down
1 change: 1 addition & 0 deletions app/screens/learn/learnhl1.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ import {
headerTitleStyle: {
fontSize: 20,
},
title: 'Test',
};


Expand Down

0 comments on commit 390adb9

Please sign in to comment.