Skip to content

Commit 25ebfcd

Browse files
committed
Add support for simplified Chinese locale (zh)
1 parent 916ad0c commit 25ebfcd

File tree

9 files changed

+239
-16
lines changed

9 files changed

+239
-16
lines changed

LabelStoreMax/.env

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,14 @@ APP_URL="https://mywoocommercestore.com"
88
ASSET_PATH_PUBLIC="public/assets/"
99
ASSET_PATH_IMAGES="public/assets/images"
1010
TIMEZONE="UTC"
11+
# *<! ------ Language ------!>*
12+
1113
DEFAULT_LOCALE="en"
14+
# supports: "en" (English), "es" (Spanish), "fr" (French), "hi" (Hindi), "it" (Italian), "pt" (Portuguese) or "zh" (Simplified Chinese)
1215

1316
# *<! ------ WooSignal Config ------!>*
1417

15-
APP_KEY="your app key"
18+
APP_KEY="app_affb6434339b34443a297c2e40a3edab7102137e6d67de9abfe612b749bd"
1619
# App key from WooSignal link: https://woosignal.com/dashboard/apps
1720

1821
# *<! ------ STRIPE (OPTIONAL) ------!>*

LabelStoreMax/CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
## [5.1.0] - 2020-07-19
2+
3+
* Add support for simplified Chinese locale (zh)
4+
* Add ability to change language from WooSignal dashboard
5+
16
## [5.0.7] - 2020-07-08
27

38
* Pubspec.yaml dependency updates

LabelStoreMax/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
# WooCommerce App: Label StoreMax
66

7-
### Label StoreMax - v5.0.7
7+
### Label StoreMax - v5.1.0
88

99

