Skip to content

Commit b1a3065

Browse files
authored
fix(rewards): refine mobile invite copy and WhatsApp proof flow (#945)
* fix(rewards): refine invite copy and relax WhatsApp proof * fix(rewards): format earned credits tooltip copy
1 parent 0f25731 commit b1a3065

6 files changed

Lines changed: 17 additions & 27 deletions

File tree

apps/web/src/i18n/locales/en.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,7 @@ const en = {
165165
"Total credits added from your subscription plan",
166166
"layout.sidebar.balancePopup.earned": "Reward credits",
167167
"layout.sidebar.balancePopup.earnedTooltip":
168-
"Earned from signup rewards, completed tasks, and activities. Consumption order: plan credits → credit packs → reward credits.",
168+
"Earned from signup rewards, completed tasks, and activities.",
169169
"layout.sidebar.balancePopup.consumed": "Consumed",
170170
"layout.sidebar.balancePopup.viewDetail": "View details",
171171
"layout.mobile.settings": "Settings",
@@ -304,9 +304,9 @@ const en = {
304304
"rewards.group.social": "Social & messaging",
305305
"rewards.tab.web": "Web",
306306
"rewards.tab.mobile": "Mobile",
307-
"rewards.mobileQrHint": "Scan with WeChat, Xiaohongshu, Jike, or Feishu",
307+
"rewards.mobileQrHint": "Use your camera to invite from mobile",
308308
"rewards.mobileQrDesc":
309-
"Open WeChat, Xiaohongshu, Jike, Feishu or similar clients to scan and complete sharing tasks",
309+
"Use your phone camera to scan the QR code, then invite from mobile to complete the task and earn credits",
310310
"rewards.cloudBalance": "Cloud Balance",
311311
"rewards.totalEarned": "Total earned",
312312
"rewards.totalUsed": "Total used",
@@ -418,10 +418,10 @@ const en = {
418418
"reward.x_share.desc": "Once per week",
419419
"reward.reddit.name": "Post on Reddit",
420420
"reward.reddit.desc": "Once per week",
421-
"reward.mobile_share.name": "Share via mobile clients",
421+
"reward.mobile_share.name": "Invite from mobile",
422422
"reward.mobile_share.desc":
423-
"Scan with WeChat, Xiaohongshu, Jike, or Feishu to share and earn credits",
424-
"reward.lingying.name": "Post on 瓴英",
423+
"Use your phone camera to scan the QR code and invite from mobile to earn credits",
424+
"reward.lingying.name": "Post on LinkedIn",
425425
"reward.lingying.desc": "Once per week",
426426
"reward.facebook.name": "Share on Facebook",
427427
"reward.facebook.desc": "Once per week",

apps/web/src/i18n/locales/zh-CN.ts

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -164,8 +164,7 @@ const zhCN = {
164164
"layout.sidebar.balancePopup.rechargedTooltip":
165165
"从订阅套餐中累计获得的积分总量",
166166
"layout.sidebar.balancePopup.earned": "赠送积分",
167-
"layout.sidebar.balancePopup.earnedTooltip":
168-
"来自注册奖励、完成任务等活动。消耗顺序:套餐积分 → 积分包 → 赠送积分。",
167+
"layout.sidebar.balancePopup.earnedTooltip": "来自注册奖励、完成任务等活动。",
169168
"layout.sidebar.balancePopup.consumed": "累计消耗",
170169
"layout.sidebar.balancePopup.viewDetail": "查看使用情况",
171170
"layout.empty.title": "暂无对话",
@@ -298,9 +297,9 @@ const zhCN = {
298297
"rewards.group.social": "社交与即时通讯",
299298
"rewards.tab.web": "Web 版",
300299
"rewards.tab.mobile": "移动端",
301-
"rewards.mobileQrHint": "用微信、小红书、即刻、飞书等客户端扫码",
300+
"rewards.mobileQrHint": "使用相机扫描以从手机邀请",
302301
"rewards.mobileQrDesc":
303-
"打开微信、小红书、即刻、飞书等客户端扫描二维码,完成分享任务即可领取积分",
302+
"使用手机相机扫描二维码,从手机发起邀请并完成任务即可领取积分",
304303
"rewards.cloudBalance": "云端余额",
305304
"rewards.totalEarned": "累计获得",
306305
"rewards.totalUsed": "累计消耗",
@@ -397,10 +396,10 @@ const zhCN = {
397396
"reward.x_share.desc": "每周可领一次",
398397
"reward.reddit.name": "发帖到 Reddit",
399398
"reward.reddit.desc": "每周可领一次",
400-
"reward.mobile_share.name": "移动端扫码分享",
399+
"reward.mobile_share.name": "从手机邀请",
401400
"reward.mobile_share.desc":
402-
"打开微信、小红书、即刻、飞书等客户端扫码完成分享,即可领取积分",
403-
"reward.lingying.name": "发帖到瓴英",
401+
"使用手机相机扫描二维码,从手机发起邀请即可领取积分",
402+
"reward.lingying.name": "发帖到领英",
404403
"reward.lingying.desc": "每周可领一次",
405404
"reward.facebook.name": "分享到 Facebook",
406405
"reward.facebook.desc": "每周可领一次",

packages/shared/src/schemas/rewards.ts

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@ export const rewardUrlProofTaskIdSchema = z.enum([
3232
"reddit",
3333
"lingying",
3434
"facebook",
35-
"whatsapp",
3635
]);
3736
export type RewardUrlProofTaskId = z.infer<typeof rewardUrlProofTaskIdSchema>;
3837

@@ -224,8 +223,6 @@ const rewardUrlProofPatterns = {
224223
/^https?:\/\/(?:[a-z]{2,3}\.)?linkedin\.com\/(?:feed\/update\/urn:li:(?:share|activity):\d+|posts\/[^/?#]+|pulse\/[^?#]+)(?:[/?#].*)?$/i,
225224
facebook:
226225
/^https?:\/\/(?:www\.)?facebook\.com\/(?:[^/?#]+\/posts\/\d+|story\.php\?story_fbid=\d+[^#]*|permalink\.php\?story_fbid=\d+[^#]*|share\/p\/[A-Za-z0-9]+|reel\/\d+)(?:[/?#].*)?$/i,
227-
whatsapp:
228-
/^https?:\/\/(?:(?:chat|www)\.whatsapp\.com\/(?:invite\/|channel\/)?[A-Za-z0-9/_-]+|wa\.me\/channel\/[A-Za-z0-9]+)(?:[/?#].*)?$/i,
229226
} as const satisfies Record<RewardUrlProofTaskId, RegExp>;
230227

231228
export function rewardTaskRequiresUrlProof(

tests/controller/desktop-rewards-share-templates.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ describe("desktop rewards share templates", () => {
161161
repeatMode: "weekly",
162162
shareMode: "link",
163163
icon: "reddit",
164-
url: "https://www.reddit.com/submit?url=https%3A%2F%2Fgithub.com%2Fnexu-io%2Fnexu",
164+
url: "https://www.reddit.com/submit?url=https%3A%2F%2Fdev.to%2Fjoey_lee_c96e4ad421791371%2Fwe-built-an-open-source-openclaw-desktop-client-that-fixes-17-pitfalls-gjn",
165165
isClaimed: false,
166166
claimCount: 0,
167167
lastClaimedAt: null,

tests/shared/rewards-proof.test.ts

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,11 @@ describe("reward proof helpers", () => {
1111
expect(rewardTaskRequiresUrlProof("reddit")).toBe(true);
1212
expect(rewardTaskRequiresUrlProof("lingying")).toBe(true);
1313
expect(rewardTaskRequiresUrlProof("facebook")).toBe(true);
14-
expect(rewardTaskRequiresUrlProof("whatsapp")).toBe(true);
1514

1615
expect(rewardTaskRequiresUrlProof("github_star")).toBe(false);
1716
expect(rewardTaskRequiresUrlProof("daily_checkin")).toBe(false);
18-
expect(rewardTaskRequiresUrlProof("xiaohongshu")).toBe(false);
17+
expect(rewardTaskRequiresUrlProof("mobile_share")).toBe(false);
18+
expect(rewardTaskRequiresUrlProof("whatsapp")).toBe(false);
1919
});
2020

2121
it("validates platform proof URLs with task-specific regexes", () => {
@@ -43,12 +43,6 @@ describe("reward proof helpers", () => {
4343
"https://www.facebook.com/nexu/posts/1234567890",
4444
),
4545
).toBe(true);
46-
expect(
47-
validateRewardProofUrl(
48-
"whatsapp",
49-
"https://chat.whatsapp.com/AbCdEfGhIjKlMnOpQrStUv",
50-
),
51-
).toBe(true);
5246
});
5347

5448
it("rejects cross-platform or malformed proof URLs", () => {

tests/web/home.test.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -479,7 +479,7 @@ describe("Rewards locale parity", () => {
479479
);
480480
expect(zhCN["reward.github_star.name"]).toBe("Star us");
481481
expect(zhCN["reward.reddit.name"]).toBe("发帖到 Reddit");
482-
expect(zhCN["reward.mobile_share.name"]).toBe("移动端扫码分享");
483-
expect(zhCN["reward.lingying.name"]).toBe("发帖到瓴英");
482+
expect(zhCN["reward.mobile_share.name"]).toBe("从手机邀请");
483+
expect(zhCN["reward.lingying.name"]).toBe("发帖到领英");
484484
});
485485
});

0 commit comments

Comments
 (0)