AI store generator for ecommerce, Malaysia first. Laravel 13 + React + TypeScript.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

text.ts 9.9KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229
  1. /**
  2. * The few words the storefront's built-in pages need, in each store language.
  3. * Section text comes from the store plan; this is only for pages we build ourselves.
  4. */
  5. const words = {
  6. en: {
  7. shop: 'Shop',
  8. allProducts: 'All products',
  9. viewAll: 'View all',
  10. soldOut: 'Sold out',
  11. viewProduct: 'View product',
  12. from: (amount: string) => `From ${amount}`,
  13. chooseOption: 'Please choose an option first.',
  14. unavailable: 'Not available',
  15. whatsInside: "What's inside",
  16. trustFreeShipping: 'Free shipping',
  17. trustFreeShippingOver: (amount: string) =>
  18. `Free shipping over ${amount}`,
  19. trustShippingFrom: (amount: string) => `Delivery from ${amount}`,
  20. trustShippingText: 'Across Malaysia',
  21. trustPayment: 'Secure checkout',
  22. trustPaymentText: 'Pay safely through Stripe',
  23. trustWhatsApp: 'Questions? Ask us',
  24. trustWhatsAppText: 'Quick replies on WhatsApp',
  25. pairsWellWith: 'Pairs well with',
  26. collections: 'Collections',
  27. playVideo: (title: string) => `Play video: ${title}`,
  28. previousProducts: 'Previous products',
  29. nextProducts: 'More products',
  30. footerExplore: 'Explore',
  31. footerHelp: 'Shop and help',
  32. openMenu: 'Open menu',
  33. closeMenu: 'Close menu',
  34. chooseShort: 'Choose an option',
  35. askOnWhatsApp: 'Ask about this product on WhatsApp',
  36. askAboutProduct: (product: string, store: string) =>
  37. `Hi ${store}, I have a question about ${product}.`,
  38. shippingWest: (fee: string) => `Peninsular Malaysia: ${fee}`,
  39. shippingEast: (fee: string) => `Sabah, Sarawak and Labuan: ${fee}`,
  40. shippingFreeOver: (amount: string) =>
  41. `Free shipping on orders over ${amount}.`,
  42. shippingFreeAll: 'Free shipping on every order.',
  43. previousMessage: 'Previous message',
  44. nextMessage: 'Next message',
  45. inStock: 'In stock',
  46. addToCart: 'Add to cart',
  47. quantity: 'Quantity',
  48. added: 'Added to your cart.',
  49. viewCart: 'View cart',
  50. cart: 'Cart',
  51. yourCart: 'Your cart',
  52. cartEmpty: 'Your cart is empty.',
  53. continueShopping: 'Continue shopping',
  54. remove: 'Remove',
  55. each: 'each',
  56. decrease: 'Decrease quantity',
  57. increase: 'Increase quantity',
  58. subtotal: 'Subtotal',
  59. shippingNote: 'Shipping is worked out at checkout.',
  60. checkout: 'Checkout',
  61. contactDetails: 'Your details',
  62. deliveryAddress: 'Delivery address',
  63. fullName: 'Full name',
  64. email: 'Email',
  65. phone: 'Phone number',
  66. addressLine1: 'Address',
  67. addressLine2: 'Unit, floor, building (optional)',
  68. city: 'City',
  69. postcode: 'Postcode',
  70. state: 'State',
  71. chooseState: 'Choose a state',
  72. orderSummary: 'Order summary',
  73. total: 'Total',
  74. payNow: 'Continue to payment',
  75. paySecure: 'You will pay on a secure Stripe page.',
  76. backToCart: 'Back to cart',
  77. thankYou: 'Thank you for your order',
  78. orderPaid: (number: number, email: string) =>
  79. `Order #${number} is paid. We sent a confirmation to ${email}.`,
  80. orderPendingTitle: 'Payment not completed',
  81. orderPending: (number: number) =>
  82. `Order #${number} has not been paid yet. Your cart is still saved, so you can try again.`,
  83. deliverTo: 'Deliver to',
  84. quantityShort: 'Qty',
  85. discountCode: 'Discount code',
  86. apply: 'Apply',
  87. discount: 'Discount',
  88. removeCode: 'Remove code',
  89. codePlaceholder: 'Enter code',
  90. shipping: 'Shipping',
  91. shippingFree: 'Free',
  92. chooseStateForShipping: 'Choose your state to see the shipping fee.',
  93. freeShippingOver: (amount: string) =>
  94. `Free shipping on orders over ${amount}.`,
  95. spendMoreForFree: (amount: string) =>
  96. `Add ${amount} more for free shipping.`,
  97. youGetFreeShipping: 'You get free shipping.',
  98. shippedVia: (courier: string) => `Shipped with ${courier}.`,
  99. trackingNumber: 'Tracking number',
  100. chatOnWhatsApp: 'Chat on WhatsApp',
  101. askAboutOrder: 'Ask about this order on WhatsApp',
  102. whatsAppHello: (store: string) => `Hi ${store}, I have a question.`,
  103. whatsAppOrder: (store: string, number: number) =>
  104. `Hi ${store}, I have a question about my order #${number}.`,
  105. cartAdjusted:
  106. 'Some items changed because stock ran low. Please check your cart.',
  107. onlyLeft: (count: number) => `Only ${count} left`,
  108. cartCount: (count: number) =>
  109. count === 1 ? 'Cart, 1 item' : `Cart, ${count} items`,
  110. backToShop: 'Back to shop',
  111. noProducts: 'No products yet. Please check back soon.',
  112. productCount: (count: number) =>
  113. count === 1 ? '1 product' : `${count} products`,
  114. },
  115. ms: {
  116. shop: 'Kedai',
  117. allProducts: 'Semua produk',
  118. viewAll: 'Lihat semua',
  119. soldOut: 'Habis dijual',
  120. viewProduct: 'Lihat produk',
  121. from: (amount: string) => `Dari ${amount}`,
  122. chooseOption: 'Sila pilih satu pilihan dahulu.',
  123. unavailable: 'Tiada',
  124. whatsInside: 'Kandungan set',
  125. trustFreeShipping: 'Penghantaran percuma',
  126. trustFreeShippingOver: (amount: string) =>
  127. `Penghantaran percuma melebihi ${amount}`,
  128. trustShippingFrom: (amount: string) => `Penghantaran dari ${amount}`,
  129. trustShippingText: 'Ke seluruh Malaysia',
  130. trustPayment: 'Pembayaran selamat',
  131. trustPaymentText: 'Bayar dengan selamat melalui Stripe',
  132. trustWhatsApp: 'Ada soalan? Tanya kami',
  133. trustWhatsAppText: 'Balasan pantas di WhatsApp',
  134. pairsWellWith: 'Sesuai digandingkan dengan',
  135. collections: 'Koleksi',
  136. playVideo: (title: string) => `Main video: ${title}`,
  137. previousProducts: 'Produk sebelum',
  138. nextProducts: 'Lagi produk',
  139. footerExplore: 'Terokai',
  140. footerHelp: 'Beli-belah dan bantuan',
  141. openMenu: 'Buka menu',
  142. closeMenu: 'Tutup menu',
  143. chooseShort: 'Pilih pilihan',
  144. askOnWhatsApp: 'Tanya tentang produk ini di WhatsApp',
  145. askAboutProduct: (product: string, store: string) =>
  146. `Hai ${store}, saya ada soalan tentang ${product}.`,
  147. shippingWest: (fee: string) => `Semenanjung Malaysia: ${fee}`,
  148. shippingEast: (fee: string) => `Sabah, Sarawak dan Labuan: ${fee}`,
  149. shippingFreeOver: (amount: string) =>
  150. `Penghantaran percuma untuk pesanan melebihi ${amount}.`,
  151. shippingFreeAll: 'Penghantaran percuma untuk semua pesanan.',
  152. previousMessage: 'Mesej sebelum',
  153. nextMessage: 'Mesej seterusnya',
  154. inStock: 'Ada stok',
  155. addToCart: 'Tambah ke troli',
  156. quantity: 'Kuantiti',
  157. added: 'Ditambah ke troli anda.',
  158. viewCart: 'Lihat troli',
  159. cart: 'Troli',
  160. yourCart: 'Troli anda',
  161. cartEmpty: 'Troli anda kosong.',
  162. continueShopping: 'Teruskan membeli-belah',
  163. remove: 'Buang',
  164. each: 'seunit',
  165. decrease: 'Kurangkan kuantiti',
  166. increase: 'Tambah kuantiti',
  167. subtotal: 'Jumlah kecil',
  168. shippingNote: 'Kos penghantaran dikira semasa pembayaran.',
  169. checkout: 'Bayar',
  170. contactDetails: 'Butiran anda',
  171. deliveryAddress: 'Alamat penghantaran',
  172. fullName: 'Nama penuh',
  173. email: 'E-mel',
  174. phone: 'Nombor telefon',
  175. addressLine1: 'Alamat',
  176. addressLine2: 'Unit, tingkat, bangunan (pilihan)',
  177. city: 'Bandar',
  178. postcode: 'Poskod',
  179. state: 'Negeri',
  180. chooseState: 'Pilih negeri',
  181. orderSummary: 'Ringkasan pesanan',
  182. total: 'Jumlah',
  183. payNow: 'Teruskan ke pembayaran',
  184. paySecure: 'Anda akan membayar di halaman Stripe yang selamat.',
  185. backToCart: 'Kembali ke troli',
  186. thankYou: 'Terima kasih atas pesanan anda',
  187. orderPaid: (number: number, email: string) =>
  188. `Pesanan #${number} telah dibayar. Pengesahan dihantar ke ${email}.`,
  189. orderPendingTitle: 'Pembayaran belum selesai',
  190. orderPending: (number: number) =>
  191. `Pesanan #${number} belum dibayar. Troli anda masih disimpan, jadi anda boleh cuba lagi.`,
  192. deliverTo: 'Hantar ke',
  193. quantityShort: 'Kuantiti',
  194. discountCode: 'Kod diskaun',
  195. apply: 'Guna',
  196. discount: 'Diskaun',
  197. removeCode: 'Buang kod',
  198. codePlaceholder: 'Masukkan kod',
  199. shipping: 'Penghantaran',
  200. shippingFree: 'Percuma',
  201. chooseStateForShipping:
  202. 'Pilih negeri anda untuk melihat kos penghantaran.',
  203. freeShippingOver: (amount: string) =>
  204. `Penghantaran percuma untuk pesanan melebihi ${amount}.`,
  205. spendMoreForFree: (amount: string) =>
  206. `Tambah ${amount} lagi untuk penghantaran percuma.`,
  207. youGetFreeShipping: 'Anda mendapat penghantaran percuma.',
  208. shippedVia: (courier: string) => `Dihantar melalui ${courier}.`,
  209. trackingNumber: 'Nombor penjejakan',
  210. chatOnWhatsApp: 'Sembang di WhatsApp',
  211. askAboutOrder: 'Tanya tentang pesanan ini di WhatsApp',
  212. whatsAppHello: (store: string) => `Hai ${store}, saya ada soalan.`,
  213. whatsAppOrder: (store: string, number: number) =>
  214. `Hai ${store}, saya ada soalan tentang pesanan saya #${number}.`,
  215. cartAdjusted:
  216. 'Beberapa item berubah kerana stok berkurangan. Sila semak troli anda.',
  217. onlyLeft: (count: number) => `Tinggal ${count} sahaja`,
  218. cartCount: (count: number) => `Troli, ${count} item`,
  219. backToShop: 'Kembali ke kedai',
  220. noProducts: 'Belum ada produk. Sila datang semula nanti.',
  221. productCount: (count: number) => `${count} produk`,
  222. },
  223. };
  224. export type StorefrontWords = (typeof words)['en'];
  225. export function storefrontText(language: string): StorefrontWords {
  226. return language === 'ms' ? words.ms : words.en;
  227. }