Skip to content

Commit

Permalink
🌐 Add Chinese language support for labels (#266)
Browse files Browse the repository at this point in the history
* 🌐 Add Chinese language support for labels

* 🚸 Enable custom message page for manual delivery

* 🌐 Update labels translations

* 💬 Update translation

---------

Co-authored-by: William Chong <[email protected]>
  • Loading branch information
AuroraHuang22 and williamchong authored Jan 19, 2025
1 parent 44d8deb commit 2474ab3
Show file tree
Hide file tree
Showing 10 changed files with 92 additions and 80 deletions.
2 changes: 1 addition & 1 deletion components/ShippingRates/RateTable.vue
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<div class="flex flex-row justify-between items-center">
<div class="flex justify-start items-center gap-[8px]">
<h3 class="font-bold font-mono">
Shipping Options
Shipping Options / 實體書運送選項
</h3>
<slot name="header" />
</div>
Expand Down
2 changes: 1 addition & 1 deletion components/StripeConnectCard.vue
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
>
<template #header>
<h3 class="font-bold font-mono">
Connect to a Stripe Account
Connect to a Stripe Account / 連接 Stripe 帳戶
</h3>
<UToggle
v-model="isStripeConnectChecked"
Expand Down
27 changes: 15 additions & 12 deletions pages/mint-nft/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -282,12 +282,12 @@
Mint NFT by filling required information
</h3>
</template>
<UForm :validate="validate" :state="state">
<UFormGroup label="NFT ID Prefix:" name="prefix" required>
<UForm :validate="validate" :state="state" class="flex flex-col gap-[12px]">
<UFormGroup label="NFT ID Prefix / 前綴(書本編號)" name="prefix" required>
<UInput v-model="state.nftIdPrefix" placeholder="English only ex.MoneyVerse" />
</UFormGroup>

<UFormGroup label="Number of NFT to mint:" required>
<UFormGroup label="Number of NFT to mint / 鑄造數量(此批)" required>
<UInput
v-model="nftMintCount"
placeholder="0-100"
Expand All @@ -297,19 +297,19 @@
/>
</UFormGroup>

<UFormGroup label="Image URL:" required>
<UFormGroup label="Image URL / 封面網址" required>
<UInput v-model="imageUrl" placeholder="ipfs:// ... or ar://...." />
</UFormGroup>

<UFormGroup label="External URL (optional):">
<UFormGroup label="External URL (optional) / 外部網址(選填)">
<UInput v-model="externalUrl" placeholder="https://" />
</UFormGroup>

<UFormGroup label="URI (optional):">
<UFormGroup label="URI (optional) / 元資料網址(選填)">
<UInput v-model="uri" placeholder="https://" />
</UFormGroup>

<UFormGroup v-if="isCreatingClass" label="Max number of supply for this NFT Class (optional):">
<UFormGroup v-if="isCreatingClass" label="Max number of supply for this NFT Class (optional) / 最大供應量(選填)">
<template
v-if="classMaxSupply && classMaxSupply < nftMintCount"
#help
Expand Down Expand Up @@ -405,11 +405,14 @@
target="_blank"
:to="`${likerLandURL}/nft/class/${encodeURIComponent(classId)}`"
/>
<UButton
:to="{ name: 'nft-book-store-new', query: { class_id: classId, count: nftMintCount } }"
label="Continue to publish NFT Book"
variant="solid"
/>
<div class="p-[4px] border-[2px] border-[#f59e0b] rounded-[0.375rem]">
<UButton
:to="{ name: 'nft-book-store-new', query: { class_id: classId, count: nftMintCount } }"
label="Continue to publish NFT Book / 繼續上架"
variant="solid"
color="orange"
/>
</div>
</template>
</UCard>

Expand Down
24 changes: 12 additions & 12 deletions pages/nft-book-store/collection/new.vue
Original file line number Diff line number Diff line change
Expand Up @@ -61,19 +61,19 @@
Pricing and Availability
</h3>
</template>
<UFormGroup :label="`Price(USD) of this collection (Minimal ${MINIMAL_PRICE} or $0 (free))`">
<UFormGroup :label="`Price(USD) of this collection (Minimal ${MINIMAL_PRICE} or $0 (free)) / 版本定價(美金)`">
<UInput v-model="price.price" type="number" step="0.01" :min="MINIMAL_PRICE" @input="onPriceChange" />
</UFormGroup>

<URadioGroup
v-model="price.deliveryMethod"
:disabled="price.isPhysicalOnly"
legend="Delivery method of this collection"
legend="Delivery method of this collection / 自動或手動發書"
:options="deliverMethodOptions"
/>
<UFormGroup v-if="price.deliveryMethod === 'auto'">
<template #label>
Memo of this collection
Memo of this collection / 自動發書留言
<ToolTips>
<template #image>
<img
Expand All @@ -91,7 +91,7 @@
</UFormGroup>
<UFormGroup
v-else
label="Is Physical only good"
label="Is Physical only good / 只含實體書"
:ui="{ label: { base: 'font-mono font-bold' } }"
>
<UCheckbox
Expand All @@ -102,7 +102,7 @@
</UFormGroup>
<UFormGroup>
<template #label>
Allow custom price
Allow custom price / 開啟打賞功能
<ToolTips :image-style="{ width: '300px' }">
<template #image>
<img
Expand All @@ -120,7 +120,7 @@
label="Allow user to pay more than defined price"
/>
</UFormGroup>
<UFormGroup label="Unlist Edition">
<UFormGroup label="Unlist Edition / 暫時下架">
<UCheckbox
v-model="price.isUnlisted"
name="isUnlisted"
Expand All @@ -145,7 +145,7 @@
</template>
<UFormGroup label="Product Name" :ui="{ container: 'space-y-2' }">
<template #label>
Product Name
Product Name / 產品名稱(英文)
<ToolTips :image-style="{ width: '250px' }">
<template #image>
<img
Expand All @@ -158,7 +158,7 @@
</ToolTips>
</template>
<UInput v-model="nameEn" placeholder="Product name in English" />
<span class="block text-[14px] text-[#374151] mt-[8px]">Description (Optional)</span>
<span class="block text-[14px] text-[#374151] mt-[8px]">Description (Optional) / 描述(選填)</span>
<md-editor
v-model="descriptionEn"
language="en-US"
Expand All @@ -171,7 +171,7 @@
</UFormGroup>
<UFormGroup :ui="{ container: 'space-y-2 my-[20px]' }">
<template #label>
產品名稱
產品名稱(中文)
<ToolTips :image-style="{ width: '250px' }">
<template #image>
<img
Expand Down Expand Up @@ -235,7 +235,7 @@
>
<template #header>
<h4 class="text-sm font-bold font-mono">
Email to receive sales notifications
Email to receive sales notifications / 欲收到銷售通知的電郵
</h4>
<div class="flex gap-2">
<UInput
Expand Down Expand Up @@ -326,7 +326,7 @@
>
<template #header>
<h4 class="text-sm font-bold font-mono">
Share sales data to wallets
Share sales data to wallets / 分享銷售數據給特定地址
</h4>
<div class="flex gap-2">
<UInput
Expand Down Expand Up @@ -382,7 +382,7 @@
<UCard :ui="{ body: { base: 'space-y-8' } }">
<template #header>
<h3 class="font-bold font-mono">
DRM Options
DRM Options / 數位版權管理選項
</h3>
</template>

Expand Down
8 changes: 4 additions & 4 deletions pages/nft-book-store/collection/status/[collectionId].vue
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@
>
<template #header>
<h4 class="text-sm font-bold font-mono">
Email to receive sales notifications
Email to receive sales notifications / 欲收到銷售通知的電郵
</h4>

<div class="flex gap-2">
Expand Down Expand Up @@ -236,7 +236,7 @@
<UCard :ui="{ body: { padding: '' } }">
<template #header>
<h3 class="font-bold font-mono">
Sales Channel Summary
Sales Channel Summary / 銷售渠道摘要
</h3>
</template>

Expand Down Expand Up @@ -307,7 +307,7 @@
>
<template #header>
<h4 class="text-sm font-bold font-mono">
Share sales data to wallets
Share sales data to wallets / 分享銷售數據給特定地址
</h4>
<div class="flex gap-2">
<UInput
Expand Down Expand Up @@ -369,7 +369,7 @@
>
<template #header>
<h3 class="font-bold font-mono">
Copy Purchase Link
Copy Purchase Link / 複製購買連結
</h3>
</template>

Expand Down
20 changes: 10 additions & 10 deletions pages/nft-book-store/collection/status/[collectionId]/edit.vue
Original file line number Diff line number Diff line change
Expand Up @@ -63,23 +63,23 @@
Pricing and Availability
</h3>
</template>
<UFormGroup :label="`Price(USD) of this collection (Minimal ${MINIMAL_PRICE} or $0 (free))`">
<UFormGroup :label="`Price(USD) of this collection (Minimal ${MINIMAL_PRICE} or $0 (free)) / 版本定價(美金)`">
<UInput v-model="price" type="number" step="0.01" :min="MINIMAL_PRICE" />
</UFormGroup>
<UFormGroup :label="`Total number of NFT for sale of this collection`">
<UFormGroup :label="`Total number of NFT for sale of this collection / 此定價上架的數量`">
<UInput v-model="stock" type="number" step="1" :min="minStock" />
</UFormGroup>

<URadioGroup
v-model="deliveryMethod"
:disabled="oldIsAutoDeliver || isPhysicalOnly"
legend="Delivery method of this collection"
legend="Delivery method of this collection / 自動或手動發書"
:options="deliverMethodOptions"
/>

<UFormGroup v-if="isAutoDeliver">
<template #label>
Memo of this collection
Memo of this collection / 自動發書留言
<ToolTips>
<template #image>
<img
Expand All @@ -97,7 +97,7 @@
</UFormGroup>
<UFormGroup
v-else
label="Is Physical only good"
label="Is Physical only good / 只含實體書"
:ui="{ label: { base: 'font-mono font-bold' } }"
>
<UCheckbox
Expand All @@ -108,7 +108,7 @@
</UFormGroup>
<UFormGroup>
<template #label>
Allow custom price
Allow custom price / 開啟打賞功能
<ToolTips :image-style="{ width: '300px' }">
<template #image>
<img
Expand All @@ -126,7 +126,7 @@
label="Allow user to pay more than defined price"
/>
</UFormGroup>
<UFormGroup label="Unlist Edition">
<UFormGroup label="Unlist Edition / 暫時下架">
<UCheckbox
v-model="isUnlisted"
name="isUnlisted"
Expand All @@ -151,7 +151,7 @@
</template>
<UFormGroup label="Product Name" :ui="{ container: 'space-y-2' }">
<template #label>
Product Name
Product Name / 產品名稱(英文)
<ToolTips :image-style="{ width: '250px' }">
<template #image>
<img
Expand All @@ -164,7 +164,7 @@
</ToolTips>
</template>
<UInput v-model="nameEn" placeholder="Product name in English" />
<span class="block text-[14px] text-[#374151] mt-[8px]">Description (Optional)</span>
<span class="block text-[14px] text-[#374151] mt-[8px]">Description (Optional) / 描述(選填)</span>
<md-editor
v-model="descriptionEn"
language="en-US"
Expand All @@ -177,7 +177,7 @@
</UFormGroup>
<UFormGroup :ui="{ container: 'space-y-2 my-[20px]' }">
<template #label>
產品名稱
產品名稱(中文)
<ToolTips :image-style="{ width: '250px' }">
<template #image>
<img
Expand Down
Loading

0 comments on commit 2474ab3

Please sign in to comment.