mirror of
https://gh.wpcy.net/https://github.com/discourse/discourse.git
synced 2026-05-05 00:44:53 +08:00
We should allow authors to localize their own content. This is gated behind the `content_localization_allow_author_localization` setting, which is enabled by default. Meta: https://meta.discourse.org/t/feature-request-allow-users-to-localize-only-their-own-topics/389147
22 lines
616 B
Ruby
22 lines
616 B
Ruby
# frozen_string_literal: true
|
|
|
|
module PageObjects
|
|
module Components
|
|
class TranslationComposer < PageObjects::Components::Composer
|
|
def has_translation_title?(value)
|
|
expect(find("#reply-control input#translated-topic-title").value).to eq(value)
|
|
end
|
|
|
|
def select_locale(locale)
|
|
selector = ".translation-selector-dropdown"
|
|
select_kit = PageObjects::Components::SelectKit.new(selector)
|
|
select_kit.expand
|
|
select_kit.select_row_by_name(locale)
|
|
end
|
|
|
|
def fill_content(content)
|
|
find(".d-editor-input").set(content)
|
|
end
|
|
end
|
|
end
|
|
end
|