Skip to content

Commit

Permalink
Update message translations
Browse files Browse the repository at this point in the history
  • Loading branch information
Mattk70 committed Nov 27, 2024
1 parent b7476bb commit 23c6846
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 6 deletions.
19 changes: 16 additions & 3 deletions js/ui.js
Original file line number Diff line number Diff line change
Expand Up @@ -5497,9 +5497,9 @@ function getI18n(context){
].join('')
alertPlaceholder.append(wrapper)
}
alert(`
<svg class="bi flex-shrink-0 me-2" width="20" height="20" role="img" aria-label="Info:"><use xlink:href="#info-fill"/></svg>
There's a new version of Chirpity available! <a href="https://chirpity.mattkirkland.co.uk?fromVersion=${VERSION}" target="_blank">Check the website</a> for more information`,
const link = `<a href="https://chirpity.mattkirkland.co.uk?fromVersion=${VERSION}" target="_blank">`;
const message = interpolate(getI18n(i18nUpdateMessage), {link: link})
alert(`<svg class="bi flex-shrink-0 me-2" width="20" height="20" role="img" aria-label="Info:"><use xlink:href="#info-fill"/></svg>${message}`,
'warning');
trackEvent(config.UUID, 'Update message', `From ${VERSION}`, `To: ${latestVersion}`);
}
Expand All @@ -5511,6 +5511,19 @@ function getI18n(context){
});
}
}
const i18nUpdateMessage = {
en: 'There\'s a new version of Chirpity available! ${link}Check the website</a> for more information',
da: 'Der er en ny version af Chirpity tilgængelig! ${link}Besøg hjemmesiden</a> for mere information',
de: 'Eine neue Version von Chirpity ist verfügbar! ${link}Besuchen Sie die Website</a> für weitere Informationen',
es: '¡Hay una nueva versión de Chirpity disponible! ${link}Visita el sitio web</a> para más información',
fr: 'Une nouvelle version de Chirpity est disponible ! ${link}Consultez le site web</a> pour plus d\'informations',
nl: 'Er is een nieuwe versie van Chirpity beschikbaar! ${link}Bezoek de website</a> voor meer informatie',
pt: 'Há uma nova versão do Chirpity disponível! ${link}Visite o site</a> para mais informações',
ru: 'Доступна новая версия Chirpity! ${link}Посетите сайт</a> для получения дополнительной информации',
sv: 'En ny version av Chirpity är tillgänglig! ${link}Besök webbplatsen</a> för mer information',
zh: 'Chirpity有新版本可用!${link}访问网站</a>了解更多信息'
};



function generateToast({message = '', type = 'info', autohide = true, variables = undefined} ={}) {
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"export": "electron-builder build --m -p always",
"AppImage": "electron-builder build --linux --x64 -p always",
"build": "electron-builder --win --x64 -p always",
"testBuild": "electron-builder --win",
"testBuild": "electron-builder --m",
"postinstall": "electron-builder install-app-deps",
"test": "playwright test"
},
Expand Down
2 changes: 1 addition & 1 deletion test/menu.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ test.beforeAll(async () => {
clearInterval(checkPage);
resolve('');
}
}, 5000);
}, 100);
});
})

Expand Down
3 changes: 2 additions & 1 deletion test/record.creation.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -69,13 +69,14 @@ test.beforeAll(async () => {
console.log(msg.text())
})
})

await new Promise((resolve) => {
const checkPage = setInterval(async () => {
if (page) {
clearInterval(checkPage);
resolve('');
}
}, 5000);
}, 100);
});
})

Expand Down

0 comments on commit 23c6846

Please sign in to comment.