l-min-components 1.7.1542 → 1.7.1544

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "l-min-components",
3
- "version": "1.7.1542",
3
+ "version": "1.7.1544",
4
4
  "type": "module",
5
5
  "files": [
6
6
  "src/assets",
@@ -346,7 +346,7 @@ const useMessageKit = () => {
346
346
  const getMessageRoomsByCourses = async (
347
347
  nextPage,
348
348
  once = false,
349
- limit = 1000
349
+ limit = 100
350
350
  ) => {
351
351
  if (!selectedAccount) return;
352
352
  // selected account exists
@@ -119,19 +119,23 @@ const useTranslation = (initialSentences = []) => {
119
119
  /**
120
120
  * Extract relevant translations for specific texts
121
121
  */
122
- const extractRelevantTranslations = (masterTranslations, words, language) => {
122
+ const extractRelevantTranslations = (
123
+ // masterTranslations,
124
+ words,
125
+ language
126
+ ) => {
123
127
  const relevantTranslations = {};
124
128
  const languageCode = language.toUpperCase(); // ko -> KO, fr -> FR
125
129
 
126
130
  words.forEach((word) => {
127
- if (masterTranslations[word] && masterTranslations[word][languageCode]) {
128
- const translation = masterTranslations[word][languageCode];
129
- // Only use translation if it's not empty
130
- relevantTranslations[word] = translation.trim() || word;
131
- } else {
132
- // Return original text if translation not found
133
- relevantTranslations[word] = word;
134
- }
131
+ // if (masterTranslations[word] && masterTranslations[word][languageCode]) {
132
+ // const translation = masterTranslations[word][languageCode];
133
+ // // Only use translation if it's not empty
134
+ // relevantTranslations[word] = translation.trim() || word;
135
+ // } else {
136
+ // Return original text if translation not found
137
+ relevantTranslations[word] = word;
138
+ // }
135
139
  });
136
140
 
137
141
  return relevantTranslations;
@@ -145,14 +149,14 @@ const useTranslation = (initialSentences = []) => {
145
149
 
146
150
  try {
147
151
  // Step 1: Fire-and-forget translation request to backend
148
- sendTranslationRequestToBackend(language, words);
152
+ // sendTranslationRequestToBackend(language, words);
149
153
 
150
154
  // Step 2: Get master translations (cached or fresh from S3)
151
- const masterTranslations = await getMasterTranslationsWithCache();
155
+ // const masterTranslations = await getMasterTranslationsWithCache();
152
156
 
153
157
  // Step 3: Extract only the translations we need
154
158
  const relevantTranslations = extractRelevantTranslations(
155
- masterTranslations,
159
+ // masterTranslations,
156
160
  words,
157
161
  language
158
162
  );