feat: init new i18n format

This commit is contained in:
liyasthomas
2021-08-02 20:57:18 +05:30
parent 8a268ee6de
commit b615fe7529
66 changed files with 476 additions and 428 deletions

View File

@@ -33,7 +33,7 @@
</template>
<SmartItem
icon="assignment_returned"
:label="$t('import_from_gist')"
:label="$t('import.from_gist')"
@click.native="
readCollectionGist
$refs.options.tippy().hide()
@@ -43,9 +43,9 @@
v-tippy="{ theme: 'tooltip' }"
:title="
!currentUser
? $t('login_with_github_to') + $t('create_secret_gist')
? $t('export.require_github')
: currentUser.provider !== 'github.com'
? $t('login_with_github_to') + $t('create_secret_gist')
? $t('export.require_github')
: null
"
:disabled="
@@ -56,7 +56,7 @@
: false
"
icon="assignment_turned_in"
:label="$t('create_secret_gist')"
:label="$t('export.create_secret_gist')"
@click.native="
createCollectionGist
$refs.options.tippy().hide()
@@ -87,7 +87,7 @@
v-tippy="{ theme: 'tooltip' }"
:title="$t('preserve_current')"
icon="create_new_folder"
:label="$t('import_json')"
:label="$t('import.json')"
@click.native="openDialogChooseFileToImportFrom"
/>
<input
@@ -103,14 +103,14 @@
v-tippy="{ theme: 'tooltip' }"
:title="$t('preserve_current')"
icon="folder_shared"
:label="$t('import_from_my_collections')"
:label="$t('import.from_my_collections')"
@click.native="mode = 'import_from_my_collections'"
/>
<SmartItem
v-tippy="{ theme: 'tooltip' }"
:title="$t('download_file')"
icon="drive_file_move"
:label="$t('export_as_json')"
:label="$t('export.as_json')"
@click.native="exportJSON"
/>
</div>
@@ -155,7 +155,7 @@
<ButtonPrimary
:disabled="mySelectedCollectionID == undefined"
icon="create_new_folder"
:label="$t('import')"
:label="$t('import.title')"
@click.native="importFromMyCollections"
/>
</span>
@@ -213,7 +213,7 @@ export default {
}
)
.then((res) => {
this.$toast.success(this.$t("gist_created"), {
this.$toast.success(this.$t("export.gist_created"), {
icon: "done",
})
window.open(res.html_url)
@@ -226,7 +226,7 @@ export default {
})
},
async readCollectionGist() {
const gist = prompt(this.$t("enter_gist_url"))
const gist = prompt(this.$t("import.gist_url"))
if (!gist) return
await this.$axios
.$get(`https://api.github.com/gists/${gist.split("/").pop()}`, {
@@ -413,7 +413,7 @@ export default {
})
},
failedImport() {
this.$toast.error(this.$t("import_failed"), {
this.$toast.error(this.$t("import.failed"), {
icon: "error",
})
},