Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions patches/@generaltranslation__icu@0.1.2.patch
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ diff --git a/dist/index.cjs b/dist/index.cjs
index 1d257228877aeab6a04ee143c0aad5a209d3e6a5..7e68214329cb18e59fab0580df35d04da0522b7d 100644
--- a/dist/index.cjs
+++ b/dist/index.cjs
@@ -750,11 +750,40 @@ const TIME_STYLES = {
@@ -750,11 +750,43 @@ const TIME_STYLES = {
long: LONG_TIME_STYLE,
full: LONG_TIME_STYLE
};
Expand Down Expand Up @@ -33,6 +33,9 @@ index 1d257228877aeab6a04ee143c0aad5a209d3e6a5..7e68214329cb18e59fab0580df35d04d
+}
function formatMessage(message, locales = "en", variables = {}) {
- const parts = formatElements(parse(message, { locale: resolveLocale(locales) }), {
+ if (typeof message === "string" && message.indexOf("{") === -1 && message.indexOf("}") === -1 && message.indexOf("'") === -1 && message.indexOf("<") === -1) {
+ return message;
+ }
+ const cache = localeCacheFor(locales);
+ const parts = formatElements(parseCached(cache, message), {
message,
Expand All @@ -49,7 +52,7 @@ diff --git a/dist/index.mjs b/dist/index.mjs
index a54f2235227290efe761215b30da542562b2e77f..db5bcf2592340e7e9e96d26f89e3437018cfcd0f 100644
--- a/dist/index.mjs
+++ b/dist/index.mjs
@@ -749,11 +749,40 @@ const TIME_STYLES = {
@@ -749,11 +749,43 @@ const TIME_STYLES = {
long: LONG_TIME_STYLE,
full: LONG_TIME_STYLE
};
Expand Down Expand Up @@ -80,6 +83,9 @@ index a54f2235227290efe761215b30da542562b2e77f..db5bcf2592340e7e9e96d26f89e34370
+}
function formatMessage(message, locales = "en", variables = {}) {
- const parts = formatElements(parse(message, { locale: resolveLocale(locales) }), {
+ if (typeof message === "string" && message.indexOf("{") === -1 && message.indexOf("}") === -1 && message.indexOf("'") === -1 && message.indexOf("<") === -1) {
+ return message;
+ }
+ const cache = localeCacheFor(locales);
+ const parts = formatElements(parseCached(cache, message), {
message,
Expand Down
10 changes: 5 additions & 5 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading