@wix/himalaya-cli 0.1601.0 → 0.1602.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/cli.mjs CHANGED
@@ -27634,7 +27634,6 @@ function resolveIdiom(tokens2, ctx = {}) {
27634
27634
  var IDIOM_CONTEXTS, UNSAFE_KEYS;
27635
27635
  var init_idiom = __esm({
27636
27636
  "../../core/ts/src/idiom.ts"() {
27637
- "use strict";
27638
27637
  init_define_HHP_CATALOG();
27639
27638
  IDIOM_CONTEXTS = {
27640
27639
  ios: { native: ["ios"] },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wix/himalaya-cli",
3
- "version": "0.1601.0",
3
+ "version": "0.1602.0",
4
4
  "type": "module",
5
5
  "description": "himi — the Himalaya authoring CLI. Build a Tier-5 content package on your own machine, push it to the production serve as a draft, preview it on web + Himi Player, and read worker logs back — the remote dev loop. Wraps @himalaya/serve-cli for transport.",
6
6
  "keywords": [
@@ -72,5 +72,5 @@
72
72
  "artifactId": "himalaya-cli"
73
73
  }
74
74
  },
75
- "falconPackageHash": "735879073e611b609b1ebd614c4dbff944373a5bbd1512142e1cfac5"
75
+ "falconPackageHash": "912a018c8faa872ff500b38a18a77faf8eded63603ce4eecaf8822e7"
76
76
  }
@@ -6,7 +6,7 @@ import { comments, BLOG_COMMENTS_APP_ID, blogCommentRow, listBlogComments, type
6
6
  import { get, type DbEntity } from "@himalaya/local-db";
7
7
  import { isSavedId, toggleSavedId } from "../_shared/himi-blog-saved";
8
8
  import { hideId, isHiddenId, unhideId } from "../_shared/himi-blog-hidden";
9
- import { stashCopy, copyParam, copyTemplate } from "../_shared/himi-copy.js";
9
+ import { stashCopy, copyParam, copyPlural, copyTemplate } from "../_shared/himi-copy.js";
10
10
  import { formatDateMedium, formatMonthDay } from "../_shared/engine-intl.js";
11
11
  import { openRichLink } from "../_shared/rich-content-link.js";
12
12
  import { richBody, ROW_IMAGE_WIDTH } from "../_shared/rich-body.js";
@@ -119,8 +119,8 @@ function countsLineOf(post: PostWithExtras): string {
119
119
  const likes = post.metrics?.likeCount ?? post.metrics?.likes ?? 0;
120
120
  const comments = post.metrics?.totalComments ?? post.metrics?.commentCount ?? post.metrics?.comments ?? 0;
121
121
  const bits: string[] = [];
122
- if (likes > 0) bits.push(`${likes} ${likes === 1 ? "like" : "likes"}`);
123
- if (comments > 0) bits.push(`${comments} ${comments === 1 ? "comment" : "comments"}`);
122
+ if (likes > 0) bits.push(copyPlural("blogPost.likesCount", "{n, plural, one {# like} other {# likes}}", likes));
123
+ if (comments > 0) bits.push(copyPlural("blogPost.commentsCount", "{n, plural, one {# comment} other {# comments}}", comments));
124
124
  return bits.join(" · ");
125
125
  }
126
126
 
@@ -172,7 +172,7 @@ function subtitle(post: WixPost): string {
172
172
  if (post.firstPublishedDate) {
173
173
  bits.push(formatDateMedium(new Date(post.firstPublishedDate)));
174
174
  }
175
- if (post.minutesToRead) bits.push(`${post.minutesToRead} min read`);
175
+ if (post.minutesToRead) bits.push(copyPlural("blogPost.minRead", "{n, plural, one {# min read} other {# min read}}", post.minutesToRead));
176
176
  return bits.join(" · ");
177
177
  }
178
178
 
@@ -187,10 +187,11 @@ function commentMeta(row: WixBlogCommentRow): string {
187
187
 
188
188
  function toCommentRow(row: WixBlogCommentRow): CommentRow {
189
189
  // The plain text is the document's own (runs joined as written, not space-separated) when it has one.
190
- const { bodyJson, bodyText } = richBody(row.richContent, row.text || "Comment", ROW_IMAGE_WIDTH);
190
+ // `forum.commentCta` is the app's one "Comment": the pack forwards that single key to this screen (see the prefixes).
191
+ const { bodyJson, bodyText } = richBody(row.richContent, row.text || copyParam("forum.commentCta", "Comment"), ROW_IMAGE_WIDTH);
191
192
  return {
192
193
  id: row.id,
193
- authorName: row.authorName || "Member",
194
+ authorName: row.authorName || copyParam("blogPost.memberFallback", "Member"),
194
195
  text: bodyText,
195
196
  meta: commentMeta(row),
196
197
  bodyJson,
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "$source": "en",
3
- "$generated": "2026-11-07T14:00:37.597Z",
3
+ "$generated": "2026-11-07T23:50:41.996Z",
4
4
  "messages": {
5
5
  "h_042c862e4467": {
6
6
  "source": "Try again",
@@ -6,7 +6,7 @@ import { comments, BLOG_COMMENTS_APP_ID, blogCommentRow, listBlogComments, type
6
6
  import { get, type DbEntity } from "@himalaya/local-db";
7
7
  import { isSavedId, toggleSavedId } from "../_shared/himi-blog-saved";
8
8
  import { hideId, isHiddenId, unhideId } from "../_shared/himi-blog-hidden";
9
- import { stashCopy, copyParam, copyTemplate } from "../_shared/himi-copy.js";
9
+ import { stashCopy, copyParam, copyPlural, copyTemplate } from "../_shared/himi-copy.js";
10
10
  import { formatDateMedium, formatMonthDay } from "../_shared/engine-intl.js";
11
11
  import { openRichLink } from "../_shared/rich-content-link.js";
12
12
  import { richBody, ROW_IMAGE_WIDTH } from "../_shared/rich-body.js";
@@ -119,8 +119,8 @@ function countsLineOf(post: PostWithExtras): string {
119
119
  const likes = post.metrics?.likeCount ?? post.metrics?.likes ?? 0;
120
120
  const comments = post.metrics?.totalComments ?? post.metrics?.commentCount ?? post.metrics?.comments ?? 0;
121
121
  const bits: string[] = [];
122
- if (likes > 0) bits.push(`${likes} ${likes === 1 ? "like" : "likes"}`);
123
- if (comments > 0) bits.push(`${comments} ${comments === 1 ? "comment" : "comments"}`);
122
+ if (likes > 0) bits.push(copyPlural("blogPost.likesCount", "{n, plural, one {# like} other {# likes}}", likes));
123
+ if (comments > 0) bits.push(copyPlural("blogPost.commentsCount", "{n, plural, one {# comment} other {# comments}}", comments));
124
124
  return bits.join(" · ");
125
125
  }
126
126
 
@@ -172,7 +172,7 @@ function subtitle(post: WixPost): string {
172
172
  if (post.firstPublishedDate) {
173
173
  bits.push(formatDateMedium(new Date(post.firstPublishedDate)));
174
174
  }
175
- if (post.minutesToRead) bits.push(`${post.minutesToRead} min read`);
175
+ if (post.minutesToRead) bits.push(copyPlural("blogPost.minRead", "{n, plural, one {# min read} other {# min read}}", post.minutesToRead));
176
176
  return bits.join(" · ");
177
177
  }
178
178
 
@@ -187,10 +187,11 @@ function commentMeta(row: WixBlogCommentRow): string {
187
187
 
188
188
  function toCommentRow(row: WixBlogCommentRow): CommentRow {
189
189
  // The plain text is the document's own (runs joined as written, not space-separated) when it has one.
190
- const { bodyJson, bodyText } = richBody(row.richContent, row.text || "Comment", ROW_IMAGE_WIDTH);
190
+ // `forum.commentCta` is the app's one "Comment": the pack forwards that single key to this screen (see the prefixes).
191
+ const { bodyJson, bodyText } = richBody(row.richContent, row.text || copyParam("forum.commentCta", "Comment"), ROW_IMAGE_WIDTH);
191
192
  return {
192
193
  id: row.id,
193
- authorName: row.authorName || "Member",
194
+ authorName: row.authorName || copyParam("blogPost.memberFallback", "Member"),
194
195
  text: bodyText,
195
196
  meta: commentMeta(row),
196
197
  bodyJson,
@@ -6,7 +6,7 @@ import { comments, BLOG_COMMENTS_APP_ID, blogCommentRow, listBlogComments, type
6
6
  import { get, type DbEntity } from "@himalaya/local-db";
7
7
  import { isSavedId, toggleSavedId } from "../_shared/himi-blog-saved";
8
8
  import { hideId, isHiddenId, unhideId } from "../_shared/himi-blog-hidden";
9
- import { stashCopy, copyParam, copyTemplate } from "../_shared/himi-copy.js";
9
+ import { stashCopy, copyParam, copyPlural, copyTemplate } from "../_shared/himi-copy.js";
10
10
  import { formatDateMedium, formatMonthDay } from "../_shared/engine-intl.js";
11
11
  import { openRichLink } from "../_shared/rich-content-link.js";
12
12
  import { richBody, ROW_IMAGE_WIDTH } from "../_shared/rich-body.js";
@@ -119,8 +119,8 @@ function countsLineOf(post: PostWithExtras): string {
119
119
  const likes = post.metrics?.likeCount ?? post.metrics?.likes ?? 0;
120
120
  const comments = post.metrics?.totalComments ?? post.metrics?.commentCount ?? post.metrics?.comments ?? 0;
121
121
  const bits: string[] = [];
122
- if (likes > 0) bits.push(`${likes} ${likes === 1 ? "like" : "likes"}`);
123
- if (comments > 0) bits.push(`${comments} ${comments === 1 ? "comment" : "comments"}`);
122
+ if (likes > 0) bits.push(copyPlural("blogPost.likesCount", "{n, plural, one {# like} other {# likes}}", likes));
123
+ if (comments > 0) bits.push(copyPlural("blogPost.commentsCount", "{n, plural, one {# comment} other {# comments}}", comments));
124
124
  return bits.join(" · ");
125
125
  }
126
126
 
@@ -172,7 +172,7 @@ function subtitle(post: WixPost): string {
172
172
  if (post.firstPublishedDate) {
173
173
  bits.push(formatDateMedium(new Date(post.firstPublishedDate)));
174
174
  }
175
- if (post.minutesToRead) bits.push(`${post.minutesToRead} min read`);
175
+ if (post.minutesToRead) bits.push(copyPlural("blogPost.minRead", "{n, plural, one {# min read} other {# min read}}", post.minutesToRead));
176
176
  return bits.join(" · ");
177
177
  }
178
178
 
@@ -187,10 +187,11 @@ function commentMeta(row: WixBlogCommentRow): string {
187
187
 
188
188
  function toCommentRow(row: WixBlogCommentRow): CommentRow {
189
189
  // The plain text is the document's own (runs joined as written, not space-separated) when it has one.
190
- const { bodyJson, bodyText } = richBody(row.richContent, row.text || "Comment", ROW_IMAGE_WIDTH);
190
+ // `forum.commentCta` is the app's one "Comment": the pack forwards that single key to this screen (see the prefixes).
191
+ const { bodyJson, bodyText } = richBody(row.richContent, row.text || copyParam("forum.commentCta", "Comment"), ROW_IMAGE_WIDTH);
191
192
  return {
192
193
  id: row.id,
193
- authorName: row.authorName || "Member",
194
+ authorName: row.authorName || copyParam("blogPost.memberFallback", "Member"),
194
195
  text: bodyText,
195
196
  meta: commentMeta(row),
196
197
  bodyJson,
@@ -6,7 +6,7 @@ import { comments, BLOG_COMMENTS_APP_ID, blogCommentRow, listBlogComments, type
6
6
  import { get, type DbEntity } from "@himalaya/local-db";
7
7
  import { isSavedId, toggleSavedId } from "../_shared/himi-blog-saved";
8
8
  import { hideId, isHiddenId, unhideId } from "../_shared/himi-blog-hidden";
9
- import { stashCopy, copyParam, copyTemplate } from "../_shared/himi-copy.js";
9
+ import { stashCopy, copyParam, copyPlural, copyTemplate } from "../_shared/himi-copy.js";
10
10
  import { formatDateMedium, formatMonthDay } from "../_shared/engine-intl.js";
11
11
  import { openRichLink } from "../_shared/rich-content-link.js";
12
12
  import { richBody, ROW_IMAGE_WIDTH } from "../_shared/rich-body.js";
@@ -119,8 +119,8 @@ function countsLineOf(post: PostWithExtras): string {
119
119
  const likes = post.metrics?.likeCount ?? post.metrics?.likes ?? 0;
120
120
  const comments = post.metrics?.totalComments ?? post.metrics?.commentCount ?? post.metrics?.comments ?? 0;
121
121
  const bits: string[] = [];
122
- if (likes > 0) bits.push(`${likes} ${likes === 1 ? "like" : "likes"}`);
123
- if (comments > 0) bits.push(`${comments} ${comments === 1 ? "comment" : "comments"}`);
122
+ if (likes > 0) bits.push(copyPlural("blogPost.likesCount", "{n, plural, one {# like} other {# likes}}", likes));
123
+ if (comments > 0) bits.push(copyPlural("blogPost.commentsCount", "{n, plural, one {# comment} other {# comments}}", comments));
124
124
  return bits.join(" · ");
125
125
  }
126
126
 
@@ -172,7 +172,7 @@ function subtitle(post: WixPost): string {
172
172
  if (post.firstPublishedDate) {
173
173
  bits.push(formatDateMedium(new Date(post.firstPublishedDate)));
174
174
  }
175
- if (post.minutesToRead) bits.push(`${post.minutesToRead} min read`);
175
+ if (post.minutesToRead) bits.push(copyPlural("blogPost.minRead", "{n, plural, one {# min read} other {# min read}}", post.minutesToRead));
176
176
  return bits.join(" · ");
177
177
  }
178
178
 
@@ -187,10 +187,11 @@ function commentMeta(row: WixBlogCommentRow): string {
187
187
 
188
188
  function toCommentRow(row: WixBlogCommentRow): CommentRow {
189
189
  // The plain text is the document's own (runs joined as written, not space-separated) when it has one.
190
- const { bodyJson, bodyText } = richBody(row.richContent, row.text || "Comment", ROW_IMAGE_WIDTH);
190
+ // `forum.commentCta` is the app's one "Comment": the pack forwards that single key to this screen (see the prefixes).
191
+ const { bodyJson, bodyText } = richBody(row.richContent, row.text || copyParam("forum.commentCta", "Comment"), ROW_IMAGE_WIDTH);
191
192
  return {
192
193
  id: row.id,
193
- authorName: row.authorName || "Member",
194
+ authorName: row.authorName || copyParam("blogPost.memberFallback", "Member"),
194
195
  text: bodyText,
195
196
  meta: commentMeta(row),
196
197
  bodyJson,
@@ -6,7 +6,7 @@ import { comments, BLOG_COMMENTS_APP_ID, blogCommentRow, listBlogComments, type
6
6
  import { get, type DbEntity } from "@himalaya/local-db";
7
7
  import { isSavedId, toggleSavedId } from "../_shared/himi-blog-saved";
8
8
  import { hideId, isHiddenId, unhideId } from "../_shared/himi-blog-hidden";
9
- import { stashCopy, copyParam, copyTemplate } from "../_shared/himi-copy.js";
9
+ import { stashCopy, copyParam, copyPlural, copyTemplate } from "../_shared/himi-copy.js";
10
10
  import { formatDateMedium, formatMonthDay } from "../_shared/engine-intl.js";
11
11
  import { openRichLink } from "../_shared/rich-content-link.js";
12
12
  import { richBody, ROW_IMAGE_WIDTH } from "../_shared/rich-body.js";
@@ -119,8 +119,8 @@ function countsLineOf(post: PostWithExtras): string {
119
119
  const likes = post.metrics?.likeCount ?? post.metrics?.likes ?? 0;
120
120
  const comments = post.metrics?.totalComments ?? post.metrics?.commentCount ?? post.metrics?.comments ?? 0;
121
121
  const bits: string[] = [];
122
- if (likes > 0) bits.push(`${likes} ${likes === 1 ? "like" : "likes"}`);
123
- if (comments > 0) bits.push(`${comments} ${comments === 1 ? "comment" : "comments"}`);
122
+ if (likes > 0) bits.push(copyPlural("blogPost.likesCount", "{n, plural, one {# like} other {# likes}}", likes));
123
+ if (comments > 0) bits.push(copyPlural("blogPost.commentsCount", "{n, plural, one {# comment} other {# comments}}", comments));
124
124
  return bits.join(" · ");
125
125
  }
126
126
 
@@ -172,7 +172,7 @@ function subtitle(post: WixPost): string {
172
172
  if (post.firstPublishedDate) {
173
173
  bits.push(formatDateMedium(new Date(post.firstPublishedDate)));
174
174
  }
175
- if (post.minutesToRead) bits.push(`${post.minutesToRead} min read`);
175
+ if (post.minutesToRead) bits.push(copyPlural("blogPost.minRead", "{n, plural, one {# min read} other {# min read}}", post.minutesToRead));
176
176
  return bits.join(" · ");
177
177
  }
178
178
 
@@ -187,10 +187,11 @@ function commentMeta(row: WixBlogCommentRow): string {
187
187
 
188
188
  function toCommentRow(row: WixBlogCommentRow): CommentRow {
189
189
  // The plain text is the document's own (runs joined as written, not space-separated) when it has one.
190
- const { bodyJson, bodyText } = richBody(row.richContent, row.text || "Comment", ROW_IMAGE_WIDTH);
190
+ // `forum.commentCta` is the app's one "Comment": the pack forwards that single key to this screen (see the prefixes).
191
+ const { bodyJson, bodyText } = richBody(row.richContent, row.text || copyParam("forum.commentCta", "Comment"), ROW_IMAGE_WIDTH);
191
192
  return {
192
193
  id: row.id,
193
- authorName: row.authorName || "Member",
194
+ authorName: row.authorName || copyParam("blogPost.memberFallback", "Member"),
194
195
  text: bodyText,
195
196
  meta: commentMeta(row),
196
197
  bodyJson,
@@ -6,7 +6,7 @@ import { comments, BLOG_COMMENTS_APP_ID, blogCommentRow, listBlogComments, type
6
6
  import { get, type DbEntity } from "@himalaya/local-db";
7
7
  import { isSavedId, toggleSavedId } from "../_shared/himi-blog-saved";
8
8
  import { hideId, isHiddenId, unhideId } from "../_shared/himi-blog-hidden";
9
- import { stashCopy, copyParam, copyTemplate } from "../_shared/himi-copy.js";
9
+ import { stashCopy, copyParam, copyPlural, copyTemplate } from "../_shared/himi-copy.js";
10
10
  import { formatDateMedium, formatMonthDay } from "../_shared/engine-intl.js";
11
11
  import { openRichLink } from "../_shared/rich-content-link.js";
12
12
  import { richBody, ROW_IMAGE_WIDTH } from "../_shared/rich-body.js";
@@ -119,8 +119,8 @@ function countsLineOf(post: PostWithExtras): string {
119
119
  const likes = post.metrics?.likeCount ?? post.metrics?.likes ?? 0;
120
120
  const comments = post.metrics?.totalComments ?? post.metrics?.commentCount ?? post.metrics?.comments ?? 0;
121
121
  const bits: string[] = [];
122
- if (likes > 0) bits.push(`${likes} ${likes === 1 ? "like" : "likes"}`);
123
- if (comments > 0) bits.push(`${comments} ${comments === 1 ? "comment" : "comments"}`);
122
+ if (likes > 0) bits.push(copyPlural("blogPost.likesCount", "{n, plural, one {# like} other {# likes}}", likes));
123
+ if (comments > 0) bits.push(copyPlural("blogPost.commentsCount", "{n, plural, one {# comment} other {# comments}}", comments));
124
124
  return bits.join(" · ");
125
125
  }
126
126
 
@@ -172,7 +172,7 @@ function subtitle(post: WixPost): string {
172
172
  if (post.firstPublishedDate) {
173
173
  bits.push(formatDateMedium(new Date(post.firstPublishedDate)));
174
174
  }
175
- if (post.minutesToRead) bits.push(`${post.minutesToRead} min read`);
175
+ if (post.minutesToRead) bits.push(copyPlural("blogPost.minRead", "{n, plural, one {# min read} other {# min read}}", post.minutesToRead));
176
176
  return bits.join(" · ");
177
177
  }
178
178
 
@@ -187,10 +187,11 @@ function commentMeta(row: WixBlogCommentRow): string {
187
187
 
188
188
  function toCommentRow(row: WixBlogCommentRow): CommentRow {
189
189
  // The plain text is the document's own (runs joined as written, not space-separated) when it has one.
190
- const { bodyJson, bodyText } = richBody(row.richContent, row.text || "Comment", ROW_IMAGE_WIDTH);
190
+ // `forum.commentCta` is the app's one "Comment": the pack forwards that single key to this screen (see the prefixes).
191
+ const { bodyJson, bodyText } = richBody(row.richContent, row.text || copyParam("forum.commentCta", "Comment"), ROW_IMAGE_WIDTH);
191
192
  return {
192
193
  id: row.id,
193
- authorName: row.authorName || "Member",
194
+ authorName: row.authorName || copyParam("blogPost.memberFallback", "Member"),
194
195
  text: bodyText,
195
196
  meta: commentMeta(row),
196
197
  bodyJson,
@@ -6,7 +6,7 @@ import { comments, BLOG_COMMENTS_APP_ID, blogCommentRow, listBlogComments, type
6
6
  import { get, type DbEntity } from "@himalaya/local-db";
7
7
  import { isSavedId, toggleSavedId } from "../_shared/himi-blog-saved";
8
8
  import { hideId, isHiddenId, unhideId } from "../_shared/himi-blog-hidden";
9
- import { stashCopy, copyParam, copyTemplate } from "../_shared/himi-copy.js";
9
+ import { stashCopy, copyParam, copyPlural, copyTemplate } from "../_shared/himi-copy.js";
10
10
  import { formatDateMedium, formatMonthDay } from "../_shared/engine-intl.js";
11
11
  import { openRichLink } from "../_shared/rich-content-link.js";
12
12
  import { richBody, ROW_IMAGE_WIDTH } from "../_shared/rich-body.js";
@@ -119,8 +119,8 @@ function countsLineOf(post: PostWithExtras): string {
119
119
  const likes = post.metrics?.likeCount ?? post.metrics?.likes ?? 0;
120
120
  const comments = post.metrics?.totalComments ?? post.metrics?.commentCount ?? post.metrics?.comments ?? 0;
121
121
  const bits: string[] = [];
122
- if (likes > 0) bits.push(`${likes} ${likes === 1 ? "like" : "likes"}`);
123
- if (comments > 0) bits.push(`${comments} ${comments === 1 ? "comment" : "comments"}`);
122
+ if (likes > 0) bits.push(copyPlural("blogPost.likesCount", "{n, plural, one {# like} other {# likes}}", likes));
123
+ if (comments > 0) bits.push(copyPlural("blogPost.commentsCount", "{n, plural, one {# comment} other {# comments}}", comments));
124
124
  return bits.join(" · ");
125
125
  }
126
126
 
@@ -172,7 +172,7 @@ function subtitle(post: WixPost): string {
172
172
  if (post.firstPublishedDate) {
173
173
  bits.push(formatDateMedium(new Date(post.firstPublishedDate)));
174
174
  }
175
- if (post.minutesToRead) bits.push(`${post.minutesToRead} min read`);
175
+ if (post.minutesToRead) bits.push(copyPlural("blogPost.minRead", "{n, plural, one {# min read} other {# min read}}", post.minutesToRead));
176
176
  return bits.join(" · ");
177
177
  }
178
178
 
@@ -187,10 +187,11 @@ function commentMeta(row: WixBlogCommentRow): string {
187
187
 
188
188
  function toCommentRow(row: WixBlogCommentRow): CommentRow {
189
189
  // The plain text is the document's own (runs joined as written, not space-separated) when it has one.
190
- const { bodyJson, bodyText } = richBody(row.richContent, row.text || "Comment", ROW_IMAGE_WIDTH);
190
+ // `forum.commentCta` is the app's one "Comment": the pack forwards that single key to this screen (see the prefixes).
191
+ const { bodyJson, bodyText } = richBody(row.richContent, row.text || copyParam("forum.commentCta", "Comment"), ROW_IMAGE_WIDTH);
191
192
  return {
192
193
  id: row.id,
193
- authorName: row.authorName || "Member",
194
+ authorName: row.authorName || copyParam("blogPost.memberFallback", "Member"),
194
195
  text: bodyText,
195
196
  meta: commentMeta(row),
196
197
  bodyJson,
@@ -6,7 +6,7 @@ import { comments, BLOG_COMMENTS_APP_ID, blogCommentRow, listBlogComments, type
6
6
  import { get, type DbEntity } from "@himalaya/local-db";
7
7
  import { isSavedId, toggleSavedId } from "../_shared/himi-blog-saved";
8
8
  import { hideId, isHiddenId, unhideId } from "../_shared/himi-blog-hidden";
9
- import { stashCopy, copyParam, copyTemplate } from "../_shared/himi-copy.js";
9
+ import { stashCopy, copyParam, copyPlural, copyTemplate } from "../_shared/himi-copy.js";
10
10
  import { formatDateMedium, formatMonthDay } from "../_shared/engine-intl.js";
11
11
  import { openRichLink } from "../_shared/rich-content-link.js";
12
12
  import { richBody, ROW_IMAGE_WIDTH } from "../_shared/rich-body.js";
@@ -119,8 +119,8 @@ function countsLineOf(post: PostWithExtras): string {
119
119
  const likes = post.metrics?.likeCount ?? post.metrics?.likes ?? 0;
120
120
  const comments = post.metrics?.totalComments ?? post.metrics?.commentCount ?? post.metrics?.comments ?? 0;
121
121
  const bits: string[] = [];
122
- if (likes > 0) bits.push(`${likes} ${likes === 1 ? "like" : "likes"}`);
123
- if (comments > 0) bits.push(`${comments} ${comments === 1 ? "comment" : "comments"}`);
122
+ if (likes > 0) bits.push(copyPlural("blogPost.likesCount", "{n, plural, one {# like} other {# likes}}", likes));
123
+ if (comments > 0) bits.push(copyPlural("blogPost.commentsCount", "{n, plural, one {# comment} other {# comments}}", comments));
124
124
  return bits.join(" · ");
125
125
  }
126
126
 
@@ -172,7 +172,7 @@ function subtitle(post: WixPost): string {
172
172
  if (post.firstPublishedDate) {
173
173
  bits.push(formatDateMedium(new Date(post.firstPublishedDate)));
174
174
  }
175
- if (post.minutesToRead) bits.push(`${post.minutesToRead} min read`);
175
+ if (post.minutesToRead) bits.push(copyPlural("blogPost.minRead", "{n, plural, one {# min read} other {# min read}}", post.minutesToRead));
176
176
  return bits.join(" · ");
177
177
  }
178
178
 
@@ -187,10 +187,11 @@ function commentMeta(row: WixBlogCommentRow): string {
187
187
 
188
188
  function toCommentRow(row: WixBlogCommentRow): CommentRow {
189
189
  // The plain text is the document's own (runs joined as written, not space-separated) when it has one.
190
- const { bodyJson, bodyText } = richBody(row.richContent, row.text || "Comment", ROW_IMAGE_WIDTH);
190
+ // `forum.commentCta` is the app's one "Comment": the pack forwards that single key to this screen (see the prefixes).
191
+ const { bodyJson, bodyText } = richBody(row.richContent, row.text || copyParam("forum.commentCta", "Comment"), ROW_IMAGE_WIDTH);
191
192
  return {
192
193
  id: row.id,
193
- authorName: row.authorName || "Member",
194
+ authorName: row.authorName || copyParam("blogPost.memberFallback", "Member"),
194
195
  text: bodyText,
195
196
  meta: commentMeta(row),
196
197
  bodyJson,
@@ -6,7 +6,7 @@ import { comments, BLOG_COMMENTS_APP_ID, blogCommentRow, listBlogComments, type
6
6
  import { get, type DbEntity } from "@himalaya/local-db";
7
7
  import { isSavedId, toggleSavedId } from "../_shared/himi-blog-saved";
8
8
  import { hideId, isHiddenId, unhideId } from "../_shared/himi-blog-hidden";
9
- import { stashCopy, copyParam, copyTemplate } from "../_shared/himi-copy.js";
9
+ import { stashCopy, copyParam, copyPlural, copyTemplate } from "../_shared/himi-copy.js";
10
10
  import { formatDateMedium, formatMonthDay } from "../_shared/engine-intl.js";
11
11
  import { openRichLink } from "../_shared/rich-content-link.js";
12
12
  import { richBody, ROW_IMAGE_WIDTH } from "../_shared/rich-body.js";
@@ -119,8 +119,8 @@ function countsLineOf(post: PostWithExtras): string {
119
119
  const likes = post.metrics?.likeCount ?? post.metrics?.likes ?? 0;
120
120
  const comments = post.metrics?.totalComments ?? post.metrics?.commentCount ?? post.metrics?.comments ?? 0;
121
121
  const bits: string[] = [];
122
- if (likes > 0) bits.push(`${likes} ${likes === 1 ? "like" : "likes"}`);
123
- if (comments > 0) bits.push(`${comments} ${comments === 1 ? "comment" : "comments"}`);
122
+ if (likes > 0) bits.push(copyPlural("blogPost.likesCount", "{n, plural, one {# like} other {# likes}}", likes));
123
+ if (comments > 0) bits.push(copyPlural("blogPost.commentsCount", "{n, plural, one {# comment} other {# comments}}", comments));
124
124
  return bits.join(" · ");
125
125
  }
126
126
 
@@ -172,7 +172,7 @@ function subtitle(post: WixPost): string {
172
172
  if (post.firstPublishedDate) {
173
173
  bits.push(formatDateMedium(new Date(post.firstPublishedDate)));
174
174
  }
175
- if (post.minutesToRead) bits.push(`${post.minutesToRead} min read`);
175
+ if (post.minutesToRead) bits.push(copyPlural("blogPost.minRead", "{n, plural, one {# min read} other {# min read}}", post.minutesToRead));
176
176
  return bits.join(" · ");
177
177
  }
178
178
 
@@ -187,10 +187,11 @@ function commentMeta(row: WixBlogCommentRow): string {
187
187
 
188
188
  function toCommentRow(row: WixBlogCommentRow): CommentRow {
189
189
  // The plain text is the document's own (runs joined as written, not space-separated) when it has one.
190
- const { bodyJson, bodyText } = richBody(row.richContent, row.text || "Comment", ROW_IMAGE_WIDTH);
190
+ // `forum.commentCta` is the app's one "Comment": the pack forwards that single key to this screen (see the prefixes).
191
+ const { bodyJson, bodyText } = richBody(row.richContent, row.text || copyParam("forum.commentCta", "Comment"), ROW_IMAGE_WIDTH);
191
192
  return {
192
193
  id: row.id,
193
- authorName: row.authorName || "Member",
194
+ authorName: row.authorName || copyParam("blogPost.memberFallback", "Member"),
194
195
  text: bodyText,
195
196
  meta: commentMeta(row),
196
197
  bodyJson,
@@ -6,7 +6,7 @@ import { comments, BLOG_COMMENTS_APP_ID, blogCommentRow, listBlogComments, type
6
6
  import { get, type DbEntity } from "@himalaya/local-db";
7
7
  import { isSavedId, toggleSavedId } from "../_shared/himi-blog-saved";
8
8
  import { hideId, isHiddenId, unhideId } from "../_shared/himi-blog-hidden";
9
- import { stashCopy, copyParam, copyTemplate } from "../_shared/himi-copy.js";
9
+ import { stashCopy, copyParam, copyPlural, copyTemplate } from "../_shared/himi-copy.js";
10
10
  import { formatDateMedium, formatMonthDay } from "../_shared/engine-intl.js";
11
11
  import { openRichLink } from "../_shared/rich-content-link.js";
12
12
  import { richBody, ROW_IMAGE_WIDTH } from "../_shared/rich-body.js";
@@ -119,8 +119,8 @@ function countsLineOf(post: PostWithExtras): string {
119
119
  const likes = post.metrics?.likeCount ?? post.metrics?.likes ?? 0;
120
120
  const comments = post.metrics?.totalComments ?? post.metrics?.commentCount ?? post.metrics?.comments ?? 0;
121
121
  const bits: string[] = [];
122
- if (likes > 0) bits.push(`${likes} ${likes === 1 ? "like" : "likes"}`);
123
- if (comments > 0) bits.push(`${comments} ${comments === 1 ? "comment" : "comments"}`);
122
+ if (likes > 0) bits.push(copyPlural("blogPost.likesCount", "{n, plural, one {# like} other {# likes}}", likes));
123
+ if (comments > 0) bits.push(copyPlural("blogPost.commentsCount", "{n, plural, one {# comment} other {# comments}}", comments));
124
124
  return bits.join(" · ");
125
125
  }
126
126
 
@@ -172,7 +172,7 @@ function subtitle(post: WixPost): string {
172
172
  if (post.firstPublishedDate) {
173
173
  bits.push(formatDateMedium(new Date(post.firstPublishedDate)));
174
174
  }
175
- if (post.minutesToRead) bits.push(`${post.minutesToRead} min read`);
175
+ if (post.minutesToRead) bits.push(copyPlural("blogPost.minRead", "{n, plural, one {# min read} other {# min read}}", post.minutesToRead));
176
176
  return bits.join(" · ");
177
177
  }
178
178
 
@@ -187,10 +187,11 @@ function commentMeta(row: WixBlogCommentRow): string {
187
187
 
188
188
  function toCommentRow(row: WixBlogCommentRow): CommentRow {
189
189
  // The plain text is the document's own (runs joined as written, not space-separated) when it has one.
190
- const { bodyJson, bodyText } = richBody(row.richContent, row.text || "Comment", ROW_IMAGE_WIDTH);
190
+ // `forum.commentCta` is the app's one "Comment": the pack forwards that single key to this screen (see the prefixes).
191
+ const { bodyJson, bodyText } = richBody(row.richContent, row.text || copyParam("forum.commentCta", "Comment"), ROW_IMAGE_WIDTH);
191
192
  return {
192
193
  id: row.id,
193
- authorName: row.authorName || "Member",
194
+ authorName: row.authorName || copyParam("blogPost.memberFallback", "Member"),
194
195
  text: bodyText,
195
196
  meta: commentMeta(row),
196
197
  bodyJson,
@@ -6,7 +6,7 @@ import { comments, BLOG_COMMENTS_APP_ID, blogCommentRow, listBlogComments, type
6
6
  import { get, type DbEntity } from "@himalaya/local-db";
7
7
  import { isSavedId, toggleSavedId } from "../_shared/himi-blog-saved";
8
8
  import { hideId, isHiddenId, unhideId } from "../_shared/himi-blog-hidden";
9
- import { stashCopy, copyParam, copyTemplate } from "../_shared/himi-copy.js";
9
+ import { stashCopy, copyParam, copyPlural, copyTemplate } from "../_shared/himi-copy.js";
10
10
  import { formatDateMedium, formatMonthDay } from "../_shared/engine-intl.js";
11
11
  import { openRichLink } from "../_shared/rich-content-link.js";
12
12
  import { richBody, ROW_IMAGE_WIDTH } from "../_shared/rich-body.js";
@@ -119,8 +119,8 @@ function countsLineOf(post: PostWithExtras): string {
119
119
  const likes = post.metrics?.likeCount ?? post.metrics?.likes ?? 0;
120
120
  const comments = post.metrics?.totalComments ?? post.metrics?.commentCount ?? post.metrics?.comments ?? 0;
121
121
  const bits: string[] = [];
122
- if (likes > 0) bits.push(`${likes} ${likes === 1 ? "like" : "likes"}`);
123
- if (comments > 0) bits.push(`${comments} ${comments === 1 ? "comment" : "comments"}`);
122
+ if (likes > 0) bits.push(copyPlural("blogPost.likesCount", "{n, plural, one {# like} other {# likes}}", likes));
123
+ if (comments > 0) bits.push(copyPlural("blogPost.commentsCount", "{n, plural, one {# comment} other {# comments}}", comments));
124
124
  return bits.join(" · ");
125
125
  }
126
126
 
@@ -172,7 +172,7 @@ function subtitle(post: WixPost): string {
172
172
  if (post.firstPublishedDate) {
173
173
  bits.push(formatDateMedium(new Date(post.firstPublishedDate)));
174
174
  }
175
- if (post.minutesToRead) bits.push(`${post.minutesToRead} min read`);
175
+ if (post.minutesToRead) bits.push(copyPlural("blogPost.minRead", "{n, plural, one {# min read} other {# min read}}", post.minutesToRead));
176
176
  return bits.join(" · ");
177
177
  }
178
178
 
@@ -187,10 +187,11 @@ function commentMeta(row: WixBlogCommentRow): string {
187
187
 
188
188
  function toCommentRow(row: WixBlogCommentRow): CommentRow {
189
189
  // The plain text is the document's own (runs joined as written, not space-separated) when it has one.
190
- const { bodyJson, bodyText } = richBody(row.richContent, row.text || "Comment", ROW_IMAGE_WIDTH);
190
+ // `forum.commentCta` is the app's one "Comment": the pack forwards that single key to this screen (see the prefixes).
191
+ const { bodyJson, bodyText } = richBody(row.richContent, row.text || copyParam("forum.commentCta", "Comment"), ROW_IMAGE_WIDTH);
191
192
  return {
192
193
  id: row.id,
193
- authorName: row.authorName || "Member",
194
+ authorName: row.authorName || copyParam("blogPost.memberFallback", "Member"),
194
195
  text: bodyText,
195
196
  meta: commentMeta(row),
196
197
  bodyJson,