From 0b20506cb8eba8cb25ff2355c16832420e4cf71f Mon Sep 17 00:00:00 2001 From: jsasg <735273025@qq.com> Date: Fri, 30 May 2025 10:30:34 +0800 Subject: [PATCH] =?UTF-8?q?refactor:=20=E4=BF=AE=E6=94=B9=E5=A4=9A?= =?UTF-8?q?=E8=AF=AD=E8=A8=80=E7=9B=B8=E5=85=B3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/index/common.php | 2 +- app/index/lang/en-us/mobile.php | 139 +++++++++++------- app/index/view/mobile/contact_us/bulkbuy.html | 32 ++-- .../view/mobile/contact_us/distributor.html | 34 ++--- app/index/view/mobile/index/index.html | 20 +-- app/index/view/mobile/product/category.html | 2 +- app/index/view/mobile/product/detail.html | 34 ++--- app/index/view/mobile/product/search.html | 4 +- app/index/view/mobile/public/footer.html | 4 +- app/index/view/mobile/public/header.html | 12 +- 10 files changed, 156 insertions(+), 127 deletions(-) diff --git a/app/index/common.php b/app/index/common.php index 26d0c87f..35395eec 100644 --- a/app/index/common.php +++ b/app/index/common.php @@ -135,7 +135,7 @@ if (!function_exists('lang_i18n')) { $path = strtolower(request()->controller() . '/' . request()->action()); $lang_key = "{$path}.{$name}"; if (!Lang::has($lang_key, $lang)) { - return $name; + return Lang::get($name, $vars, $lang); } return Lang::get($lang_key, $vars, $lang); } diff --git a/app/index/lang/en-us/mobile.php b/app/index/lang/en-us/mobile.php index 716aa15d..a4f83ffd 100644 --- a/app/index/lang/en-us/mobile.php +++ b/app/index/lang/en-us/mobile.php @@ -1,40 +1,60 @@ 'Home', + '产品列表' => 'Products', '搜索' => 'Search', '搜索历史' => 'Search History', '请择地区' => 'SELECT A REGION', - '首页' => 'Home', - '产品列表' => 'Products', '产品' => 'Product', '联系方式' => 'Contact', - '查看所有' => 'View All', - '查看全部' => 'View All', - '明星产品/热点产品' => 'Featured Products', - '了解更多' => 'Learn More', - 'Orico 技术' => 'ORICO Technology', - '强大功能、简单使用' => 'designed to be just as easy to learn as iPhone. chatting with friends.', - '常见问题' => 'FAQ', - '回答您最关心的问题' => 'What are you most concerned about', - '客服团队的工作时间:周一到周五,早9点到晚6点 平均应答时间:24小时内' => 'Our customer support is available Monday to Friday: 9am-6:00pm. Average answer time: 24h', - '发送查询' => 'Send Inquiry', - '型号' => 'Model', - '产品描述' => 'Product Description', - '关联产品' => 'Related Products', - '姓名' => 'Name', - '请输入您的名称' => 'First name', - '请输入您的姓氏' => 'Last name', - '公司/组织' => 'Company/Organization', - '电子邮箱' => 'Email', - '电话号码' => 'Phone Number', - '国家' => 'Country', - '请选择所属国家' => 'Select your country', - '行业' => 'Industry', - '询问内容' => 'Inquiry', - '提交' => 'SUBMIT', + + // 返回文本 '信息已成功提交!' => 'Add Success!', '信息提交失败!' => 'Add Fail!', + // 首页 + 'index/index' => [ + '查看所有' => 'View All', + '明星产品/热点产品' => 'Featured Products', + '了解更多' => 'Learn More', + 'Orico 技术' => 'ORICO Technology', + '强大功能、简单使用' => 'designed to be just as easy to learn as iPhone. chatting with friends.', + '常见问题' => 'FAQ', + '回答您最关心的问题' => 'What are you most concerned about', + '客服团队的工作时间:周一到周五,早9点到晚6点 平均应答时间:24小时内' => 'Our customer support is available Monday to Friday: 9am-6:00pm. Average answer time: 24h', + ], + + // 产品分类 + 'product/category' => [ + '查看全部' => 'View All', + ], + // 产品搜索 + 'product/search' => [ + '搜索' => 'Search', + '请搜索' => 'Please search...', + ], + // 产品详情 + 'product/detail' => [ + '首页' => 'Home', + '型号' => 'Model', + '发送查询' => 'Send Inquiry', + '产品描述' => 'Product Description', + '关联产品' => 'Related Products', + '姓名' => 'Name', + '请输入您的名称' => 'First name', + '请输入您的姓氏' => 'Last name', + '公司/组织' => 'Company/Organization', + '邮箱' => 'Email', + '电话号码' => 'Phone Number', + '国家' => 'Country', + '请选择所属国家' => 'Select your country', + '行业' => 'Industry', + '询问内容' => 'Inquiry', + '提交' => 'SUBMIT', + ], + // 附件下载 'attachment/index' => [ '软件下载' => 'Software download', @@ -48,36 +68,45 @@ return [ '软件和驱动程序' => 'Software and Drivers', '您的浏览器不支持 video 标签。' => 'Your browser does not support HTML5 video.', ], - - // 成为分销商页面 - '成为经销商' => 'Become a Distributor', - '准备好加入我们了吗?
在下面输入您的详细信息,我们的销售团队将在2个工作日内回复您。' => 'Ready to join us?
Enter your details below and our Sales team will get back to you within 2 business days.', - '公司名称' => 'Company Name', - '请输入公司名称' => 'Enter your Company Name', - '电子邮件' => 'Contact Email', - '请输入邮箱' => 'Enter your Email', - '电话号码' => 'Phone Number', - '请输入电话号码' => 'Enter your Phone Number', - '业务类型' => 'Type of Business', - '在线商店网址' => 'Online Store URL', - '企业规模' => 'Enterprise Size', - '公司地址' => 'Company Address', - '请输入地址' => 'Enter Address', - '留言' => 'Message', - '请输入留言' => 'Enter your message', - // 批量购买页面 - '批量购买' => 'Bulk Buy', - '法定营业名称' => 'Legal business name', - '官方网站' => 'Official website', - '请粘贴网址' => 'Please paste the URL', - '姓名' => 'Your Name', - '姓' => 'Last name', - '名' => 'First name', - '邮箱' => 'Email', - '电话号码' => 'Phone Number', - '您对哪个产品品类感兴趣?' => 'Products you are interested in?', - '当前选定语言的采购可选品类配置出错' => 'The procurement category configuration for the currently selected language is incorrect', + // 联系我们批量购买页面 + 'contactus/bulkbuy' => [ + '批量购买' => 'Bulk Buy', + '公司名称' => 'Company Name', + '法定营业名称' => 'Legal business name', + '官方网站' => 'Official website', + '请粘贴网址' => 'Please paste the URL', + '姓名' => 'Your Name', + '姓' => 'Last name', + '名' => 'First name', + '邮箱' => 'Email', + '请输入邮箱' => 'Enter your Email', + '电话号码' => 'Phone Number', + '请输入电话号码' => 'Enter your Phone Number', + '您对哪个产品品类感兴趣?' => 'Products you are interested in?', + '留言' => 'Message', + '请输入留言' => 'Enter your message', + '提交' => 'SUBMIT', + ], + // 联系我们成为分销商页面 + 'contactus/distributor' => [ + '成为经销商' => 'Become a Distributor', + '准备好加入我们了吗?
在下面输入您的详细信息,我们的销售团队将在2个工作日内回复您。' => 'Ready to join us?
Enter your details below and our Sales team will get back to you within 2 business days.', + '公司名称' => 'Company Name', + '请输入公司名称' => 'Enter your Company Name', + '电子邮件' => 'Contact Email', + '请输入邮箱' => 'Enter your Email', + '电话号码' => 'Phone Number', + '请输入电话号码' => 'Enter your Phone Number', + '业务类型' => 'Type of Business', + '在线商店网址' => 'Online Store URL', + '企业规模' => 'Enterprise Size', + '公司地址' => 'Company Address', + '请输入地址' => 'Enter Address', + '留言' => 'Message', + '请输入留言' => 'Enter your message', + '提交' => 'SUBMIT', + ], // 联系我们留言页 'contactus/message' => [ '我们的信息' => 'Our Information', diff --git a/app/index/view/mobile/contact_us/bulkbuy.html b/app/index/view/mobile/contact_us/bulkbuy.html index 8cefd10b..c1b4bea5 100644 --- a/app/index/view/mobile/contact_us/bulkbuy.html +++ b/app/index/view/mobile/contact_us/bulkbuy.html @@ -6,45 +6,45 @@
-

