Skip to content
Snippets Groups Projects
Verified Commit 3920ab1a authored by Chad Lavimoniere's avatar Chad Lavimoniere Committed by GitLab
Browse files

Merge branch...

Merge branch '450712-undo-the-split-sentence-in-because-reason-to-make-text-localizable' into 'master' 

Update split i18n strings to be more translatable

See merge request !148112



Merged-by: default avatarChad Lavimoniere <clavimoniere@gitlab.com>
Approved-by: default avatarMarcin Sedlak-Jakubowski <msedlakjakubowski@gitlab.com>
Approved-by: default avatarJames Rushford <jrushford@gitlab.com>
Approved-by: default avatarStanislav Lashmanov <slashmanov@gitlab.com>
Approved-by: charlie ablett's avatarcharlie ablett <cablett@gitlab.com>
Approved-by: default avatarSmriti Garg <sgarg@gitlab.com>
Reviewed-by: Peter Leitzen's avatarPeter Leitzen <pleitzen@gitlab.com>
Reviewed-by: charlie ablett's avatarcharlie ablett <cablett@gitlab.com>
Reviewed-by: default avatarChad Lavimoniere <clavimoniere@gitlab.com>
parents 5074f4ea 746789fd
No related branches found
No related tags found
No related merge requests found
Pipeline #1256497631 passed
Pipeline: GitLab

