Turkish translation missing many singular strings

(Yağız Öztürk) #1

Can someone please help me on updating the existing language from scratch step by step.
Turkish translation is missing some parts as I attached a screenshot.

I did chang the local files in config/locales by entering the app.

./launcher enter app

also tried to clear cache which worked ok but didnot change anything

RUBY_GC_MALLOC_LIMIT=90000000 RAILS_ENV=production bundle exec rake assets:clean

Tried to reboot server, rebuilding app, precompile…

i am missing something.

Japanese translation missing of singular strings
(Yağız Öztürk) #2

@tyildir I saw that you lastly commited on transifex, do you have any idea to fix that bug?

Invalid Format Error at the bottom of all post pages
(Yağız Öztürk) #3

I am sorry to bother you @sam but I cannot go further to launch a website with that error. Could someone please help?

(Tarik Yildirim) #4

We have reported the issue in another post. So far there has been no replies.

As you point out, there seems to be a general problem. Singular versions of many strings are missing.

We launched our forum anyways, hoping that someone else will fix the problem soon!

(Yağız Öztürk) #5

thanks alot for the information, I also uploaded these screenshots to your post.

(Kane York) #6

This is bad, you shouldn’t be doing this.

You should be:

  1. Trying to fix this in Transifex. So I’ll change the title of this to “Turkish translation missing many singulars” for you. Note that you always have the power to change it back if you think of something better!
  2. If you want a quick solution, read this first.

(Yağız Öztürk) #7

Thanks first of all, i read it and followed these steps.

./launcher ssh app
cd /var/www/discourse/config/locales/vi client.tr_TR.yml

Edited the place i wanted. And then what?

(Yağız Öztürk) #8

@zogstrip you closed the issue on github (#3049). But this is a real bug and cannot get it done. All files already traslated on transifex.

Can someone help me out on that, we cannot launch our website?

(Régis Hanol) #9

@techapj can you find out why the Turkish translation is missing strings?

(Arpit Jalan) #10

I just pushed the latest locales on Transifiex and noticed that the source files for “Turkish (Turkey)” language was not updated. (this is strange)

@yagizozturk since we don’t accept PR for updating translations manually, what I will recommend you (for the time being) is that you should manually override the translations by installing discourse-locale-override plugin by @lidel, have a look:

Issue regarding Turkish translations has also been reported previously, I will look more into it as soon as possible.

cc @neil

(Yağız Öztürk) #11

Thanks alot @techAPJ I will do my best with the plugin…

I also checked the transifex files, and downloaded again. But strings that need to be written are also missing. For example ‘has_replies’ has ‘other’ but not ‘one’ as şn my original post image…

(chouchuuchochouchou) #12

Bug is discovered.
Turkish is set to [‘plural only’]
(discourse/plurals.rb at master · discourse/discourse · GitHub). (‘other: only’)

:tr => { :i18n => { :plural => { :keys => [:other], :rule => lambda { |n| :other } } } },

Fixing the line should let singular work in transifex once updated.
Then, transifex will stop deleting singular case.

Unicode is saying Tukish has no singular case. If it has one, this will need updating too.

(Kane York) #13

Ah, so the problem is that the locale JS is asking for the singular translation when there shouldn’t be one.

This file: discourse/tr_TR.js.erb at master · discourse/discourse · GitHub

Needs a pluralizationRules method. Example:

I18n.pluralizationRules['tr_TR'] = function(n) { return "other"; }

(Tarik Yildirim) #14

In some cases we don’t differentiate between plural and singular, but in other cases we do.

For instance, we say “8 book on the table.” rather than “8 books on the table.”

But, we say “books on the table.” rather than “book on the table.”

It is hard to cut out a universal parameter across all languages. This stuff was not written by someone with a logical goal in mind :smile:

(Kane York) #15

Did it myself, @chouchuuchochouchou


(Tarik Yildirim) #16

Today we picked up some related bugs in our logs. It seems like the pluralization issue is still not completely resolved:

(Kane York) #17

Found the issue.
The server-side plural rules were set with “tr” but not with “tr_TR”.


(Jeff Atwood) #18