diff --git a/LabelStoreMax/.env b/LabelStoreMax/.env index 05306c7..aa58ff4 100644 --- a/LabelStoreMax/.env +++ b/LabelStoreMax/.env @@ -8,11 +8,14 @@ APP_URL="https://mywoocommercestore.com" ASSET_PATH_PUBLIC="public/assets/" ASSET_PATH_IMAGES="public/assets/images" TIMEZONE="UTC" +# ** + DEFAULT_LOCALE="en" +# supports: "en" (English), "es" (Spanish), "fr" (French), "hi" (Hindi), "it" (Italian), "pt" (Portuguese) or "zh" (Simplified Chinese) # ** -APP_KEY="your app key" +APP_KEY="app_affb6434339b34443a297c2e40a3edab7102137e6d67de9abfe612b749bd" # App key from WooSignal link: https://woosignal.com/dashboard/apps # ** diff --git a/LabelStoreMax/CHANGELOG.md b/LabelStoreMax/CHANGELOG.md index 2c7b435..401ee70 100644 --- a/LabelStoreMax/CHANGELOG.md +++ b/LabelStoreMax/CHANGELOG.md @@ -1,3 +1,8 @@ +## [5.1.0] - 2020-07-19 + +* Add support for simplified Chinese locale (zh) +* Add ability to change language from WooSignal dashboard + ## [5.0.7] - 2020-07-08 * Pubspec.yaml dependency updates diff --git a/LabelStoreMax/README.md b/LabelStoreMax/README.md index 27e8009..bdbfa77 100644 --- a/LabelStoreMax/README.md +++ b/LabelStoreMax/README.md @@ -4,7 +4,7 @@ # WooCommerce App: Label StoreMax -### Label StoreMax - v5.0.7 +### Label StoreMax - v5.1.0 [Official WooSignal WooCommerce App](https://woosignal.com) @@ -45,7 +45,7 @@ Full documentation this available [here](https://woosignal.com/docs/app/ios/labe - Change app name, logo, customize default language, currency + more - Light and dark mode - Stripe, Cash On Delivery, RazorPay, PayPal -- Localized for en, es, pt, it, hi, fr +- Localized for en, es, pt, it, hi, fr, zh - Orders show as normal in WooCommerce ## Security Vulnerabilities diff --git a/LabelStoreMax/lang/zh.json b/LabelStoreMax/lang/zh.json new file mode 100644 index 0000000..41d20db --- /dev/null +++ b/LabelStoreMax/lang/zh.json @@ -0,0 +1,188 @@ +{ + "Categories": "类别", + "Shop": "店铺", + "Newest": "最新", + "Browse categories": "浏览分类", + "Cart": "大车", + "You need items in your cart to checkout": "您需要购物车中的商品才能结帐", + "Updated": "更新", + "Item removed": "项目已删除", + "Success": "成功", + "Cart cleared": "购物车已清除", + "Shopping Cart": "购物车", + "Clear Cart": "清除购物车", + "Empty Basket": "空篮子", + "PROCEED TO CHECKOUT": "进行结算", + "Browse": "浏览", + "Search results for": "为。。。。寻找结果", + "Select a": "选择一个", + "Added to cart": "已加入购物车", + "Options": "选项", + "Price": "价格", + "Choose your options": "选择你的选择", + "Out of stock": "缺货", + "In Stock": "有存货", + "Add to cart": "添加到购物车", + "Oops": "哎呀", + "Please select valid options first": "请先选择有效选项", + "Sorry": "对不起", + "This item is not in stock": "此产品没有现货", + "Description": "描述", + "Full description": "详细描述", + "ADD TO CART": "添加到购物车", + "This item is out of stock": "此产品缺货", + "Add your shipping details first": "首先添加您的运输详细信息", + "Checkout": "查看", + "Billing/shipping details": "帐单/运输详细信息", + "Add billing & shipping details": "添加帐单和运输详细信息", + "Payment method": "付款方法", + "Pay with": "使用。。。支付", + "Select a payment method": "选择付款方式", + "Shipping selected": "已选择运输", + "Select shipping": "选择送货", + "Select a shipping option": "选择一个运输选项", + "Shipping fee": "运输费用", + "Subtotal": "小计", + "Total": "全部的", + "CHECKOUT": "查看", + "One moment": "一瞬间", + "Please select add your billing/shipping address to proceed": "请选择添加您的帐单/送货地址以继续", + "Your billing/shipping details are incomplete": "您的帐单/运输详细信息不完整", + "Please select a shipping method to proceed": "请选择一种运输方式以继续", + "Please select a payment method to proceed": "请选择付款方式以继续", + "Something went wrong, please contact our store": "出了点问题,请联系我们的商店", + "Error": "错误", + "Order Status": "订单状态", + "Thank You!": "谢谢你!", + "Your transaction details": "您的交易详情", + "Order Ref": "订单参考", + "Items": "项目", + "Back to Home": "返回首页", + "Orders": "命令", + "Billing & Shipping Details": "帐单和运输详细信息", + "First Name": "名", + "Last Name": "姓", + "Address Line": "地址栏", + "City": "城市", + "Postal code": "邮政编码", + "Email address": "电子邮件地址", + "Selected": "选定", + "Select country": "选择国家", + "Remember my details": "记住我的详细信息", + "USE SHIPPING ADDRESS": "使用送货地址", + "About": "关于", + "Privacy policy": "隐私政策", + "Terms and conditions": "条款和条件", + "Version": "版本", + "Payment Method": "付款方法", + "CANCEL": "取消", + "Shipping Methods": "运送方式", + "Shipping is not supported for your country, sorry": "您所在的国家/地区不支持运输,抱歉", + "Search": "搜索", + "Debit or Credit Card": "借记卡或信用卡", + "Oops, something went wrong": "哎呀!出事了", + "Tax": "税", + "No results": "没结果", + "There is an item out of stock": "有商品缺货", + "Maximum stock reached": "已达到最大库存", + "Select a country": "选择一个国家", + "Menu": "菜单", + "About Us": "关于我们", + "Something went wrong": "出问题了", + "Product variation does not exist": "不存在产品变异", + "This variation is unavailable": "此变体不可用", + "Sorry, something went wrong": "抱歉,出了一些问题", + "Back": "后退", + "Profile": "轮廓", + "Forgot Password": "忘记密码", + "Create an account": "创建一个帐户", + "Login": "登录", + "Password": "密码", + "Oops!": "哎呀!", + "Invalid login credentials": "无效的登录凭证", + "That email address is not valid": "该电子邮件地址无效", + "Password must be a min 6 characters": "密码必须至少为 6 个字符", + "Please check your details": "请检查您的详细信息", + "Invalid": "无效的", + "Actions": "行动", + "View Terms and Conditions or Privacy policy": "查看条款和条件或隐私政策", + "Terms and Conditions": "条款和条件", + "Privacy Policy": "隐私政策", + "terms and conditions": "条款和条件", + "and": "和", + "By tapping \"Register\" you agree to ": "通过点击\"注册\",您同意", + "privacy policy": "隐私政策", + "Sign up": "注册", + "Email": "电子邮件", + "Update details": "更新详情", + "Settings": "设置", + "Account": "帐户", + "Logout": "登出", + "No orders found": "未找到订单", + "items": "项目", + "Update Details": "更新详情", + "Invalid details": "无效的详细信息", + "Please check your email and password": "请检查您的电子邮件和密码", + "Something went wrong, please try again.": "出了点问题,请再试一次。", + "Done": "完毕", + "Billing Details": "结算明细", + "Shipping Details": "送货细节", + "Shipping Address": "送货地址", + "State": "状态", + "Country": "国家", + "UPDATE DETAILS": "更新详情", + "No more products": "没有更多的产品", + "release to load more": "释放以加载更多", + "Load Failed! Click retry!": "加载失败!点击重试!", + "pull up load": "拉负荷", + "Sort: 从低到高": "排序:从低到高", + "Sort: 从高到低": "排序:从高到低", + "Sort: 名称 A-Z": "排序:名称 A-Z", + "Sort: 名称 Z-A": "排序:名称 Z-A", + "Cancel": "取消", + "Sort results": "排序结果", + "you're now logged in": "您现在已登录", + "Hello": "你好", + "Welcome back": "欢迎回来", + "Quantity": "数量", + "Select a state": "选择一个州", + "Select state": "选择状态", + "Ship to a different address?": "运送到不同的地址?", + "USE DETAILS": "使用细节", + "Not supported, try a card payment": "不支持,试试刷卡支付", + "Invalid shipping address, please check your shipping details": "送货地址无效,请检查您的送货详情", + "Was": "曾是", + "off": "离开", + "Maximum quantity reached": "已达到最大数量", + "Sorry, only": "对不起,只有", + "left": "剩下", + "Billing address is incomplete": "帐单地址不完整", + "Order": "命令", + "Date Ordered": "订购日期", + "Ships to": "运往", + "That email does not match our records": "那封电子邮件与我们的记录不符", + "That username does not match our records": "该用户名与我们的记录不符", + "That password does not match our records": "该密码与我们的记录不符", + "The email and password field cannot be empty": "电子邮件和密码字段不能为空", + "Username taken, try another.": "该用户名已被占用,换一个试试。", + "A user already exists": "用户已存在", + "That email is taken, try another": "那封邮件被占用了,试试另一个", + "The email field is empty": "电子邮件字段为空", + "No more orders": "没有更多的订单", + "Account updated": "帐户已更新", + "Spend a minimum of": "花最少的钱", + "for": "为了", + "Buy Product": "购买产品", + "Retry": "重试", + "Retry later": "稍后重试", + "Light Mode": "光模式", + "Dark Mode": "黑暗模式", + "PayPal Checkout": "支付宝结账", + "Processing Payment": "处理付款", + "Please wait, your order is being processed and you will be redirected to the PayPal website.": "请稍等,您的订单正在处理中,您将被重定向到 PayPal 网站。", + "If you are not automatically redirected to PayPal within 5 seconds": "如果您没有在 5 秒内自动重定向到 PayPal", + "Payment Cancelled": "付款已取消", + "The payment has been cancelled": "付款已取消", + "Must have": "一定有", + "Our selection of new items": "我们精选的新品" +} \ No newline at end of file diff --git a/LabelStoreMax/lib/config/app_locale.dart b/LabelStoreMax/lib/config/app_locale.dart index df8fed6..da4fe76 100644 --- a/LabelStoreMax/lib/config/app_locale.dart +++ b/LabelStoreMax/lib/config/app_locale.dart @@ -11,7 +11,8 @@ import 'package:flutter/cupertino.dart'; |-------------------------------------------------------------------------- */ -const Locale app_locale = Locale('en'); +const Locale app_locale = null; // by default it will use the "DEFAULT_LOCALE" value from the /.env +// const Locale app_locale = Locale('en'); // uncomment to change the locale here too. const List app_locales_supported = [ Locale('en'), @@ -20,4 +21,5 @@ const List app_locales_supported = [ Locale('hi'), Locale('it'), Locale('pt'), + Locale('zh'), ]; diff --git a/LabelStoreMax/lib/main.dart b/LabelStoreMax/lib/main.dart index a16cc64..92c7096 100644 --- a/LabelStoreMax/lib/main.dart +++ b/LabelStoreMax/lib/main.dart @@ -8,6 +8,7 @@ import 'package:flutter_app/resources/themes/dark_theme.dart'; import 'package:flutter_app/resources/themes/default_theme.dart'; import 'package:flutter_app/config/app_theme.dart'; import 'package:flutter_app/routes/router.dart'; +import 'package:nylo_support/helpers/helper.dart'; import 'package:nylo_support/nylo.dart'; import 'package:nylo_framework/nylo_framework.dart'; import 'package:nylo_framework/theme/helper/theme_helper.dart'; @@ -27,6 +28,7 @@ void main() async { String initialRoute = '/no-connection'; WooSignalApp wooSignalApp = await appWooSignal((api) => api.getApp()); + Locale locale = app_locale; if (wooSignalApp != null) { initialRoute = "/home"; @@ -40,6 +42,14 @@ void main() async { wpJsonPath: wooSignalApp.wpLoginWpApiPath, ); } + + if (locale == null) { + if (wooSignalApp.locale != null) { + locale = Locale(wooSignalApp.locale); + } else { + locale = Locale(getEnv('DEFAULT_LOCALE', defaultValue: 'en')); + } + } } runApp( @@ -48,7 +58,7 @@ void main() async { onGenerateRoute: nylo.router.generator(), themeData: CurrentTheme.instance.theme, darkTheme: darkTheme(appTheme), - locale: app_locale, + locale: locale, initialRoute: initialRoute, supportedLocales: app_locales_supported, debugShowCheckedModeBanner: false, diff --git a/LabelStoreMax/pubspec.lock b/LabelStoreMax/pubspec.lock index c818180..1ec91ad 100644 --- a/LabelStoreMax/pubspec.lock +++ b/LabelStoreMax/pubspec.lock @@ -77,7 +77,21 @@ packages: name: cached_network_image url: "https://pub.dartlang.org" source: hosted - version: "3.0.0" + version: "3.1.0" + cached_network_image_platform_interface: + dependency: transitive + description: + name: cached_network_image_platform_interface + url: "https://pub.dartlang.org" + source: hosted + version: "1.0.0" + cached_network_image_web: + dependency: transitive + description: + name: cached_network_image_web + url: "https://pub.dartlang.org" + source: hosted + version: "1.0.0" characters: dependency: transitive description: @@ -147,7 +161,7 @@ packages: name: device_info url: "https://pub.dartlang.org" source: hosted - version: "2.0.0" + version: "2.0.2" device_info_platform_interface: dependency: transitive description: @@ -412,9 +426,9 @@ packages: name: nylo_framework url: "https://pub.dartlang.org" source: hosted - version: "1.0.1" + version: "1.1.0" nylo_support: - dependency: transitive + dependency: "direct main" description: name: nylo_support url: "https://pub.dartlang.org" @@ -566,7 +580,7 @@ packages: name: shared_preferences url: "https://pub.dartlang.org" source: hosted - version: "2.0.5" + version: "2.0.6" shared_preferences_linux: dependency: transitive description: @@ -725,7 +739,7 @@ packages: name: woosignal url: "https://pub.dartlang.org" source: hosted - version: "2.0.2" + version: "2.1.0" woosignal_stripe: dependency: "direct main" description: diff --git a/LabelStoreMax/pubspec.yaml b/LabelStoreMax/pubspec.yaml index 5839962..e82bde4 100644 --- a/LabelStoreMax/pubspec.yaml +++ b/LabelStoreMax/pubspec.yaml @@ -1,7 +1,7 @@ # Official WooSignal App Template for WooCommerce # Label StoreMax -# Version: 5.0.7 +# Version: 5.1.0 # Author: Anthony Gordon # Homepage: https://woosignal.com # Documentation: https://woosignal.com/docs/app/ios/label-storemax @@ -32,11 +32,11 @@ dependencies: page_transition: ^2.0.2 nylo_framework: ^1.0.0 nylo_support: ^1.0.0 - woosignal: ^2.0.2 + woosignal: ^2.1.0 woosignal_stripe: ^1.1.0 razorpay_flutter: ^1.2.5 wp_json_api: ^3.0.0 - cached_network_image: ^3.0.0 + cached_network_image: ^3.1.0 package_info: ^2.0.2 money_formatter: ^0.0.3 platform_alert_dialog: ^1.0.0+2 @@ -102,4 +102,5 @@ flutter: - lang/de.json - lang/hi.json - lang/pt.json + - lang/zh.json - .env diff --git a/README.md b/README.md index 9e8f57b..498794d 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@ # WooCommerce App: Label StoreMax -### Label StoreMax - v5.0.7 +### Label StoreMax - v5.1.0 [Official WooSignal WooCommerce App](https://woosignal.com) @@ -46,7 +46,7 @@ Full documentation this available [here](https://woosignal.com/docs/app/ios/labe - Light and dark mode - Theme customization - Stripe, Cash On Delivery, RazorPay and PayPal -- Localized for en, es, pt, it, hi, fr +- Localized for en, es, pt, it, hi, fr, zh - Orders show as normal in WooCommerce ## Security Vulnerabilities