#1256675870

    Pipeline: E2E Omnibus GitLab EE

    #1256618029

      Pipeline: E2E GDK

      #1256517559

        +2
        Showing
        with 59 additions and 51 deletions
        ......@@ -10,9 +10,9 @@ export default {
        i18n: {
        reply: __('Reply…'),
        replyToComment: __('Reply to comment'),
        commentError: __('Your comment could not be submitted because %{reason}.'),
        commentError: __('Comment could not be submitted: %{reason}.'),
        genericError: __(
        'Your comment could not be submitted! Please check your network connection and try again.',
        'Comment could not be submitted. Please check your network connection and try again.',
        ),
        },
        components: {
        ......
        ......@@ -9,7 +9,7 @@ import AbuseReportCommentForm from './abuse_report_comment_form.vue';
        export default {
        name: 'AbuseReportEditNote',
        i18n: {
        updateError: __('Your comment could not be updated because %{reason}.'),
        updateError: __('Comment could not be updated: %{reason}.'),
        genericError: __('Something went wrong while editing your comment. Please try again.'),
        },
        components: {
        ......
        ......@@ -55,7 +55,7 @@ export default {
        },
        },
        errorMessage: __(
        'This content could not be displayed because %{reason}. You can %{options} instead.',
        'Content could not be displayed: %{reason}. Options to address this: %{options}.',
        ),
        };
        </script>
        ......
        ......@@ -67,7 +67,7 @@ export const BUILDING_YOUR_MR = __(
        );
        export const SOMETHING_WENT_WRONG = __('Something went wrong on our end. Please try again!');
        export const SAVING_THE_COMMENT_FAILED = s__(
        'MergeRequests|Your comment could not be submitted because %{reason}.',
        'MergeRequests|Comment could not be submitted: %{reason}.',
        );
        export const ERROR_LOADING_FULL_DIFF = s__(
        'MergeRequest|Error loading full diff. Please try again.',
        ......
        ......@@ -4,7 +4,7 @@ export const COMMENT_FORM = {
        GENERIC_UNSUBMITTABLE_NETWORK: __(
        'Your comment could not be submitted! Please check your network connection and try again.',
        ),
        error: __('Your comment could not be submitted because %{reason}.'),
        error: __('Comment could not be submitted: %{reason}.'),
        note: __('Note'),
        comment: __('Comment'),
        internalComment: __('Add internal note'),
        ......@@ -57,6 +57,6 @@ export const EDITED_TEXT = {
        };
        export const UPDATE_COMMENT_FORM = {
        error: __('Your comment could not be updated because %{reason}.'),
        error: __('Comment could not be updated: %{reason}.'),
        defaultError: __('Something went wrong while editing your comment. Please try again.'),
        };
        ......@@ -90,7 +90,8 @@ def email_default_heading(text)
        ].join(';')
        end
        def closure_reason_text(closed_via, format: nil)
        def closure_reason_text(closed_via, format:, name:)
        name = sanitize_name(name)
        case closed_via
        when MergeRequest
        merge_request = MergeRequest.find(closed_via[:id]).present
        ......@@ -100,10 +101,10 @@ def closure_reason_text(closed_via, format: nil)
        case format
        when :html
        merge_request_link = link_to(merge_request.to_reference, merge_request.web_url)
        _("via merge request %{link}").html_safe % { link: merge_request_link }
        safe_format(_("Issue was closed by %{name} via merge request %{link}"), name: name, link: merge_request_link)
        else
        # If it's not HTML nor text then assume it's text to be safe
        _("via merge request %{link}") % { link: "#{merge_request.to_reference} (#{merge_request.web_url})" }
        _("Issue was closed by %{name} via merge request %{link}") % { name: name, link: "#{merge_request.to_reference} (#{merge_request.web_url})" }
        end
        when String
        # Technically speaking this should be Commit but per
        ......@@ -111,9 +112,13 @@ def closure_reason_text(closed_via, format: nil)
        # we can't deserialize Commit without custom serializer for ActiveJob
        return "" unless Ability.allowed?(@recipient, :download_code, @project)
        _("via %{closed_via}") % { closed_via: closed_via }
        _("Issue was closed by %{name} via %{closed_via}") % { name: name, closed_via: closed_via }
        else
        ""
        if name
        _("Issue was closed by %{name}") % { name: name }
        else
        ""
        end
        end
        end
        ......
        ......@@ -169,7 +169,7 @@ def unapproved_merge_request_email(recipient_id, merge_request_id, unapproved_by
        def setup_merge_request_mail(merge_request_id, recipient_id, present: false)
        @merge_request = MergeRequest.find(merge_request_id)
        @project = @merge_request.project
        @target_url = project_merge_request_url(@project, @merge_request)
        @target_url = Gitlab::Routing.url_helpers.project_merge_request_url(@project, @merge_request)
        @recipient = User.find(recipient_id)
        if present
        ......
        ......@@ -88,7 +88,7 @@ def render_error
        def render_error_message
        return unless render_error
        _("This %{viewer} could not be displayed because %{reason}. You can %{options} instead.") %
        _("%{viewer} could not be displayed: %{reason}. Options to address this: %{options}.") %
        {
        viewer: switcher_title,
        reason: render_error_reason,
        ......
        ......@@ -20,7 +20,7 @@ def enqueue(project, current_user, bfg_object_map)
        RepositoryCleanupWorker.perform_async(project.id, current_user.id)
        end
        rescue Project::RepositoryReadOnlyError => err
        { status: :error, message: (_('Failed to make repository read-only. %{reason}') % { reason: err.message }) }
        { status: :error, message: (_('Failed to make repository read-only: %{reason}') % { reason: err.message }) }
        end
        def cleanup_after(project)
        ......
        %p
        = _("Issue was closed by %{name} %{reason}").html_safe % { name: sanitize_name(@updated_by.name), reason: closure_reason_text(@closed_via, format: formats.first) }
        = closure_reason_text(@closed_via, format: formats.first, name: @updated_by.name)
        = _("Issue was closed by %{name} %{reason}").html_safe % { name: sanitize_name(@updated_by.name), reason: closure_reason_text(@closed_via, format: formats.first) }
        = closure_reason_text(@closed_via, format: formats.first, name: @updated_by.name)
        Issue ##{@issue.iid}: #{project_issue_url(@issue.project, @issue)}
        ......@@ -133,7 +133,7 @@ def saml_redirect_path
        override :find_message
        def find_message(kind, options = {})
        _('Unable to sign you in to the group with SAML due to "%{reason}"') % options
        _('Unable to sign in to group with SAML: "%{reason}"') % options
        end
        override :after_omniauth_failure_path_for
        ......
        ......@@ -535,7 +535,7 @@ def stub_certificate_error
        it "has descriptive error flash" do
        post :failure, params: { group_id: group }
        expect(flash[:alert]).to start_with("Unable to sign you in to the group with SAML due to")
        expect(flash[:alert]).to start_with("Unable to sign in to group with SAML:")
        expect(flash[:alert]).to include("Fingerprint mismatch")
        end
        ......
        ......@@ -1433,6 +1433,9 @@ msgstr ""
        msgid "%{verb} this %{noun} as a draft."
        msgstr ""
         
        msgid "%{viewer} could not be displayed: %{reason}. Options to address this: %{options}."
        msgstr ""
        msgid "%{webhooks_link_start}%{webhook_type}%{webhooks_link_end} enable you to send notifications to web applications in response to events in a group or project."
        msgstr ""
         
        ......@@ -12735,6 +12738,15 @@ msgstr ""
        msgid "Comment added to the timeline."
        msgstr ""
         
        msgid "Comment could not be submitted. Please check your network connection and try again."
        msgstr ""
        msgid "Comment could not be submitted: %{reason}."
        msgstr ""
        msgid "Comment could not be updated: %{reason}."
        msgstr ""
        msgid "Comment form position"
        msgstr ""
         
        ......@@ -14242,6 +14254,9 @@ msgstr ""
        msgid "Content"
        msgstr ""
         
        msgid "Content could not be displayed: %{reason}. Options to address this: %{options}."
        msgstr ""
        msgid "Content parsed with %{link}."
        msgstr ""
         
        ......@@ -21473,7 +21488,7 @@ msgstr ""
        msgid "Failed to load stacktrace."
        msgstr ""
         
        msgid "Failed to make repository read-only. %{reason}"
        msgid "Failed to make repository read-only: %{reason}"
        msgstr ""
         
        msgid "Failed to mark this issue as a duplicate because referenced issue was not found."
        ......@@ -28099,7 +28114,13 @@ msgstr ""
        msgid "Issue update failed"
        msgstr ""
         
        msgid "Issue was closed by %{name} %{reason}"
        msgid "Issue was closed by %{name}"
        msgstr ""
        msgid "Issue was closed by %{name} via %{closed_via}"
        msgstr ""
        msgid "Issue was closed by %{name} via merge request %{link}"
        msgstr ""
         
        msgid "Issue weight"
        ......@@ -31940,6 +31961,9 @@ msgstr ""
        msgid "MergeRequests|Can't perform this action automatically. It may have already been done, or a more recent commit may have updated some of this content. Please perform this action locally."
        msgstr ""
         
        msgid "MergeRequests|Comment could not be submitted: %{reason}."
        msgstr ""
        msgid "MergeRequests|Commit cherry-pick failed"
        msgstr ""
         
        ......@@ -31988,9 +32012,6 @@ msgstr ""
        msgid "MergeRequests|View replaced file @ %{commitId}"
        msgstr ""
         
        msgid "MergeRequests|Your comment could not be submitted because %{reason}."
        msgstr ""
        msgid "MergeRequests|commented on commit %{commitLink}"
        msgstr ""
         
        ......@@ -52246,9 +52267,6 @@ msgstr ""
        msgid "This %{noteableTypeText} is %{confidentialLinkStart}confidential%{confidentialLinkEnd} and its %{lockedLinkStart}discussion is locked%{lockedLinkEnd}."
        msgstr ""
         
        msgid "This %{viewer} could not be displayed because %{reason}. You can %{options} instead."
        msgstr ""
        msgid "This Cron pattern is invalid"
        msgstr ""
         
        ......@@ -52366,9 +52384,6 @@ msgstr ""
        msgid "This commit was signed with multiple signatures."
        msgstr ""
         
        msgid "This content could not be displayed because %{reason}. You can %{options} instead."
        msgstr ""
        msgid "This content could not be displayed because it is stored in LFS. You can %{linkStart}download it%{linkEnd} instead."
        msgstr ""
         
        ......@@ -54619,7 +54634,7 @@ msgstr ""
        msgid "Unable to schedule a pipeline to run immediately"
        msgstr ""
         
        msgid "Unable to sign you in to the group with SAML due to \"%{reason}\""
        msgid "Unable to sign in to group with SAML: \"%{reason}\""
        msgstr ""
         
        msgid "Unable to suggest a path. Please refresh and try again."
        ......@@ -59657,15 +59672,9 @@ msgstr ""
        msgid "Your changes have been successfully committed."
        msgstr ""
         
        msgid "Your comment could not be submitted because %{reason}."
        msgstr ""
        msgid "Your comment could not be submitted! Please check your network connection and try again."
        msgstr ""
         
        msgid "Your comment could not be updated because %{reason}."
        msgstr ""
        msgid "Your comment will be discarded."
        msgstr ""
         
        ......@@ -62090,12 +62099,6 @@ msgstr ""
        msgid "via"
        msgstr ""
         
        msgid "via %{closed_via}"
        msgstr ""
        msgid "via merge request %{link}"
        msgstr ""
        msgid "view it on GitLab"
        msgstr ""
         
        ......@@ -270,7 +270,7 @@ def file_container(filename)
        # Wait for elements to appear to ensure full page reload
        expect(page).to have_content("File suppressed by a .gitattributes entry or the file's encoding is unsupported.")
        expect(page).to have_content('This source diff could not be displayed because it is too large.')
        expect(page).to have_content('source diff could not be displayed: it is too large.')
        expect(page).to have_content('too_large_image.jpg')
        find('.note-textarea')
        ......
        ......@@ -121,7 +121,7 @@
        click_button 'Add comment now'
        expect(page).to have_content('Your comment could not be submitted because discussion to reply to cannot be found')
        expect(page).to have_content('Comment could not be submitted: discussion to reply to cannot be found')
        end
        end
        end
        ......
        ......@@ -160,7 +160,7 @@
        let(:file_name) { 'a/image.png' }
        it 'shows an error message' do
        expect(page).not_to have_content('could not be displayed because it is stored in LFS')
        expect(page).not_to have_content('could not be displayed: it is stored in LFS')
        end
        end
        ......@@ -168,7 +168,7 @@
        let(:file_name) { 'a/ruby.rb' }
        it 'shows an error message' do
        expect(page).to have_content('This source diff could not be displayed because it is stored in LFS')
        expect(page).to have_content('source diff could not be displayed: it is stored in LFS')
        end
        end
        end
        ......
        ......@@ -48,7 +48,7 @@ def visit_commit(sha, anchor: nil)
        end
        it 'shows an error message' do
        expect(page).to have_content('This source diff could not be displayed because it is stored in LFS. You can view the blob instead.')
        expect(page).to have_content('source diff could not be displayed: it is stored in LFS. Options to address this: view the blob.')
        end
        end
        ......
        ......@@ -183,8 +183,8 @@ describe('Abuse Report Add Note', () => {
        await waitForPromises();
        const errorMessage = errorResponse
        ? 'Your comment could not be submitted because the discussion could not be found.'
        : 'Your comment could not be submitted! Please check your network connection and try again.';
        ? 'Comment could not be submitted: the discussion could not be found.'
        : 'Comment could not be submitted. Please check your network connection and try again.';
        expect(createAlert).toHaveBeenCalledWith({
        message: errorMessage,
        ......
        ......@@ -116,7 +116,7 @@ describe('Abuse Report Edit Note', () => {
        await waitForPromises();
        const errorMessage = errorResponse
        ? 'Your comment could not be updated because the note could not be found.'
        ? 'Comment could not be updated: the note could not be found.'
        : 'Something went wrong while editing your comment. Please try again.';
        expect(createAlert).toHaveBeenCalledWith({
        ......
        0% Loading or .
        You are about to add 0 people to the discussion. Proceed with caution.
        Finish editing this message first!
        Please register or to comment