mirror of
https://github.com/discourse/discourse.git
synced 2026-03-04 01:15:08 +08:00
This is a second attempt at: https://github.com/discourse/discourse/pull/33001 We had to [revert the commit](https://github.com/discourse/discourse/pull/33157) because it was performing a site-setting check at boot time, which is prone to issues and not allowed. This PR: - re-introduces the changes in the original PR - a fix by not performing a site-setting check at boot time (verified by: `SKIP_DB_AND_REDIS=1 DISCOURSE_DEV_DB="nonexist" bin/rails runner "puts 'booted'"` locally and should be caught by the new CI check introduced here: https://github.com/discourse/discourse/pull/33158) - adds a fix to the translation editor to not show the original post locale in the dropdown, as well as adding an indicator of what the original post locale is in a small badge in the header: - 
5 lines
152 B
Ruby
5 lines
152 B
Ruby
# frozen_string_literal: true
|
|
|
|
class TopicLocalizationSerializer < ApplicationSerializer
|
|
attributes :id, :topic_id, :locale, :title, :fancy_title
|
|
end
|