Skip to content

Commit

Permalink
Merge pull request braille-systems#328 from braille-systems/fix/327-n…
Browse files Browse the repository at this point in the history
…o-octave

braille-systems#327 remove octave marks
  • Loading branch information
zuevval authored Feb 7, 2022
2 parents d88eba2 + 3b74283 commit e7e41e8
Show file tree
Hide file tree
Showing 6 changed files with 84 additions and 65 deletions.
8 changes: 4 additions & 4 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -17,17 +17,17 @@ android {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
compileSdkVersion 29
compileSdkVersion 30
buildToolsVersion "29.0.3"
dataBinding {
enabled = true
}
defaultConfig {
applicationId "com.github.braillesystems.learnbraille"
minSdkVersion 19
targetSdkVersion 29
versionCode 17
versionName "1.3.0"
targetSdkVersion 30
versionCode 21
versionName "1.3.2"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
vectorDrawables.useSupportLibrary = true
multiDexEnabled = true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ import timber.log.Timber
CurrentStep::class, LastCourseStep::class, LastLessonStep::class,
Action::class
],
version = 20,
version = 22,
exportSchema = true
)
@TypeConverters(
Expand Down Expand Up @@ -135,7 +135,9 @@ abstract class LearnBrailleDatabase : RoomDatabase(), KoinComponent {
MIGRATION_16_17,
MIGRATION_17_18,
MIGRATION_18_19,
MIGRATION_19_20
MIGRATION_19_20,
MIGRATION_20_21,
MIGRATION_21_22
)
.build()
.init()
Expand Down Expand Up @@ -339,3 +341,18 @@ private val MIGRATION_19_20 = object : Migration(19, 20) {
}
}

private val MIGRATION_20_21 = object : Migration(20, 21) {
override fun migrate(database: SupportSQLiteDatabase) {
Timber.i("Start 20-21 migration")
updateTheoryAndMaterials(database)
Timber.i("Finish 20-21 migration")
}
}

