Skip to content

Commit

Permalink
Add weblate translation info
Browse files Browse the repository at this point in the history
  • Loading branch information
jacobsjo committed Nov 8, 2023
1 parent 6259b74 commit aff33ac
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/components/LocaleChanger.vue
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,11 @@ function updateUrlSearch(locale: string) {
</script>

<template>
<div class="locale-info">
<a v-bind:href="`https://weblate.catter.dev/projects/jacobsjo/mc-datapack-map/${$i18n.locale}`" target="_blank">
<img v-bind:src="`https://weblate.catter.dev/widget/jacobsjo/mc-datapack-map/${$i18n.locale}/svg-badge.svg`" alt="Translation status" />
</a>
</div>
<div class="locale-changer">
<font-awesome-icon icon="fa-earth-europe" class="icon" :title="$t('locale.change_locale.title')" />
<select v-model="$i18n.locale" @change="() => updateUrlSearch($i18n.locale)">
Expand All @@ -28,6 +33,11 @@ function updateUrlSearch(locale: string) {
</template>

<style scoped>
.locale-info {
width: 100%;
text-align: right;
}
.locale-changer {
width: 100%;
padding-bottom: 0.5rem;
Expand Down

0 comments on commit aff33ac

Please sign in to comment.