# Admin -\> Customize -\> Text behaving badly

**URL:** https://meta.discourse.org/t/admin-customize-text-behaving-badly/285691
**Category:** Bug
**Tags:** translation, fixed
**Created:** [November 16, 2023, 9:00am UTC](https://meta.discourse.org/t/admin-customize-text-behaving-badly/285691 "2023-11-16T09:00:09Z")
**Posts on this page:** 1
**Showing post:** 5

<div class="post-metadata">

### Author: ![gerhard](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/gerhard/32/119479_2.png) [@gerhard](https://meta.discourse.org/u/gerhard)
#### Post date: [November 20, 2023, 3:23pm UTC](https://meta.discourse.org/t/admin-customize-text-behaving-badly/285691/5 "2023-11-20T15:23:28Z")

</div>

This happens when there’s a translation override for a key that previously was a translatable string, but was converted into a Hash at a later time. That’s exactly what [happened](https://github.com/merefield/discourse-chatbot/commit/f72e39908f8cb0421164bc3c3cad832d683e2e62#diff-333c4c8cacc2f84633d4894f2aaddb130a6d74f42dd63199462b3d66278f6ce8) with `chatbot.prompt.system`.

This seems like a regression. I’m pretty sure this used to work in the past.

I can easily reproduce this with a locale file like this:

```plaintext
en:
  foo: "this is foo"

```

Go to Customize → Text and override “foo” with a different value.

Then, change the locale file to look like this:

```plaintext
en:
  foo:
    basic: "Basic Foo"
    advanced: "Advanced Foo"

```

Visit Customize → Text again and search for “foo”. Discourse will log the following error.

```plaintext
NoMethodError (undefined method `scan' for {:basic=>"Basic Foo", :advanced=>"Advanced Foo"}:Hash)
lib/i18n/i18n_interpolation_keys_finder.rb:6:in `find'
app/controllers/admin/site_texts_controller.rb:183:in `record_for'
app/controllers/admin/site_texts_controller.rb:249:in `block in find_translations'
app/controllers/admin/site_texts_controller.rb:234:in `each'
app/controllers/admin/site_texts_controller.rb:234:in `find_translations'
app/controllers/admin/site_texts_controller.rb:34:in `index'

```

Discourse shouldn’t load translation overrides if there’s no corresponding English string.

---

_[View the full topic](https://meta.discourse.org/t/admin-customize-text-behaving-badly/285691)._