{:lang('批量购买')}

+

{:lang_i18n('批量购买')}

- - + +
- - + +
- - - + + +
- - + +
- - + +
- +
{notempty name="interested"} {volist name="interested" id="it"} @@ -58,14 +58,14 @@
- - + +
-
{:lang('提交')}
+
{:lang_i18n('提交')}
diff --git a/app/index/view/mobile/contact_us/distributor.html b/app/index/view/mobile/contact_us/distributor.html index 2ea4c494..7a04540c 100644 --- a/app/index/view/mobile/contact_us/distributor.html +++ b/app/index/view/mobile/contact_us/distributor.html @@ -8,8 +8,8 @@
-

{:lang('成为经销商')}

-

{:lang('准备好加入我们了吗?
在下面输入您的详细信息,我们的销售团队将在2个工作日内回复您。')}

+

{:lang_i18n('成为经销商')}

+

{:lang_i18n('准备好加入我们了吗?
在下面输入您的详细信息,我们的销售团队将在2个工作日内回复您。')}

@@ -18,25 +18,25 @@
- - + +
- - + +
- - + +
- + + +
- + + +
- - + +
-
{:lang('提交')}
+
{:lang_i18n('提交')}
diff --git a/app/index/view/mobile/index/index.html b/app/index/view/mobile/index/index.html index e02d1297..4d95fdf9 100644 --- a/app/index/view/mobile/index/index.html +++ b/app/index/view/mobile/index/index.html @@ -45,7 +45,7 @@

{$ft.title}

@@ -57,7 +57,7 @@ {notempty name="featured_products"}
-

{:lang('明星产品/热点产品')}

+

{:lang_i18n('明星产品/热点产品')}

@@ -103,7 +103,7 @@

$sc['title_txt_color']])}>{$sc.title}

$sc['desc_txt_color']])}>{$sc.desc}

