Add a new language interface - uzbek

Hi! I’m trying to add uzbek as a language following this guide from @gerhard :

But when I add the plugin in the app.yml and rebuild the app I get this error:

Pups::ExecError: cd /var/www/discourse && su discourse -c 'bundle exec rake db:migrate' failed with return #<Process::Status: pid
 1414 exit 1>
Location of failure: /usr/local/lib/ruby/gems/2.7.0/gems/pups-1.1.1/lib/pups/exec_command.rb:117:in `spawn'
exec failed with the params {"cd"=>"$home", "hook"=>"db_migrate", "cmd"=>["su discourse -c 'bundle exec rake db:migrate'"]}
bootstrap failed with exit code 1
** FAILED TO BOOTSTRAP ** please scroll up and look for earlier error messages, there may be more than one.
./discourse-doctor may help diagnose the problem.

This is the repository of my plugin(translation are yet to come):

What am I missing?


I didn’t see an obvious problem with your plugin.

It looks like the error might be related to something other than the plugin. Unfortunately you didn’t include the actual error message in your snippet. It should have been in the output somewhere above the “FAILED” message.

I was finally able to install the plugin and display correctly among the available interface languages.
But when I try to translate a post with the discourse translate plugin it doesn’t translate and it returns Translated from [missing% {language} value] by Google


Looks like the translator plugin has an internal mapping for Google. This is a total hack, but you could try patching it by appending the following snippet to your plugin.rb.

after_initialize do
  if defined? DiscourseTranslator::Google::SUPPORTED_LANG_MAPPING
    DiscourseTranslator::Google::SUPPORTED_LANG_MAPPING[:uz] = "uz"
1 Like

Hi @gerhard
Thank you very much for supporting!
Is there any chance to officially upgrade the Translator in order to consider the new languages without hacking?

We need to have 6 new languages integrated in Discourse. In the next months we’ll provide the translations via crowdin, but in the meantime we need to activate the functionalities of the Translator and Multilingual plugins (as we were discussing here). I think that a Translator upgrade would be more reliable and useful to other users with the same need.

In the last weeks we already raised a couple of PRs (such these ones) to incude new locales in the Translator, but maybe it is not the same kind of request…?

You can create a PR and someone will have a look.

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