2
0
mirror of https://github.com/frappe/books.git synced 2025-01-31 02:58:31 +00:00

feat: add link to language contributions

- fix helpers
This commit is contained in:
18alantom 2022-02-17 14:50:48 +05:30
parent c83ac376dd
commit 330d0ac5c5
2 changed files with 16 additions and 2 deletions

View File

@ -33,7 +33,7 @@ function getIndexFormat(inp) {
function getSnippets(string) {
let start = 0;
snippets = [...string.matchAll(/\${[^}]+}/g)].map((m) => {
const snippets = [...string.matchAll(/\${[^}]+}/g)].map((m) => {
let end = m.index;
let snip = string.slice(start, end);
start = end + m[0].length;

View File

@ -10,7 +10,13 @@
</template>
<template #content>
<div class="flex flex-col justify-center items-center h-96">
<LanguageSelector class="w-40" />
<LanguageSelector class="w-40 mt-8" />
<p
class="text-sm mt-2 hover:underline cursor-pointer text-gray-700"
@click="openContributingTranslations"
>
{{ t`I can't find my language.` }}
</p>
</div>
</template>
<template #secondaryButton>
@ -100,6 +106,8 @@ import {
} from '../../errorHandling';
import Slide from './Slide.vue';
import LanguageSelector from '@/components/Controls/LanguageSelector.vue';
import { ipcRenderer } from 'electron';
import { IPC_MESSAGES } from '@/messages';
export default {
name: 'SetupWizard',
@ -137,6 +145,12 @@ export default {
});
},
methods: {
openContributingTranslations() {
ipcRenderer.send(
IPC_MESSAGES.OPEN_EXTERNAL,
'https://github.com/frappe/books/wiki/Contributing-Translations'
);
},
handlePrimary() {
if (this.index === 0) {
this.index = 1;