diff --git a/app/models/integrations/pushover.rb b/app/models/integrations/pushover.rb index b0cadc7ef4e9d7817f0dd3194c318a402ad1b41e..db39a4c68bd12b18a0c90029b0d839a45e3a216a 100644 --- a/app/models/integrations/pushover.rb +++ b/app/models/integrations/pushover.rb @@ -21,18 +21,46 @@ def self.to_param def fields [ - { type: 'text', name: 'api_key', title: _('API key'), placeholder: s_('PushoverService|Your application key'), required: true }, - { type: 'text', name: 'user_key', placeholder: s_('PushoverService|Your user key'), required: true }, - { type: 'text', name: 'device', placeholder: s_('PushoverService|Leave blank for all active devices') }, - { type: 'select', name: 'priority', required: true, choices: + { + type: 'text', + name: 'api_key', + title: _('API key'), + help: s_('PushoverService|Enter your application key.'), + placeholder: '', + required: true + }, + { + type: 'text', + name: 'user_key', + title: _('User key'), + help: s_('PushoverService|Enter your user key.'), + placeholder: '', + required: true + }, + { + type: 'text', + name: 'device', + title: _('Devices (optional)'), + help: s_('PushoverService|Leave blank for all active devices.'), + placeholder: '' + }, + { + type: 'select', + name: 'priority', + required: true, + choices: [ - [s_('PushoverService|Lowest Priority'), -2], - [s_('PushoverService|Low Priority'), -1], - [s_('PushoverService|Normal Priority'), 0], - [s_('PushoverService|High Priority'), 1] + [s_('PushoverService|Lowest priority'), -2], + [s_('PushoverService|Low priority'), -1], + [s_('PushoverService|Normal priority'), 0], + [s_('PushoverService|High priority'), 1] ], - default_choice: 0 }, - { type: 'select', name: 'sound', choices: + default_choice: 0 + }, + { + type: 'select', + name: 'sound', + choices: [ ['Device default sound', nil], ['Pushover (default)', 'pushover'], @@ -57,7 +85,8 @@ def fields ['Pushover Echo (long)', 'echo'], ['Up Down (long)', 'updown'], ['None (silent)', 'none'] - ] } + ] + } ] end diff --git a/locale/gitlab.pot b/locale/gitlab.pot index 1adb3cefe79a446233185470ae51622020c2f436..594a2cf01dc15199776e8d0e06aef26493e42fc6 100644 --- a/locale/gitlab.pot +++ b/locale/gitlab.pot @@ -11222,6 +11222,9 @@ msgstr "" msgid "DevOps adoption" msgstr "" +msgid "Devices (optional)" +msgstr "" + msgid "DevopsAdoption|%{adoptedCount}/%{featuresCount} %{title} features adopted" msgstr "" @@ -26804,34 +26807,34 @@ msgstr "" msgid "PushoverService|%{user_name} pushed new branch \"%{ref}\"." msgstr "" -msgid "PushoverService|Get real-time notifications on your device." +msgid "PushoverService|Enter your application key." msgstr "" -msgid "PushoverService|High Priority" +msgid "PushoverService|Enter your user key." msgstr "" -msgid "PushoverService|Leave blank for all active devices" +msgid "PushoverService|Get real-time notifications on your device." msgstr "" -msgid "PushoverService|Low Priority" +msgid "PushoverService|High priority" msgstr "" -msgid "PushoverService|Lowest Priority" +msgid "PushoverService|Leave blank for all active devices." msgstr "" -msgid "PushoverService|Normal Priority" +msgid "PushoverService|Low priority" msgstr "" -msgid "PushoverService|See project %{project_full_name}" +msgid "PushoverService|Lowest priority" msgstr "" -msgid "PushoverService|Total commits count: %{total_commits_count}" +msgid "PushoverService|Normal priority" msgstr "" -msgid "PushoverService|Your application key" +msgid "PushoverService|See project %{project_full_name}" msgstr "" -msgid "PushoverService|Your user key" +msgid "PushoverService|Total commits count: %{total_commits_count}" msgstr "" msgid "Quarters" @@ -35682,6 +35685,9 @@ msgstr "" msgid "User is not allowed to resolve thread" msgstr "" +msgid "User key" +msgstr "" + msgid "User key was successfully removed." msgstr "" diff --git a/spec/features/projects/services/user_activates_pushover_spec.rb b/spec/features/projects/services/user_activates_pushover_spec.rb index 97003ab7c2a03c9a2fd597f85defd06a96788dca..d92f69e700aebb7ec546d98ba9b7bb30ce4d1706 100644 --- a/spec/features/projects/services/user_activates_pushover_spec.rb +++ b/spec/features/projects/services/user_activates_pushover_spec.rb @@ -14,7 +14,7 @@ fill_in('API key', with: 'verySecret') fill_in('User key', with: 'verySecret') fill_in('Device', with: 'myDevice') - select('High Priority', from: 'Priority') + select('High priority', from: 'Priority') select('Bike', from: 'Sound') click_test_then_save_integration(expect_test_to_fail: false)