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

Commit

Permalink
Merge remote-tracking branch 'origin/develop' into feature/#84_fix_lo…
Browse files Browse the repository at this point in the history
…calization_and_other_bugs
  • Loading branch information
viinkelvin committed Jun 20, 2018
2 parents a44a41d + e40aaf3 commit babd5d5
Show file tree
Hide file tree
Showing 17 changed files with 100 additions and 35 deletions.
1 change: 1 addition & 0 deletions android/app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
android:label="@string/app_name"
android:icon="@mipmap/ic_launcher"
android:allowBackup="true"
android:screenOrientation="portrait"
android:largeHeap="true"
android:theme="@style/AppTheme">
<meta-data
Expand Down
Binary file modified app/assets/img/topic/10.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified app/assets/img/topic/11.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified app/assets/img/topic/12.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added app/assets/img/topic/13.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified app/assets/img/topic/14.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified app/assets/img/topic/15.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified app/assets/img/topic/4.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified app/assets/img/topic/5.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified app/assets/img/topic/7.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified app/assets/img/topic/8.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified app/assets/img/topic/9.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
40 changes: 24 additions & 16 deletions app/config/localization.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,14 @@ export let strings = new LocalizedStrings({
KATAKANA_LIST_TITLE: 'Katakana',
NUMBER_TITLE : "Number",
GREETING_TITLE : "Greeting",
TOPIC1_TITLE : "Myself",
TOPIC2_TITLE : "Family",
TOPIC3_TITLE : "House",
TOPIC4_TITLE : "Living environments",
TOPIC5_TITLE : "Free time",
TOPIC6_TITLE : "Entertainment",
TOPIC7_TITLE : "Living",
TOPIC8_TITLE : "Human Life",
TOPIC1_TITLE : "Myself and Work",
TOPIC2_TITLE : "Life and Hobbies",
TOPIC3_TITLE : "House and Town",
TOPIC4_TITLE : "Travel and transportation",
TOPIC5_TITLE : "Shopping",
TOPIC6_TITLE : "Family",
TOPIC7_TITLE : "Day Off",
TOPIC8_TITLE : "Relationship with people",
TOPIC9_TITLE : "Travel",
TOPIC10_TITLE : "Traffic",
TOPIC11_TITLE : "health",
Expand Down Expand Up @@ -166,6 +166,11 @@ export let strings = new LocalizedStrings({

WARNING : "Warning",
HISTORY : 'History',
TIME : 'TIME',
SCORE : 'SCORE',
DETAIL : 'DETAIL',


},
ja: {
loginGuest: "ログイン",
Expand All @@ -180,14 +185,14 @@ export let strings = new LocalizedStrings({
KATAKANA_LIST_TITLE: 'カタカナ',
NUMBER_TITLE : "数字",
GREETING_TITLE : "あいさつ",
TOPIC1_TITLE : "自分",
TOPIC2_TITLE : "家族",
TOPIC3_TITLE : "住まい",
TOPIC4_TITLE : "住環境",
TOPIC5_TITLE : "自由時間",
TOPIC6_TITLE : "娯楽",
TOPIC7_TITLE : "生活",
TOPIC8_TITLE : "人生",
TOPIC1_TITLE : "私と仕事",
TOPIC2_TITLE : "生活と趣味",
TOPIC3_TITLE : "家と町",
TOPIC4_TITLE : "旅行と交通",
TOPIC5_TITLE : "買い物",
TOPIC6_TITLE : "家族",
TOPIC7_TITLE : "休みの日",
TOPIC8_TITLE : "人との関係",
TOPIC9_TITLE : "旅行",
TOPIC10_TITLE : "交通",
TOPIC11_TITLE : "健康",
Expand Down Expand Up @@ -330,6 +335,9 @@ export let strings = new LocalizedStrings({
T023_MSG : '言語と文化のテスト取ってお願いします。',
T024_MSG : '言語と文化のテスト取ってお願いします。',
HISTORY : '履歴',
TIME : '時間',
SCORE : 'スコア',
DETAIL : '詳細',

}
});
22 changes: 11 additions & 11 deletions app/screens/Study/hiraganaList.js
Original file line number Diff line number Diff line change
Expand Up @@ -208,20 +208,20 @@ class HiraganaListScreen extends Component {
<View style={[study.cardBox, study.borderBox, study.p3]}>
<Text style={[study.textLg, study.textBlack]}>{ strings['STUDY_QUIZ'] }</Text>
<View style={study.buttonContainer}>
<TouchableOpacity style={study.button} onPress={this.navigateToLearn.bind(this, 'Quiz', this.state.topicId)}>
<Icon name='play-arrow' color='#fff'/>
<Text style={[study.textWhite, study.textMd]} > { strings['STUDY_START'] }</Text>
<TouchableOpacity style={study.button} onPress={this.navigateReview.bind(this, 'QUIZ')}>
<Icon name='search' color='#fff'/>
<Text style={[study.textWhite, study.textMd, study.mR10]} > { strings['STUDY_REVIEW'] }</Text>
</TouchableOpacity>
</View>
<Text style={[study.textLg, study.textCenter, study.textBold, study.textBlack]}>{ scoreQuiz }</Text>
<View style={study.buttonContainer}>
<TouchableOpacity style={[study.button, study.mR10]} onPress={this.navigateHistory.bind(this, 'QUIZ')}>
<TouchableOpacity style={[study.button, study.mR10]} onPress={this.navigateToLearn.bind(this, 'Quiz')}>
<Icon name='play-arrow' color='#fff'/>
<Text style={[study.textWhite, study.textMd]} > history</Text>
<Text style={[study.textWhite, study.textMd]} > { strings['STUDY_START'] }</Text>
</TouchableOpacity>
<TouchableOpacity style={study.button} onPress={this.navigateReview.bind(this, 'QUIZ')}>
<Icon name='search' color='#fff'/>
<Text style={[study.textWhite, study.textMd]} > { strings['STUDY_REVIEW'] }</Text>
<TouchableOpacity style={[study.button]} onPress={this.navigateHistory.bind(this, 'QUIZ')}>
<Icon name='history' color='#fff'/>
<Text style={[study.textWhite, study.textMd]} >{ strings['HISTORY'] }</Text>
</TouchableOpacity>
</View>
</View>
Expand All @@ -235,9 +235,9 @@ class HiraganaListScreen extends Component {
<Icon name='play-arrow' color='#fff'/>
<Text style={[study.textWhite, study.textMd]} > { strings['STUDY_START'] }</Text>
</TouchableOpacity>
<TouchableOpacity style={[study.button, study.mR10]} onPress={this.navigateHistory.bind(this, 'TEST')}>
<Icon name='play-arrow' color='#fff'/>
<Text style={[study.textWhite, study.textMd]} > history</Text>
<TouchableOpacity style={[study.button]} onPress={this.navigateHistory.bind(this, 'TEST')}>
<Icon name='history' color='#fff'/>
<Text style={[study.textWhite, study.textMd]} >{ strings['HISTORY'] }</Text>
</TouchableOpacity>
</View>
</View>
Expand Down
9 changes: 7 additions & 2 deletions app/screens/Study/studyList.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import { ImageData } from '../../config/image_list';

import { bindActionCreators } from 'redux';
import { connect } from 'react-redux';
import * as Actions from '../../actions/study'; //Import your actions
import * as Actions from '../../actions/summary'; //Import your actions

import style from 'react-native-datepicker/style';

Expand All @@ -38,6 +38,10 @@ class StudyListScreen extends Component {
lockedMessage=(item, index)=>{
alert(strings[item.topic_id + '_MSG'] );
}

componentWillMount(){
this.props.getLockRecord();
}

navigateToLearn=(item, index)=>{
item['index'] = index;
Expand Down Expand Up @@ -75,6 +79,7 @@ class StudyListScreen extends Component {
}

checkLock = (topic_id) =>{
console.log(this.props.lock);
if(this.props.lock){
if(this.props.lock[topic_id]){
if(this.props.lock[topic_id].lock){
Expand All @@ -86,7 +91,7 @@ class StudyListScreen extends Component {
return false;
}
}else{
return true;
return false;
}
}
render() {
Expand Down
36 changes: 30 additions & 6 deletions app/screens/Summary/historyList.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ import {

}
state = {
type : ""
}

componentWillMount() {
Expand All @@ -62,23 +63,46 @@ import {
];
return datefinish.getDate() + " " + monthNames[datefinish.getMonth()] + " " + datefinish.getFullYear() + " " + datefinish.getHours() + ":" + datefinish.getMinutes();
}

checkType = (itemType) =>{

}

gotoHistoryDetail = (item) =>{
this.props.navigation.navigate('historyDetailScreen', (item));
}
render() {
console.log(this.state.type);
return (
<ScrollView style={study.StudyContainer}>
<View style={study.historyFlex}>
<View style={study.historyFlexRow2}>
<Text style={study.historyFont}>{ strings['TIME'] }</Text>
</View>
<View style={study.historyFlexRow1}>
<Text style={study.historyFont}>{ strings['SCORE'] }</Text>
</View>
<View style={study.historyFlexRow1}>
<Text style={study.historyFont}>{ strings['DETAIL'] }</Text>
</View>
</View>
{ this.props.historyData ? (
<View>
{ this.props.historyData.map((item, key)=>(
<View key={key}>
{ this.item == this.state.type ? (
<View>
<Text>{ this.getDateFormat(item.startTime) }</Text>
<Text>{ item.type }</Text>
<Text>{ this.countScore(item.questions) }</Text>
<TouchableHighlight onPress={ () => this.gotoHistoryDetail(item) }><Text>Detail</Text></TouchableHighlight>
{ item.type == this.state.type ? (
<View style={study.historyFlex}>
<View style={study.historyFlexRow2}>
<Text style={study.historyFont}>{ this.getDateFormat(item.startTime) }</Text>
</View>
<View style={study.historyFlexRow1}>
<Text style={study.historyFont}>{ this.countScore(item.questions) }</Text>
</View>
<View style={study.historyFlexRow1}>
<TouchableOpacity style={study.styleButon} onPress={ () => this.gotoHistoryDetail(item) }>
<Icon name='forward' color='#fff'/>
</TouchableOpacity>
</View>
</View>
) : (
<View></View>
Expand Down
27 changes: 27 additions & 0 deletions app/styles/study.js
Original file line number Diff line number Diff line change
Expand Up @@ -364,5 +364,32 @@ tableHeader : {
tableBorder: {
borderWidth: 1,
},
historyFlex: {
flex: 1,
flexDirection: 'row',
paddingBottom:5,
paddingTop: 5,
borderBottomWidth: 1,
borderBottomColor: '#ddd'
},
historyFlexRow1: {
flex: 1,
},
historyFlexRow2: {
flex: 2,
},
historyFont: {
fontSize: 20
},
styleButon :{
padding:5,
height: 40,
width:40,
backgroundColor: '#45B3EB',
borderRadius: 20,
justifyContent: 'center',
alignItems: 'center',
marginLeft: 20
}
});

0 comments on commit babd5d5

Please sign in to comment.