Skip to content
This repository was archived by the owner on Jan 5, 2023. It is now read-only.

Features/add languague vi #331

Open
wants to merge 3 commits into
base: iosched_2020
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion androidTest-shared/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ android {
}

dependencies {
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$rootProject.kotlinVersion"
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$rootProject.kotlinVersion"

// Architecture Components
implementation "androidx.lifecycle:lifecycle-extensions:$rootProject.lifecycleVersion"
Expand Down
2 changes: 1 addition & 1 deletion ar/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -59,5 +59,5 @@ dependencies {
implementation "androidx.appcompat:appcompat:$rootProject.appcompatVersion"
implementation "com.google.ar:core:$rootProject.arcoreVersion"
implementation "com.google.android.gms:play-services-vision:$rootProject.googlePlayServicesVisionVersion"
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$rootProject.kotlinVersion"
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$rootProject.kotlinVersion"
}
28 changes: 14 additions & 14 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,11 @@ buildscript {

// App dependencies
androidGradlePluginVersion = '3.4.1'
appcompatVersion = '1.1.0-beta01'
activityVersion = '1.0.0-beta01'
appcompatVersion = '1.1.0'
activityVersion = '1.0.0'
cardviewVersion = '1.0.0'
archTestingVersion = '2.0.0'
arcoreVersion = '1.7.0'
arcoreVersion = '1.12.0'
browserVersion = '1.0.0'
constraintLayoutVersion = '1.1.3'
coreVersion = '1.2.0-alpha02'
Expand All @@ -47,28 +47,28 @@ buildscript {
drawerLayoutVersion = '1.1.0-alpha02'
espressoVersion = '3.1.1'
fabricVersion = '1.25.4'
firebaseAuthVersion = '18.1.0'
firebaseConfigVersion = '18.0.0'
firebaseCoreVersion = '17.0.1'
firebaseFirestoreVersion = '20.2.0'
firebaseFunctionsVersion = '18.1.0'
firebaseMessagingVersion = '19.0.1'
firebaseAuthVersion = '19.1.0'
firebaseConfigVersion = '19.0.2'
firebaseCoreVersion = '17.2.0'
firebaseFirestoreVersion = '21.1.1'
firebaseFunctionsVersion = '19.0.1'
firebaseMessagingVersion = '20.0.0'
firebaseUiVersion = "4.0.0"
flexboxVersion = "1.1.0"
fragmentVersion = "1.1.0-beta01"
glideVersion = "4.6.1"
googleMapUtilsVersion = "0.5"
googlePlayServicesMapsVersion = '16.0.0'
googlePlayServicesVisionVersion = '17.0.2'
googlePlayServicesMapsVersion = '17.0.0'
googlePlayServicesVisionVersion = '18.0.0'
googleServicesVersion = "3.2.0"
gsonVersion = "2.8.1"
hamcrestVersion = '1.3'
junitVersion = '4.12'
kotlinVersion = '1.3.41'
ktxVersion = "1.0.0"
kotlinVersion = '1.3.50'
ktxVersion = "1.1.0"
leanbackVersion = '1.0.0'
legacySupportVersion = '1.0.0'
lifecycleVersion = '2.1.0-beta01'
lifecycleVersion = '2.2.0-alpha05'
lottieVersion = "3.0.0"
materialVersion = '1.1.0-alpha07'
mockitoVersion = "2.8.9"
Expand Down
2 changes: 1 addition & 1 deletion mobile/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ dependencies {
implementation "androidx.core:core-ktx:$rootProject.ktxVersion"

// Kotlin
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$rootProject.kotlinVersion"
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$rootProject.kotlinVersion"

// Instrumentation tests
androidTestImplementation "androidx.test.espresso:espresso-core:$rootProject.espressoVersion"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ class ScheduleFragment : MainNavigationFragment() {
// Filters sheet configuration
bottomSheetBehavior = BottomSheetBehavior.from(view.findViewById(R.id.filter_sheet))
filtersFab.setOnClickListener {
bottomSheetBehavior.state = BottomSheetBehavior.STATE_EXPANDED
bottomSheetBehavior.state = STATE_EXPANDED
}
bottomSheetBehavior.addBottomSheetCallback(object : BottomSheetCallback {
override fun onStateChanged(bottomSheet: View, newState: Int) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -245,8 +245,6 @@ class BottomSheetBehavior<V : View> : Behavior<V> {

private val callbacks: MutableSet<BottomSheetCallback> = mutableSetOf()

constructor() : super()

@SuppressLint("PrivateResource")
constructor(context: Context, attrs: AttributeSet?) : super(context, attrs) {
// Re-use BottomSheetBehavior's attrs
Expand Down Expand Up @@ -289,7 +287,7 @@ class BottomSheetBehavior<V : View> : Behavior<V> {
isDraggable = ss.isDraggable
peekHeight = ss.peekHeight
isFitToContents = ss.isFitToContents
isHideable = ss.isHideable
isHideable = ss.isHidden
skipCollapsed = ss.skipCollapsed

// Set state last. Intermediate states are restored as collapsed state.
Expand Down Expand Up @@ -827,7 +825,7 @@ class BottomSheetBehavior<V : View> : Behavior<V> {
@State internal val state: Int
internal val peekHeight: Int
internal val isFitToContents: Boolean
internal val isHideable: Boolean
internal val isHidden: Boolean
internal val skipCollapsed: Boolean
internal val isDraggable: Boolean

Expand All @@ -837,7 +835,7 @@ class BottomSheetBehavior<V : View> : Behavior<V> {
state = source.readInt()
peekHeight = source.readInt()
isFitToContents = source.readBooleanUsingCompat()
isHideable = source.readBooleanUsingCompat()
isHidden = source.readBooleanUsingCompat()
skipCollapsed = source.readBooleanUsingCompat()
isDraggable = source.readBooleanUsingCompat()
}
Expand All @@ -854,7 +852,7 @@ class BottomSheetBehavior<V : View> : Behavior<V> {
this.state = state
this.peekHeight = peekHeight
this.isFitToContents = isFitToContents
this.isHideable = isHideable
this.isHidden = isHideable
this.skipCollapsed = skipCollapsed
this.isDraggable = isDraggable
}
Expand All @@ -865,7 +863,7 @@ class BottomSheetBehavior<V : View> : Behavior<V> {
writeInt(state)
writeInt(peekHeight)
writeBooleanUsingCompat(isFitToContents)
writeBooleanUsingCompat(isHideable)
writeBooleanUsingCompat(isHidden)
writeBooleanUsingCompat(skipCollapsed)
writeBooleanUsingCompat(isDraggable)
}
Expand Down
2 changes: 2 additions & 0 deletions mobile/src/main/res/values-vi/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -269,4 +269,6 @@
<string name="codelabs_website">Trang web của Lớp học mã</string>
<string name="codelab_duration">Thời lượng: %1$d phút</string>
<string name="start_codelab">Bắt đầu lớp học mã</string>
<string name="ask_question">Hỏi Đáp</string>
<string name="version_name">Phiên bản %s</string>
</resources>
2 changes: 1 addition & 1 deletion model/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ dependencies {
api "org.threeten:threetenbp:$rootProject.threetenbpVersion:no-tzdb"
implementation "androidx.core:core-ktx:$rootProject.ktxVersion"

implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$rootProject.kotlinVersion"
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$rootProject.kotlinVersion"
}

sourceCompatibility = "1.7"
Expand Down
2 changes: 1 addition & 1 deletion shared/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ dependencies {
implementation "com.squareup.okhttp3:logging-interceptor:$rootProject.okhttpVersion"

// Kotlin
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$rootProject.kotlinVersion"
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$rootProject.kotlinVersion"

// Dagger
implementation "com.google.dagger:dagger-android:$rootProject.dagger"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ open class LoadSessionUseCase @Inject constructor(private val repository: Sessio
MediatorUseCase<String, Session>() {

override fun execute(parameters: SessionId) {
val session = repository.getSessions().firstOrNull { it -> it.id == parameters }
val session = repository.getSessions().firstOrNull { it.id == parameters }

if (session == null) {
result.postValue(Result.Error(SessionNotFoundException()))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,15 +32,15 @@ import java.util.concurrent.TimeUnit
*/
class IoschedFirebaseMessagingService : DaggerFirebaseMessagingService() {

override fun onNewToken(token: String?) {
override fun onNewToken(token: String) {
super.onNewToken(token)
Timber.d("New firebase token: $token")
// Nothing to do, we update the user's firebase token via FirebaseAuthStateUserDataSource
}

override fun onMessageReceived(remoteMessage: RemoteMessage?) {
Timber.d("Message data payload: ${remoteMessage?.data}")
val data = remoteMessage?.data ?: return
override fun onMessageReceived(remoteMessage: RemoteMessage) {
Timber.d("Message data payload: ${remoteMessage.data}")
val data = remoteMessage.data
if (data[TRIGGER_EVENT_DATA_SYNC_key] == TRIGGER_EVENT_DATA_SYNC) {
// Schedule job on JobScheduler when FCM message with action `TRIGGER_EVENT_DATA_SYNC`
// is received.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ class TestConfDataSourceSession0 : ConferenceDataSource {
private class TestConfDataSourceSession1 : ConferenceDataSource {
override fun getRemoteConferenceData(): ConferenceData? {
return ConferenceData(
sessions = listOf(TestData.session1),
sessions = listOf(session1),
speakers = listOf(TestData.speaker1),
rooms = emptyList(),
codelabs = emptyList(),
Expand All @@ -172,7 +172,7 @@ private class TestConfDataSourceSession1 : ConferenceDataSource {

override fun getOfflineConferenceData(): ConferenceData? {
return ConferenceData(
sessions = listOf(TestData.session1),
sessions = listOf(session1),
speakers = listOf(TestData.speaker1),
rooms = emptyList(),
codelabs = emptyList(),
Expand All @@ -189,7 +189,7 @@ class BootstrapDataSourceSession3 : ConferenceDataSource {

override fun getOfflineConferenceData(): ConferenceData? {
return ConferenceData(
sessions = listOf(TestData.session3),
sessions = listOf(session3),
speakers = listOf(TestData.speaker1),
rooms = emptyList(),
codelabs = emptyList(),
Expand All @@ -206,7 +206,7 @@ private class TestConfDataSourceOnlyCachedSession1 : ConferenceDataSource {

override fun getOfflineConferenceData(): ConferenceData? {
return ConferenceData(
sessions = listOf(TestData.session1),
sessions = listOf(session1),
speakers = listOf(TestData.speaker1),
rooms = emptyList(),
codelabs = emptyList(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -284,7 +284,7 @@ class CompareOldAndNewUserEventsTest {
}

private fun createReservationResult(
requestResult: ReservationRequestResult.ReservationRequestStatus? = null,
requestResult: ReservationRequestStatus? = null,
requestId: String = "213",
timestamp: Long = -1
): ReservationRequestResult {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ class LoadCodelabsUseCaseTest {
@Test
fun loadCodelabsList() {
val loadCodelabsUseCase = LoadCodelabsUseCase(CodelabsRepository(TestDataRepository))
val codelabs: Result.Success<List<Codelab>> =
val codelabs: Success<List<Codelab>> =
loadCodelabsUseCase.executeNow(Unit) as Success<List<Codelab>>
assertThat(codelabs.data, `is`(equalTo(TestData.codelabsSorted)))
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ class LoadTagsUseCaseTest {
@Test
fun returnsListOfTags() {
val loadTagsUseCase = LoadTagsUseCase(TagRepository(TestDataRepository))
val tags: Result.Success<List<Tag>> =
val tags: Success<List<Tag>> =
loadTagsUseCase.executeNow(Unit) as Success<List<Tag>>

assertEquals(tags.data, TagRepository(TestDataRepository).getTags())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* limitations under the License.
*/

package com.google.samples.apps.iosched.model
package com.google.samples.apps.iosched.shared.model

import com.google.samples.apps.iosched.model.SessionType.CODELAB
import com.google.samples.apps.iosched.model.SessionType.SESSION
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,9 @@
* limitations under the License.
*/

package com.google.samples.apps.iosched.model
package com.google.samples.apps.iosched.shared.model

import com.google.samples.apps.iosched.model.Tag
import org.hamcrest.CoreMatchers.equalTo
import org.hamcrest.CoreMatchers.not
import org.junit.Assert.assertThat
Expand Down
2 changes: 1 addition & 1 deletion test-shared/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ dependencies {

implementation project(":model")
// Kotlin
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$rootProject.kotlinVersion"
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$rootProject.kotlinVersion"

// ThreeTenBP for the shared module only. Date and time API for Java.
testImplementation "org.threeten:threetenbp:$rootProject.threetenbpVersion"
Expand Down