Config to translate all text.

This commit is contained in:
Vinincios Gomes 2021-02-08 18:04:51 -03:00
parent d175056acf
commit ff3b1cd384
8 changed files with 24 additions and 11 deletions

1
.l10nignore Normal file
View file

@ -0,0 +1 @@
js/

1
.npmignore Normal file
View file

@ -0,0 +1 @@
node_modules

10
.tx/config Normal file
View file

@ -0,0 +1,10 @@
[main]
host = https://www.transifex.com
lang_map = bg_BG: bg, cs_CZ: cs, fi_FI: fi, hu_HU: hu, nb_NO: nb, sk_SK: sk, th_TH: th, ja_JP: ja
[nextcloud.libresign]
file_filter = translationfiles/<lang>/libresign.po
source_file = translationfiles/templates/libresign.pot
source_lang = pt_BR
type = PO

0
l10n/.gitkeep Normal file
View file

View file

@ -25,21 +25,21 @@
<div class="container">
<header>
<img :src="image">
<p>{{ pdfName }}</p>
<span>{{ pdfDescription }}</span>
<p>{{ t('libresign', pdfName) }}</p>
<span>{{ t('libresign', pdfDescription) }}</span>
</header>
<div id="body">
<form @submit="e => e.preventDefault()">
<div v-show="signaturePath" class="form-group">
<label for="password">Senha da Assinatura</label>
<label for="password">{{ t('libresign', 'Senha da Assinatura') }}</label>
<div class="form-ib-group">
<input id="password" v-model="password" type="password">
<button type="button"
:value="'Assinar Documento'"
:value="buttonValue"
class="primary"
:disabled="updating"
@click="checkAssign">
Assinar Documento
{{ t('libresign', 'Assinar Documento') }}
</button>
</div>
</div>
@ -54,6 +54,7 @@ import axios from '@nextcloud/axios'
import Image from '../../assets/images/application-pdf.png'
import { generateUrl } from '@nextcloud/router'
import { joinPaths } from '@nextcloud/paths'
import { translate as t } from '@nextcloud/l10n'
export default {
name: 'Description',
@ -78,6 +79,7 @@ export default {
signaturePath: '2',
password: '',
asign: true,
buttonValue: t('libresign', 'Assinar Documento'),
}
},
@ -108,7 +110,7 @@ export default {
checkAssign() {
if (this.hasSavePossible === true) {
showSuccess('Assinado!')
showSuccess(t('libresign', 'Assinado!'))
}
},
},

View file

@ -33,8 +33,6 @@ import VTooltip from '@nextcloud/vue/dist/Directives/Tooltip'
import '@nextcloud/dialogs/styles/toast.scss'
Vue.mixin({ methods: { t, n } })
// CSP config for webpack dynamic chunk loading
// eslint-disable-next-line
__webpack_nonce__ = btoa(getRequestToken())

View file

@ -11,7 +11,7 @@
</template>
<script>
import { translate as t } from '@nextcloud/l10n'
import { translate as t, translatePlural as n } from '@nextcloud/l10n'
import SettingsSection from '@nextcloud/vue/dist/Components/SettingsSection'
import MulutiSelect from '@nextcloud/vue/dist/Components/Multiselect'
import axios from '@nextcloud/axios'
@ -26,7 +26,7 @@ export default {
data: () => ({
title: t('libresign', 'Webhook'),
description: t('libresign', 'Selecionar grupos autorizados.'),
description: n('libresign', 'Selecionar grupos autorizados.'),
groupsSelected: [],
groups: [],
}),

View file

@ -32,6 +32,7 @@
</template>
<script>
import { translate as t } from '@nextcloud/l10n'
import { showInfo } from '@nextcloud/dialogs'
import Description from '../Components/Description'
import PDFViewer from '../Components/PDFViewer'
@ -56,7 +57,7 @@ export default {
methods: {
checkHasUser() {
if (this.user.length === 0) {
showInfo('Usuario não existe, por favor crie uma nova conta!')
showInfo(t('libresign', 'Usuario não existe, por favor crie uma nova conta!'))
this.$router.push({ name: 'CreateUser' })
}
},