Invalid Format: Uncaught SyntaxError for Turkish locale

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

Does it still happen in safe mode?

3 Likes

Yes it still happen in safe mode.

1 Like

The broken translations should be fixed.

How can i fix that? Where should i look?

@gerhard can you have a quick look at this :face_with_raised_eyebrow:

3 Likes

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. :wink:

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

Take a look at Message Format support for localization if you want to know more about Message Format.

5 Likes

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.

2 Likes

That looks correct. I updated the translated string on Transifex. The issue in Discourse will be fixed the next time we pull translations from Transifex.

2 Likes

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

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