Added i18n support

This commit is contained in:
MakingCG
2020-04-01 18:44:47 +02:00
parent 182091c21a
commit 8633650f82
52 changed files with 861 additions and 272 deletions

View File

@@ -26,7 +26,7 @@
<!--Other attributes-->
<span v-if="isFile || isImage" class="item-size">{{ file.filesize }}, {{ file.created_at }}</span>
<span v-if="isFolder" class="item-length">{{ file.items == 0 ? 'Empty' : (file.items + ' item') | pluralize(file.items) }}, {{ file.created_at }}</span >
<span v-if="isFolder" class="item-length">{{ file.items == 0 ? $t('folder.empty') : $tc('folder.item_counts', folderItems) }}, {{ file.created_at }}</span>
</div>
</div>
</template>
@@ -47,11 +47,6 @@ export default {
return this.file.type === 'image'
}
},
filters: {
pluralize(word, amount) {
return amount > 1 ? word + 's' : word
}
},
}
</script>