- {:lang('了解更多')} + {:lang_i18n('了解更多')}

@@ -113,8 +113,8 @@
-

{:lang('Orico 技术')}

-

{:lang('强大功能、简单使用')}

+

{:lang_i18n('Orico 技术')}

+

{:lang_i18n('强大功能、简单使用')}

@@ -144,7 +144,7 @@

$bs['desc_txt_color']])}>{$bs.desc}

- {:lang('了解更多')} + {:lang_i18n('了解更多')}

@@ -208,9 +208,9 @@
-

{:lang('常见问题')}

-
{:lang('回答您最关心的问题')}
-

{:lang('客服团队的工作时间:周一到周五,早9点到晚6点 平均应答时间:24小时内')}

+

{:lang_i18n('常见问题')}

+
{:lang_i18n('回答您最关心的问题')}
+

{:lang_i18n('客服团队的工作时间:周一到周五,早9点到晚6点 平均应答时间:24小时内')}

{volist name="recommend_faq" id="rq"}
diff --git a/app/index/view/mobile/product/category.html b/app/index/view/mobile/product/category.html index 04702b45..5a836c6b 100644 --- a/app/index/view/mobile/product/category.html +++ b/app/index/view/mobile/product/category.html @@ -37,7 +37,7 @@
diff --git a/app/index/view/mobile/product/detail.html b/app/index/view/mobile/product/detail.html index 9d55ceb5..8dd0c949 100644 --- a/app/index/view/mobile/product/detail.html +++ b/app/index/view/mobile/product/detail.html @@ -19,7 +19,7 @@
- {:lang('首页')} + {:lang_i18n('首页')} {volist name="product_categorys" id="ca"} {$ca.name} @@ -81,7 +81,7 @@
  • -
    {:lang('型号')}
    +
    {:lang_i18n('型号')}
    {$product.spu}
  • @@ -96,15 +96,15 @@
{/notempty}
    -
  • {:lang('产品描述')}
  • +
  • {:lang_i18n('产品描述')}
  • {notempty name="product_related"} -
  • {:lang('关联产品')}
  • +
  • {:lang_i18n('关联产品')}
  • {/notempty}
@@ -122,42 +122,42 @@
diff --git a/app/index/view/mobile/product/search.html b/app/index/view/mobile/product/search.html index 31f070e9..2fd24f87 100644 --- a/app/index/view/mobile/product/search.html +++ b/app/index/view/mobile/product/search.html @@ -9,9 +9,9 @@
- +
- +
{notempty name="products"}
diff --git a/app/index/view/mobile/public/footer.html b/app/index/view/mobile/public/footer.html index 314bd4ca..088c3b5e 100644 --- a/app/index/view/mobile/public/footer.html +++ b/app/index/view/mobile/public/footer.html @@ -5,7 +5,7 @@
    {notempty name="header_categorys"}
  • -

    {:lang('产品')}

    +

    {:lang_i18n('产品')}

    {volist name="header_categorys" id="hc"}

    {$hc.name}

    {/volist} @@ -26,7 +26,7 @@ {/volist} {/notempty}
  • -

    {:lang('联系方式')}

    +

    {:lang_i18n('联系方式')}

    {notempty name="contact_config.website_email"}

    {$contact_config.website_email.title}: {$contact_config.website_email.value}

    {/notempty} diff --git a/app/index/view/mobile/public/header.html b/app/index/view/mobile/public/header.html index 94bcc25d..d8c30371 100644 --- a/app/index/view/mobile/public/header.html +++ b/app/index/view/mobile/public/header.html @@ -12,11 +12,11 @@
    -
    {:lang('产品列表')}
    +
    {:lang_i18n('产品列表')}
    {notempty name="header_categorys"} {volist name="header_categorys" id="ca"} @@ -48,11 +48,11 @@
    - - + +
    @@ -63,7 +63,7 @@