Skip to content

Commit 72f7c99

Browse files
committed
fix: add translations to root nav titles
- Add translations to hardcoded titles in RootNavigator.tsx - Bump iOS & Android build versions
1 parent 71439fe commit 72f7c99

File tree

6 files changed

+35
-13
lines changed

6 files changed

+35
-13
lines changed

android/app/build.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,8 +82,8 @@ android {
8282
applicationId "to.pubky.ring"
8383
minSdkVersion rootProject.ext.minSdkVersion
8484
targetSdkVersion rootProject.ext.targetSdkVersion
85-
versionCode 13
86-
versionName "1.8"
85+
versionCode 15
86+
versionName "1.10"
8787
}
8888

8989
signingConfigs {

ios/pubkyring.xcodeproj/project.pbxproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -283,7 +283,7 @@
283283
buildSettings = {
284284
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
285285
CLANG_ENABLE_MODULES = YES;
286-
CURRENT_PROJECT_VERSION = 5;
286+
CURRENT_PROJECT_VERSION = 7;
287287
DEVELOPMENT_TEAM = KYH47R284B;
288288
ENABLE_BITCODE = NO;
289289
INFOPLIST_FILE = pubkyring/Info.plist;
@@ -314,7 +314,7 @@
314314
buildSettings = {
315315
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
316316
CLANG_ENABLE_MODULES = YES;
317-
CURRENT_PROJECT_VERSION = 5;
317+
CURRENT_PROJECT_VERSION = 7;
318318
DEVELOPMENT_TEAM = KYH47R284B;
319319
INFOPLIST_FILE = pubkyring/Info.plist;
320320
INFOPLIST_KEY_CFBundleDisplayName = "Pubky Ring";

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "pubkyring",
3-
"version": "0.0.24",
3+
"version": "0.0.25",
44
"private": false,
55
"scripts": {
66
"android": "react-native run-android",

src/i18n/locales/en.json

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -266,5 +266,15 @@
266266
},
267267
"pubkyProfile": {
268268
"backupReminder": "backup!"
269+
},
270+
"screenTitles": {
271+
"termsOfUse": "Terms of Use",
272+
"onboarding": "Welcome",
273+
"confirmPubky": "Confirm pubky",
274+
"home": "Pubky Ring",
275+
"about": "About",
276+
"settings": "Settings",
277+
"pubkyDetail": "Pubky Details",
278+
"editPubky": "Edit Pubky"
269279
}
270280
}

src/i18n/locales/es.json

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -266,5 +266,15 @@
266266
},
267267
"pubkyProfile": {
268268
"backupReminder": "¡respaldo!"
269+
},
270+
"screenTitles": {
271+
"termsOfUse": "Condiciones de uso",
272+
"onboarding": "Bienvenido",
273+
"confirmPubky": "Confirmar pubky",
274+
"home": "Anillo Pubky",
275+
"about": "Acerca de",
276+
"settings": "Ajustes",
277+
"pubkyDetail": "Detalles del Pubky",
278+
"editPubky": "Editar Pubky"
269279
}
270280
}

src/navigation/RootNavigator.tsx

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,12 @@ import {
1717
import SettingsScreen from '../screens/SettingsScreen.tsx';
1818
import TermsOfUse from '../screens/TermsOfUse.tsx';
1919
import About from '../screens/About.tsx';
20+
import { useTranslation } from 'react-i18next';
2021

2122
const Stack = createNativeStackNavigator<RootStackParamList>();
2223

2324
const RootNavigator = (): ReactElement => {
25+
const { t } = useTranslation();
2426
const showOnboarding = useSelector(getShowOnboarding);
2527
const signedTermsOfUse = useSelector(getSignedTermsOfUse);
2628
const navigationAnimation = useSelector(getNavigationAnimation);
@@ -42,31 +44,31 @@ const RootNavigator = (): ReactElement => {
4244
name="TermsOfUse"
4345
component={TermsOfUse}
4446
options={{
45-
title: 'Terms of Use',
47+
title: t('screenTitles.termsOfUse'),
4648
gestureEnabled: false,
4749
}}
4850
/>
4951
<Stack.Screen
5052
name="Onboarding"
5153
component={OnboardingScreen}
5254
options={{
53-
title: 'Welcome',
55+
title: t('screenTitles.onboarding'),
5456
gestureEnabled: false,
5557
}}
5658
/>
5759
<Stack.Screen
5860
name="ConfirmPubky"
5961
component={ConfirmPubkyScreen}
6062
options={{
61-
title: 'Confirm pubky',
63+
title: t('screenTitles.confirmPubky'),
6264
gestureEnabled: false,
6365
}}
6466
/>
6567
<Stack.Screen
6668
name="Home"
6769
component={HomeScreen}
6870
options={{
69-
title: 'Pubky Ring',
71+
title: t('screenTitles.home'),
7072
gestureEnabled: false,
7173
headerBackVisible: false,
7274
}}
@@ -75,31 +77,31 @@ const RootNavigator = (): ReactElement => {
7577
name="About"
7678
component={About}
7779
options={{
78-
title: 'About',
80+
title: t('screenTitles.about'),
7981
gestureEnabled: true,
8082
}}
8183
/>
8284
<Stack.Screen
8385
name="Settings"
8486
component={SettingsScreen}
8587
options={{
86-
title: 'Settings',
88+
title: t('screenTitles.settings'),
8789
gestureEnabled: true,
8890
}}
8991
/>
9092
<Stack.Screen
9193
name="PubkyDetail"
9294
component={PubkyDetailScreen}
9395
options={{
94-
title: 'Pubky Details',
96+
title: t('screenTitles.pubkyDetail'),
9597
gestureEnabled: true,
9698
}}
9799
/>
98100
<Stack.Screen
99101
name="EditPubky"
100102
component={EditPubkyScreen}
101103
options={{
102-
title: 'Edit Pubky',
104+
title: t('screenTitles.editPubky'),
103105
gestureEnabled: true,
104106
}}
105107
/>

0 commit comments

Comments
 (0)