Commit Graph

590 Commits

Author SHA1 Message Date
9bb8d2f09a fix(i18n): use users namespace for admin label in service users table
The admin key lives in the users namespace, not common. Remove the type-unsafe tCommon call and its fallback string.

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-06-26 15:18:06 +00:00
083b5dbdbe i18n: replace string concatenations with message interpolation
Use ICU message placeholders for router removal, route/network deletion notifications and validation errors to support variable ordering in translations.

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-06-26 15:17:38 +00:00
fdcf641f29 i18n: localize posture checks table and action components
Convert hard-coded labels, tooltips, notifications and dialog text in posture-checks components to use the postureChecks namespace.

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-06-26 15:17:08 +00:00
b13b7de232 i18n: localize onboarding intent, completion and demo-call screens
Replace hard-coded English in OnboardingIntent, OnboardingEnd and OnboardingDemoCall with useTranslations calls, including rich-text demo-call variants.

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-06-26 15:16:39 +00:00
92dc5b26c6 i18n: add translation keys for onboarding, posture checks and routes
Add English and Chinese strings for onboarding demo-call variants, posture-check labels/actions, and route/network interpolation messages.

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-06-26 15:16:11 +00:00
1514a48f2b i18n: localize dashboard page metadata titles
Convert static metadata objects to async generateMetadata using getTranslations for six dashboard route groups.

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-06-26 15:15:42 +00:00
43a9649e15 i18n: add IntlMessages type augmentation for next-intl
Declare the global IntlMessages interface from the English message catalog so translation keys are type-checked.

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-06-26 15:15:14 +00:00
d9b9bb59ac i18n: remove unused navigation and routing modules
Remove dead i18n files (navigation.ts, routing.ts) and clean up the stale JSDoc link in config.ts.

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-06-26 15:14:45 +00:00
sakuradairong
7e4e2f0169 fix(i18n): resolve build/type errors, sync main, and address CodeRabbit items 2026-06-24 17:40:30 +08:00
sakuradairong
2ce9f9020d Merge remote-tracking branch 'origin/main' into localize-zh-v2.39.0 2026-06-24 17:21:54 +08:00
2bd2e03fd6 i18n: add untranslated English string baseline
- Extract 485 remaining hardcoded English UI strings across
  app, cloud, components, contexts, hooks, and modules
- Append them to a new 'untranslated' namespace in en.ts as baseline
- Mirror same English values in zh.ts as placeholders to maintain key alignment
- No Chinese translations added yet - to be translated in future pass
2026-06-24 08:57:02 +00:00
5eb928f6bb i18n: localize Routes, DNS, Networks, Access Control modules
- Routes: 12 files internationalized (98 keys), covering route table,
  modal, action cells, and route-group sub-module
- DNS: 14 files internationalized (158 keys), covering nameserver
  and DNS zone management
- Networks: 28 files internationalized (184+ keys), covering network
  resources, routing peers, and provider-level notifications
- Access Control: 7 files internationalized (112 keys), covering
  SSH settings, posture checks, port/protocol filters, and table
- Add natural Chinese translations with consistent terminology
2026-06-24 08:46:05 +00:00
3bb1a61c3f i18n: localize Peers, Activity, Setup Keys modules
- PeerActionCell.tsx: replace ~20 hardcoded strings with t() calls
  (approve, bypass compliance, session expiration, SSH, delete actions)
- Activity module: internationalize 5 files including ActivityDescription.tsx
  with ~104 activity event description templates using t.rich()
- Setup Keys: replace ~18 hardcoded strings in SetupKeyActionCell
  and SetupKeyGroupsCell with translation keys
