Stuck trying to add new locale files


(Suvla) #1

Hi, I’m trying to display the user interface of my installation of Discourse in a language that already has a partial translation in Transifex, but their files aren’t already in the Discourse repo.

To grab the files, I followed the instructions that there are in the Contribute a translation to Discourse Howto, specifically in the “Get translations” section: I create the ~/.transifexrc file and added my credentials, and ran ruby script/pull_translations.rb. I saw that these steps put the files in their correct locations.

Then I ran:

RAILS_ENV=production bundle exec rake assets:clobber assets:precompile

as I read in an answer to the thread “How to add a new language” (sorry, as a new user here I can’t link it).

Once finished, the locale I was trying to use did show up in the list of available locales to choose, which was great. But once I selected it as the main locale of the site in the Admin options, saved and refreshed, then I experienced exactly the same issue described in “Uncaught ReferenceError - I18n is not defined (after upgrading 1.5 to 1.6)”.

When I point the browser to my discourse installation I see basically a blank screen. If I inspect its source code I see some HTML with some strings in my selected locale, but nothing that allows me to work with it. This is what I see in the console.

Since then, as suggested by one of the answers, I have tried to recompile assets, rebuild the entire app, etc, multiple times but nothing of these seems to work for me.

Thank you