🦀 ClawHub
Listing I18n
by @hugochougt
在 OpenClaw 中把中文产品 Excel 或 CSV 本地化为 Amazon 和 Shopify 的多语言 Listing。适用于翻译产品、跨境电商 Listing 本地化、Amazon listing、Shopify listing、localize products 等场景。
TERMINAL
clawhub install listing-i18n📖 About This Skill
name: listing-i18n description: 在 OpenClaw 中把中文产品 Excel 或 CSV 本地化为 Amazon 和 Shopify 的多语言 Listing。适用于翻译产品、跨境电商 Listing 本地化、Amazon listing、Shopify listing、localize products 等场景。 version: 0.2.0 metadata: openclaw: emoji: "🌐" requires: bins: ["python3"]
Listing I18n
这个 skill 运行在 OpenClaw 上:
不要把这个 skill 当成独立翻译程序。它是“LLM 工作流 + 本地辅助脚本”的组合。
可用脚本
python3 generate_template.py [output.xlsx]python3 inspect_input.py [--sheet SheetName] python3 build_output.py [output.xlsx] python3 validate.py 工作流
1. 用户没有产品文件
运行:
python3 generate_template.py
告诉用户填写 Products sheet 第 3 行起的数据,再继续。
2. 用户提供了产品文件
先运行:
python3 inspect_input.py
基于脚本输出完成三件事:
1. 告诉用户检测到的列名和前 3 行样例 2. 确认以下字段映射 3. 如果缺少必填字段,要求用户补齐
必填字段:
product_idbrandproduct_namecategoryspecsselling_pointskeywords_cnpackage_includes可选字段:
custom_attributesimages_note3. 确认平台和目标市场
如果用户没有特别说明:
Bothen_US支持的目标市场:
en_USen_UKde_DEja_JPes_ESfr_FRit_IT4. 由 LLM 执行逐产品翻译
对每个产品、每个目标市场、每个平台分别生成内容。
#### Amazon
titlebullet_point_1 到 bullet_point_5descriptionbackend_keywords#### Shopify
titledescription_htmlseo_titleseo_descriptiontagsproduct_type> 分隔翻译要求:
best、#1、guaranteedcustom_attributes 的 key 保持英文,value 翻译成目标语言5. 生成输出文件
先把翻译结果组织成 JSON,再运行:
python3 build_output.py [output.xlsx]
输出 workbook 需包含:
Amazon_ sheetShopify_ sheetSource_CN sheetAmazon sheet 列顺序必须是:
product_id
brand
title
bullet_point_1
bullet_point_2
bullet_point_3
bullet_point_4
bullet_point_5
description
backend_keywords
custom_attributes
source_product_name
Shopify sheet 列顺序必须是:
product_id
brand
title
description_html
seo_title
seo_description
tags
product_type
custom_attributes
source_product_name
6. 校验并汇报
生成 Excel 后运行:
python3 validate.py
向用户汇报:
error 和 warningtranslations.json 结构
build_output.py 读取如下结构。仓库里还提供了可直接参考的 translations.example.json:
{
"sheets": [
{
"name": "Amazon_en_US",
"headers": [
"product_id",
"brand",
"title",
"bullet_point_1",
"bullet_point_2",
"bullet_point_3",
"bullet_point_4",
"bullet_point_5",
"description",
"backend_keywords",
"custom_attributes",
"source_product_name"
],
"rows": [
[
"SP-001",
"SoundPulse",
"SoundPulse Noise Cancelling Earbuds",
"【NOISE CANCELLATION】...",
"【HI-RES AUDIO】...",
"【ALL-DAY COMFORT】...",
"【SWEAT RESISTANCE】...",
"【IN THE BOX】...",
"Long description...",
"wireless earbuds bluetooth earbuds sports earbuds",
"color:black | connectivity:bluetooth 5.3",
"SP-Pro 主动降噪真无线蓝牙耳机"
]
]
},
{
"name": "Source_CN",
"headers": ["product_id", "brand", "product_name"],
"rows": [["SP-001", "SoundPulse", "SP-Pro 主动降噪真无线蓝牙耳机"]]
}
]
}
注意
python3 和 openpyxl