Fixes #3733 - Simple quote characters ('
) not properly displayed.
(cherry picked from commit 2bd4ceeedf
)
This commit is contained in:
parent
e54158c0a8
commit
06af2b7936
3 changed files with 23 additions and 4 deletions
|
@ -46,7 +46,7 @@ class App.UiElement.ApplicationUiElement
|
|||
result = []
|
||||
for row in selection
|
||||
if attribute.translate
|
||||
row.name = App.i18n.translateInline(row.name)
|
||||
row.name = App.i18n.translatePlain(row.name)
|
||||
if !_.isEmpty(row.children)
|
||||
row.children = @getConfigOptionListArray(attribute, row.children)
|
||||
result.push row
|
||||
|
@ -65,7 +65,7 @@ class App.UiElement.ApplicationUiElement
|
|||
for key in order
|
||||
name_new = selection[key]
|
||||
if attribute.translate
|
||||
name_new = App.i18n.translateInline(name_new)
|
||||
name_new = App.i18n.translatePlain(name_new)
|
||||
attribute.options.push {
|
||||
name: name_new
|
||||
value: key
|
||||
|
@ -162,7 +162,7 @@ class App.UiElement.ApplicationUiElement
|
|||
nameNew = item.name
|
||||
|
||||
if attribute.translate
|
||||
nameNew = App.i18n.translateInline(nameNew)
|
||||
nameNew = App.i18n.translatePlain(nameNew)
|
||||
|
||||
row =
|
||||
value: item.id,
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
</div>
|
||||
<div class="form-group js-sure">
|
||||
<h3 class="danger-color"><%- @T('Warning') %></h3>
|
||||
<p class="danger-color"><%- @T('There is no rollback of this deletion possible. If you are absolutely sure to do this, then type in "%s" into the input.', App.i18n.translateInline('delete').toUpperCase()) %></p>
|
||||
<p class="danger-color"><%- @T('There is no rollback of this deletion possible. If you are absolutely sure to do this, then type in "%s" into the input.', App.i18n.translatePlain('delete').toUpperCase()) %></p>
|
||||
<%- @sure_html %>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -563,6 +563,25 @@ RSpec.describe 'Ticket Create', type: :system do
|
|||
end
|
||||
end
|
||||
|
||||
context 'when state options have a special translation', authenticated_as: :authenticate do
|
||||
let(:admin_de) { create(:admin, preferences: { locale: 'de-de' }) }
|
||||
|
||||
context 'when translated state option has a single quote' do
|
||||
def authenticate
|
||||
open_tranlation = Translation.where(locale: 'de-de', source: 'open')
|
||||
open_tranlation.update(target: "off'en")
|
||||
|
||||
admin_de
|
||||
end
|
||||
|
||||
it 'shows the translated state options correctly' do
|
||||
visit 'ticket/create'
|
||||
|
||||
expect(page).to have_select('state_id', with_options: ["off'en"])
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
describe 'It should be possible to show attributes which are configured shown false #3726', authenticated_as: :authenticate, db_strategy: :reset do
|
||||
let(:field_name) { SecureRandom.uuid }
|
||||
let(:field) do
|
||||
|
|
Loading…
Reference in a new issue