Adding translations

Davide, can you please provide the full stack trace for the first error in your error log here?

Starts ActionView::Template::Error

Thank you!

Hi @merefield
Is this what you need?

Info
ActionView::Template::Error (The asset “locales/ky.js” is not present in the asset pipeline.
)
app/helpers/application_helper.rb:95:in script_asset_path' app/helpers/application_helper.rb:139:in block in preload_script’
app/helpers/application_helper.rb:138:in map' app/helpers/application_helper.rb:138:in preload_script’
app/views/layouts/application.html.erb:28
app/controllers/application_controller.rb:127:in block (2 levels) in <class:ApplicationController>' app/controllers/application_controller.rb:412:in block in with_resolved_locale’
app/controllers/application_controller.rb:412:in with_resolved_locale' app/controllers/application_controller.rb:127:in block in class:ApplicationController
lib/middleware/omniauth_bypass_middleware.rb:71:in call' lib/content_security_policy/middleware.rb:12:in call’
lib/middleware/anonymous_cache.rb:368:in call' config/initializers/100-quiet_logger.rb:23:in call’
config/initializers/100-silence_logger.rb:31:in call' lib/middleware/enforce_hostname.rb:23:in call’
lib/middleware/request_tracker.rb:202:in `call’

Backtrace
sprockets-rails (3.4.2) lib/sprockets/rails/helper.rb:84:in compute_asset_path' actionview (7.0.3.1) lib/action_view/helpers/asset_url_helper.rb:203:in asset_path’
app/helpers/application_helper.rb:95:in script_asset_path' app/helpers/application_helper.rb:139:in block in preload_script’
app/helpers/application_helper.rb:138:in map' app/helpers/application_helper.rb:138:in preload_script’
app/views/layouts/application.html.erb:28
actionview (7.0.3.1) lib/action_view/base.rb:244:in public_send' actionview (7.0.3.1) lib/action_view/base.rb:244:in _run’
actionview (7.0.3.1) lib/action_view/template.rb:157:in block in render' activesupport (7.0.3.1) lib/active_support/notifications.rb:208:in instrument’
actionview (7.0.3.1) lib/action_view/template.rb:361:in instrument_render_template' actionview (7.0.3.1) lib/action_view/template.rb:155:in render’
rack-mini-profiler (3.0.0) lib/mini_profiler/profiling_methods.rb:85:in block in profile_method' actionview (7.0.3.1) lib/action_view/renderer/template_renderer.rb:76:in block in render_with_layout’
activesupport (7.0.3.1) lib/active_support/notifications.rb:206:in block in instrument' activesupport (7.0.3.1) lib/active_support/notifications/instrumenter.rb:24:in instrument’
activesupport (7.0.3.1) lib/active_support/notifications.rb:206:in instrument' actionview (7.0.3.1) lib/action_view/renderer/template_renderer.rb:74:in render_with_layout’
actionview (7.0.3.1) lib/action_view/renderer/template_renderer.rb:59:in render_template' actionview (7.0.3.1) lib/action_view/renderer/template_renderer.rb:11:in render’
actionview (7.0.3.1) lib/action_view/renderer/renderer.rb:61:in render_template_to_object' actionview (7.0.3.1) lib/action_view/renderer/renderer.rb:29:in render_to_object’
actionview (7.0.3.1) lib/action_view/rendering.rb:117:in block in _render_template' actionview (7.0.3.1) lib/action_view/base.rb:270:in in_rendering_context’
actionview (7.0.3.1) lib/action_view/rendering.rb:116:in _render_template' actionpack (7.0.3.1) lib/action_controller/metal/streaming.rb:216:in _render_template’
actionview (7.0.3.1) lib/action_view/rendering.rb:103:in render_to_body' actionpack (7.0.3.1) lib/action_controller/metal/rendering.rb:46:in render_to_body’
actionpack (7.0.3.1) lib/action_controller/metal/renderers.rb:141:in render_to_body' actionpack (7.0.3.1) lib/abstract_controller/rendering.rb:25:in render’
actionpack (7.0.3.1) lib/action_controller/metal/rendering.rb:30:in render' actionpack (7.0.3.1) lib/action_controller/metal/instrumentation.rb:22:in block (2 levels) in render’
/usr/local/lib/ruby/2.7.0/benchmark.rb:308:in realtime' activesupport (7.0.3.1) lib/active_support/core_ext/benchmark.rb:14:in ms’
actionpack (7.0.3.1) lib/action_controller/metal/instrumentation.rb:22:in block in render' actionpack (7.0.3.1) lib/action_controller/metal/instrumentation.rb:91:in cleanup_view_runtime’
activerecord (7.0.3.1) lib/active_record/railties/controller_runtime.rb:34:in cleanup_view_runtime' actionpack (7.0.3.1) lib/action_controller/metal/instrumentation.rb:21:in render’
app/controllers/application_controller.rb:127:in block (2 levels) in <class:ApplicationController>' app/controllers/application_controller.rb:412:in block in with_resolved_locale’
i18n (1.12.0) lib/i18n.rb:322:in with_locale' app/controllers/application_controller.rb:412:in with_resolved_locale’
plugins/discourse-multilingual/extensions/application_controller.rb:8:in with_resolved_locale' app/controllers/application_controller.rb:127:in block in class:ApplicationController
activesupport (7.0.3.1) lib/active_support/rescuable.rb:114:in instance_exec' activesupport (7.0.3.1) lib/active_support/rescuable.rb:114:in block in handler_for_rescue’
activesupport (7.0.3.1) lib/active_support/rescuable.rb:92:in rescue_with_handler' activesupport (7.0.3.1) lib/active_support/rescuable.rb:165:in rescue_with_handler’
actionpack (7.0.3.1) lib/action_controller/metal/rescue.rb:25:in rescue in process_action' actionpack (7.0.3.1) lib/action_controller/metal/rescue.rb:21:in process_action’
actionpack (7.0.3.1) lib/action_controller/metal/instrumentation.rb:67:in `block in process_action’

that helps, thanks!

Repro’d the issue, opining on best option for fix.

Hi!

First of all, thanks for this plugin. I’m testing adding category translations, and if successful I may try to add tag translations too. Here is a couple of questions:

  1. Is it possible to translate the name of the category for uncategorized topics?
    I tried to use the slug uncategorized but it doesn’t do anything.
  2. For now translation files have to be uploaded by hand one-by-one.
    Is it possible to batch-upload multiple translation files at once?
    Or even better, is there a way to update translations programmatically? (through either files or API…)
    The idea is to update YAML translation files from a Git repository.

Hi.
I did not find “multilingual enable custom translations” in settings. Could i add translation for category without this setting?

  1. Go to the page /admin/site_settings/category/plugins?filter=multilingual and make sure to have Multilingual plugin enabled
  2. Go to the page /admin/multilingual/translations for uploading category translation files as described in the first post of this topic, for example category_name.<language_code>.yml with content in the following form:
slug: translated name
parent_slug:
   slug: translated child name