diff options
author | André Luís <me@andr3.net> | 2019-07-16 02:48:40 +0000 |
---|---|---|
committer | Kushal Pandya <kushalspandya@gmail.com> | 2019-07-16 02:48:40 +0000 |
commit | ee85e3f4668743c916b48dabfc7fd58214a4505c (patch) | |
tree | c1d50dda90ad51e6d1729dc33783b53e3df09bde /app/assets/javascripts/issue_show | |
parent | ad5bcd9109b341630a2d880dab45e9f0788a7d28 (diff) | |
download | gitlab-ce-ee85e3f4668743c916b48dabfc7fd58214a4505c.tar.gz |
Fix broken vue i18n strings
Diffstat (limited to 'app/assets/javascripts/issue_show')
-rw-r--r-- | app/assets/javascripts/issue_show/components/locked_warning.vue | 21 |
1 files changed, 15 insertions, 6 deletions
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> |