Invalid Format: Uncaught SyntaxError for Turkish locale


#1

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


(Mittineague) #2

Does it still happen in safe mode?


#3

Yes it still happen in safe mode.


(Jeff Atwood) #4

The broken translations should be fixed.


#5

How can i fix that? Where should i look?


(Sam Saffron) #6

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


(Gerhard Schlager) #7

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.


#8

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.


(Gerhard Schlager) #9

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.


#11

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


(Gerhard Schlager) #12

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