Skip to content

Commit

Permalink
[#115] Review : Change string name
Browse files Browse the repository at this point in the history
  • Loading branch information
dolinetouko committed Mar 1, 2023
1 parent d9a88b7 commit 406c317
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ fun ComponentBanners() {
bottomSheetScaffoldState = rememberBottomSheetScaffoldState(),
bottomSheetContent = {
ComponentCountRow(
title = stringResource(id = R.string.component_banners_textLines),
title = stringResource(id = R.string.component_banner_text_lines_count),
count = textLinesCount,
minusIconContentDescription = stringResource(id = R.string.component_card_remove_action_button),
plusIconContentDescription = stringResource(id = R.string.component_card_add_action_button),
Expand All @@ -50,7 +50,7 @@ fun ComponentBanners() {
maxCount = BannerCustomizationState.MaxTextCount
)
ComponentCountRow(
title = stringResource(id = R.string.component_banners_Buttons),
title = stringResource(id = R.string.component_banners_Buttons_count),
count = buttonsCount,
minusIconContentDescription = stringResource(id = R.string.component_banner_remove_action_button),
plusIconContentDescription = stringResource(id = R.string.component_banner_add_action_button),
Expand All @@ -59,18 +59,18 @@ fun ComponentBanners() {
maxCount = BannerCustomizationState.MaxActionButtonCount
)
OdsListItem(
text = stringResource(id = R.string.component_banners_image),
text = stringResource(id = R.string.component_banner_image),
trailing = OdsSwitchTrailing(checked = iconChecked, enabled = hasTextLines)
)
OdsListItem(
text = stringResource(id = R.string.component_banners_divider),
text = stringResource(id = R.string.component_banner_divider),
trailing = OdsSwitchTrailing(checked = dividerChecked)
)
}
) {
Column {
OdsBanner(
message = if (hasTextLines) stringResource(id = R.string.component_banners_twoLine) else stringResource(id = R.string.component_banners_oneLine),
message = if (hasTextLines) stringResource(id = R.string.component_banners_two_line_text) else stringResource(id = R.string.component_banners_one_line_text),
button1Text = stringResource(id = R.string.component_snackbar_action_label),
buttonText = if (hasTextLines && hasButton) stringResource(id = R.string.component_snackbar_action_label) else null,
actionOnNewLine = !hasTextLines,
Expand All @@ -82,8 +82,8 @@ fun ComponentBanners() {
CommonTechnicalTextColumn(
componentName = OdsComponent.OdsBanner.name
) {
if (hasTextLines) TechnicalText(text = " message = \"${stringResource(id = R.string.component_banners_twoLine)}\"")
else TechnicalText(text = " message = \"${stringResource(id = R.string.component_banners_oneLine)}\"")
if (hasTextLines) TechnicalText(text = " message = \"${stringResource(id = R.string.component_banners_two_line_text)}\"")
else TechnicalText(text = " message = \"${stringResource(id = R.string.component_banners_one_line_text)}\"")
TechnicalText("")
TechnicalText(" divider = $hasDivider")
TechnicalText("")
Expand Down
14 changes: 7 additions & 7 deletions demo/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -105,15 +105,15 @@

<!-- Components Banners -->
<string name="component_banners">Banners</string>
<string name="component_banners_textLines">Text lines count</string>
<string name="component_banners_Buttons">Buttons count</string>
<string name="component_banners_divider">Divider</string>
<string name="component_banners_image">Image</string>
<string name="component_banners_description">A banner displays an important message which requires an action to be dismissed.</string>
<string name="component_banner_text_lines_count">Text lines count</string>
<string name="component_banners_Buttons_count">Buttons count</string>
<string name="component_banner_divider">Divider</string>
<string name="component_banner_image">Image</string>
<string name="component_banner_remove_action_button">Remove Line</string>
<string name="component_banner_add_action_button">Add Line</string>
<string name="component_banners_description">A banner displays an important message which requires an action to be dismissed.</string>
<string name="component_banners_oneLine">One line text string with one action.</string>
<string name="component_banners_twoLine">Two lines text string with two actions. One to two lines is preferable on mobile and tablet.</string>
<string name="component_banners_one_line_text">One line text string with one action.</string>
<string name="component_banners_two_line_text">Two lines text string with two actions. One to two lines is preferable on mobile and tablet.</string>

<!-- Components Buttons -->
<string name="component_buttons">Buttons</string>
Expand Down

0 comments on commit 406c317

Please sign in to comment.