# Invalid Format: Uncaught SyntaxError for Turkish locale

**URL:** https://meta.discourse.org/t/invalid-format-uncaught-syntaxerror-for-turkish-locale/84766
**Category:** Bug
**Created:** [April 7, 2018, 9:10am UTC](https://meta.discourse.org/t/invalid-format-uncaught-syntaxerror-for-turkish-locale/84766 "2018-04-07T09:10:26Z")
**Posts on this page:** 11
**Page:** 1

<div class="post-metadata">

### Author: ![bekircem](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/bekircem/32/44582_2.png) [@bekircem](https://meta.discourse.org/u/bekircem)
#### Post date: [April 7, 2018, 9:10am UTC](https://meta.discourse.org/t/invalid-format-uncaught-syntaxerror-for-turkish-locale/84766/1 "2018-04-07T09:10:26Z")

</div>

Hi,

I’ve error at the bottom of the page. I have not resolved for a long time. The reason of this error language files. I use Turkish interface. I did not make any edits on Turkish language files. How i fix that error?

`Invalid Format: Uncaught SyntaxError: Expected "{" but "d" found. at undefined:1376:10`

---

<div class="post-metadata">

### Author: ![Mittineague](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/mittineague/32/114259_2.png) [@Mittineague](https://meta.discourse.org/u/Mittineague)
#### Post date: [April 7, 2018, 9:18am UTC](https://meta.discourse.org/t/invalid-format-uncaught-syntaxerror-for-turkish-locale/84766/2 "2018-04-07T09:18:37Z")

</div>

Does it still happen in [safe mode](https://meta.discourse.org/t/53504?silent=true)?

---

<div class="post-metadata">

### Author: ![bekircem](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/bekircem/32/44582_2.png) [@bekircem](https://meta.discourse.org/u/bekircem)
#### Post date: [April 7, 2018, 1:56pm UTC](https://meta.discourse.org/t/invalid-format-uncaught-syntaxerror-for-turkish-locale/84766/3 "2018-04-07T13:56:45Z")

</div>

Yes it still happen in [safe mode](https://meta.discourse.org/t/53504?silent=true).

---

<div class="post-metadata">

### Author: ![codinghorror](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/codinghorror/32/110067_2.png) [@codinghorror](https://meta.discourse.org/u/codinghorror)
#### Post date: [April 7, 2018, 4:33pm UTC](https://meta.discourse.org/t/invalid-format-uncaught-syntaxerror-for-turkish-locale/84766/4 "2018-04-07T16:33:36Z")

</div>

The broken translations should be fixed.

---

<div class="post-metadata">

### Author: ![bekircem](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/bekircem/32/44582_2.png) [@bekircem](https://meta.discourse.org/u/bekircem)
#### Post date: [April 7, 2018, 5:08pm UTC](https://meta.discourse.org/t/invalid-format-uncaught-syntaxerror-for-turkish-locale/84766/5 "2018-04-07T17:08:53Z")

</div>

How can i fix that? Where should i look?

---

<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: [April 9, 2018, 3:57am UTC](https://meta.discourse.org/t/invalid-format-uncaught-syntaxerror-for-turkish-locale/84766/6 "2018-04-09T03:57:54Z")

</div>

@gerhard can you have a quick look at this 🤨

---

<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: [April 9, 2018, 1:35pm UTC](https://meta.discourse.org/t/invalid-format-uncaught-syntaxerror-for-turkish-locale/84766/7 "2018-04-09T13:35:42Z")

</div>

There’s a problem with the translation of `read_more_MF`. Currently it looks like this:

```
Kalan {
UNREAD, plural,
=0 {}
one {
  <a href='/unread'>1 okunmamış</a>
} other {
  <a href='/unread'># okunmamış</a>
}
} {
  NEW, plural,
    =0 {}
    one { {BOTH, select, true{ve} false {} other{}} <a href='/new'>1 yeni</a> konu}
    other { {BOTH, select, true{and } false {} other{}} <a href='/new'># yeni</a> konu}
} var, veya {CATEGORY, select, true { {catLink}} false {{latestLink}} kategorilerindeki diğer {} konulara göz atabilirsiniz }

```

The problem is in the last part:

> var, veya {CATEGORY, select, true { {catLink}} false {{latestLink}} kategorilerindeki diğer {} konulara göz atabilirsiniz }

It’s not possible to have arbitrary text outside the curly braces of the options `true`, `false` and `other`.  
I’d suggest something like this, but I need your help in fixing this, since I don’t speak Turkish. 😉

> var, veya {CATEGORY, select, true {kategorilerindeki {catLink}} false {{latestLink}} other {}} konulara göz atabilirsiniz"

Take a look at [Message Format support for localization](https://meta.discourse.org/t/message-format-support-for-localization/7035) if you want to know more about Message Format.

---

<div class="post-metadata">

### Author: ![bekircem](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/bekircem/32/44582_2.png) [@bekircem](https://meta.discourse.org/u/bekircem)
#### Post date: [April 9, 2018, 8:35pm UTC](https://meta.discourse.org/t/invalid-format-uncaught-syntaxerror-for-turkish-locale/84766/8 "2018-04-09T20:35:43Z")

</div>

> [@gerhard](#):
>
> read\_more\_MF

Here is my suggestion:

`{ UNREAD, plural, =0 {} one { <a href='/unread'>1 okunmamış mesaj</a> } other { <a href='/unread'># okunmamış mesaj</a> } } { NEW, plural, =0 {} one { {BOTH, select, true{ve} false {} other{}} <a href='/new'>1 yeni</a> konu} other { {BOTH, select, true{ve } false {} other{}} <a href='/new'># yeni</a> konu} } var. {CATEGORY, select, true {{catLink} kategorisine} false {{latestLink}} other {}} göz atabilirsiniz.`

---

<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: [April 10, 2018, 9:52am UTC](https://meta.discourse.org/t/invalid-format-uncaught-syntaxerror-for-turkish-locale/84766/9 "2018-04-10T09:52:59Z")

</div>

That looks correct. I updated [the translated string on Transifex](https://www.transifex.com/discourse/discourse-org/translate/#tr_TR/clientenyml/13697764?q=key%3Aread_more_MF). The issue in Discourse will be fixed the next time we pull translations from Transifex.

---

<div class="post-metadata">

### Author: ![bekircem](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/bekircem/32/44582_2.png) [@bekircem](https://meta.discourse.org/u/bekircem)
#### Post date: [April 10, 2018, 10:01am UTC](https://meta.discourse.org/t/invalid-format-uncaught-syntaxerror-for-turkish-locale/84766/11 "2018-04-10T10:01:11Z")

</div>

I changed it on my admin panel. Yes it’s works. But is this best template, I’m not sure.

---

<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: [April 12, 2018, 10:01am UTC](https://meta.discourse.org/t/invalid-format-uncaught-syntaxerror-for-turkish-locale/84766/12 "2018-04-12T10:01:24Z")

</div>

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.
