summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndré Luís <aluis@gitlab.com>2019-07-15 12:44:42 +0100
committerAndré Luís <aluis@gitlab.com>2019-07-15 14:30:26 +0100
commit36c13d7574022c64a26026de9fe0df6eba66a093 (patch)
tree978f7f2a1774c1538247ae2163490d648e73283b
parent29662cdce3b7a4728ecd98c8e31c99d97473e483 (diff)
downloadgitlab-ce-fix-broken-vue-i18n-strings.tar.gz
Fix broken vue i18n stringsfix-broken-vue-i18n-strings
-rw-r--r--app/assets/javascripts/diffs/components/diff_file.vue19
-rw-r--r--app/assets/javascripts/issue_show/components/locked_warning.vue21
-rw-r--r--changelogs/unreleased/fix-broken-vue-i18n-strings.yml5
-rw-r--r--locale/gitlab.pot6
4 files changed, 39 insertions, 12 deletions
diff --git a/app/assets/javascripts/diffs/components/diff_file.vue b/app/assets/javascripts/diffs/components/diff_file.vue
index 63350fafefa..2514274224d 100644
--- a/app/assets/javascripts/diffs/components/diff_file.vue
+++ b/app/assets/javascripts/diffs/components/diff_file.vue
@@ -67,6 +67,18 @@ export default {
errorMessage() {
return this.file.viewer.error_message;
},
+ forkMessage() {
+ return sprintf(
+ __(
+ "You're not allowed to %{tag_start}edit%{tag_end} files in this project directly. Please fork this project, make your changes there, and submit a merge request.",
+ ),
+ {
+ tag_start: '<span class="js-file-fork-suggestion-section-action">',
+ tag_end: '</span>',
+ },
+ false,
+ );
+ },
},
watch: {
isCollapsed: function fileCollapsedWatch(newVal, oldVal) {
@@ -150,12 +162,7 @@ export default {
/>
<div v-if="forkMessageVisible" class="js-file-fork-suggestion-section file-fork-suggestion">
- <span class="file-fork-suggestion-note">
- {{ sprintf(__("You're not allowed to %{tag_start}edit%{tag_end} files in this project
- directly. Please fork this project, make your changes there, and submit a merge request."),
- { tag_start: '<span class="js-file-fork-suggestion-section-action">', tag_end: '</span>' })
- }}
- </span>
+ <span class="file-fork-suggestion-note" v-html="forkMessage"></span>
<a
:href="file.fork_path"
class="js-fork-suggestion-button btn btn-grouped btn-inverted btn-success"
diff --git a/app/assets/javascripts/issue_show/components/locked_warning.vue b/app/assets/javascripts/issue_show/components/locked_warning.vue
index 2f3e611e089..19c7a11d87b 100644
--- a/app/assets/javascripts/issue_show/components/locked_warning.vue
+++ b/app/assets/javascripts/issue_show/components/locked_warning.vue
@@ -1,18 +1,27 @@
<script>
+import { __, sprintf } from '~/locale';
+
export default {
computed: {
currentPath() {
return window.location.pathname;
},
+ alertMessage() {
+ return sprintf(
+ __(
+ 'Someone edited the issue at the same time you did. Please check out %{linkStart}the issue%{linkEnd} and make sure your changes will not unintentionally remove theirs.',
+ ),
+ {
+ linkStart: `<a href="${this.currentPath}" target="_blank" rel="nofollow">`,
+ linkEnd: `</a>`,
+ },
+ false,
+ );
+ },
},
};
</script>
<template>
- <div class="alert alert-danger">
- {{ sprintf(__("Someone edited the issue at the same time you did. Please check out
- %{linkStart}%the issue%{linkEnd} and make sure your changes will not unintentionally remove
- theirs."), { linkStart: `<a href="${currentPath}" target="_blank" rel="nofollow">` linkEnd: '</a
- >', }) }}
- </div>
+ <div class="alert alert-danger" v-html="alertMessage"></div>
</template>
diff --git a/changelogs/unreleased/fix-broken-vue-i18n-strings.yml b/changelogs/unreleased/fix-broken-vue-i18n-strings.yml
new file mode 100644
index 00000000000..69cec8a6b1b
--- /dev/null
+++ b/changelogs/unreleased/fix-broken-vue-i18n-strings.yml
@@ -0,0 +1,5 @@
+---
+title: Fix broken warnings while Editing Issues and Edit File on MR
+merge_request:
+author:
+type: fixed
diff --git a/locale/gitlab.pot b/locale/gitlab.pot
index b1fe304e46f..3b07b69bfd7 100644
--- a/locale/gitlab.pot
+++ b/locale/gitlab.pot
@@ -9727,6 +9727,9 @@ msgstr ""
msgid "Some email servers do not support overriding the email sender name. Enable this option to include the name of the author of the issue, merge request or comment in the email body instead."
msgstr ""
+msgid "Someone edited the issue at the same time you did. Please check out %{linkStart}the issue%{linkEnd} and make sure your changes will not unintentionally remove theirs."
+msgstr ""
+
msgid "Someone edited this %{issueType} at the same time you did. The description has been updated and you will need to make your changes again."
msgstr ""
@@ -12507,6 +12510,9 @@ msgstr ""
msgid "You'll need to use different branch names to get a valid comparison."
msgstr ""
+msgid "You're not allowed to %{tag_start}edit%{tag_end} files in this project directly. Please fork this project, make your changes there, and submit a merge request."
+msgstr ""
+
msgid "You're not allowed to make changes to this project directly. A fork of this project has been created that you can make changes in, so you can submit a merge request."
msgstr ""