private val MIGRATION_21_22 = object : Migration(21, 22) {
override fun migrate(database: SupportSQLiteDatabase) {
Timber.i("Start 21-22 migration")
updateTheoryAndMaterials(database)
Timber.i("Finish 21-22 migration")
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,13 @@ val otherMusicalTypes = listOf(
MarkerType.MusicRest4th,
MarkerType.MusicRestHalf,
MarkerType.MusicRestFull,
MarkerType.CounterOctaveMark,
MarkerType.OctaveMarkBig,
MarkerType.OctaveMarkSmall,
MarkerType.OctaveMark1,
MarkerType.OctaveMark2,
MarkerType.OctaveMark3,
MarkerType.OctaveMark4,
MarkerType.OctaveMark5,
MarkerType.OctaveMark6,
MarkerType.OctaveMark7,
MarkerType.MusicSharp,
MarkerType.MusicFlat,
MarkerType.MusicNatural,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2270,18 +2270,7 @@ internal val golubinaIntroLessons by lessons {
)
)
+Info("""
Каждая строка в нотах должна начинаться с обозначения октавы. В следующих шагах
посмотрим на их обозначения.
""")
+Show(content.markers.getValue(MarkerType.OctaveMark1))
+Show(content.markers.getValue(MarkerType.OctaveMark2))
+Show(content.markers.getValue(MarkerType.OctaveMark3))
+Show(content.markers.getValue(MarkerType.OctaveMark4))
+Show(content.markers.getValue(MarkerType.OctaveMark5))
+Show(content.markers.getValue(MarkerType.OctaveMark6))
+Show(content.markers.getValue(MarkerType.OctaveMark7))
+Info("""
Последний набор символов, с которыми мы сегодня ознакомимся:
Ещё один набор символов, с которыми мы сегодня ознакомимся:
<br>
Знаки альтерации - диез, бемоль и бекар;
<b>Музыкальный перенос</b> - аналог обычного текстового переноса в нотах.
Expand All @@ -2291,6 +2280,18 @@ internal val golubinaIntroLessons by lessons {
+Show(content.markers.getValue(MarkerType.MusicSharp))
+Show(content.markers.getValue(MarkerType.MusicFlat))
+Show(content.markers.getValue(MarkerType.MusicNatural))
+Show(content.markers.getValue(MarkerType.MusicHyphen))
+Info("""
Каждая строка в нотах должна начинаться с обозначения октавы. В следующих шагах
посмотрим на эти символы.
""")
+Show(content.markers.getValue(MarkerType.OctaveMarkBig))
+Show(content.markers.getValue(MarkerType.OctaveMarkSmall))
+Show(content.markers.getValue(MarkerType.OctaveMark1))
+Show(content.markers.getValue(MarkerType.OctaveMark2))
+Show(content.markers.getValue(MarkerType.OctaveMark3))
+Show(content.markers.getValue(MarkerType.OctaveMark4))
+Show(content.markers.getValue(MarkerType.CounterOctaveMark))
+Info(InfoInterpolation.run {
"""
Урок $iLesson на этом завершается.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,13 +49,13 @@ enum class MarkerType {
MusicRest4th,
MusicRestHalf,
MusicRestFull,
CounterOctaveMark,
OctaveMarkBig,
OctaveMarkSmall,
OctaveMark1,
OctaveMark2,
OctaveMark3,
OctaveMark4,
OctaveMark5,
OctaveMark6,
OctaveMark7,
MusicHyphen,
MusicSharp,
MusicFlat,
Expand Down Expand Up @@ -262,13 +262,14 @@ private val otherMusicalSymbols by markers {
marker(MarkerType.MusicRest4th, BrailleDots(F, F, F, E, E, F))
marker(MarkerType.MusicRestHalf, BrailleDots(F, E, F, E, E, F))
marker(MarkerType.MusicRestFull, BrailleDots(F, E, F, F, E, E))
marker(MarkerType.OctaveMark1, BrailleDots(E, E, E, F, E, E))
marker(MarkerType.OctaveMark2, BrailleDots(E, E, E, F, F, E))
marker(MarkerType.OctaveMark3, BrailleDots(E, E, E, F, F, F))
marker(MarkerType.OctaveMark4, BrailleDots(E, E, E, E, F, E))
marker(MarkerType.OctaveMark5, BrailleDots(E, E, E, F, E, F))
marker(MarkerType.OctaveMark6, BrailleDots(E, E, E, E, F, F))
marker(MarkerType.OctaveMark7, BrailleDots(E, E, E, E, E, F))
marker(MarkerType.CounterOctaveMark, BrailleDots(E, E, E, F, E, E))
marker(MarkerType.OctaveMarkBig, BrailleDots(E, E, E, F, F, E))
marker(MarkerType.OctaveMarkSmall, BrailleDots(E, E, E, F, F, F))
marker(MarkerType.OctaveMark1, BrailleDots(E, E, E, E, F, E))
marker(MarkerType.OctaveMark2, BrailleDots(E, E, E, F, E, F))
marker(MarkerType.OctaveMark3, BrailleDots(E, E, E, E, F, F))
marker(MarkerType.OctaveMark4, BrailleDots(E, E, E, E, E, F))
marker(MarkerType.MusicHyphen, BrailleDots(E, E, E, E, F, E))
marker(MarkerType.MusicHyphen, BrailleDots(E, E, E, E, F, E))
marker(MarkerType.MusicSharp, brailleDots = BrailleDots(F, E, E, F, E, F))
marker(MarkerType.MusicFlat, brailleDots = BrailleDots(F, F, E, E, E, F))
Expand Down Expand Up @@ -622,38 +623,38 @@ val Context.inputMarkerPrintRules by rules<Context, MarkerType, String>(
},

{
val s = getString(R.string.input_music_octave1)
MarkerType.OctaveMark1::equals to { _: MarkerType -> s }
val s = getString(R.string.input_music_counter_octave)
MarkerType.CounterOctaveMark::equals to { _: MarkerType -> s }
},

{
val s = getString(R.string.input_music_octave2)
MarkerType.OctaveMark2::equals to { _: MarkerType -> s }
val s = getString(R.string.input_music_octave_big)
MarkerType.OctaveMarkBig::equals to { _: MarkerType -> s }
},

{
val s = getString(R.string.input_music_octave3)
MarkerType.OctaveMark3::equals to { _: MarkerType -> s }
val s = getString(R.string.input_music_octave_small)
MarkerType.OctaveMarkSmall::equals to { _: MarkerType -> s }
},

{
val s = getString(R.string.input_music_octave4)
MarkerType.OctaveMark4::equals to { _: MarkerType -> s }
val s = getString(R.string.input_music_octave1)
MarkerType.OctaveMark1::equals to { _: MarkerType -> s }
},

{
val s = getString(R.string.input_music_octave5)
MarkerType.OctaveMark5::equals to { _: MarkerType -> s }
val s = getString(R.string.input_music_octave2)
MarkerType.OctaveMark2::equals to { _: MarkerType -> s }
},

{
val s = getString(R.string.input_music_octave6)
MarkerType.OctaveMark6::equals to { _: MarkerType -> s }
val s = getString(R.string.input_music_octave3)
MarkerType.OctaveMark3::equals to { _: MarkerType -> s }
},

{
val s = getString(R.string.input_music_octave7)
MarkerType.OctaveMark7::equals to { _: MarkerType -> s }
val s = getString(R.string.input_music_octave4)
MarkerType.OctaveMark4::equals to { _: MarkerType -> s }
},

{
Expand Down Expand Up @@ -788,38 +789,38 @@ val Context.showMarkerPrintRules by rules<Context, MarkerType, String>(
},

{
val s = getString(R.string.show_music_octave1)
MarkerType.OctaveMark1::equals to { _: MarkerType -> s }
val s = getString(R.string.show_music_counter_octave)
MarkerType.CounterOctaveMark::equals to { _: MarkerType -> s }
},

{
val s = getString(R.string.show_music_octave2)
MarkerType.OctaveMark2::equals to { _: MarkerType -> s }
val s = getString(R.string.show_music_octave_big)
MarkerType.OctaveMarkBig::equals to { _: MarkerType -> s }
},

{
val s = getString(R.string.show_music_octave3)
MarkerType.OctaveMark3::equals to { _: MarkerType -> s }
val s = getString(R.string.show_music_octave_small)
MarkerType.OctaveMarkSmall::equals to { _: MarkerType -> s }
},

{
val s = getString(R.string.show_music_octave4)
MarkerType.OctaveMark4::equals to { _: MarkerType -> s }
val s = getString(R.string.show_music_octave1)
MarkerType.OctaveMark1::equals to { _: MarkerType -> s }
},

{
val s = getString(R.string.show_music_octave5)
MarkerType.OctaveMark5::equals to { _: MarkerType -> s }
val s = getString(R.string.show_music_octave2)
MarkerType.OctaveMark2::equals to { _: MarkerType -> s }
},

{
val s = getString(R.string.show_music_octave6)
MarkerType.OctaveMark6::equals to { _: MarkerType -> s }
val s = getString(R.string.show_music_octave3)
MarkerType.OctaveMark3::equals to { _: MarkerType -> s }
},

{
val s = getString(R.string.show_music_octave7)
MarkerType.OctaveMark7::equals to { _: MarkerType -> s }
val s = getString(R.string.show_music_octave4)
MarkerType.OctaveMark4::equals to { _: MarkerType -> s }
},

{
Expand Down
12 changes: 6 additions & 6 deletions app/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -88,13 +88,13 @@
<string name="input_music_rest_4th">Введите паузу длительности одна четверть</string>
<string name="input_music_rest_half">Введите паузу половинной длительности</string>
<string name="input_music_rest_full">Введите целую паузу</string>
<string name="input_music_counter_octave">Введите обозначение контроктавы</string>
<string name="input_music_octave_big">Введите обозначение большой октавы</string>
<string name="input_music_octave_small">Введите обозначение малой октавы</string>
<string name="input_music_octave1">Введите обозначение первой октавы</string>
<string name="input_music_octave2">Введите обозначение второй октавы</string>
<string name="input_music_octave3">Введите обозначение третьей октавы</string>
<string name="input_music_octave4">Введите обозначение четвёртой октавы</string>
<string name="input_music_octave5">Введите обозначение пятой октавы</string>
<string name="input_music_octave6">Введите обозначение шестой октавы</string>
<string name="input_music_octave7">Введите обозначение седьмой октавы</string>
<string name="input_music_hyphen">Введите музыкальный знак переноса</string>
<string name="input_music_sharp">Введите диез</string>
<string name="input_music_flat">Введите бемоль</string>
Expand Down Expand Up @@ -152,13 +152,13 @@
<string name="show_music_rest_4th">Пауза длительности одна четверть</string>
<string name="show_music_rest_half">Пауза половинной длительности</string>
<string name="show_music_rest_full">Целая пауза</string>
<string name="show_music_counter_octave">Обозначение контроктавы</string>
<string name="show_music_octave_big">Обозначение большой октавы</string>
<string name="show_music_octave_small">Обозначение малой октавы</string>
<string name="show_music_octave1">Обозначение первой октавы</string>
<string name="show_music_octave2">Обозначение второй октавы</string>
<string name="show_music_octave3">Обозначение третьей октавы</string>
<string name="show_music_octave4">Обозначение четвёртой октавы</string>
<string name="show_music_octave5">Обозначение пятой октавы</string>
<string name="show_music_octave6">Обозначение шестой октавы</string>
<string name="show_music_octave7">Обозначение седьмой октавы</string>
<string name="show_music_hyphen">Музыкальный знак переноса</string>
<string name="show_music_sharp">Диез</string>
<string name="show_music_flat">Бемоль</string>
Expand Down

0 comments on commit e7e41e8

Please sign in to comment.