feat(i18n): Papago 다음 순서에 AWS 공급자를 등록한다
This commit is contained in:
+7
-2
@@ -90,7 +90,6 @@ import javax.persistence.EntityManager
|
||||
TranslationSourceExtractor::class,
|
||||
TranslationReadModelMaterializer::class,
|
||||
TranslationCoordinator::class,
|
||||
LanguageProviderProperties::class,
|
||||
PapagoTranslationService::class,
|
||||
ResourceTranslationJobScheduler::class,
|
||||
TranslationJobScheduler::class,
|
||||
@@ -678,6 +677,12 @@ class CreatorCommunityLanguageDetectTest @Autowired constructor(
|
||||
@TestConfiguration
|
||||
@EnableAsync
|
||||
class AsyncConfiguration {
|
||||
@Bean
|
||||
fun languageProviderProperties() = LanguageProviderProperties(
|
||||
listOf(LanguageProviderId.PAPAGO),
|
||||
listOf(LanguageProviderId.PAPAGO)
|
||||
)
|
||||
|
||||
@Bean(name = ["taskExecutor"])
|
||||
fun taskExecutor(): DetailPipelineTaskExecutor {
|
||||
return DetailPipelineTaskExecutor()
|
||||
@@ -734,7 +739,7 @@ class ControlledLanguageDetectionCacheService(
|
||||
override val providerId = LanguageProviderId.PAPAGO
|
||||
override fun detect(query: String): String? = null
|
||||
}),
|
||||
LanguageProviderProperties()
|
||||
LanguageProviderProperties(listOf(LanguageProviderId.PAPAGO), listOf(LanguageProviderId.PAPAGO))
|
||||
) {
|
||||
val detections = ConcurrentHashMap<String, String>()
|
||||
val queries = ConcurrentLinkedQueue<String>()
|
||||
|
||||
+10
-1
@@ -4,6 +4,7 @@ import kr.co.vividnext.sodalive.configs.QueryDslConfig
|
||||
import kr.co.vividnext.sodalive.content.theme.AudioContentThemeQueryRepository
|
||||
import kr.co.vividnext.sodalive.explorer.profile.creatorCommunity.CreatorCommunity
|
||||
import kr.co.vividnext.sodalive.explorer.profile.creatorCommunity.CreatorCommunityRepository
|
||||
import kr.co.vividnext.sodalive.i18n.translation.LanguageProviderId.PAPAGO
|
||||
import kr.co.vividnext.sodalive.i18n.translation.LanguageProviderProperties
|
||||
import kr.co.vividnext.sodalive.i18n.translation.LanguageTranslationTargetType
|
||||
import kr.co.vividnext.sodalive.i18n.translation.PapagoLanguageDetectionProvider
|
||||
@@ -29,6 +30,8 @@ import org.springframework.aop.support.AopUtils
|
||||
import org.springframework.beans.factory.annotation.Autowired
|
||||
import org.springframework.boot.test.autoconfigure.jdbc.AutoConfigureTestDatabase
|
||||
import org.springframework.boot.test.autoconfigure.orm.jpa.DataJpaTest
|
||||
import org.springframework.boot.test.context.TestConfiguration
|
||||
import org.springframework.context.annotation.Bean
|
||||
import org.springframework.context.annotation.Import
|
||||
import org.springframework.http.HttpHeaders
|
||||
import org.springframework.http.HttpMethod
|
||||
@@ -71,7 +74,7 @@ import java.util.concurrent.atomic.AtomicInteger
|
||||
QueryDslConfig::class,
|
||||
AudioContentThemeQueryRepository::class,
|
||||
LanguageDetectionCacheService::class,
|
||||
LanguageProviderProperties::class,
|
||||
CreatorCommunityLanguageDetectionCacheConcurrencyTest.PapagoConfiguration::class,
|
||||
PapagoLanguageDetectionProvider::class,
|
||||
PapagoTranslationService::class,
|
||||
TranslationCoordinator::class,
|
||||
@@ -98,6 +101,12 @@ class CreatorCommunityLanguageDetectionCacheConcurrencyTest @Autowired construct
|
||||
}
|
||||
private lateinit var papagoRequests: ControlledPapagoRequestFactory
|
||||
|
||||
@TestConfiguration
|
||||
class PapagoConfiguration {
|
||||
@Bean
|
||||
fun languageProviderProperties() = LanguageProviderProperties(listOf(PAPAGO), listOf(PAPAGO))
|
||||
}
|
||||
|
||||
@BeforeEach
|
||||
fun setUp() {
|
||||
papagoRequests = ControlledPapagoRequestFactory()
|
||||
|
||||
+5
-1
@@ -108,6 +108,10 @@ class LanguageDetectionCacheServiceTest {
|
||||
override val providerId = LanguageProviderId.PAPAGO
|
||||
override fun detect(query: String) = detect()
|
||||
}
|
||||
return LanguageDetectionCacheService(repository, listOf(provider), LanguageProviderProperties())
|
||||
return LanguageDetectionCacheService(
|
||||
repository,
|
||||
listOf(provider),
|
||||
LanguageProviderProperties(listOf(LanguageProviderId.PAPAGO), listOf(LanguageProviderId.PAPAGO))
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user