BigW Consortium Gitlab

i18n in some files

parent fe5d2c55
/* global monaco */
import $ from 'jquery';
import Vue from 'vue';
import Translate from '../vue_shared/translate';
import RepoSidebar from './repo_sidebar.vue';
import EditButton from './repo_edit_button';
import Service from './repo_service';
......@@ -14,6 +15,8 @@ import monacoLoader from './monaco_loader';
import RepoMixin from './repo_mixin';
import PopupDialog from '../vue_shared/components/popup_dialog.vue'
Vue.use(Translate);
function repoEditorLoader() {
return new Promise((resolve) => {
monacoLoader(['vs/editor/editor.main'], () => {
......@@ -74,7 +77,15 @@ function initRepo() {
<repo-binary-viewer/>
</div>
<repo-commit-section/>
<popup-dialog primary-button-label="Discard changes" :open="dialog.open" kind="warning" title="Are you sure?" body="Are you sure you want to discard your changes?" @toggle="dialogToggled" @submit="dialogSubmitted"></popup-dialog>
<popup-dialog
:primary-button-label="__('Discard changes')"
:open="dialog.open"
kind="warning"
:title="__('Are you sure?')"
:body="__('Are you sure you want to discard your changes?')"
@toggle="dialogToggled"
@submit="dialogSubmitted"
/>
</div>
`,
mixins: [RepoMixin],
......
import Vue from 'vue';
import Store from './repo_store';
import RepoMixin from './repo_mixin'
import RepoMixin from './repo_mixin';
import { __ } from '../locale';
export default class RepoEditButton {
constructor(el) {
......@@ -14,7 +15,7 @@ export default class RepoEditButton {
data: () => Store,
computed: {
buttonLabel() {
return this.editMode ? 'Cancel edit' : 'Edit';
return this.editMode ? __('Cancel edit') : __('Edit');
},
buttonIcon() {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment