# Agile Web Development with Rails 7: Payment labels should keep the object name when adding i18n labels (pages 238-239)

**URL:** <https://forum.devtalk.com/t/agile-web-development-with-rails-7-payment-labels-should-keep-the-object-name-when-adding-i18n-labels-pages-238-239/148280>\
**Category:** PragProg Customers\
**Tags:** book-agile-web-development-with-rails-7, errata\
**Created:** [21 March 2024 20:34 UTC](https://forum.devtalk.com/t/agile-web-development-with-rails-7-payment-labels-should-keep-the-object-name-when-adding-i18n-labels-pages-238-239/148280 "2024-03-21T20:34:51Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![alexisszabo](https://forum.devtalk.com/user_avatar/forum.devtalk.com/alexisszabo/32/4113_2.png) [@alexisszabo](https://forum.devtalk.com/u/alexisszabo)\
**Post date:** [21 March 2024 20:34 UTC](https://forum.devtalk.com/t/agile-web-development-with-rails-7-payment-labels-should-keep-the-object-name-when-adding-i18n-labels-pages-238-239/148280/1 "2024-03-21T20:34:51Z")

</div>

When internationalizing the payment type forms, the labels should keep the object name so that the “for” attribute is set correctly on the label.

ie. should be:

```auto
<%= form.label :credit_card_number, t('.cc_number') %>
<%= form.password_field :credit_card_number, class: "input-field" %>

```

instead of

```auto
<%= form.label t('.cc_number') %>
<%= form.password_field :credit_card_number, class: "input-field" %>

```

---

<div class="post-metadata">

**Author:** ![rubys](https://forum.devtalk.com/user_avatar/forum.devtalk.com/rubys/32/3797_2.png) [@rubys](https://forum.devtalk.com/u/rubys)\
**Post date:** [17 June 2024 23:16 UTC](https://forum.devtalk.com/t/agile-web-development-with-rails-7-payment-labels-should-keep-the-object-name-when-adding-i18n-labels-pages-238-239/148280/2 "2024-06-17T23:16:31Z")

</div>

Fixed. Thanks!
