# Blank topics page when interface language is German

**URL:** https://meta.discourse.org/t/blank-topics-page-when-interface-language-is-german/40753
**Category:** Bug
**Created:** [March 8, 2016, 4:06pm UTC](https://meta.discourse.org/t/blank-topics-page-when-interface-language-is-german/40753 "2016-03-08T16:06:15Z")
**Posts on this page:** 9
**Page:** 1

<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: [March 8, 2016, 4:06pm UTC](https://meta.discourse.org/t/blank-topics-page-when-interface-language-is-german/40753/1 "2016-03-08T16:06:15Z")

</div>

Since this morning, I’m getting a blank page when I visit [meta.discouse.org](http://meta.discouse.org) as long as I’m using German as interface language. I can’t test this anywhere else right now ([try.discourse.org](http://try.discourse.org) doesn’t allow users to change the interface language), but it’s definitely a problem here on meta.

Steps to reproduce:

- Go to the user preferences
- Change the interface language to “de”
- Go back to the topic list and refresh the page

It seems to work with “ru”, but it looks like “fr” doesn’t work either.

---

<div class="post-metadata">

### Author: ![simon](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/simon/32/339122_2.png) [@simon](https://meta.discourse.org/u/simon)
#### Post date: [March 8, 2016, 4:45pm UTC](https://meta.discourse.org/t/blank-topics-page-when-interface-language-is-german/40753/2 "2016-03-08T16:45:35Z")

</div>

Getting the error Cannot set property ‘bugs’ of undefined’,

` I18n.translations.en.js.filters.bugs = { title: "Bugs", help: "Open Bugs" };`

---

<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: [March 8, 2016, 4:49pm UTC](https://meta.discourse.org/t/blank-topics-page-when-interface-language-is-german/40753/3 "2016-03-08T16:49:04Z")

</div>

Yeah, that error has been there for ages. 😉  
Must be something else.

---

<div class="post-metadata">

### Author: ![simon](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/simon/32/339122_2.png) [@simon](https://meta.discourse.org/u/simon)
#### Post date: [March 8, 2016, 5:51pm UTC](https://meta.discourse.org/t/blank-topics-page-when-interface-language-is-german/40753/4 "2016-03-08T17:51:14Z")

</div>

I just updated my forum and everything works fine there. Everything works properly in my development environment too.

---

<div class="post-metadata">

### Author: ![simon](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/simon/32/339122_2.png) [@simon](https://meta.discourse.org/u/simon)
#### Post date: [March 8, 2016, 7:16pm UTC](https://meta.discourse.org/t/blank-topics-page-when-interface-language-is-german/40753/5 "2016-03-08T19:16:32Z")

</div>

Meta seems to be using this customization to create the ‘Bug’ and ‘Features’ nav items.

```plaintext
<script>
Discourse.ExternalNavItem = Discourse.NavItem.extend({
    href: function() {
        return this.get('href');
    }
    .property('href')
});

Discourse.NavItem.reopenClass({
    buildList: function(category, args) {
        var list = this._super(category, args);
        if (!category) {
             I18n.translations.en.js.filters.bugs = {
                title: "Bugs",
                help: "Open Bugs"
            };
            I18n.translations.en.js.filters.features = {
                title: "Features",
                help: "Open Feature Requests"
            };
            list.push(Discourse.ExternalNavItem.create({
                href: '/category/bug?order=op_likes&status=open',
                name: 'bugs'
            }));
            list.push(Discourse.ExternalNavItem.create({
                href: '/category/feature?order=op_likes&status=open',
                name: 'features'
            }));
        }
        return list;
    }
});
</script>

```

When I add that as a customization to the head section of my site I get similar results to what I’m seeing on meta when I change the locale to ‘fr’ or ‘de’. Moving the ‘bugs’ and ‘features’ translations out of the `buildList` function seems to solve the problem.

---

<div class="post-metadata">

### Author: ![sam](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sam/32/102149_2.png) [@sam](https://meta.discourse.org/u/sam)
#### Post date: [March 8, 2016, 8:13pm UTC](https://meta.discourse.org/t/blank-topics-page-when-interface-language-is-german/40753/6 "2016-03-08T20:13:29Z")

</div>

Ahhhh at last I know what happened here will fix

---

<div class="post-metadata">

### Author: ![sam](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sam/32/102149_2.png) [@sam](https://meta.discourse.org/u/sam)
#### Post date: [March 8, 2016, 11:14pm UTC](https://meta.discourse.org/t/blank-topics-page-when-interface-language-is-german/40753/7 "2016-03-08T23:14:03Z")

</div>

The pattern I used for adding a localization from a site customization was incorrect.

Instead of:

```plaintext
  I18n.translations.en.js.filters.bugs = { title: "Bugs", help: "Open Bugs" };
  I18n.translations.en.js.filters.features = { title: "Features", help: "Open Feature Requests" };

```

Should have been

```plaintext
  I18n.translations[I18n.locale].js.filters.bugs = { title: "Bugs", help: "Open Bugs" };
  I18n.translations[I18n.locale].js.filters.features = { title: "Features", help: "Open Feature Requests" };

```

---

<div class="post-metadata">

### Author: ![sam](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sam/32/102149_2.png) [@sam](https://meta.discourse.org/u/sam)
#### Post date: [March 8, 2016, 11:19pm UTC](https://meta.discourse.org/t/blank-topics-page-when-interface-language-is-german/40753/8 "2016-03-08T23:19:17Z")

</div>

OK, this works, but I did notices some hebrew glitches a unread is not translated properly and @simon it looks like 1.2k has the k in the wrong side on front page

![](https://global.discourse-cdn.com/meta/original/3X/b/8/b811096e0fcf8de485d962461a6c2b91ee1145a7.png)

![](https://global.discourse-cdn.com/meta/original/3X/5/f/5f465c0f50c46e670a7fff569fa202eeeb071582.png)

---

<div class="post-metadata">

### Author: ![sam](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sam/32/102149_2.png) [@sam](https://meta.discourse.org/u/sam)
#### Post date: [March 8, 2016, 11:20pm UTC](https://meta.discourse.org/t/blank-topics-page-when-interface-language-is-german/40753/9 "2016-03-08T23:20:16Z")

</div>


