Skip to content
This repository has been archived by the owner on Nov 5, 2024. It is now read-only.

Commit

Permalink
Merge pull request #755 from code-a1/develop
Browse files Browse the repository at this point in the history
Added strings in strings.xml
  • Loading branch information
ILIYANGERMANOV authored Apr 20, 2022
2 parents b5ebc17 + 3574250 commit cd7e95c
Show file tree
Hide file tree
Showing 12 changed files with 92 additions and 37 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import androidx.compose.ui.Modifier
import androidx.compose.ui.draw.clip
import androidx.compose.ui.graphics.Color
import androidx.compose.ui.graphics.toArgb
import androidx.compose.ui.res.stringResource
import androidx.compose.ui.text.font.FontWeight
import androidx.compose.ui.tooling.preview.Preview
import androidx.compose.ui.unit.Dp
Expand Down Expand Up @@ -85,7 +86,7 @@ private fun BoxWithConstraintsScope.UI(
Spacer(Modifier.width(24.dp))

Text(
text = "Categories",
text = stringResource(R.string.categories),
style = UI.typo.h2.style(
color = UI.colors.pureInverse,
fontWeight = FontWeight.ExtraBold
Expand Down Expand Up @@ -230,7 +231,7 @@ fun AddedSpent(

LabelAmount(
textColor = textColor,
label = "EXPENSES THIS MONTH",
label = stringResource(R.string.month_expenses),
amount = monthlyExpenses,
currency = currency,
center = center
Expand Down Expand Up @@ -262,7 +263,7 @@ fun AddedSpent(

LabelAmount(
textColor = textColor,
label = "INCOME THIS MONTH",
label = stringResource(R.string.month_income),
amount = monthlyIncome,
currency = currency,
center = center
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
import androidx.compose.ui.draw.clip
import androidx.compose.ui.graphics.Color
import androidx.compose.ui.res.stringResource
import androidx.compose.ui.text.font.FontWeight
import androidx.compose.ui.tooling.preview.Preview
import androidx.compose.ui.unit.dp
Expand All @@ -23,6 +24,7 @@ import com.ivy.design.l0_system.style
import com.ivy.wallet.domain.logic.csv.model.ImportType
import com.ivy.wallet.ui.IvyWalletPreview
import com.ivy.wallet.ui.onboarding.components.OnboardingToolbar
import com.ivy.wallet.R


import com.ivy.wallet.ui.theme.components.GradientCutBottom
Expand Down Expand Up @@ -59,7 +61,7 @@ fun BoxWithConstraintsScope.ImportFrom(

Text(
modifier = Modifier.padding(start = 32.dp),
text = "Import from",
text = stringResource(R.string.import_from),
style = UI.typo.h2.style(
fontWeight = FontWeight.Black
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import androidx.compose.material.Text
import androidx.compose.runtime.Composable
import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
import androidx.compose.ui.res.stringResource
import androidx.compose.ui.text.font.FontWeight
import androidx.compose.ui.tooling.preview.Preview
import androidx.compose.ui.unit.dp
Expand All @@ -15,6 +16,7 @@ import com.ivy.design.l0_system.style
import com.ivy.wallet.ui.IvyWalletPreview
import com.ivy.wallet.ui.theme.GradientGreen
import com.ivy.wallet.ui.theme.Gray
import com.ivy.wallet.R


import com.ivy.wallet.ui.theme.components.IvyDividerLine
Expand All @@ -32,7 +34,7 @@ fun ImportProcessing(
Spacer(Modifier.height(80.dp))

Text(
text = "Please wait",
text = stringResource(R.string.please_wait),
style = UI.typo.h2.style(
fontWeight = FontWeight.Black
)
Expand All @@ -57,7 +59,7 @@ fun ImportProcessing(
Spacer(modifier = Modifier.weight(1f))

Text(
text = "Importing the CSV file",
text = stringResource(R.string.importing_the_csv_file),
style = UI.typo.b2.style(
fontWeight = FontWeight.Bold
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import androidx.compose.foundation.layout.*
import androidx.compose.material.Text
import androidx.compose.runtime.Composable
import androidx.compose.ui.Modifier
import androidx.compose.ui.res.stringResource
import androidx.compose.ui.text.font.FontWeight
import androidx.compose.ui.tooling.preview.Preview
import androidx.compose.ui.unit.dp
Expand All @@ -18,6 +19,7 @@ import com.ivy.wallet.ui.theme.components.BackButton
import com.ivy.wallet.ui.theme.components.IvyDividerLine
import com.ivy.wallet.ui.theme.components.OnboardingButton
import com.ivy.wallet.utils.format
import com.ivy.wallet.R

@Composable
fun ImportResultUI(
Expand Down Expand Up @@ -45,7 +47,7 @@ fun ImportResultUI(
result.transactionsImported > result.rowsFound / 2
Text(
modifier = Modifier.padding(horizontal = 32.dp),
text = if (importSuccess) "Success" else "Failure",
text = if (importSuccess) stringResource(R.string.success) else stringResource(R.string.failure),
style = UI.typo.h2.style(
fontWeight = FontWeight.Black,
color = if (importSuccess) UI.colors.pureInverse else Red
Expand All @@ -56,7 +58,7 @@ fun ImportResultUI(

Text(
modifier = Modifier.padding(horizontal = 32.dp),
text = "Imported",
text = stringResource(R.string.imported),
style = UI.typo.b1.style(
color = Green,
fontWeight = FontWeight.Black
Expand All @@ -77,7 +79,7 @@ fun ImportResultUI(

Text(
modifier = Modifier.padding(horizontal = 32.dp),
text = "${result.transactionsImported} transactions",
text = stringResource(R.string.transactions_imported, result.transactionsImported),
style = UI.typo.nB2.style(
fontWeight = FontWeight.Bold,
color = Gray
Expand All @@ -88,7 +90,7 @@ fun ImportResultUI(

Text(
modifier = Modifier.padding(horizontal = 32.dp),
text = "${result.accountsImported} accounts",
text = stringResource(R.string.accounts_imported, result.accountsImported),
style = UI.typo.nB2.style(
fontWeight = FontWeight.Bold,
color = Gray
Expand All @@ -99,7 +101,7 @@ fun ImportResultUI(

Text(
modifier = Modifier.padding(horizontal = 32.dp),
text = "${result.categoriesImported} categories",
text = stringResource(R.string.categories_imported, result.categoriesImported),
style = UI.typo.nB2.style(
fontWeight = FontWeight.Bold,
color = Gray
Expand All @@ -118,7 +120,7 @@ fun ImportResultUI(

Text(
modifier = Modifier.padding(horizontal = 32.dp),
text = "Failed",
text = stringResource(R.string.failed),
style = UI.typo.b1.style(
fontWeight = FontWeight.Black,
color = Red
Expand All @@ -137,7 +139,7 @@ fun ImportResultUI(

Text(
modifier = Modifier.padding(horizontal = 32.dp),
text = "${result.rowsFound - result.transactionsImported} rows from CSV file not recognized",
text = stringResource(R.string.rows_from_csv_not_recognized, result.rowsFound - result.transactionsImported),
style = UI.typo.nB2.style(
fontWeight = FontWeight.Bold,
color = Gray
Expand All @@ -152,7 +154,7 @@ fun ImportResultUI(
Modifier
.fillMaxWidth()
.padding(horizontal = 24.dp),
text = "Finish",
text = stringResource(R.string.finish),
textColor = White,
backgroundGradient = GradientIvy,
hasNext = true,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@ import androidx.compose.foundation.layout.Spacer
import androidx.compose.foundation.layout.height
import androidx.compose.runtime.Composable
import androidx.compose.ui.Modifier
import androidx.compose.ui.res.stringResource
import androidx.compose.ui.unit.dp
import com.ivy.wallet.R

@Composable
fun DefaultImportSteps(
Expand All @@ -17,7 +19,7 @@ fun DefaultImportSteps(

StepTitle(
number = 1,
title = "Export CSV file"
title = stringResource(R.string.export_csv_file)
)

Spacer(Modifier.height(12.dp))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@ import androidx.compose.foundation.layout.Spacer
import androidx.compose.foundation.layout.height
import androidx.compose.runtime.Composable
import androidx.compose.ui.Modifier
import androidx.compose.ui.res.stringResource
import androidx.compose.ui.unit.dp
import com.ivy.wallet.R

@Composable
fun FinancistoSteps(
Expand All @@ -14,8 +16,8 @@ fun FinancistoSteps(

StepTitle(
number = 1,
title = "Export CSV file with standard options",
description = "Please use the standard options and make sure to include headers."
title = stringResource(R.string.export_csv_file_standard),
description = stringResource(R.string.export_csv_file_standard_description)
)

Spacer(Modifier.height(24.dp))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import androidx.compose.ui.Modifier
import androidx.compose.ui.draw.clip
import androidx.compose.ui.graphics.Color
import androidx.compose.ui.platform.LocalContext
import androidx.compose.ui.res.stringResource
import androidx.compose.ui.text.font.FontWeight
import androidx.compose.ui.text.font.FontWeight.Companion.Bold
import androidx.compose.ui.text.style.TextAlign
Expand All @@ -26,6 +27,7 @@ import com.ivy.design.l0_system.UI
import com.ivy.design.l0_system.style
import com.ivy.wallet.R
import com.ivy.wallet.domain.logic.csv.model.ImportType
import com.ivy.wallet.stringRes
import com.ivy.wallet.ui.IvyWalletPreview
import com.ivy.wallet.ui.RootActivity
import com.ivy.wallet.ui.onboarding.components.OnboardingToolbar
Expand Down Expand Up @@ -68,7 +70,7 @@ fun BoxWithConstraintsScope.ImportInstructions(

Text(
modifier = Modifier.padding(start = 32.dp),
text = "How to import",
text = stringResource(R.string.how_to_import),
style = UI.typo.h2.style(
fontWeight = FontWeight.Black
)
Expand All @@ -78,7 +80,7 @@ fun BoxWithConstraintsScope.ImportInstructions(

Text(
modifier = Modifier.padding(start = 32.dp),
text = "open",
text = stringResource(R.string.open),
style = UI.typo.b2.style(
color = Gray,
fontWeight = Bold
Expand All @@ -103,7 +105,7 @@ fun BoxWithConstraintsScope.ImportInstructions(

Text(
modifier = Modifier.padding(start = 32.dp),
text = "Steps",
text = stringResource(R.string.steps),
style = UI.typo.b1.style(
fontWeight = FontWeight.Black
)
Expand Down Expand Up @@ -169,8 +171,8 @@ fun VideoButton(
InstructionButton(
modifier = modifier,
icon = R.drawable.ic_import_video,
caption = "How to",
text = "Video"
caption = stringResource(R.string.how_to),
text = stringResource(R.string.video)
) {
onClick()
}
Expand All @@ -184,8 +186,8 @@ fun ArticleButton(
InstructionButton(
modifier = modifier,
icon = R.drawable.ic_import_web,
caption = "How to",
text = "Article"
caption = stringResource(R.string.how_to),
text = stringResource(R.string.article)
) {
onClick()
}
Expand Down Expand Up @@ -246,7 +248,7 @@ fun InstructionButton(
@Composable
fun UploadFileStep(
stepNumber: Int,
text: String = "Upload CSV file",
text: String = stringResource(R.string.upload_csv_file),
onUploadClick: () -> Unit
) {
StepTitle(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@ import androidx.compose.foundation.layout.Spacer
import androidx.compose.foundation.layout.height
import androidx.compose.runtime.Composable
import androidx.compose.ui.Modifier
import androidx.compose.ui.res.stringResource
import androidx.compose.ui.unit.dp
import com.ivy.wallet.R

@Composable
fun IvyWalletSteps(
Expand All @@ -14,7 +16,7 @@ fun IvyWalletSteps(

StepTitle(
number = 1,
title = "Export Data"
title = stringResource(R.string.export_data)
)

Spacer(Modifier.height(12.dp))
Expand All @@ -28,7 +30,7 @@ fun IvyWalletSteps(

UploadFileStep(
stepNumber = 2,
text = "Upload CSV/ZIP file",
text = stringResource(R.string.upload_csv_zip_file),
onUploadClick = onUploadClick
)
}
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@ import androidx.compose.foundation.layout.Spacer
import androidx.compose.foundation.layout.height
import androidx.compose.runtime.Composable
import androidx.compose.ui.Modifier
import androidx.compose.ui.res.stringResource
import androidx.compose.ui.unit.dp
import com.ivy.wallet.R

@Composable
fun MonefySteps(
Expand All @@ -14,8 +16,8 @@ fun MonefySteps(

StepTitle(
number = 1,
title = "Export to file",
description = "Character set: UTF-8\nDecimal separator: Decimal point '.'\nDelimiter character: Comma ','"
title = stringResource(R.string.export_to_file),
description = stringResource(R.string.export_to_file_description)
)

Spacer(Modifier.height(24.dp))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@ import androidx.compose.foundation.layout.padding
import androidx.compose.runtime.Composable
import androidx.compose.ui.Modifier
import androidx.compose.ui.platform.LocalContext
import androidx.compose.ui.res.stringResource
import androidx.compose.ui.unit.dp
import com.ivy.wallet.R
import com.ivy.wallet.ui.RootActivity

@Composable
Expand All @@ -17,7 +19,7 @@ fun MoneyManagerPraseSteps(

StepTitle(
number = 1,
title = "Export Excel file",
title = stringResource(R.string.export_excel_file),
)

Spacer(Modifier.height(12.dp))
Expand All @@ -32,8 +34,8 @@ fun MoneyManagerPraseSteps(

StepTitle(
number = 2,
title = "Convert XLS to CSV",
description = "!NOTE: If the exported file doesn't have \".xls\" extension, add it by renaming the file manually."
title = stringResource(R.string.convert_xls_to_csv),
description = stringResource(R.string.convert_xls_to_csv_description)
)

Spacer(Modifier.height(12.dp))
Expand All @@ -42,7 +44,7 @@ fun MoneyManagerPraseSteps(
InstructionButton(
modifier = Modifier.padding(horizontal = 16.dp),
icon = null,
caption = "Online CSV converter FREE",
caption = stringResource(R.string.online_csv_converter_free),
text = "https://www.zamzar.com/converters/document/xls-to-csv/"
) {
ivyActivity.openUrlInBrowser("https://www.zamzar.com/converters/document/xls-to-csv/")
Expand Down
Loading

0 comments on commit cd7e95c

Please sign in to comment.