Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

다국어 지원 완료 #150

Merged
merged 18 commits into from
Dec 22, 2023
Merged
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
6 changes: 4 additions & 2 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,13 @@ insert_final_newline = true
trim_trailing_whitespace = true
ktlint_standard_filename = disabled
ktlint_standard_import-ordering = disabled
ktlint_standard_annotation = disabled
ktlint_standard_wrapping = disabled
ktlint_standard_argument-list-wrapping = disabled
ktlint_standard_multiline-if-else = disabled
ktlint_standard_trailing-comma-on-call-site = disabled
ktlint_standard_trailing-comma-on-declaration-site = disabled
ktlint_standard_no_blank_line_in_list = disabled

[*.{kt,kts}]
ij_kotlin_allow_trailing_comma = true
ij_kotlin_allow_trailing_comma_on_call_site = true
ij_kotlin_allow_trailing_comma_on_call_site = true
4 changes: 2 additions & 2 deletions app/src/main/res/values/splash.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@

<style name="Theme.Bandalart.Splash" parent="Theme.SplashScreen">
<item name="windowSplashScreenBackground">#FFF9FAFB</item>
<item name="windowSplashScreenAnimatedIcon">@drawable/ic_app</item>
<item name="windowSplashScreenAnimatedIcon">@drawable/ic_dummy_splash</item>
<item name="windowSplashScreenAnimationDuration">200</item>
<item name="postSplashScreenTheme">@style/Theme.Bandalart</item>
</style>

</resources>
</resources>
6 changes: 0 additions & 6 deletions app/src/main/res/values/strings.xml

This file was deleted.

4 changes: 2 additions & 2 deletions build-logic/src/main/kotlin/internal/android.kt
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import org.gradle.kotlin.dsl.configure
import org.gradle.kotlin.dsl.getByType
import org.jetbrains.kotlin.gradle.dsl.KotlinProjectExtension