- Add Chinese translations with natural grammar and consistent terminology
2026-06-24 07:44:15 +00:00
46d20e5877 i18n: localize remaining UI strings in users module
- Add namePlaceholder, emailPlaceholder, userActions keys to users namespace
- Add Chinese translations for the new keys
- Fix remaining hardcoded placeholders in UserInviteModal (John Doe, hello@netbird.io)
- Fix hardcoded placeholder in ServiceUserModal (use serviceUserNamePlaceholder)
- Fix hardcoded aria-label in UserActionCell (use t('userActions'))
2026-06-24 07:00:26 +00:00
a6f46b1a47 i18n: localize critical UI components into Chinese
- Add translations for PageNotFound, NoResultsCard, Dialog close button
- Localize Navigation labels (Integrations, Traffic Events)
- Translate error page states (blocked, pending, access error)
- Localize UserDropdown, LoginExpiredBadge, DarkModeToggle, LocaleSwitcher
- Add missing keys to en.ts and zh.ts
2026-06-23 20:55:34 +00:00
sakuradairong
3cb8244d77 i18n: add survey and aws marketplace translation keys 2026-06-24 01:27:28 +08:00
sakuradairong
1e0b124a03 i18n: localize webhooks module (general, headers, auth, config) 2026-06-24 01:23:37 +08:00
sakuradairong
9d1cd3e189 i18n: localize invoices module (tab, table, action cells, type cells) 2026-06-24 01:07:26 +08:00
sakuradairong
3b870a0e74 i18n: localize reverse-proxy terminated service badge 2026-06-24 00:53:04 +08:00
sakuradairong
9bbbeead1a i18n: localize notifications module (channels, modals, events) 2026-06-24 00:42:47 +08:00
sakuradairong
fdc7af186e fix(i18n): localize peer SSH, edit IP, routes, access tokens and setup keys
- Localize PeerEditIPModal config and buttons
- Localize PeerSSHToggle dialogs, tooltips, help text and callouts
- Localize AddRouteDropdownButton and RemoteJobDropdownButton
- Localize PeerRoutesTable and RouteMetricCell tooltips
- Localize AccessTokensTable empty state
- Localize SetupKeysTable filters, options and empty states
- Add missing translation keys to en.ts and zh.ts
- Fix t.rich tag usage for peerOfflineRemoteJob
- Fix singularize usage with ICU plural activePoliciesCount
- Normalize formatting with prettier
- Remove empty progress.md
2026-06-23 23:12:27 +08:00
Bethuel Mmbaga
76529fc089 Preserve inactivity expiration on partial peer updates (#676) 2026-06-23 17:30:06 +03:00
sakuradairong
f9326f65c5 fix(i18n): localize PeerSSHToggle and PeerEditIPModal
- PeerSSHToggle: sshAccess, enableSSH
- PeerEditIPModal: changesTakeEffect, cancel
- Add sshAccess, enableSSH, changesTakeEffect keys
2026-06-23 22:28:52 +08:00
sakuradairong
722c9fb8bf fix(i18n): localize AccessTokensTable and SetupKeysTable columns
- Refactor both table column defs from const to function with t() param
- Add lastUsed, lastUsedOn, nameAndKey, expires keys to common/setupKeys namespaces
2026-06-23 22:24:58 +08:00
sakuradairong
249da7788a fix(i18n): convert UsersTable columns to useTranslations
- Refactor UsersTableColumns from const to function with t() param
- Add useTranslations('users') to UsersTable component
- Replace hardcoded Name, Role, Status, Groups, Last Login headers
2026-06-23 22:16:32 +08:00
sakuradairong
9cd0d6ccbe fix(i18n): convert PeersTable columns to useTranslations
- Refactor PeersTableColumns from const to function with t() param
- Add useTranslations('peers') to PeersTable component
- Replace hardcoded Name, Address, Groups, OS, Serial number, Version headers
- Add selectAll, selectRow, unknown keys
2026-06-23 22:14:13 +08:00
sakuradairong
e89c56b8ec fix(i18n): commit remaining locale changes for team/user, PeerMultiSelect, AuthenticationTab, UserInviteModal 2026-06-23 22:03:49 +08:00
sakuradairong
11ca0c64a4 Merge remote-tracking branch 'origin/main' into localize-zh-v2.39.0
# Conflicts:
#	src/app/(dashboard)/team/users/page.tsx
2026-06-23 22:03:34 +08:00
sakuradairong
c8eec5a818 fix(i18n): add accessControlGroups and autoApply keys 2026-06-23 21:59:38 +08:00
Maycon Santos
8c22e64d02 Restrict cloud/licensed-only API calls in open-source mode (#675)
Gate premium endpoints so the open-source dashboard stops calling
endpoints the open-source management server does not serve:

- MSP/Distributor: only fetch /integrations/msp, /integrations/msp/switcher
  and /integrations/msp/reseller on NetBird Cloud
- EDR bypass: only fetch /peers/edr/bypassed when licensed
- Event Streaming: gate /integrations/event-streaming GETs on the license
  in addition to the existing permission check
- useIsLicensed: cache the licensed-only probe result (per API origin, 1h
  TTL) so it no longer re-fires on every page load
- Team > Users: show the Identity Provider Sync tile in open-source mode so
  IdP sync remains discoverable
2026-06-23 15:59:15 +02:00
sakuradairong
c0fe4d07e4 fix(i18n): localize PeerMultiSelect and add route keys
- Add useTranslations to PeerMultiSelect (assigningGroups, assignGroups)
- Add accessControlGroups, autoApply keys for RouteTable
2026-06-23 21:59:01 +08:00
sakuradairong
0ccc0f93f3 fix(i18n): localize AuthenticationTab
- Add useTranslations('settings')
- Replace hardcoded Session Expiration, Days, Hours, Require login with existing t() keys
2026-06-23 21:56:25 +08:00
sakuradairong
fcb1e8c4d4 fix(i18n): localize UserInviteModal and team/user page
- Add userRole, userRoleHelp to users namespace
- Add expiresIn, expiresInHelp to users namespace
- Replace hardcoded User Role, Expires in with t() calls
- Add useTranslations to UserInviteModal
2026-06-23 21:55:16 +08:00
sakuradairong
acf427db4d fix(i18n): localize groups sections, DNS records, route modals, reverse proxy
- GroupPeersSection: lastSeen, removePeersFromGroup
- GroupUsersSection: blockUser, lastLogin
- AssignUserToGroupModal: lastLogin
- DNSRecordModal: recordTypeAAAA, recordTypeCNAME
- RouteAddRoutingPeerModal: addNewRoutingPeer, networkIdentifier, routingPeer, distributionGroups
- RouteUpdateModal: routingPeer, peerGroup, distributionGroups, metric
- ReverseProxyAccessControlRules: accessControlRules
- ReverseProxyTargetCustomHeaders: customHeaders
- Add corresponding keys to en.ts and zh.ts
2026-06-23 21:46:57 +08:00
sakuradairong
8e40fd8d84 fix(i18n): localize IdentityProviderModal, ChangePasswordModal, CreateDebugJobModal
- Add IDP keys (idpProviderType, idpName, idpClientId, etc.)
- Add common keys (currentPassword, newPassword, logFileCount, duration)
- Add settings/allowSSH keys for PeerSSHInstructions
2026-06-23 21:40:56 +08:00
sakuradairong
dc9c9d9735 fix(i18n): localize RouteModal, SetupKeyModal, CreateAccessTokenModal
- RouteModal: routeType, networkRange, domains, distributionGroups, metric
- SetupKeyModal: createTitle, nameHelp, usageLimitHelp, expiresIn
- CreateAccessTokenModal: tokenName, tokenNameHelp, tokenExpiresIn
- Add corresponding keys to en.ts and zh.ts
2026-06-23 21:38:18 +08:00
sakuradairong
312c32f6ea fix(i18n): localize Peer sections and Posture Checks components
- AccessiblePeersSection, PeerNetworkRoutesSection, PeerRemoteJobsSection
- PostureCheckGeoLocation, PostureCheckNetBirdVersion, PostureCheckOperatingSystem
- PostureCheckPeerNetworkRange, PostureCheckProcess, PostureCheckNoChecksInfo
- Update en.ts and zh.ts messages with new translation keys
2026-06-23 21:25:55 +08:00
sakuradairong
055252d68b Merge remote-tracking branch 'origin/main' into localize-zh-v2.39.0
# Conflicts:
#	package-lock.json
#	src/app/(dashboard)/dns/settings/page.tsx
#	src/app/(dashboard)/events/audit/page.tsx
#	src/app/(dashboard)/peer/page.tsx
#	src/app/(dashboard)/peers/servers/page.tsx
#	src/app/(dashboard)/peers/users/page.tsx
#	src/app/(dashboard)/reverse-proxy/services/page.tsx
#	src/app/(dashboard)/settings/page.tsx
#	src/app/(dashboard)/team/user/page.tsx
#	src/app/(dashboard)/team/users/page.tsx
#	src/components/ui/AddGroupButton.tsx
#	src/components/ui/AddPeerButton.tsx
#	src/layouts/Navigation.tsx
#	src/modules/access-control/AccessControlModal.tsx
#	src/modules/access-control/table/AccessControlActionCell.tsx
#	src/modules/access-control/table/AccessControlTable.tsx
#	src/modules/common-table-rows/GroupsRow.tsx
#	src/modules/groups/table/GroupsActionCell.tsx
#	src/modules/networks/NetworkModal.tsx
#	src/modules/networks/resources/NetworkResourceAccessControl.tsx
#	src/modules/networks/resources/NetworkResourceModal.tsx
#	src/modules/peers/PeerActionCell.tsx
#	src/modules/peers/PeerMultiSelect.tsx
#	src/modules/peers/PeersTable.tsx
#	src/modules/reverse-proxy/ReverseProxyAccessControlRules.tsx
#	src/modules/reverse-proxy/ReverseProxyLayer4Content.tsx
#	src/modules/reverse-proxy/ReverseProxyModal.tsx
#	src/modules/reverse-proxy/auth/AuthHeaderModal.tsx
#	src/modules/reverse-proxy/clusters/ClustersModal.tsx
#	src/modules/reverse-proxy/domain/CustomDomainModal.tsx
#	src/modules/reverse-proxy/targets/ReverseProxyTargetCustomHeaders.tsx
#	src/modules/settings/AuthenticationTab.tsx
#	src/modules/settings/ClientSettingsTab.tsx
#	src/modules/settings/DangerZoneTab.tsx
#	src/modules/settings/GroupsSettings.tsx
#	src/modules/settings/IdentityProviderModal.tsx
#	src/modules/settings/NetworkSettingsTab.tsx
#	src/modules/settings/PermissionsTab.tsx
#	src/modules/users/ServiceUserModal.tsx
#	src/modules/users/ServiceUsersTable.tsx
#	src/modules/users/UsersTable.tsx
2026-06-23 21:20:35 +08:00
Maycon Santos
7653e3411c Merge NetBird cloud edition into the dashboard (#674)
Brings the unified dashboard into the open-source repo. Premium features
ship in the open code, gated at runtime via NETBIRD_CLOUD and
NETBIRD_LICENSED, with upgrade prompts for unlicensed self-hosted
deployments. Adds the cloud-only feature areas (billing, integrations,
MSP, traffic events, notifications) and the Playwright e2e suite.
2026-06-21 16:01:08 +02:00
Maycon Santos
86b6e23981 Update announcements.json (#673) 2026-06-20 16:43:04 +02:00
sakuradairong
bddc357b0e fix(i18n): localize Resource Access Control, Peer Expiration, Peer Settings
NetworkResourceAccessControl: "Access Control Policies" label + help text
PeerExpirationToggle: session expiration description, tooltip text (setup
key disabled, no permission, global setting disabled, go to settings)
PeerExpirationSettings: notification texts, inactivity expiration text

New keys in peers + networks namespaces (en + zh).
2026-06-20 22:21:45 +08:00
sakuradairong
d894c7440f fix(i18n): localize Settings tab sub-categories (forms, labels, help text)
Replaces hardcoded English text inside all 7 settings tabs with
useTranslations("settings") calls. Covers:

- AuthenticationTab: Session Expiration, User Approval, Local MFA,
  Peer Session Expiration, Days/Hours, Require login after disconnect
- ClientSettingsTab: Automatic Updates, Force Updates, Expose Services
  from CLI, Enable Peer Expose, Allowed peer groups, Lazy Connections
- GroupsSettings: Group propagation, JWT group sync, JWT claim,
  JWT allow groups, group access warning
- NetworkSettingsTab: DNS Domain, Network Range, IPv6 ranges,
  IPv6 enabled groups, DNS Wildcard Routing, validation errors
- IdentityProvidersTab: table headers (Name/Type), description
- SetupKeysTab: description text
- PermissionsTab: Restrict dashboard toggle, Save Changes

40+ new translation keys added to settings namespace (en + zh).
2026-06-20 22:00:07 +08:00
Eduard Gert
389a0c0785 update banner (#672) 2026-06-20 15:59:23 +02:00
sakuradairong
5c4df7aeb1 merge: resolve conflict with origin/main (IdentityProviderModal logout URL)
Resolve merge conflict in IdentityProviderModal.tsx by adopting upstream
main's new 'Endpoint URLs' section (Redirect/Callback + Logout URLs from
PR #657), then re-applying i18n: useTranslations import, Cancel button
localization, and new translation keys for the added endpoint/logout text
(endpointUrls, redirectCallback, logoutLabel, notAllProvidersLogout,
learnMore) in en + zh.

Also brings in upstream DNS Zones & Setup modal improvements (#669),
banner IPv6 link (#662), remote jobs docs link (#664).
2026-06-20 21:40:32 +08:00
sakuradairong
50c2ffac0b fix(i18n): localize Danger Zone account deletion text
Replaces all hardcoded English strings in DangerZoneTab with
useTranslations("settings") calls: card title, warning paragraph,
confirm/cancel dialog, notify messages, and button label.
i18n keys added to settings namespace (en + zh).
2026-06-20 21:18:30 +08:00
sakuradairong
77b413d960 fix(i18n): localize aria-label attributes across 12 components
Replaces 19 hardcoded aria-label strings with useTranslations() calls:

- "Select all" / "Select row" — group assignments, posture checks
- "Configure policies" / "Configure access control" — network, reverse proxy
- "Configure authentication" / "Remove rule" / "Remove header" — reverse proxy
- "Public listen port" / "Destination port" — reverse proxy L4 config
- "Select language" — locale switcher

Also refactors 5 module-level column arrays into factory functions
to pass the translation function through column definitions.
i18n keys added to common namespace (en + zh translations).
2026-06-20 20:25:32 +08:00
sakuradairong
2dc523ca9e fix(i18n): localize Cancel button text across 25 modal components
Replaces all hardcoded "Cancel" button text with {t("cancel")} using the
common namespace in every modal component, plus a few adjacent button
texts. Adds import { useTranslations } + useTranslations("common") to
each component that needed it.

Files covered: access-tokens, jobs, networks, peer, posture-checks,
remote-access/ssh, reverse-proxy/auth, reverse-proxy/clusters,
reverse-proxy/domain, routes, settings, setup-keys, users — all modal
dialogs with Cancel buttons now respect the active locale.
2026-06-20 19:52:21 +08:00
sakuradairong
96f15d7b48 fix(i18n): localize remaining hardcoded titles in user detail, peers section and onboarding
Covers four high-visibility hardcoded headings and surrounding text:

- User detail page: "Access Tokens" tab label + heading + description
- UserPeersSection: "Peers" heading + "View all peers..." description
- OnboardingIntent: "Get started with NetBird" title
- OnboardingAddResource: "Add your first resource" title

i18n keys added: users.accessTokens, users.accessTokensDescription,
peers.userPeersDescription, onboarding.title, onboarding.addResource
(en + zh translations).
2026-06-20 19:31:28 +08:00
sakuradairong
c05a3ee051 fix(i18n): localize remaining hardcoded UI strings across settings and auth
Replaces all hardcoded English text in 8 settings tab components and the
SessionLost page with useTranslations() calls, so they render in the user's
active locale (English or Chinese):

- Settings tabs: Authentication, Clients, Groups, Networks, Danger Zone,
  Setup Keys, Identity Providers, Permissions — breadcrumbs and h1 headers
  now use the existing settings namespace keys.
- SessionLost: "Session Expired" description + "Login" button localized
  via the auth namespace.
- i18n keys added: auth.sessionExpiredDescription, dns.nameserversDescription,
  dns.zonesDescription (en + zh translations).
2026-06-20 19:17:40 +08:00
sakuradairong
98a7923400 feat(i18n): cookie-based locale detection with English default and switcher
Previously the locale was hardcoded to "zh" in AppLayout's
NextIntlClientProvider, so every user saw Chinese with no way to switch.

This adds proper client-side locale resolution suitable for the static
export build (`output: "export"` — no server runtime / middleware):

- New single source of truth `src/i18n/config.ts` (locales, defaultLocale,
  message catalog, cookie name, timezones) consumed by request.ts,
  routing.ts, navigation.ts and the new provider.
- New pure detection helpers `src/i18n/detection.ts`:
  cookie (NEXT_LOCALE) -> browser language (navigator.languages) ->
  default. All branches are SSR/build-safe to avoid hydration mismatches.
- New `LocaleProvider` context wraps NextIntlClientProvider, resolves the
  locale on mount, syncs <html lang>, and exposes { locale, setLocale }.
- AppLayout now uses LocaleProvider instead of the hardcoded "zh" wiring.
- New `LanguageSwitcher` in the header and a new `Language` tab in
  Settings, both persisting the choice via the cookie for reloads.

Default locale is now English ("en"); Chinese remains available via the
browser-language fallback or the explicit switcher. Includes a manual
assertion script (detection.test.ts) covering cookie precedence, browser
fallback, persistence and SSR safety.
2026-06-20 18:57:43 +08:00