1010
[Official WooSignal WooCommerce App](https://woosignal.com)
@@ -45,7 +45,7 @@ Full documentation this available [here](https://woosignal.com/docs/app/ios/labe
4545
- Change app name, logo, customize default language, currency + more
4646
- Light and dark mode
4747
- Stripe, Cash On Delivery, RazorPay, PayPal
48-
- Localized for en, es, pt, it, hi, fr
48+
- Localized for en, es, pt, it, hi, fr, zh
4949
- Orders show as normal in WooCommerce
5050

5151
## Security Vulnerabilities

LabelStoreMax/lang/zh.json

Lines changed: 188 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,188 @@
1+
{
2+
"Categories": "类别",
3+
"Shop": "店铺",
4+
"Newest": "最新",
5+
"Browse categories": "浏览分类",
6+
"Cart": "大车",
7+
"You need items in your cart to checkout": "您需要购物车中的商品才能结帐",
8+
"Updated": "更新",
9+
"Item removed": "项目已删除",
10+
"Success": "成功",
11+
"Cart cleared": "购物车已清除",
12+
"Shopping Cart": "购物车",
13+
"Clear Cart": "清除购物车",
14+
"Empty Basket": "空篮子",
15+
"PROCEED TO CHECKOUT": "进行结算",
16+
"Browse": "浏览",
17+
"Search results for": "为。。。。寻找结果",
18+
"Select a": "选择一个",
19+
"Added to cart": "已加入购物车",
20+
"Options": "选项",
21+
"Price": "价格",
22+
"Choose your options": "选择你的选择",
23+
"Out of stock": "缺货",
24+
"In Stock": "有存货",
25+
"Add to cart": "添加到购物车",
26+
"Oops": "哎呀",
27+
"Please select valid options first": "请先选择有效选项",
28+
"Sorry": "对不起",
29+
"This item is not in stock": "此产品没有现货",
30+
"Description": "描述",
31+
"Full description": "详细描述",
32+
"ADD TO CART": "添加到购物车",
33+
"This item is out of stock": "此产品缺货",
34+
"Add your shipping details first": "首先添加您的运输详细信息",
35+
"Checkout": "查看",
36+
"Billing/shipping details": "帐单/运输详细信息",
37+
"Add billing & shipping details": "添加帐单和运输详细信息",
38+
"Payment method": "付款方法",
39+
"Pay with": "使用。。。支付",
40+
"Select a payment method": "选择付款方式",
41+
"Shipping selected": "已选择运输",
42+
"Select shipping": "选择送货",
43+
"Select a shipping option": "选择一个运输选项",
44+
"Shipping fee": "运输费用",
45+
"Subtotal": "小计",
46+
"Total": "全部的",
47+
"CHECKOUT": "查看",
48+
"One moment": "一瞬间",
49+
"Please select add your billing/shipping address to proceed": "请选择添加您的帐单/送货地址以继续",
50+
"Your billing/shipping details are incomplete": "您的帐单/运输详细信息不完整",
51+
"Please select a shipping method to proceed": "请选择一种运输方式以继续",
52+
"Please select a payment method to proceed": "请选择付款方式以继续",
53+
"Something went wrong, please contact our store": "出了点问题,请联系我们的商店",
54+
"Error": "错误",
55+
"Order Status": "订单状态",
56+
"Thank You!": "谢谢你!",
57+
"Your transaction details": "您的交易详情",
58+
"Order Ref": "订单参考",
59+
"Items": "项目",
60+
"Back to Home": "返回首页",
61+
"Orders": "命令",
62+
"Billing & Shipping Details": "帐单和运输详细信息",
63+
"First Name": "",
64+
"Last Name": "",
65+
"Address Line": "地址栏",
66+
"City": "城市",
67+
"Postal code": "邮政编码",
68+
"Email address": "电子邮件地址",
69+
"Selected": "选定",
70+
"Select country": "选择国家",
71+
"Remember my details": "记住我的详细信息",
72+
"USE SHIPPING ADDRESS": "使用送货地址",
73+
"About": "关于",
74+
"Privacy policy": "隐私政策",
75+
"Terms and conditions": "条款和条件",
76+
"Version": "版本",
77+
"Payment Method": "付款方法",
78+
"CANCEL": "取消",
79+
"Shipping Methods": "运送方式",
80+
"Shipping is not supported for your country, sorry": "您所在的国家/地区不支持运输,抱歉",
81+
"Search": "搜索",
82+
"Debit or Credit Card": "借记卡或信用卡",
83+
"Oops, something went wrong": "哎呀!出事了",
84+
"Tax": "",
85+
"No results": "没结果",
86+
"There is an item out of stock": "有商品缺货",
87+
"Maximum stock reached": "已达到最大库存",
88+
"Select a country": "选择一个国家",
89+
"Menu": "菜单",
90+
"About Us": "关于我们",
91+
"Something went wrong": "出问题了",
92+
"Product variation does not exist": "不存在产品变异",
93+
"This variation is unavailable": "此变体不可用",
94+
"Sorry, something went wrong": "抱歉,出了一些问题",
95+
"Back": "后退",
96+
"Profile": "轮廓",
97+
"Forgot Password": "忘记密码",
98+
"Create an account": "创建一个帐户",
99+
"Login": "登录",
100+
"Password": "密码",
101+
"Oops!": "哎呀!",
102+
"Invalid login credentials": "无效的登录凭证",
103+
"That email address is not valid": "该电子邮件地址无效",
104+
"Password must be a min 6 characters": "密码必须至少为 6 个字符",
105+
"Please check your details": "请检查您的详细信息",
106+
"Invalid": "无效的",
107+
"Actions": "行动",
108+
"View Terms and Conditions or Privacy policy": "查看条款和条件或隐私政策",
109+
"Terms and Conditions": "条款和条件",
110+
"Privacy Policy": "隐私政策",
111+
"terms and conditions": "条款和条件",
112+
"and": "",
113+
"By tapping \"Register\" you agree to ": "通过点击\"注册\",您同意",
114+
"privacy policy": "隐私政策",
115+
"Sign up": "注册",
116+
"Email": "电子邮件",
117+
"Update details": "更新详情",
118+
"Settings": "设置",
119+
"Account": "帐户",
120+
"Logout": "登出",
121+
"No orders found": "未找到订单",
122+
"items": "项目",
123+
"Update Details": "更新详情",
124+
"Invalid details": "无效的详细信息",
125+
"Please check your email and password": "请检查您的电子邮件和密码",
126+
"Something went wrong, please try again.": "出了点问题,请再试一次。",
127+
"Done": "完毕",
128+
"Billing Details": "结算明细",
129+
"Shipping Details": "送货细节",
130+
"Shipping Address": "送货地址",
131+
"State": "状态",
132+
"Country": "国家",
133+
"UPDATE DETAILS": "更新详情",
134+
"No more products": "没有更多的产品",
135+
"release to load more": "释放以加载更多",
136+
"Load Failed! Click retry!": "加载失败!点击重试!",
137+
"pull up load": "拉负荷",
138+
"Sort: 从低到高": "排序:从低到高",
139+
"Sort: 从高到低": "排序:从高到低",
140+
"Sort: 名称 A-Z": "排序:名称 A-Z",
141+
"Sort: 名称 Z-A": "排序:名称 Z-A",
142+
"Cancel": "取消",
143+
"Sort results": "排序结果",
144+
"you're now logged in": "您现在已登录",
145+
"Hello": "你好",
146+
"Welcome back": "欢迎回来",
147+
"Quantity": "数量",
148+
"Select a state": "选择一个州",
149+
"Select state": "选择状态",
150+
"Ship to a different address?": "运送到不同的地址?",
151+
"USE DETAILS": "使用细节",
152+
"Not supported, try a card payment": "不支持,试试刷卡支付",
153+
"Invalid shipping address, please check your shipping details": "送货地址无效,请检查您的送货详情",
154+
"Was": "曾是",
155+
"off": "离开",
156+
"Maximum quantity reached": "已达到最大数量",
157+
"Sorry, only": "对不起,只有",
158+
"left": "剩下",
159+
"Billing address is incomplete": "帐单地址不完整",
160+
"Order": "命令",
161+
"Date Ordered": "订购日期",
162+
"Ships to": "运往",
163+
"That email does not match our records": "那封电子邮件与我们的记录不符",
164+
"That username does not match our records": "该用户名与我们的记录不符",
165+
"That password does not match our records": "该密码与我们的记录不符",
166+
"The email and password field cannot be empty": "电子邮件和密码字段不能为空",
167+
"Username taken, try another.": "该用户名已被占用,换一个试试。",
168+
"A user already exists": "用户已存在",
169+
"That email is taken, try another": "那封邮件被占用了,试试另一个",
170+
"The email field is empty": "电子邮件字段为空",
171+
"No more orders": "没有更多的订单",
172+
"Account updated": "帐户已更新",
173+
"Spend a minimum of": "花最少的钱",
174+
"for": "为了",
175+
"Buy Product": "购买产品",
176+
"Retry": "重试",
177+
"Retry later": "稍后重试",
178+
"Light Mode": "光模式",
179+
"Dark Mode": "黑暗模式",
180+
"PayPal Checkout": "支付宝结账",
181+
"Processing Payment": "处理付款",
182+
"Please wait, your order is being processed and you will be redirected to the PayPal website.": "请稍等,您的订单正在处理中,您将被重定向到 PayPal 网站。",
183+
"If you are not automatically redirected to PayPal within 5 seconds": "如果您没有在 5 秒内自动重定向到 PayPal",
184+
"Payment Cancelled": "付款已取消",
185+
"The payment has been cancelled": "付款已取消",
186+
"Must have": "一定有",
187+
"Our selection of new items": "我们精选的新品"
188+
}

LabelStoreMax/lib/config/app_locale.dart

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,8 @@ import 'package:flutter/cupertino.dart';
1111
|--------------------------------------------------------------------------
1212
*/
1313

14-
const Locale app_locale = Locale('en');
14+
const Locale app_locale = null; // by default it will use the "DEFAULT_LOCALE" value from the /.env
15+
// const Locale app_locale = Locale('en'); // uncomment to change the locale here too.
1516

1617
const List<Locale> app_locales_supported = [
1718
Locale('en'),
@@ -20,4 +21,5 @@ const List<Locale> app_locales_supported = [
2021
Locale('hi'),
2122
Locale('it'),
2223
Locale('pt'),
24+
Locale('zh'),
2325
];

LabelStoreMax/lib/main.dart

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ import 'package:flutter_app/resources/themes/dark_theme.dart';
88
import 'package:flutter_app/resources/themes/default_theme.dart';
99
import 'package:flutter_app/config/app_theme.dart';
1010
import 'package:flutter_app/routes/router.dart';
11+
import 'package:nylo_support/helpers/helper.dart';
1112
import 'package:nylo_support/nylo.dart';
1213
import 'package:nylo_framework/nylo_framework.dart';
1314
import 'package:nylo_framework/theme/helper/theme_helper.dart';
@@ -27,6 +28,7 @@ void main() async {
2728

2829
String initialRoute = '/no-connection';
2930
WooSignalApp wooSignalApp = await appWooSignal((api) => api.getApp());
31+
Locale locale = app_locale;
3032

3133
if (wooSignalApp != null) {
3234
initialRoute = "/home";
@@ -40,6 +42,14 @@ void main() async {
4042
wpJsonPath: wooSignalApp.wpLoginWpApiPath,
4143
);
4244
}
45+
46+
if (locale == null) {
47+
if (wooSignalApp.locale != null) {
48+
locale = Locale(wooSignalApp.locale);
49+
} else {
50+
locale = Locale(getEnv('DEFAULT_LOCALE', defaultValue: 'en'));
51+
}
52+
}
4353
}
4454

4555
runApp(
@@ -48,7 +58,7 @@ void main() async {
4858
onGenerateRoute: nylo.router.generator(),
4959
themeData: CurrentTheme.instance.theme,
5060
darkTheme: darkTheme(appTheme),
51-
locale: app_locale,
61+
locale: locale,
5262
initialRoute: initialRoute,
5363
supportedLocales: app_locales_supported,
5464
debugShowCheckedModeBanner: false,

LabelStoreMax/pubspec.lock

Lines changed: 20 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,21 @@ packages:
7777
name: cached_network_image
7878
url: "https://pub.dartlang.org"
7979
source: hosted
80-
version: "3.0.0"
80+
version: "3.1.0"
81+
cached_network_image_platform_interface:
82+
dependency: transitive
83+
description:
84+
name: cached_network_image_platform_interface
85+
url: "https://pub.dartlang.org"
86+
source: hosted
87+
version: "1.0.0"
88+
cached_network_image_web:
89+
dependency: transitive
90+
description:
91+
name: cached_network_image_web
92+
url: "https://pub.dartlang.org"
93+
source: hosted
94+
version: "1.0.0"
8195
characters:
8296
dependency: transitive
8397
description:
@@ -147,7 +161,7 @@ packages:
147161
name: device_info
148162
url: "https://pub.dartlang.org"
149163
source: hosted
150-
version: "2.0.0"
164+
version: "2.0.2"
151165
device_info_platform_interface:
152166
dependency: transitive
153167
description:
@@ -412,9 +426,9 @@ packages:
412426
name: nylo_framework
413427
url: "https://pub.dartlang.org"
414428
source: hosted
415-
version: "1.0.1"
429+
version: "1.1.0"
416430
nylo_support:
417-
dependency: transitive
431+
dependency: "direct main"
418432
description:
419433
name: nylo_support
420434
url: "https://pub.dartlang.org"
@@ -566,7 +580,7 @@ packages:
566580
name: shared_preferences
567581
url: "https://pub.dartlang.org"
568582
source: hosted
569-
version: "2.0.5"
583+
version: "2.0.6"
570584
shared_preferences_linux:
571585
dependency: transitive
572586
description:
@@ -725,7 +739,7 @@ packages:
725739
name: woosignal
726740
url: "https://pub.dartlang.org"
727741
source: hosted
728-
version: "2.0.2"
742+
version: "2.1.0"
729743
woosignal_stripe:
730744
dependency: "direct main"
731745
description:

LabelStoreMax/pubspec.yaml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Official WooSignal App Template for WooCommerce
22

33
# Label StoreMax
4-
# Version: 5.0.7
4+
# Version: 5.1.0
55
# Author: Anthony Gordon
66
# Homepage: https://woosignal.com
77
# Documentation: https://woosignal.com/docs/app/ios/label-storemax
@@ -32,11 +32,11 @@ dependencies:
3232
page_transition: ^2.0.2
3333
nylo_framework: ^1.0.0
3434
nylo_support: ^1.0.0
35-
woosignal: ^2.0.2
35+
woosignal: ^2.1.0
3636
woosignal_stripe: ^1.1.0
3737
razorpay_flutter: ^1.2.5
3838
wp_json_api: ^3.0.0
39-
cached_network_image: ^3.0.0
39+
cached_network_image: ^3.1.0
4040
package_info: ^2.0.2
4141
money_formatter: ^0.0.3
4242
platform_alert_dialog: ^1.0.0+2
@@ -102,4 +102,5 @@ flutter:
102102
- lang/de.json
103103
- lang/hi.json
104104
- lang/pt.json
105+
- lang/zh.json
105106
- .env

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
# WooCommerce App: Label StoreMax
66

7-
### Label StoreMax - v5.0.7
7+
### Label StoreMax - v5.1.0
88

99

1010
[Official WooSignal WooCommerce App](https://woosignal.com)
@@ -46,7 +46,7 @@ Full documentation this available [here](https://woosignal.com/docs/app/ios/labe
4646
- Light and dark mode
4747
- Theme customization
4848
- Stripe, Cash On Delivery, RazorPay and PayPal
49-
- Localized for en, es, pt, it, hi, fr
49+
- Localized for en, es, pt, it, hi, fr, zh
5050
- Orders show as normal in WooCommerce
5151

5252
## Security Vulnerabilities

0 commit comments

Comments
 (0)