internal fun Project.configureAndroid(extension: CommonExtension<*, *, *, *>) {
internal fun Project.configureAndroid(extension: CommonExtension<*, *, *, *, *>) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

저기에 * 하나 더 달리는거는 무슨 차이야?
저런게 바꼈다는거는 어디서 볼 수 있어?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

저기에 * 하나 더 달리는거는 무슨 차이야?
저런게 바꼈다는거는 어디서 볼 수 있어?

agp 버전 업데이트하는데 Star-projection 개수 관련한 에러가 발생해서 검색했었는데 8.0.2 -> 8.1.1 로 넘어갈때 그 개수가 4개에서 5개로 늘었더라고 그래서 하나 더 붙혀줬어

https://stackoverflow.com/questions/77036477/build-failure-after-migrating-to-gradle-8-1-1

https://android.googlesource.com/platform/tools/base/+/655ea2cf3bd8337a8a2172446a4c4713040d7df0%5E%21/

extension.apply {
compileSdk = ApplicationConstants.CompileSdk

Expand Down Expand Up @@ -65,7 +65,7 @@ internal val Project.isAndroidProject: Boolean
get() = pluginManager.hasPlugin(Plugins.AndroidApplication) ||
pluginManager.hasPlugin(Plugins.AndroidLibrary)

internal val Project.androidExtensions: CommonExtension<*, *, *, *>
internal val Project.androidExtensions: CommonExtension<*, *, *, *, *>
get() {
return if (pluginManager.hasPlugin(Plugins.AndroidApplication)) {
extensions.getByType<BaseAppModuleExtension>()
Expand Down
2 changes: 1 addition & 1 deletion build-logic/src/main/kotlin/internal/gmd.kt
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import com.android.build.api.dsl.CommonExtension
import com.android.build.api.dsl.ManagedVirtualDevice
import org.gradle.kotlin.dsl.create

internal fun configureGmd(extension: CommonExtension<*, *, *, *>) {
internal fun configureGmd(extension: CommonExtension<*, *, *, *, *>) {
extension.testOptions {
managedDevices {
devices {
Expand Down
3 changes: 2 additions & 1 deletion build-logic/src/main/kotlin/public-extensions.kt
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import com.android.build.api.dsl.CommonExtension
import org.gradle.api.plugins.ExtensionAware
import org.jetbrains.kotlin.gradle.dsl.KotlinJvmOptions

fun CommonExtension<*, *, *, *>.kotlinOptions(block: KotlinJvmOptions.() -> Unit) {
fun CommonExtension<*, *, *, *, *>.kotlinOptions(block: KotlinJvmOptions.() -> Unit) {
(this as ExtensionAware).extensions.configure("kotlinOptions", block)
}

28 changes: 10 additions & 18 deletions core/designsystem/src/main/res/drawable/ic_app.xml
Original file line number Diff line number Diff line change
@@ -1,20 +1,12 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="108dp"
android:height="108dp"
android:viewportWidth="192"
android:viewportHeight="192">
<group android:scaleX="0.67"
android:scaleY="0.67"
android:translateX="31.68"
android:translateY="31.68">
<path
android:pathData="M0,0h192v192h-192z"
android:fillColor="#f9fafb"/>
<path
android:pathData="M39,40C39,33.37 44.37,28 51,28L123.37,28C134.01,28 139.38,40.83 131.92,48.41L95.72,85.22L59.49,121.49C51.93,129.06 39,123.7 39,113.01L39,40Z"
android:fillColor="#f9fafb"/>
<path
android:pathData="M152,151C152,157.63 146.63,163 140,163L67.63,163C56.99,163 51.61,150.17 59.08,142.59L95.28,105.78L131.51,69.51C139.07,61.94 152,67.3 152,77.99L152,151Z"
android:fillColor="#f9fafb"/>
</group>
android:width="28dp"
android:height="34dp"
android:viewportWidth="28"
android:viewportHeight="34">
<path
android:pathData="M0,2.973C0,1.331 1.331,0 2.973,0L20.905,0C23.542,0 24.874,3.178 23.025,5.058L14.055,14.179L5.077,23.166C3.204,25.04 0,23.714 0,21.064L0,2.973Z"
android:fillColor="#3FFFBA"/>
<path
android:pathData="M28,30.478C28,32.12 26.669,33.451 25.027,33.451L7.095,33.451C4.458,33.451 3.126,30.273 4.975,28.393L13.945,19.272L22.923,10.285C24.796,8.411 28,9.737 28,12.387L28,30.478Z"
android:fillColor="#111827"/>
</vector>
20 changes: 20 additions & 0 deletions core/designsystem/src/main/res/drawable/ic_dummy_splash.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="108dp"
android:height="108dp"
android:viewportWidth="192"
android:viewportHeight="192">
<group android:scaleX="0.67"
android:scaleY="0.67"
android:translateX="31.68"
android:translateY="31.68">
<path
android:pathData="M0,0h192v192h-192z"
android:fillColor="#f9fafb"/>
<path
android:pathData="M39,40C39,33.37 44.37,28 51,28L123.37,28C134.01,28 139.38,40.83 131.92,48.41L95.72,85.22L59.49,121.49C51.93,129.06 39,123.7 39,113.01L39,40Z"
android:fillColor="#f9fafb"/>
<path
android:pathData="M152,151C152,157.63 146.63,163 140,163L67.63,163C56.99,163 51.61,150.17 59.08,142.59L95.28,105.78L131.51,69.51C139.07,61.94 152,67.3 152,77.99L152,151Z"
android:fillColor="#f9fafb"/>
</group>
</vector>
496 changes: 496 additions & 0 deletions core/designsystem/src/main/res/drawable/ic_onboarding_en.xml

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.nexters.bandalart.android.feature.home.ui
package com.nexters.bandalart.android.core.ui.component

import androidx.compose.runtime.Composable
import androidx.compose.ui.Modifier
Expand All @@ -10,34 +10,33 @@ import com.nexters.bandalart.android.core.designsystem.theme.Gray900
import com.nexters.bandalart.android.core.designsystem.theme.koronaOneRegular
import com.nexters.bandalart.android.core.designsystem.theme.neurimboGothicRegular
import com.nexters.bandalart.android.core.ui.R
import com.nexters.bandalart.android.core.ui.component.FixedSizeText
import com.nexters.bandalart.android.core.util.extension.getCurrentLocale
import java.util.Locale

@Composable
fun HomeAppTitle(
fun AppTitle(
modifier: Modifier = Modifier,
) {
val context = LocalContext.current
val currentLocale = context.getCurrentLocale()

when (currentLocale.language) {
Locale.KOREAN.language -> {
HomeAppKoreanTitle(modifier = modifier)
AppKoreanTitle(modifier = modifier)
}

Locale.ENGLISH.language -> {
HomeAppEnglishTitle(modifier = modifier)
AppEnglishTitle(modifier = modifier)
}

else -> {
HomeAppEnglishTitle(modifier = modifier)
AppEnglishTitle(modifier = modifier)
}
}
}

@Composable
fun HomeAppKoreanTitle(
fun AppKoreanTitle(
modifier: Modifier = Modifier,
) {
FixedSizeText(
Expand All @@ -53,7 +52,7 @@ fun HomeAppKoreanTitle(
}

@Composable
fun HomeAppEnglishTitle(
fun AppEnglishTitle(
modifier: Modifier = Modifier,
) {
FixedSizeText(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,19 +6,17 @@ import androidx.compose.foundation.layout.fillMaxWidth
import androidx.compose.foundation.layout.height
import androidx.compose.foundation.layout.padding
import androidx.compose.foundation.shape.RoundedCornerShape
import androidx.compose.material3.Text
import androidx.compose.runtime.Composable
import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
import androidx.compose.ui.draw.clip
import androidx.compose.ui.text.font.FontWeight
import androidx.compose.ui.unit.dp
import androidx.compose.ui.unit.sp
import com.nexters.bandalart.android.core.ui.extension.clickableSingle
import com.nexters.bandalart.android.core.ui.nonScaleSp
import com.nexters.bandalart.android.core.designsystem.theme.Gray900
import com.nexters.bandalart.android.core.designsystem.theme.White
import com.nexters.bandalart.android.core.designsystem.theme.pretendard
import com.nexters.bandalart.android.core.ui.extension.clickableSingle

@Composable
fun BandalartButton(
Expand All @@ -37,13 +35,13 @@ fun BandalartButton(
.padding(16.dp),
contentAlignment = Alignment.Center,
) {
Text(
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

꼼꼼해 꼼꼼해 👍

FixedSizeText(
text = text,
fontFamily = pretendard,
fontWeight = FontWeight.W700,
fontSize = 16.sp.nonScaleSp,
fontSize = 16.sp,
color = White,
letterSpacing = (-0.32).sp.nonScaleSp,
letterSpacing = (-0.32).sp,
)
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -13,28 +13,27 @@ import androidx.compose.foundation.shape.RoundedCornerShape
import androidx.compose.material3.Button
import androidx.compose.material3.ButtonColors
import androidx.compose.material3.Surface
import androidx.compose.material3.Text
import androidx.compose.runtime.Composable
import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
import androidx.compose.ui.graphics.vector.ImageVector
import androidx.compose.ui.platform.LocalContext
import androidx.compose.ui.res.painterResource
import androidx.compose.ui.res.vectorResource
import androidx.compose.ui.text.font.FontWeight
import androidx.compose.ui.text.style.TextAlign
import androidx.compose.ui.unit.dp
import androidx.compose.ui.unit.sp
import androidx.compose.ui.window.Dialog
import com.nexters.bandalart.android.core.ui.R
import com.nexters.bandalart.android.core.ui.nonScaleSp
import com.nexters.bandalart.android.core.designsystem.theme.Gray200
import com.nexters.bandalart.android.core.designsystem.theme.Gray400
import com.nexters.bandalart.android.core.designsystem.theme.Gray900
import com.nexters.bandalart.android.core.designsystem.theme.White
import com.nexters.bandalart.android.core.ui.R

@Composable
fun BandalartDeleteAlertDialog(
title: String,
message: String,
message: String?,
onDeleteClicked: () -> Unit,
onCancelClicked: () -> Unit,
modifier: Modifier = Modifier,
Expand All @@ -51,7 +50,9 @@ fun BandalartDeleteAlertDialog(
.padding(top = 24.dp),
) {
Image(
painter = painterResource(id = com.nexters.bandalart.android.core.designsystem.R.drawable.ic_delete),
imageVector = ImageVector.vectorResource(
id = com.nexters.bandalart.android.core.designsystem.R.drawable.ic_delete,
),
contentDescription = context.getString(R.string.delete_descrption),
modifier = Modifier
.height(28.dp)
Expand All @@ -68,16 +69,18 @@ fun BandalartDeleteAlertDialog(
lineHeight = 30.sp,
letterSpacing = (-0.4).sp,
)
Spacer(modifier = Modifier.height(8.dp))
FixedSizeText(
modifier = Modifier.align(Alignment.CenterHorizontally),
text = message,
color = Gray400,
fontSize = 14.sp,
fontWeight = FontWeight.W500,
textAlign = TextAlign.Center,
letterSpacing = (-0.28).sp,
)
if (message != null) {
Spacer(modifier = Modifier.height(8.dp))
FixedSizeText(
modifier = Modifier.align(Alignment.CenterHorizontally),
text = message,
color = Gray400,
fontSize = 14.sp,
fontWeight = FontWeight.W500,
textAlign = TextAlign.Center,
letterSpacing = (-0.28).sp,
)
}
Spacer(modifier = Modifier.height(30.dp))
Row(
modifier = Modifier
Expand All @@ -99,9 +102,9 @@ fun BandalartDeleteAlertDialog(
disabledContentColor = Gray900,
),
) {
Text(
FixedSizeText(
text = context.getString(R.string.delete_bandalart_cancel),
fontSize = 16.sp.nonScaleSp,
fontSize = 16.sp,
fontWeight = FontWeight.W600,
color = Gray900,
)
Expand All @@ -119,9 +122,9 @@ fun BandalartDeleteAlertDialog(
disabledContentColor = White,
),
) {
Text(
FixedSizeText(
text = context.getString(R.string.delete_bandalart_delete),
fontSize = 16.sp.nonScaleSp,
fontSize = 16.sp,
fontWeight = FontWeight.W600,
color = White,
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,22 +11,21 @@ import androidx.compose.foundation.shape.RoundedCornerShape
import androidx.compose.material3.DropdownMenu
import androidx.compose.material3.DropdownMenuItem
import androidx.compose.material3.MaterialTheme
import androidx.compose.material3.Text
import androidx.compose.runtime.Composable
import androidx.compose.ui.Alignment.Companion.CenterVertically
import androidx.compose.ui.Modifier
import androidx.compose.ui.graphics.ColorFilter
import androidx.compose.ui.graphics.vector.ImageVector
import androidx.compose.ui.platform.LocalContext
import androidx.compose.ui.res.painterResource
import androidx.compose.ui.res.vectorResource
import androidx.compose.ui.text.font.FontWeight
import androidx.compose.ui.unit.DpOffset
import androidx.compose.ui.unit.dp
import androidx.compose.ui.unit.sp
import com.nexters.bandalart.android.core.ui.R
import com.nexters.bandalart.android.core.ui.nonScaleSp
import com.nexters.bandalart.android.core.designsystem.theme.Error
import com.nexters.bandalart.android.core.designsystem.theme.White
import com.nexters.bandalart.android.core.designsystem.theme.pretendard
import com.nexters.bandalart.android.core.ui.R

@Composable
fun BandalartDropDownMenu(
Expand Down Expand Up @@ -58,7 +57,7 @@ fun BandalartDropDownMenu(
// text = {
// Row {
// Image(
// painter = painterResource(id = R.drawable.ic_image),
// imageVector = ImageVector.vectorResource(id = R.drawable.ic_image),
// contentDescription = "Image Icon",
// modifier = Modifier
// .height(14.dp)
Expand Down Expand Up @@ -87,21 +86,23 @@ fun BandalartDropDownMenu(
text = {
Row {
Image(
painter = painterResource(com.nexters.bandalart.android.core.designsystem.R.drawable.ic_delete),
imageVector = ImageVector.vectorResource(
id = com.nexters.bandalart.android.core.designsystem.R.drawable.ic_delete,
),
contentDescription = context.getString(R.string.delete_descrption),
modifier = Modifier
.height(14.dp)
.align(CenterVertically),
colorFilter = ColorFilter.tint(Error),
)
Text(
FixedSizeText(
modifier = Modifier
.fillMaxHeight()
.padding(start = 13.dp)
.align(CenterVertically),
text = context.getString(R.string.dropdown_delete),
color = Error,
fontSize = 14.sp.nonScaleSp,
fontSize = 14.sp,
fontFamily = pretendard,
fontWeight = FontWeight.W500,
)
Expand Down
Loading