File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 66
77'use strict' ;
88
9+ import {
10+ defineMessages ,
11+ } from 'react-intl' ;
12+
13+ const messages = defineMessages ( {
14+ otherStylesTitle : {
15+ id : 'tutorialVideos.otherStylesTitle' ,
16+ defaultMessage : 'Other Styles' ,
17+ description : 'Name of the tutorial category for miscellaneous dance styles' ,
18+ } ,
19+ } ) ;
20+
921export const defaultTutorials = [
1022 {
1123 title : 'Bboy / Bgirl' ,
@@ -140,6 +152,7 @@ export const defaultTutorials = [
140152 } ,
141153 {
142154 title : 'Other Styles' ,
155+ titleMessage : messages . otherStylesTitle ,
143156 thumbnail : require ( './images/styles/other.png' ) ,
144157 tutorials : [
145158 require ( './tutorials/misc/yakfilms.json' ) ,
Original file line number Diff line number Diff line change @@ -10,6 +10,7 @@ import moment from 'moment';
1010
1111export class Playlist {
1212 title : string ;
13+ titleMessage: ?{ id : string } ;
1314 subtitle: string ;
1415 author: string ;
1516 style: string ;
@@ -19,6 +20,7 @@ export class Playlist {
1920
2021 constructor ( json : any ) {
2122 this . title = json . title ;
23+ this . titleMessage = json . titleMessage ;
2224 this . subtitle = json . subtitle ;
2325 this . author = json . author ;
2426 this . style = json . style ;
Original file line number Diff line number Diff line change @@ -165,6 +165,11 @@ class _PlaylistStylesView extends React.Component {
165165 const imageWidth = boxWidth - 30 ;
166166 const durationSeconds = style . tutorials . reduce ( ( prev , current ) => prev + current . getDurationSeconds ( ) , 0 ) ;
167167 const length = formatDuration ( this . props . intl . formatMessage , durationSeconds ) ;
168+ let styleTitle = style . title ;
169+ console . log ( style . title , style . titleMessage ) ;
170+ if ( style . titleMessage ) {
171+ styleTitle = this . props . intl . formatMessage ( style . titleMessage ) ;
172+ }
168173 return < TouchableHighlight
169174 onPress = { ( ) => {
170175 this . props . onSelected ( style , this . state . stylePlaylists [ style ] ) ;
@@ -182,7 +187,7 @@ class _PlaylistStylesView extends React.Component {
182187 alignItems : 'center' ,
183188 } } >
184189 < Image source = { style . thumbnail } resizeMode = "contain" style = { { width : imageWidth , height : imageWidth } } />
185- < Text style = { { fontWeight : 'bold' } } > { style . title } </ Text >
190+ < Text style = { { fontWeight : 'bold' } } > { styleTitle } </ Text >
186191 < Text > { this . props . intl . formatMessage ( messages . numTutorials , { count : style . tutorials . length } ) } </ Text >
187192 < Text > { this . props . intl . formatMessage ( messages . totalTime , { time : length } ) } </ Text >
188193 </ View >
Original file line number Diff line number Diff line change 11{
2- "title" : " Mizuki's Waacking/Punking" ,
2+ "title" : " Mizuki: Waacking/Punking" ,
33 "subtitle" : " RISING Dance School" ,
44 "author" : " Mizuki" ,
55 "style" : " waack" ,
Original file line number Diff line number Diff line change 7575 "tutorialVideos.navigatorTitle" : " Learn: Tutorials" ,
7676 "tutorialVideos.numTutorials" : " {count} Tutorials" ,
7777 "tutorialVideos.numVideosWithDuration" : " {count} videos: {duration}" ,
78+ "tutorialVideos.otherStylesTitle" : " Other Styles" ,
7879 "tutorialVideos.styleHeader" : " Choose a style you'd like to learn:" ,
7980 "tutorialVideos.styleTutorialTitle" : " {style} Tutorials" ,
8081 "tutorialVideos.timeHoursMinutes" : " {hours}h {minutes}m" ,
Original file line number Diff line number Diff line change 7575 "tutorialVideos.navigatorTitle" : " Apprendre : Tutoriels" ,
7676 "tutorialVideos.numTutorials" : " {count} Tutoriels" ,
7777 "tutorialVideos.numVideosWithDuration" : " {count} vidéos : {duration}" ,
78+ "tutorialVideos.otherStylesTitle" : " D'autres Styles" ,
7879 "tutorialVideos.styleHeader" : " Choisir un style de danse :" ,
7980 "tutorialVideos.styleTutorialTitle" : " Tutoriels de {style}" ,
8081 "tutorialVideos.timeHoursMinutes" : " {hours}h {minutes}m" ,
Original file line number Diff line number Diff line change 7575 "tutorialVideos.navigatorTitle" : " 学ぶ: チュートリアル" ,
7676 "tutorialVideos.numTutorials" : " {count}本のチュートリアル" ,
7777 "tutorialVideos.numVideosWithDuration" : " {count}本の動画: {duration}" ,
78+ "tutorialVideos.otherStylesTitle" : " 他のダンススタイル" ,
7879 "tutorialVideos.styleHeader" : " 勉強したいダンススタイルを選択:" ,
7980 "tutorialVideos.styleTutorialTitle" : " {style}のチュートリアル" ,
8081 "tutorialVideos.timeHoursMinutes" : " {hours}時間 {minutes}分" ,
Original file line number Diff line number Diff line change 7575 "tutorialVideos.navigatorTitle" : " 學習: 課程" ,
7676 "tutorialVideos.numTutorials" : " {count}部課程" ,
7777 "tutorialVideos.numVideosWithDuration" : " {count}個短片: {duration}" ,
78+ "tutorialVideos.otherStylesTitle" : " 其他的舞蹈風格" ,
7879 "tutorialVideos.styleHeader" : " 選擇你想學習舞蹈風格:" ,
7980 "tutorialVideos.styleTutorialTitle" : " {style} 課程" ,
8081 "tutorialVideos.timeHoursMinutes" : " {hours}小時{minutes}分" ,
You can’t perform that action at this time.
0 commit comments