Commit c854460e authored by Phil Hughes's avatar Phil Hughes

i18n in some files

parent fe5d2c55
/* global monaco */ /* global monaco */
import $ from 'jquery'; import $ from 'jquery';
import Vue from 'vue'; import Vue from 'vue';
import Translate from '../vue_shared/translate';
import RepoSidebar from './repo_sidebar.vue'; import RepoSidebar from './repo_sidebar.vue';
import EditButton from './repo_edit_button'; import EditButton from './repo_edit_button';
import Service from './repo_service'; import Service from './repo_service';
...@@ -14,6 +15,8 @@ import monacoLoader from './monaco_loader'; ...@@ -14,6 +15,8 @@ import monacoLoader from './monaco_loader';
import RepoMixin from './repo_mixin'; import RepoMixin from './repo_mixin';
import PopupDialog from '../vue_shared/components/popup_dialog.vue' import PopupDialog from '../vue_shared/components/popup_dialog.vue'
Vue.use(Translate);
function repoEditorLoader() { function repoEditorLoader() {
return new Promise((resolve) => { return new Promise((resolve) => {
monacoLoader(['vs/editor/editor.main'], () => { monacoLoader(['vs/editor/editor.main'], () => {
...@@ -74,7 +77,15 @@ function initRepo() { ...@@ -74,7 +77,15 @@ function initRepo() {
<repo-binary-viewer/> <repo-binary-viewer/>
</div> </div>
<repo-commit-section/> <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> </div>
`, `,
mixins: [RepoMixin], mixins: [RepoMixin],
......
import Vue from 'vue'; import Vue from 'vue';
import Store from './repo_store'; import Store from './repo_store';
import RepoMixin from './repo_mixin' import RepoMixin from './repo_mixin';
import { __ } from '../locale';
export default class RepoEditButton { export default class RepoEditButton {
constructor(el) { constructor(el) {
...@@ -14,7 +15,7 @@ export default class RepoEditButton { ...@@ -14,7 +15,7 @@ export default class RepoEditButton {
data: () => Store, data: () => Store,
computed: { computed: {
buttonLabel() { buttonLabel() {
return this.editMode ? 'Cancel edit' : 'Edit'; return this.editMode ? __('Cancel edit') : __('Edit');
}, },
buttonIcon() { 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