1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
|
import { getLocales } from "expo-localization";
const en = {
home: "Home",
alerts: "Alerts",
controls: "Controls",
settings: "Settings",
allClear: "All clear",
attentionNeeded: "Attention needed",
captchaError: "Captcha verification failed. Please try again.",
today: "Today",
review: "Review",
nothingNeedsAttention: "Nothing needs attention.",
fewItemsNeedReview: "A few items need review.",
deviceIsOnline: "Device is online",
deviceIsOffline: "Device is offline",
protectionActive: "Protection active.",
reconnectingAutomatically: "Reconnecting automatically.",
recentAlerts: "Recent alerts",
last24Hours: "Last 24 hours",
thisWeek: "This week",
needsAction: "needs action",
reviewed: "reviewed",
// Onboarding & Auth
welcomeTitle: "Welcome to Buddy",
welcomeSubtitle: "Keep your family safe online with smart parental controls.",
getStarted: "Get Started",
signIn: "Sign In",
signUp: "Sign Up",
email: "Email",
password: "Password",
confirmPassword: "Confirm Password",
emailPlaceholder: "Enter your email",
passwordPlaceholder: "Enter your password",
confirmPasswordPlaceholder: "Confirm your password",
createAccount: "Create Account",
alreadyHaveAccount: "Already have an account?",
dontHaveAccount: "Don't have an account?",
forgotPassword: "Forgot password?",
resetPassword: "Reset Password",
resetPasswordHelp: "Request a reset link or enter a token to set a new password.",
sendResetLink: "Send reset link",
resetPasswordToken: "Reset token",
resetPasswordTokenPlaceholder: "Paste your reset token",
newPassword: "New Password",
newPasswordPlaceholder: "Enter your new password",
confirmNewPassword: "Confirm New Password",
switchToResetWithToken: "I have a reset token",
switchToRequestReset: "I need a reset link",
passwordResetEmailSent:
"If that email exists, a reset link has been sent.",
passwordResetSuccess: "Your password has been reset. You can sign in now.",
resetTokenRequired: "Reset token is required",
resetPasswordError: "Unable to reset password. Please try again.",
backToSignIn: "Back to Sign In",
invalidEmail: "Please enter a valid email",
passwordRequired: "Password is required",
passwordTooShort: "Password must be at least 8 characters",
passwordsDoNotMatch: "Passwords do not match",
signInError: "Unable to sign in. Please check your credentials.",
signUpError: "Unable to create account. Please try again.",
continueWithGoogle: "Continue with Google",
googleAuthUnifiedHint:
"Google will sign you in or create your Buddy account automatically.",
googleSignInError: "Google sign in failed. Please try again.",
googleMissingIdToken:
"Google sign in did not return an ID token. Please try again.",
googleConfigMissing: "Google sign in is not configured yet. Contact support.",
loadingAlerts: "Loading alerts...",
allClearTitle: "All clear!",
noAlertsToReview: "No alerts to review right now.",
reviewPill: "Review",
fyiPill: "FYI",
whatHappened: "What happened",
whyItMatters: "Why it matters",
suggestedNextStep: "Suggested next step",
noDeviceSelected: "No device selected. Please link a device first.",
disableBuddy: "Disable Buddy",
temporarilyDisablesBuddy: "Temporarily disables Buddy.",
contentBlocking: "Content blocking",
adultSites: "Adult sites",
blockAdultWebsites: "Block adult websites.",
familyLink: "Family Link",
antiCircumvention: "Anti-Circumvention",
preventFamilyLinkBypasses:
"Measures that prevent certain Family Link bypasses.",
communication: "Communication",
communicationWithStrangers: "Communication with strangers",
blockAllCommunications: "Block all communications",
scanCommunicationsWithAI: "Scan communications with AI",
chooseHowBuddyShouldHandleStrangers:
"Choose how Buddy should handle strangers.",
communicationWithStrangersTitle: "Communication with strangers",
blockAllCommunicationsConfirm:
"This will notify of all comms with strangers.",
okay: "Okay",
cancel: "Cancel",
notifications: "Notifications",
dangerousMessages: "Dangerous messages",
newContactAdded: "New contact added",
galleryScanning: "Gallery scanning",
scanGalleryForInappropriateImages: "Scan gallery for inappropriate images.",
galleryScanningTitle: "Gallery scanning",
galleryScanningNone: "Do nothing",
galleryScanningNotify: "Notify me",
galleryScanningDelete: "Delete detected images",
devices: "Devices",
device: "device",
devicesPlural: "devices",
lastSeen: "Last seen",
online: "Online",
offline: "Offline",
transparency: "Transparency",
privacyAndTerms: "Privacy & terms",
legalAndPrivacyInfo: "Legal and privacy info.",
account: "Account",
verifyEmail: "Verify E-Mail",
verifyYourEmailAddress: "Verify your email address.",
signOut: "Sign Out",
notWiredYet: "Not wired yet",
hookThisUpLater: "Hook this up later.",
renameDevice: "Rename Device",
enterNewNameFor: "Enter a new name for",
verifyEmailTitle: "Verify Email",
enterVerificationCode: "Enter the verification code sent to your email:",
success: "Success",
error: "Error",
emailVerifiedSuccessfully: "Email verified successfully!",
failedToVerifyEmail: "Failed to verify email",
newContactAddedTitle: "New Contact Added",
newContactAddedSubtitle: "A new contact was added to a device",
contactName: "Contact Name",
unknown: "Unknown",
phoneNumber: "Phone Number",
emailAddress: "Email Address",
identifier: "Identifier",
notProvided: "Not provided",
unknownDevice: "Unknown Device",
contactAddedInfo:
"This contact was added to {deviceName}. You can review it in the device's contact list.",
backToHome: "Back to Home",
noDeviceSelectedPleaseLinkFirst:
"No device selected. Please link a device first.",
};
const hr: typeof en = {
home: "Početna",
alerts: "Upozorenja",
controls: "Kontrole",
settings: "Postavke",
allClear: "Sve je u redu",
attentionNeeded: "Potrebna pažnja",
captchaError: "Neuspjela provjera Captcha. Pokušajte ponovno.",
today: "Danas",
review: "Pregled",
nothingNeedsAttention: "Ništa ne zahtijeva pažnju.",
fewItemsNeedReview: "Nekoliko stavki treba pregled.",
deviceIsOnline: "Uređaj je na mreži",
deviceIsOffline: "Uređaj je izvan mreže",
protectionActive: "Zaštita je aktivna.",
reconnectingAutomatically: "Automatsko ponovno povezivanje.",
recentAlerts: "Nedavna upozorenja",
last24Hours: "Zadnja 24 sata",
thisWeek: "Ovaj tjedan",
needsAction: "zahtijeva radnju",
reviewed: "pregledano",
// Onboarding & Auth
welcomeTitle: "Dobrodošli u Buddy",
welcomeSubtitle:
"Zaštitite svoju obitelj na internetu uz pametne roditeljske kontrole.",
getStarted: "Započni",
signIn: "Prijava",
signUp: "Registracija",
email: "E-mail",
password: "Lozinka",
confirmPassword: "Potvrdite lozinku",
emailPlaceholder: "Unesite svoj e-mail",
passwordPlaceholder: "Unesite svoju lozinku",
confirmPasswordPlaceholder: "Potvrdite svoju lozinku",
createAccount: "Izradi račun",
alreadyHaveAccount: "Već imate račun?",
dontHaveAccount: "Nemate račun?",
forgotPassword: "Zaboravljena lozinka?",
resetPassword: "Resetiraj lozinku",
resetPasswordHelp:
"Zatražite poveznicu za resetiranje ili unesite token za novu lozinku.",
sendResetLink: "Pošalji poveznicu za resetiranje",
resetPasswordToken: "Token za resetiranje",
resetPasswordTokenPlaceholder: "Zalijepite token za resetiranje",
newPassword: "Nova lozinka",
newPasswordPlaceholder: "Unesite novu lozinku",
confirmNewPassword: "Potvrdite novu lozinku",
switchToResetWithToken: "Imam token za resetiranje",
switchToRequestReset: "Trebam poveznicu za resetiranje",
passwordResetEmailSent:
"Ako taj e-mail postoji, poveznica za resetiranje je poslana.",
passwordResetSuccess:
"Lozinka je uspješno resetirana. Sada se možete prijaviti.",
resetTokenRequired: "Token za resetiranje je obavezan",
resetPasswordError: "Resetiranje lozinke nije uspjelo. Pokušajte ponovno.",
backToSignIn: "Natrag na prijavu",
invalidEmail: "Unesite valjanu e-mail adresu",
passwordRequired: "Lozinka je obavezna",
passwordTooShort: "Lozinka mora imati najmanje 8 znakova",
passwordsDoNotMatch: "Lozinke se ne podudaraju",
signInError: "Prijava nije uspjela. Provjerite podatke.",
signUpError: "Registracija nije uspjela. Pokušajte ponovno.",
continueWithGoogle: "Nastavi s Google računom",
googleAuthUnifiedHint:
"Google će vas prijaviti ili automatski izraditi Buddy račun.",
googleSignInError: "Google prijava nije uspjela. Pokušajte ponovno.",
googleMissingIdToken:
"Google prijava nije vratila ID token. Pokušajte ponovno.",
googleConfigMissing:
"Google prijava još nije konfigurirana. Kontaktirajte podršku.",
loadingAlerts: "Učitavanje upozorenja...",
allClearTitle: "Sve je u redu!",
noAlertsToReview: "Trenutno nema upozorenja za pregled.",
reviewPill: "Pregled",
fyiPill: "Informacija",
whatHappened: "Što se dogodilo",
whyItMatters: "Zašto je važno",
suggestedNextStep: "Predloženi sljedeći korak",
noDeviceSelected: "Nije odabran uređaj. Najprije povežite uređaj.",
disableBuddy: "Onemogući Buddy",
temporarilyDisablesBuddy: "Privremeno onemogućuje Buddy.",
contentBlocking: "Blokiranje sadržaja",
adultSites: "Stranice za odrasle",
blockAdultWebsites: "Blokiraj web-stranice za odrasle.",
familyLink: "Family Link",
antiCircumvention: "Protiv zaobilaženja",
preventFamilyLinkBypasses:
"Mjere koje sprječavaju određene zaobilaske Family Linka.",
communication: "Komunikacija",
communicationWithStrangers: "Komunikacija sa strancima",
blockAllCommunications: "Blokiraj sve komunikacije",
scanCommunicationsWithAI: "Skeniraj komunikacije pomoću AI",
chooseHowBuddyShouldHandleStrangers:
"Odaberite kako Buddy treba postupati sa strancima.",
communicationWithStrangersTitle: "Komunikacija sa strancima",
blockAllCommunicationsConfirm:
"Ovo će obavještavati o svim komunikacijama sa strancima.",
okay: "U redu",
cancel: "Odustani",
notifications: "Obavijesti",
dangerousMessages: "Opasne poruke",
newContactAdded: "Dodan novi kontakt",
galleryScanning: "Skeniranje galerije",
scanGalleryForInappropriateImages: "Skeniraj galeriju za neprimjerene slike.",
galleryScanningTitle: "Skeniranje galerije",
galleryScanningNone: "Ne poduzimaj ništa",
galleryScanningNotify: "Obavijesti me",
galleryScanningDelete: "Izbriši otkrivene slike",
devices: "Uređaji",
device: "uređaj",
devicesPlural: "uređaji",
lastSeen: "Zadnje viđeno",
online: "Na mreži",
offline: "Izvan mreže",
transparency: "Transparentnost",
privacyAndTerms: "Privatnost i uvjeti",
legalAndPrivacyInfo: "Pravne i privatnosne informacije.",
account: "Račun",
verifyEmail: "Potvrdi e-mail",
verifyYourEmailAddress: "Potvrdite svoju e-mail adresu.",
signOut: "Odjava",
notWiredYet: "Još nije povezano",
hookThisUpLater: "Povežite ovo kasnije.",
renameDevice: "Preimenuj uređaj",
enterNewNameFor: "Unesite novo ime za",
verifyEmailTitle: "Potvrdite e-mail",
enterVerificationCode: "Unesite verifikacijski kod poslan na vaš e-mail:",
success: "Uspjeh",
error: "Greška",
emailVerifiedSuccessfully: "E-mail je uspješno potvrđen!",
failedToVerifyEmail: "Neuspjela potvrda e-maila",
newContactAddedTitle: "Dodan novi kontakt",
newContactAddedSubtitle: "Na uređaj je dodan novi kontakt",
contactName: "Ime kontakta",
unknown: "Nepoznato",
phoneNumber: "Telefonski broj",
emailAddress: "E-mail adresa",
identifier: "Identifikator",
notProvided: "Nije navedeno",
unknownDevice: "Nepoznati uređaj",
contactAddedInfo:
"Ovaj kontakt je dodan na {deviceName}. Možete ga pregledati na popisu kontakata uređaja.",
backToHome: "Natrag na početnu",
noDeviceSelectedPleaseLinkFirst:
"Nije odabran uređaj. Najprije povežite uređaj.",
};
type Locale = "en" | "hr";
export const locales: Record<Locale, typeof en> = {
en,
hr,
} as const;
export type LocaleKey = keyof typeof en;
export const getCurrentLocale = (): Locale => {
const currentLocale = getLocales()[0]?.languageTag || "en";
return currentLocale.startsWith("hr") ? "hr" : "en";
};
export const t = (key: LocaleKey): string => {
const locale = getCurrentLocale();
return locales[locale][key] || locales.en[key] || key;
};
|