Skip to content

Commit

Permalink
fix(boilerplate): migrate imports path to @/i18n (#2894 by @flexbox)
Browse files Browse the repository at this point in the history
  • Loading branch information
flexbox authored Jan 29, 2025
1 parent eb5ef66 commit ff7cef4
Show file tree
Hide file tree
Showing 15 changed files with 16 additions and 15 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ Nothing makes it into Ignite unless it's been proven on projects that Infinite R
| apisauce | REST client | v2 | Communicate with back-end |
| Reactotron RN | Inspector/Debugger | v3 | JS debugging |
| Hermes | JS engine | | Fine-tuned JS engine for RN |
| Jest | Test Runner | v26 | Standard test runner for JS apps |
| Jest | Test Runner | v29 | Standard test runner for JS apps |
| Maestro | Testing Framework | | Automate end-to-end UI testing |
| date-fns | Date library | v4 | Excellent date library |
| react-native-keyboard-controller | Keyboard library | v1 | Great keyboard manager library |
Expand Down
3 changes: 2 additions & 1 deletion boilerplate/app/components/EmptyState.tsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
import { Image, ImageProps, ImageStyle, StyleProp, TextStyle, View, ViewStyle } from "react-native"
import { translate } from "../i18n"

import { Button, ButtonProps } from "./Button"
import { Text, TextProps } from "./Text"
import { useAppTheme } from "@/utils/useAppTheme"
import type { ThemedStyle } from "@/theme"
import { translate } from "@/i18n/translate"

const sadFace = require("../../assets/images/sad-face.png")

Expand Down
2 changes: 1 addition & 1 deletion boilerplate/app/components/Header.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import {
View,
ViewStyle,
} from "react-native"
import { isRTL, translate } from "../i18n"
import { isRTL, translate } from "@/i18n"
import { $styles } from "../theme"
import { ExtendedEdge, useSafeAreaInsetsStyle } from "../utils/useSafeAreaInsetsStyle"
import { Icon, IconTypes } from "./Icon"
Expand Down
2 changes: 1 addition & 1 deletion boilerplate/app/components/Text.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { TOptions } from "i18next"
import { StyleProp, Text as RNText, TextProps as RNTextProps, TextStyle } from "react-native"
import { isRTL, translate, TxKeyPath } from "../i18n"
import { isRTL, translate, TxKeyPath } from "@/i18n"
import type { ThemedStyle, ThemedStyleArray } from "@/theme"
import { useAppTheme } from "@/utils/useAppTheme"
import { typography } from "@/theme/typography"
Expand Down
2 changes: 1 addition & 1 deletion boilerplate/app/components/TextField.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import {
View,
ViewStyle,
} from "react-native"
import { isRTL, translate } from "../i18n"
import { isRTL, translate } from "@/i18n"
import type { ThemedStyle, ThemedStyleArray } from "@/theme"
import { $styles } from "../theme"
import { Text, TextProps } from "./Text"
Expand Down
2 changes: 1 addition & 1 deletion boilerplate/app/models/Episode.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { Instance, SnapshotIn, SnapshotOut, types } from "mobx-state-tree"
import { withSetPropAction } from "./helpers/withSetPropAction"
import { formatDate } from "../utils/formatDate"
import { translate } from "../i18n"
import { translate } from "@/i18n"

interface Enclosure {
link: string
Expand Down
2 changes: 1 addition & 1 deletion boilerplate/app/navigators/DemoNavigator.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { CompositeScreenProps } from "@react-navigation/native"
import { TextStyle, ViewStyle } from "react-native"
import { useSafeAreaInsets } from "react-native-safe-area-context"
import { Icon } from "../components"
import { translate } from "../i18n"
import { translate } from "@/i18n"
import { DemoCommunityScreen, DemoShowroomScreen, DemoDebugScreen } from "../screens"
import { DemoPodcastListScreen } from "../screens/DemoPodcastListScreen"
import type { ThemedStyle } from "@/theme"
Expand Down
2 changes: 1 addition & 1 deletion boilerplate/app/screens/DemoCommunityScreen.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { ListItem, Screen, Text } from "../components"
import { DemoTabScreenProps } from "../navigators/DemoNavigator"
import { $styles } from "../theme"
import { openLinkInBrowser } from "../utils/openLinkInBrowser"
import { isRTL } from "../i18n"
import { isRTL } from "@/i18n"
import type { ThemedStyle } from "@/theme"
import { useAppTheme } from "@/utils/useAppTheme"

Expand Down
2 changes: 1 addition & 1 deletion boilerplate/app/screens/DemoDebugScreen.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import { Button, ListItem, Screen, Text } from "../components"
import { DemoTabScreenProps } from "../navigators/DemoNavigator"
import type { ThemedStyle } from "@/theme"
import { $styles } from "../theme"
import { isRTL } from "../i18n"
import { isRTL } from "@/i18n"
import { useStores } from "../models"
import { useAppTheme } from "@/utils/useAppTheme"

Expand Down
2 changes: 1 addition & 1 deletion boilerplate/app/screens/DemoPodcastListScreen.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ import {
Switch,
Text,
} from "@/components"
import { isRTL, translate } from "../i18n"
import { isRTL, translate } from "@/i18n"
import { useStores } from "../models"
import { Episode } from "../models/Episode"
import { DemoTabScreenProps } from "../navigators/DemoNavigator"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { Image, ImageStyle, Platform, SectionList, TextStyle, View, ViewStyle }
import { Drawer } from "react-native-drawer-layout"
import { type ContentStyle } from "@shopify/flash-list"
import { ListItem, ListView, ListViewRef, Screen, Text } from "../../components"
import { TxKeyPath, isRTL, translate } from "../../i18n"
import { TxKeyPath, isRTL, translate } from "@/i18n"
import { DemoTabParamList, DemoTabScreenProps } from "../../navigators/DemoNavigator"
import type { Theme, ThemedStyle } from "@/theme"
import { $styles } from "@/theme"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { Pressable, PressableProps, ViewStyle, Platform } from "react-native"
import Animated, { interpolate, interpolateColor, useAnimatedStyle } from "react-native-reanimated"
import { useDrawerProgress } from "react-native-drawer-layout"
import { isRTL } from "../../i18n"
import { isRTL } from "@/i18n"
import { useAppTheme } from "@/utils/useAppTheme"

interface DrawerIconButtonProps extends PressableProps {}
Expand Down
2 changes: 1 addition & 1 deletion boilerplate/app/screens/WelcomeScreen.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import {
Text,
Screen,
} from "@/components"
import { isRTL } from "../i18n"
import { isRTL } from "@/i18n"
import { useStores } from "../models" // @demo remove-current-line
import { AppStackScreenProps } from "../navigators"
import { $styles, type ThemedStyle } from "@/theme"
Expand Down
2 changes: 1 addition & 1 deletion src/tools/__snapshots__/markup.test.ts.snap
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ import { Image, ImageStyle, TextStyle, View, ViewStyle } from \\"react-native\\"
import {
Text,
} from \\"app/components\\"
import { isRTL } from \\"../i18n\\"
import { isRTL } from \\"@/i18n\\"
import { AppStackScreenProps } from \\"../navigators\\"
import type { ThemedStyle } from \\"app/theme\\"
import { useSafeAreaInsetsStyle } from \\"../utils/useSafeAreaInsetsStyle\\"
Expand Down
2 changes: 1 addition & 1 deletion src/tools/markup.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -334,7 +334,7 @@ import {
Button, // @demo remove-current-line
Text,
} from "app/components"
import { isRTL } from "../i18n"
import { isRTL } from "@/i18n"
import { useStores } from "../models" // @demo remove-current-line
import { AppStackScreenProps } from "../navigators"
import type { ThemedStyle } from "app/theme"
Expand Down

0 comments on commit ff7cef4

Please sign in to comment.