@umituz/react-native-settings 4.23.92 → 4.23.94

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": "@umituz/react-native-settings",
3
- "version": "4.23.92",
3
+ "version": "4.23.94",
4
4
  "description": "Complete settings hub for React Native apps - consolidated package with settings, localization, about, legal, appearance, feedback, FAQs, rating, and gamification",
5
5
  "main": "./src/index.ts",
6
6
  "types": "./src/index.ts",
@@ -12,6 +12,7 @@ import type { FAQCategory } from "../../domains/faqs";
12
12
  */
13
13
  export interface AppInfo {
14
14
  name: string;
15
+ appName?: string;
15
16
  version: string;
16
17
  description?: string;
17
18
  developer?: string;
@@ -5,7 +5,7 @@
5
5
  /**
6
6
  * Translation function type
7
7
  */
8
- export type TranslationFunction = (key: string) => string;
8
+ export type TranslationFunction = (key: string, options?: any) => string;
9
9
 
10
10
  /**
11
11
  * Feedback form data interface
@@ -17,14 +17,16 @@ export const translateFAQData = (
17
17
  ): FAQData | undefined => {
18
18
  if (!faqData) return undefined;
19
19
 
20
+ const interpolationValues = { appName: _appInfo.appName || _appInfo.name };
21
+
20
22
  return {
21
23
  categories: faqData.categories.map((category) => ({
22
24
  id: category.id,
23
- title: t(category.title),
25
+ title: t(category.title, interpolationValues),
24
26
  items: category.items.map((item) => ({
25
27
  id: item.id,
26
- question: t(item.question),
27
- answer: t(item.answer),
28
+ question: t(item.question, interpolationValues),
29
+ answer: t(item.answer, interpolationValues),
28
30
  })),
29
31
  })),
30
32
  };