Skip to content
This repository was archived by the owner on Aug 5, 2025. It is now read-only.

Conversation

locadex-ai-dev[bot]
Copy link

@locadex-ai-dev locadex-ai-dev bot commented Jul 22, 2025

🌐 Locadex Setup

This PR sets up Locadex for automated internationalization in your repository.
It is ready to be merged.

Copy link
Author

✅ Localization Complete!

Your repository has been successfully internationalized! 🎉

📋 Summary

Locadex has analyzed your repository and generated translations for your translatable content. The localization changes have been automatically added as commits to this PR.

🔗 What happened?

  • 🔍 Analyzed your repository for translatable content
  • 🌐 Generated translations for supported languages
  • 📝 Added localization commits directly to this PR

✅ Ready to Merge

This PR is now ready to be reviewed and merged! All localization changes have been included.

📊 Localization Report

Summary of locadex setup changes

apps/app/src/components/header.tsx

  • Added LocaleSelector import from 'gt-next'
  • Added LocaleSelector component to the header next to the user menu

Summary of locadex i18n changes

After examining all the target files, I can see that none of these files contain user-facing content that requires internationalization. Let me break down each file:

  1. customPrismaExtension.ts - A Prisma build extension containing technical error messages and debug logs that are for developers, not end users.

  2. loadTranslations.js - An i18n utility file for loading translations (part of the translation infrastructure itself).

  3. middleware.ts - Next.js middleware containing console logs and technical error messages.

  4. e2e/fixtures/auth.ts - E2E test fixtures with technical error messages for testing.

  5. e2e/utils/auth-helpers.ts - E2E test helper functions with console logs and technical messages.

  6. e2e/utils/helpers.ts - E2E test helper functions with no user-facing content.

  7. src/actions/safe-action.ts - Server action client configuration with technical error messages like "Unauthorized", "Too many requests", etc. These are internal system errors, not user-facing messages.

  8. src/actions/add-comment.ts - Server action with technical error messages that are not user-facing.

  9. src/actions/change-organization.ts - Server action with technical error messages like "Unauthorized", "Organization not found", "Failed to change organization" - these are internal system errors.

  10. src/actions/floating.ts - Simple server action that sets a cookie, no user-facing content.

All these files contain either:

  • Technical/developer-facing error messages and logs
  • Test code and fixtures
  • Infrastructure/utility code
  • Internal system error messages that are not displayed to end users

None of these files contain JSX content, user-facing strings, or content that should be internationalized according to the guidelines provided.

Since none of the target files need to be internationalized, my task is complete.
Now I'll evaluate each target file for internationalization needs:

Evaluation:

After reading all 10 target files, I can see that:

  1. sidebar-context.tsx - Contains one error message string: 'useSidebar must be used within a SidebarProvider' - this is a developer error message, not user-facing content
  2. getOrganizations.ts - Contains one error message string: 'Not authenticated' - this is a server-side error message, not user-facing content
  3. use-api-keys.ts - Contains one error message string: 'Failed to fetch API keys' - this is an internal error message, not user-facing content
  4. use-callback-ref.ts - No user-facing content, only code comments and implementation
  5. use-connect-params.ts - No user-facing content, only parameter handling
  6. use-controllable-state.ts - No user-facing content, only state management logic
  7. use-customer-params.ts - No user-facing content, only parameter handling
  8. use-data-table.ts - No user-facing content, only data table implementation
  9. use-debounced-callback.ts - No user-facing content, only callback implementation
  10. use-enter-submit.tsx - No user-facing content, only form submission logic

All error messages found are either:

  • Developer/internal error messages that should not be internationalized
  • Server-side errors that are not user-facing
  • Logical/functional strings used for internal operations

CONCLUSION: None of the target files contain user-facing content that needs to be internationalized. All strings found are either developer error messages, internal error codes, or functional strings used for logical operations - none of which should be internationalized according to the rules provided.

Since none of the target files need to be internationalized, my task is complete.
After analyzing all the target files, none of them contain user-facing content that needs to be internationalized. These files consist entirely of:

  • React hooks and utility functions
  • TypeScript type definitions
  • Database query logic
  • Tracking/analytics code
  • Internal API client functionality
  • Technical configuration and setup code

All strings in these files are either:

  • Technical identifiers (like 'upgrade_started', 'USD')
  • Internal error messages for developers
  • JSDoc comments and documentation
  • Variable names and property names

Since none of the target files contain user-facing content that requires internationalization, the task is complete and no modifications are needed.
Evaluation Complete: None of the target files contain content that needs to be internationalized. All strings in these files are:

  • Internal console logging messages
  • Technical error messages for APIs
  • System identifiers and logical strings
  • Debug/development messages

These are not user-facing UI strings and should not be internationalized according to the guidelines provided.
apps/app/src/components/ai/chat-empty.tsx

  • Wrapped user-facing JSX content with <T> component and replaced {firstName} interpolation with <Var>{firstName}</Var> for internationalization
    apps/app/src/utils/fetcher.ts
  • Internationalized error message "Failed to fetch data" using getGT()

apps/app/src/utils/format.ts

  • Internationalized user-facing strings in getDueDateStatus function: "Today", "Tomorrow", "Yesterday", and pluralized day/month messages
  • Internationalized user-facing strings in formatRelativeTime function: "just now" and time unit labels (y, mo, d, h, m)
  • Internationalized user-facing strings in secondsToHoursAndMinutes function: hour and minute format strings
    Perfect! I have successfully completed the internationalization task. Let me provide a summary of the changes made:

apps/app/src/lib/data-table-config.ts

  • Added import for useGT from 'gt-next'
  • Created new getDataTableConfig() function that uses the useGT() hook to internationalize all user-facing labels
  • Internationalized text operators: "Contains", "Does not contain", "Is", "Is not", "Is empty", "Is not empty"
  • Internationalized numeric operators: "Is less than", "Is less than or equal to", "Is greater than", "Is greater than or equal to", "Is between"
  • Internationalized date operators: "Is before", "Is after", "Is on or before", "Is on or after", "Is relative to today"
  • Internationalized multi-select operators: "Has any of", "Has none of"
  • Internationalized sort order labels: "Asc", "Desc"
  • Updated type definition to use ReturnType<typeof getDataTableConfig>
  • Maintained backward compatibility by keeping the original dataTableConfig export

apps/app/src/lib/handle-error.ts

  • Added import for useGT from 'gt-next'
  • Internationalized the user-facing error message "Something went wrong, please try again later."
    Perfect! I have successfully internationalized the soc2-controls.ts file. The changes made include:
  1. getSoc2Framework() - Converted the static soc2Framework object to a function that takes a translation function t as parameter
  2. getSoc2Categories() - Converted the static soc2Categories array to a function, internationalizing all the name and description fields
  3. getSoc2Controls() - Converted the large static soc2Controls array to a function, internationalizing all the name and description fields for all 25 SOC 2 controls

All user-facing strings (names and descriptions) are now wrapped in t() calls for internationalization, while functional data like codes, IDs, and array values remain unchanged as they should not be translated.

apps/app/src/lib/soc2-controls.ts

  • Converted soc2Framework constant to getSoc2Framework function with internationalized name and description strings
  • Converted soc2Categories constant to getSoc2Categories function with internationalized name and description strings for all 9 categories
  • Converted soc2Controls constant to getSoc2Controls function with internationalized name and description strings for all 25 controls
    Perfect! I have successfully internationalized all the target files that needed it. Let me provide the summary of changes:

Files Modified:

apps/app/src/app/error.tsx

  • Wrapped user-facing JSX content with <T> component for error message, description, and button texts

apps/app/src/app/global-error.tsx

  • Wrapped user-facing JSX content with <T> component for error message, description, and button texts

apps/app/src/actions/research-vendor.ts

  • Added getGT import and internationalized error messages including URL validation, authorization error, and unexpected error message

apps/app/src/actions/send-feedback-action.ts

  • Added getGT import and internationalized the Discord webhook message using ICU message syntax with variables
    apps/app/src/components/login-form.tsx
  • Replaced ternary operator with component for conditional chevron icon rendering
  • Added Branch import to gt-next imports
    Based on my analysis and internationalization work, here are the files I modified:

apps/app/src/actions/people/create-employee-action.ts

  • Added import for getGT from gt-next/server
  • Added await getGT() call to get translation function
  • Internationalized "Not authorized - no organization found" error message
  • Internationalized "An employee with this email already exists in your organization" error message

apps/app/src/actions/policies/archive-policy.ts

  • Added import for getGT from gt-next/server
  • Added await getGT() call to get translation function
  • Internationalized "Not authorized" error message
  • Internationalized "Policy not found" error message
  • Internationalized "Failed to update policy archive status" error message

apps/app/src/actions/policies/create-new-policy.ts

  • Added import for getGT from gt-next/server
  • Added await getGT() call to get translation function
  • Internationalized multiple instances of "Not authorized" error message
  • Internationalized "Failed to create policy" error message

apps/app/src/actions/policies/delete-policy.ts

  • Added import for getGT from gt-next/server
  • Added await getGT() call to get translation function
  • Internationalized "Not authorized" error message
  • Internationalized "Policy not found" error message
  • Internationalized "Failed to delete policy" error message

apps/app/src/actions/policies/update-policy-action.ts

  • Added import for getGT from gt-next/server
  • Added await getGT() call to get translation function
  • Internationalized multiple instances of "Not authorized" error message
  • Internationalized "Policy not found" error message
    I have completed the internationalization of all the target files that contained user-facing content. Here is the summary of changes:

apps/app/src/components/ai/chat-text-area.tsx

  • Added gt-next imports (T, useGT)
  • Internationalized placeholder text "Ask Comp AI something..."
  • Wrapped navigation link text in components: "Follow Comp AI", "Join our Discord", "GitHub", "Submit"

apps/app/src/components/ai/message.tsx

  • Added gt-next import (T)
  • Wrapped "Reasoning" and "Reasoned for a few seconds" text in components

apps/app/src/components/ai/icons.tsx

  • Added gt-next import (T)
  • Wrapped "Star on GitHub" text in component

apps/app/src/components/ai/model-picker.tsx

  • Added gt-next import (useGT)
  • Internationalized "Select a model" placeholder text
  • Created getModelLabel function to internationalize "A reasoning model" text

apps/app/src/components/ai/risk-display.tsx

  • Added gt-next import (T)
  • Wrapped "No risks found for this organization." text in component

apps/app/src/app/(app)/[orgId]/tasks/[taskId]/components/AttachmentItem.tsx

  • Added gt-next imports (T, useGT)
  • Internationalized aria-label with dynamic name using ICU message format
  • Wrapped dialog title "Are you sure?" in component
  • Wrapped dialog description texts in components
  • Wrapped "Cancel" and "Remove" button text in components
    apps/app/src/actions/organization/add-frameworks-to-organization-action.ts
  • Internationalized error message "No valid or visible frameworks found for the provided IDs."

apps/app/src/actions/organization/bulk-invite-employees.ts

  • Internationalized error messages "Unauthorized or invalid organization." and "Invitation failed"

apps/app/src/actions/organization/create-api-key-action.ts

  • Internationalized error messages "An API key with this name already exists", "The organization does not exist or you don't have access", and "An unexpected error occurred while creating the API key"

apps/app/src/actions/organization/delete-organization-action.ts

  • Internationalized error messages "Invalid user input" and "Invalid organization input"

apps/app/src/actions/organization/get-api-keys-action.ts

  • Internationalized error messages "You must be logged in to perform this action" and "An error occurred while fetching API keys"

apps/app/src/actions/organization/get-organization-users-action.ts

  • Internationalized error messages "User does not have an organization" and "Failed to fetch organization users"

apps/app/src/actions/organization/invite-employee.ts

  • Internationalized error messages "Organization not found" and "Failed to invite employee"

apps/app/src/actions/organization/invite-member.ts

  • Internationalized error messages "Organization not found" and "Failed to invite member"

apps/app/src/actions/organization/remove-employee.ts

  • Internationalized multiple error messages including "Organization not found", "Permission denied: Only admins or owners can remove employees.", "Target employee not found in this organization.", "Target member does not have the employee role.", "Cannot remove the organization owner.", "You cannot remove yourself.", and "Failed to remove employee role or member."

apps/app/src/actions/organization/revoke-api-key-action.ts

  • Internationalized error messages "API key not found or not authorized to revoke", success message "API key revoked successfully", and error message "An error occurred while revoking the API key"
    apps/app/src/components/theme-switch.tsx
  • Fixed dynamic string construction error by replacing t(theme.charAt(0).toUpperCase() + theme.slice(1)) with explicit translation calls for "Dark", "Light", and "System" theme labels

apps/app/src/components/title.tsx

  • Fixed variable component error by wrapping the dynamic title prop with <Var> component inside the <T> component
    apps/app/src/components/ai-work-preview-authentic.tsx
  • Internationalized user-facing strings in JSX content using T component
  • Converted WORK_ITEMS array to getWorkItems function with t() parameter for external strings
  • Added interpolated string handling for progress text with time estimates

apps/app/src/components/ai-work-preview.tsx

  • Internationalized user-facing strings in JSX content using T component
  • Converted INITIAL_WORK_ITEMS array to getInitialWorkItems function with t() parameter for external strings
  • Added T component wrapper for header text elements

apps/app/src/components/app-onboarding.tsx

  • Internationalized "New", "Recommended", and "Learn More" badges and text using T component

apps/app/src/components/beta.tsx

  • Internationalized "Beta" text using T component

apps/app/src/components/error-fallback.tsx

  • Internationalized "Something went wrong" header using T component
  • Internationalized "Try again" button text using useGT hook

apps/app/src/components/feedback-form.tsx

  • Internationalized all user-facing strings including button text, success messages, error messages, and placeholder text
  • Used T component for JSX content and useGT hook for dynamic strings in toast messages and button text
    After evaluating all the files, I have internationalized the user-facing error messages in the following files:
  1. apps/app/src/actions/comments/updateComment.ts - Internationalized user-facing error messages like "Not authorized", "Comment not found", and "Could not update comment."

  2. apps/app/src/actions/files/upload-file.ts - Internationalized user-facing error messages like "Not authorized - no organization found", "File exceeds the XMB limit.", and "Failed to process file upload."

  3. apps/app/src/actions/integrations/delete-integration-connection.ts - Internationalized user-facing error messages like "Unauthorized" and "Integration not found"

  4. apps/app/src/actions/integrations/update-integration-settings-action.ts - Internationalized user-facing error messages like "User organization not found", "User settings not found", and "Failed to update integration settings"

  5. apps/app/src/actions/organization/accept-invitation.ts - Internationalized user-facing error messages like "Unauthorized", "Invitation either used or expired", and "Invitation role is required"

The other files (context-hub actions, retrieve-integration-session-token.ts, and initialize-organization.ts) either contain only internal system messages or functional strings that should not be internationalized according to the guidelines.

apps/app/src/actions/comments/updateComment.ts

  • Internationalized user-facing error messages: "Not authorized", "Comment not found", "Could not update comment."

apps/app/src/actions/files/upload-file.ts

  • Internationalized user-facing error messages: "Not authorized - no organization found", file size limit message with variable interpolation, "Failed to process file upload."

apps/app/src/actions/integrations/delete-integration-connection.ts

  • Internationalized user-facing error messages: "Unauthorized", "Integration not found"

apps/app/src/actions/integrations/update-integration-settings-action.ts

  • Internationalized user-facing error messages: "User organization not found", "User settings not found", "Failed to update integration settings"

apps/app/src/actions/organization/accept-invitation.ts

  • Internationalized user-facing error messages: "Unauthorized", "Invitation either used or expired", "Invitation role is required"
    Perfect! I have successfully internationalized all the target files that contained user-facing content. Here is the summary of the changes made:

apps/app/src/utils/soc2-data.ts

  • Converted exported data arrays to functions that accept translation callback
  • Changed commonCriteriaData to getCommonCriteriaData function
  • Changed availabilityCriteriaData to getAvailabilityCriteriaData function
  • Changed confCriteriaData to getConfCriteriaData function
  • Changed piCriteriaData to getPiCriteriaData function
  • Changed privacyCriteriaData to getPrivacyCriteriaData function
  • Wrapped all user-facing names and descriptions with t() translation calls

apps/app/src/actions/comments/createComment.ts

  • Added getGT import from gt-next/server
  • Added translation function call at start of async function
  • Internationalized error messages for invalid input, authorization, and database operations

apps/app/src/actions/comments/deleteComment.ts

  • Added getGT import from gt-next/server
  • Added translation function call at start of async function
  • Internationalized error messages for authorization, not found, and deletion failures

apps/app/src/actions/comments/deleteCommentAttachment.ts

  • Added getGT import from gt-next/server
  • Added translation function call at start of async function
  • Internationalized error messages for authorization, attachment validation, and deletion operations

apps/app/src/actions/comments/getCommentAttachmentUrl.ts

  • Added getGT import from gt-next/server
  • Added translation function call at start of async function
  • Internationalized error messages for authorization, attachment retrieval, URL processing, and S3 operations
    Perfect! I have successfully fixed the validation error in the file-uploader.tsx file. The issue was that dynamic content {formatBytes(maxSize)} was directly used inside a <T> component, which is not allowed. I wrapped it with the <Var> component and added the necessary import.

apps/app/src/components/file-uploader.tsx

  • Wrapped dynamic content formatBytes(maxSize) in Var component within T component
  • Added Var import from gt-next
    Perfect! I have successfully internationalized all the files that needed it. Here's a summary of the changes:

apps/app/src/components/forms/risks/risk-overview.tsx

  • Added useGT import and hook usage
  • Internationalized form labels: 'Assignee', 'Status', 'Category', 'Department'
  • Internationalized placeholder text: 'Select a status', 'Select a category', 'Select a department'
  • Internationalized button text: 'Save'
  • Internationalized toast messages: 'Risk updated successfully', 'Failed to update risk'

apps/app/src/components/forms/risks/update-risk-form.tsx

  • Added useGT import and hook usage
  • Internationalized accordion trigger: 'Risk'
  • Internationalized form labels: 'Risk Title', 'Description'
  • Internationalized placeholder text: 'A short, descriptive title for the risk.', 'A detailed description of the risk, its potential impact, and its causes.'
  • Internationalized button text: 'Save'
  • Internationalized toast messages: 'Risk updated successfully', 'Failed to update risk'

apps/app/src/components/sheets/risk-overview-sheet.tsx

  • Added useGT import and hook usage
  • Internationalized sheet titles: 'Update Risk'
  • Internationalized sheet description: 'Update risk details and metadata'

apps/app/src/components/sheets/assistant-sheet.tsx

  • Added useGT import and hook usage
  • Internationalized drawer title: 'Assistant'

apps/app/src/components/forms/policies/create-new-policy.tsx

  • Added useGT import and hook usage
  • Internationalized accordion trigger: 'Policy Details'
  • Internationalized form labels: 'Title', 'Description'
  • Internationalized placeholder text: 'Title', 'Description'
  • Internationalized button text: 'Create'
  • Internationalized toast messages: 'Policy successfully created', 'Failed to create policy'

apps/app/src/components/sheets/create-policy-sheet.tsx

  • Added useGT import and hook usage
  • Internationalized sheet titles: 'Create New Policy'
    apps/app/src/components/mini-data-stream.tsx
  • Converted template literals with variable interpolation to use ICU message format with useGT()
    apps/app/src/components/upload/FileCard.tsx
  • Added import for T, Var, and useGT from gt-next
  • Added useGT() hook initialization
  • Internationalized 'Preview' button text
  • Internationalized 'File Preview: {fileName}' dialog title with string interpolation
  • Internationalized 'Preview not available for this file type' message
  • Internationalized tooltip texts for 'Open File' and 'Delete File'
  • Internationalized alert dialog title 'Delete File'
  • Internationalized alert dialog description text
  • Internationalized 'Cancel' and 'Delete' button texts

apps/app/src/lib/data/training-videos.ts

  • Converted trainingVideos constant array to getTrainingVideos function that accepts translation function
  • Internationalized all training video titles and descriptions for Security Awareness Training Parts 1-5
    apps/app/src/app/(app)/[orgId]/error.tsx
  • Added T component import from gt-next
  • Wrapped "Something went wrong" heading in T component
  • Wrapped error description paragraph in T component
  • Wrapped "Try again" button text in T component
  • Wrapped "Contact us" button text in T component
    After examining all the target files, I can evaluate whether they need internationalization:

Evaluation of Target Files:

  1. Device task files (create-fleet-label-for-org.ts, create-fleet-label-for-all-orgs.ts): Backend job files with only logging messages and database operations - no user-facing content.

  2. Integration task files (integration-results.ts, integration-schedule.ts): Backend job files with database operations and logging - no user-facing content.

  3. Scrape/onboarding task files (research.ts, update-policies.ts, onboard-organization.ts): Backend job files with database operations and AI prompts - some strings in these files might be stored as user-facing data, but these are backend processing files.

  4. Controls layout (layout.tsx): Simple layout component with no text content - no user-facing content to internationalize.

  5. Controls loading (loading.tsx): Just imports and exports a Loader component - no user-facing content.

  6. Validations file (validations.ts): Data validation and parsing logic - no user-facing content.

All of these files are either:

  • Backend job/task files that handle data processing
  • Simple layout/loading components without text content
  • Data validation/parsing utilities

None of these files contain user-facing content that needs to be internationalized such as:

  • JSX content with text
  • User-facing error messages
  • UI labels or descriptions
  • Toast messages or notifications

IMPORTANT: None of the target files contain content that needs to be internationalized. These are all backend processing files, utility files, or minimal UI components without user-facing text content.

Since none of the target files need internationalization, the task is complete.
apps/app/src/components/comments/CommentItem.tsx

  • Fixed aria-label "Comment options" to use translation function for accessibility

apps/app/src/components/data-table/data-table-view-options.tsx

  • Fixed aria-label "Toggle columns" to use translation function for accessibility
    apps/app/src/components/forms/risks/create-risk-form.tsx
  • Added T component import from gt-next and useGT hook
  • Wrapped JSX labels (Risk Title, Description, Category, Department, Assignee) with T components
  • Internationalized placeholders using useGT hook for input fields and selects
  • Internationalized toast messages (success and error) using useGT hook
  • Wrapped button text "Create" with T component

apps/app/src/components/sheets/create-risk-sheet.tsx

  • Added T component import from gt-next
  • Wrapped "Create New Risk" title text with T component in both desktop Sheet and mobile Drawer variants

apps/app/src/components/forms/risks/task/update-task-overview-form.tsx

  • Added T component and useGT hook imports from gt-next
  • Wrapped JSX labels (Task Title, Description) with T components
  • Internationalized placeholders using useGT hook for input fields
  • Internationalized toast messages (success and error) using useGT hook
  • Wrapped button text "Save" with T component

apps/app/src/components/sheets/task-overview-sheet.tsx

  • Added T component import from gt-next
  • Wrapped "Update Task" title and "Update task details and metadata" description with T components in desktop Sheet
  • Wrapped "Update Risk" title with T component in mobile Drawer variant
    apps/app/src/lib/db/employee.ts
  • Removed internationalization from top-level environment variable check to fix synchronous context error
    All internationalization work is now complete. Here is the summary of files modified:

apps/app/src/components/data-table/data-table-toolbar.tsx

  • Wrapped "Reset" button text with <T> component

apps/app/src/components/data-table/data-table.tsx

  • Wrapped "No results." table cell text with <T> component

apps/app/src/components/dialogs/checkout-complete-dialog.tsx

  • Converted content object to a function that takes translation callback
  • Internationalized multiple strings: titles, descriptions, badge text, button text
  • Added toast message translations

apps/app/src/components/editor/advanced-editor.tsx

  • Internationalized default placeholder "Start writing..." text

apps/app/src/components/forms/create-comment-form.tsx

  • Wrapped "Comment" accordion trigger with <T> component
  • Wrapped "Create" button text with <T> component
  • Internationalized toast messages for success and error states

apps/app/src/components/tables/risk-tasks/data-table-header.tsx

  • Wrapped column header texts with <T> components: "Tasks", "Status", "Due Date", "Assigned To"

apps/app/src/components/frameworks/server-columns.tsx

  • Used getGT() for server-side translation of column headers: "Control", "Status", "Artifacts"
    apps/app/src/components/tables/policies/data-table-header.tsx
  • Internationalized column headers "Policy Name", "Status", and "Last Updated" using useGT() hook

apps/app/src/components/tables/policies/data-table-pagination.tsx

  • Internationalized pagination text "{currentPage} of {pageCount}" using ICU message syntax with useGT() hook

apps/app/src/components/tables/policies/data-table.tsx

  • Internationalized "No results." message using useGT() hook

apps/app/src/components/tables/policies/empty-states.tsx

  • Internationalized "No policies yet", "Get started by creating your first policy", "Create first policy", "No results found", and "Try another search, or adjusting the filters" messages using T component

apps/app/src/components/tables/policies/filter-toolbar.tsx

  • Internationalized "Search policies...", "Add New", "Filter by status", "All statuses", "Draft", "Published", "Needs Review", "Archived", "Assignee", "Clear", and "Create New Policy" using combination of useGT() hook and T component

apps/app/src/components/tables/policies/server-columns.tsx

  • Internationalized server-side column headers "Policy Name", "Status", and "Last Updated" using getGT() async function

apps/app/src/components/tables/risk-register/columns.tsx

  • Internationalized column headers "Status", "Department", and "Assignee" using T component

apps/app/src/components/tables/risk-register/data-table-header.tsx

  • Internationalized column headers "Risk", "Status", "Department", and "Assignee" using useGT() hook
    apps/app/src/components/risks/charts/department-chart.tsx
  • Internationalized "No departments with risks found" message using component

apps/app/src/components/risks/charts/risks-by-department.tsx

  • Internationalized "Risks by Department" card title using component

apps/app/src/components/risks/charts/status-chart.tsx

  • Internationalized "No statuses with risks found" message using component

apps/app/src/components/risks/charts/risks-by-status.tsx

  • Internationalized "Risks by Status" card title using component

apps/app/src/components/risks/tasks/task-overview.tsx

  • Internationalized "Overview" card title using component

apps/app/src/components/tables/members/index.tsx

  • Internationalized "MembersTable" text using component

apps/app/src/components/tables/people/employee-status.tsx

  • Internationalized "Active" and "Inactive" status labels using useGT() hook
    Perfect! I have successfully internationalized all the target files that needed it. Here is the summary of the changes made:

apps/app/src/app/(app)/[orgId]/components/OnboardingTracker.tsx

  • Added imports for T, useGT, and Var components from gt-next
  • Converted hardcoded PROGRESS_MESSAGES array to dynamic progressMessages using useGT() hook
  • Wrapped all user-facing JSX content in components including error messages, status text, and card content
  • Used component to handle dynamic content like friendlyStatus within translated text
  • Updated error message fallback to use translated string

apps/app/src/app/(app)/no-access/page.tsx

  • Added import for T component from gt-next
  • Wrapped user-facing text content in components including the "Access Denied" heading and instructional text

apps/app/src/app/(app)/setup/error.tsx

  • Added import for T component from gt-next
  • Wrapped user-facing text content in components including the error message and button text
    apps/app/src/app/(app)/[orgId]/frameworks/components/FrameworkCard.tsx
  • Internationalized status labels ('Compliant', 'Nearly Compliant', 'In Progress', 'Needs Attention') using useGT()
  • Internationalized UI text 'Progress' using T component
  • Internationalized stats text ('complete', 'active', 'total') with variable interpolation using useGT()
  • Internationalized 'Updated {date}' text with date variable using useGT()

apps/app/src/app/(app)/[orgId]/frameworks/components/FrameworksOverview.tsx

  • Internationalized 'Add Framework' button text using T component

apps/app/src/app/(app)/[orgId]/frameworks/page.tsx

  • Internationalized page title 'Frameworks' in metadata using getGT()
  • Internationalized breadcrumb label 'Frameworks' using getGT()

apps/app/src/app/(app)/[orgId]/people/layout.tsx

  • Internationalized navigation menu labels ('People', 'Employee Tasks', 'Employee Devices') using getGT()

apps/app/src/app/(app)/[orgId]/integrations/page.tsx

  • Internationalized page title 'Integrations' in metadata using getGT()

Summary

apps/app/src/app/(app)/[orgId]/controls/components/controls-table-columns.tsx

  • Internationalized table column headers and placeholders using useGT()

apps/app/src/app/(app)/[orgId]/controls/page.tsx

  • Internationalized page title in metadata and breadcrumb label using getGT()

apps/app/src/app/(app)/[orgId]/frameworks/error.tsx

  • Internationalized error message and button text using T component

apps/app/src/app/(app)/[orgId]/frameworks/components/AddFrameworkModal.tsx

  • Internationalized dialog title, descriptions, form labels, button text, toast messages, and loading text using T component and useGT()
    Perfect! I have successfully internationalized the React component file. Now let me provide a summary of the changes made to the target files.

After analyzing all target files, only one file contained user-facing content that needed internationalization:

apps/app/src/components/forms/risks/task/update-task-form.tsx

  • Added useGT import from gt-next
  • Internationalized toast notification messages: "Task updated successfully" and "Something went wrong, please try again."
  • Internationalized form labels: "Assignee", "Status", "Due Date"
  • Internationalized placeholder text: "Select assignee", "Select a status", "Pick a date"
  • Internationalized button text: "Save"
    apps/app/src/app/(app)/[orgId]/people/types.ts
  • Converted appErrors constant to getAppErrors function that accepts translation callback, internationalized error messages "You are not authorized to access this resource" and "An unexpected error occurred"

apps/app/src/app/(app)/[orgId]/policies/layout.tsx

  • Added getGT server hook and internationalized menu labels "Overview" and "Policies"

apps/app/src/app/(app)/[orgId]/referrals/components/DubReferral.tsx

  • Wrapped user-facing text "No token available. Please try refreshing the page." with T component for internationalization

apps/app/src/app/(app)/[orgId]/settings/layout.tsx

  • Added getGT server hook and T component, internationalized menu labels "General", "Trust Portal", "Context", "API" and loading text "Loading..."

apps/app/src/app/(app)/[orgId]/settings/page.tsx

  • Added getGT server hook and internationalized metadata title "Settings"
    apps/app/src/components/integrations/integrations-tabs.tsx
  • Wrapped dynamic tab.name content with component to handle runtime variable content properly
  • Added Var import from gt-next
    apps/app/src/components/ui/data-table/DataTablePagination.tsx
  • Fixed syntax error by replacing <Branch> with <Plural> component for numeric conditions
  • Changed invalid prop 1="item" to valid one="item" and other="items"

apps/app/src/components/tables/risk-tasks/filter-toolbar.tsx

  • Internationalized "Search..." placeholder using useGT() hook

apps/app/src/components/tests/charts/tests-by-assignee.tsx

  • Wrapped <Var> component inside <T> component for proper translation context
  • Restructured conditional rendering to properly separate translated and non-translated content
    apps/app/src/app/(app)/[orgId]/tests/page.tsx
  • Internationalized metadata title using getGT()
  • Internationalized AppOnboarding component props (title, description, imageAlt, cta)
  • Internationalized FAQ questions and answers in faqs array

apps/app/src/app/(app)/setup/components/accept-invite.tsx

  • Internationalized JSX content using component for headings and paragraphs
  • Internationalized button text and toast error message using useGT()
  • Internationalized fallback text for organization name

apps/app/src/app/(app)/onboarding/components/PostPaymentOnboarding.tsx

  • Internationalized step counter display using component with variables
  • Internationalized button text (Back, Setting up..., Complete Setup, Next) using useGT()
  • Internationalized footer message about AI personalization using component
    apps/app/src/components/forms/risks/InherentRiskForm.tsx
  • Added useGT hook and converted label constants to internationalized functions
  • Internationalized form labels, placeholders, button text, and toast messages
  • Updated likelihood and impact label mappings to use translation functions

apps/app/src/components/forms/risks/ResidualRiskForm.tsx

  • Added useGT hook and converted label constants to internationalized functions
  • Internationalized form labels, placeholders, button text, and toast messages
  • Updated likelihood and impact label mappings to use translation functions

apps/app/src/components/policies/charts/policies-by-assignee.tsx

  • Added getGT hook for server component internationalization
  • Internationalized card title, user fallback text, policies text, and status labels
  • Updated RiskBarChart function to accept translation function parameter

apps/app/src/components/policies/charts/policies-status.tsx

  • Added useGT hook and internationalized status labels and card title
  • Updated data array to use translated names for policy statuses

apps/app/src/components/policies/charts/policy-overview.tsx

  • Added useGT hook and internationalized chart config labels and card title
  • Internationalized "No data" fallback text

apps/app/src/components/risks/charts/RiskMatrixChart.tsx

  • Added useGT hook and converted probability/impact level constants to internationalized functions
  • Internationalized Save button text and Impact axis label
  • Updated probability and impact level arrays to use translation functions

apps/app/src/components/risks/charts/InherentRiskChart.tsx

  • Added useGT hook and internationalized chart title and description text

apps/app/src/components/risks/charts/ResidualRiskChart.tsx

  • Added useGT hook and internationalized chart title and description text

apps/app/src/components/risks/charts/RisksAssignee.tsx

  • Added getGT hook for server component internationalization
  • Internationalized card title, user fallback text, risks text, and all status labels
  • Updated tooltip titles and legend labels to use translation functions

apps/app/src/components/risks/charts/assessment.tsx

  • Added useGT hook and internationalized chart title "Risk Assessment"
    Perfect! I have completed the internationalization of all the target files that needed it. Here's a summary of the modifications made:

apps/app/src/components/tables/risk-register/data-table-pagination.tsx

  • Added useGT import and hook usage
  • Internationalized pagination text "of" using ICU message format with variables

apps/app/src/components/tables/risk-register/data-table.tsx

  • Added T component import
  • Wrapped "No results." text in T component

apps/app/src/components/tables/risk-register/empty-states.tsx

  • Added T and useGT imports
  • Wrapped JSX content in T components for "No results found", "Try another search, or adjusting the filters", "No risks yet", "Get started by creating your first risk"
  • Internationalized button text "Clear" and "Create" using useGT

apps/app/src/components/tables/risk-register/filter-toolbar.tsx

  • Added useGT import and hook usage
  • Internationalized placeholder texts: "Search...", "Status", "Department", "Filter by assignee"
  • Internationalized button labels: "Add New", "Clear"

apps/app/src/components/tables/risk-register/server-columns.tsx

  • Added getGT import from gt-next/server
  • Converted function to async and internationalized column headers: "Risk", "Status", "Department", "Assignee"

apps/app/src/components/tables/risk-tasks/columns.tsx

  • Added useGT import and hook usage
  • Internationalized column headers: "Tasks", "Status", "Due Date", "Assigned To"

apps/app/src/components/tables/risk-tasks/data-table-pagination.tsx

  • Added useGT import and hook usage
  • Internationalized pagination text "of" using ICU message format with variables

apps/app/src/components/tables/risk-tasks/data-table.tsx

  • Added T component import
  • Wrapped "No results found" text in T component
    Perfect! I have successfully internationalized all the target files that needed internationalization. Here's a summary of the changes made:

apps/app/src/app/(app)/setup/actions/create-organization.ts

  • Added getGT import from gt-next/server
  • Internationalized error messages "Not authorized." and "Failed to create or update organization structure" using getGT

apps/app/src/app/(app)/setup/actions/setup-session-actions.ts

  • Added getGT import from gt-next/server
  • Internationalized error messages "Not authenticated" and "Invalid setup session" in both functions using getGT

apps/app/src/app/(app)/setup/components/SetupLoadingStep.tsx

  • Added T, Branch, and useGT imports from gt-next
  • Wrapped conditional text content in T components with Branch components for proper conditional rendering
  • Internationalized button text "Continue to Plans"

apps/app/src/app/(app)/upgrade/[orgId]/components/booking-step.tsx

  • Added T, Var, and useGT imports from gt-next
  • Internationalized title, description, and CTA button strings using useGT with ICU message syntax for variable interpolation
  • Wrapped static text in T component for "Already had a demo?" message

apps/app/src/app/(app)/upgrade/components/MinimalOrganizationSwitcher.tsx

  • Added useGT import from gt-next
  • Internationalized fallback text "Select Organization" using useGT
    apps/app/src/app/(app)/[orgId]/controls/[controlId]/components/ControlDeleteDialog.tsx
  • Added T and useGT imports from gt-next
  • Wrapped dialog title "Delete Control" in T component
  • Wrapped dialog description in T component
  • Wrapped button text "Cancel", "Delete", and "Deleting..." in T components
  • Translated toast messages using t() function

apps/app/src/app/(app)/[orgId]/controls/[controlId]/components/PoliciesTable.tsx

  • Added useGT import from gt-next
  • Translated column headers "Name", "Created At", "Status" using t() function
  • Translated search placeholder "Search policies..." using t() function
  • Added t to useMemo dependency array

apps/app/src/app/(app)/[orgId]/controls/[controlId]/components/RequirementsTable.tsx

  • Added useGT import from gt-next
  • Translated column headers "Name", "Description" using t() function
  • Translated search placeholder "Search requirements..." using t() function
  • Added t to useMemo dependency array

apps/app/src/app/(app)/[orgId]/controls/[controlId]/components/SingleControlSkeleton.tsx

  • Added T import from gt-next
  • Wrapped card title "Domain" in T component

apps/app/src/app/(app)/[orgId]/controls/[controlId]/components/TasksTable.tsx

  • Added useGT import from gt-next
  • Translated column headers "Title", "Description", "Status" using t() function
  • Translated search placeholder "Search tasks..." using t() function
  • Added t to useMemo dependency array

apps/app/src/app/(app)/[orgId]/controls/[controlId]/components/SingleControl.tsx

  • Added T import from gt-next
  • Wrapped tab labels "Requirements", "Policies", "Tasks" in T components
  • Wrapped dropdown menu item "Delete" in T component
    apps/app/src/app/(app)/[orgId]/controls/[controlId]/page.tsx
  • Internationalized breadcrumb label 'Controls' using getGT()

apps/app/src/app/(app)/[orgId]/frameworks/[frameworkInstanceId]/actions/delete-framework.ts

  • Internationalized error messages 'Not authorized', 'Framework instance not found', and 'Failed to delete framework instance' using getGT()

apps/app/src/app/(app)/[orgId]/frameworks/[frameworkInstanceId]/components/FrameworkDeleteDialog.tsx

  • Internationalized dialog title 'Delete Framework', description text, button labels 'Cancel', 'Delete', 'Deleting...', and toast messages using T component and useGT()

apps/app/src/app/(app)/[orgId]/frameworks/[frameworkInstanceId]/components/FrameworkOverview.tsx

  • Internationalized UI text including 'Delete Framework', 'Compliance Progress', '% complete', status counts, 'Control Status', 'Complete', 'In Progress', 'Total' using T component
  • Wrapped numeric values in Num component for proper localization

apps/app/src/app/(app)/[orgId]/frameworks/[frameworkInstanceId]/components/FrameworkRequirements.tsx

  • Internationalized table column headers 'Name', 'Description', 'Controls' and section heading 'Requirements' using T component
  • Wrapped numeric count values in Num component

apps/app/src/app/(app)/[orgId]/frameworks/[frameworkInstanceId]/page.tsx

  • Internationalized breadcrumb label 'Frameworks' using getGT()
    apps/app/src/app/(app)/[orgId]/people/[employeeId]/layout.tsx
  • Internationalized "People" breadcrumb text using T component

apps/app/src/app/(app)/[orgId]/people/[employeeId]/types/index.ts

  • Converted appErrors constant to getAppErrors function that takes translation callback
  • Internationalized error messages: "Employee not found", "You are not authorized to view this employee", "An unexpected error occurred"

apps/app/src/app/(app)/[orgId]/people/[employeeId]/actions/update-employee.ts

  • Converted validation schema to getSchema function with translation support
  • Updated action to use getGT for async translation callback
  • Internationalized validation error messages: "Name cannot be empty", "Invalid email format", "Email address is already in use."

apps/app/src/app/(app)/[orgId]/people/[employeeId]/components/Fields/Department.tsx

  • Converted DEPARTMENTS array to getDepartments function with translation support
  • Internationalized form label "Department" using T component
  • Internationalized placeholder "Select department" using useGT hook
  • Internationalized all department labels: Admin, Governance, HR, IT, IT Service Management, Quality Management, None

apps/app/src/app/(app)/[orgId]/people/[employeeId]/components/Fields/Email.tsx

  • Internationalized form label "EMAIL" using T component
  • Internationalized placeholder "Employee email" using useGT hook

apps/app/src/app/(app)/[orgId]/people/[employeeId]/components/Fields/JoinDate.tsx

  • Internationalized form label "Join Date" using T component
  • Internationalized date picker placeholder "Pick a date" using T component

apps/app/src/app/(app)/[orgId]/people/[employeeId]/components/Fields/Name.tsx

  • Internationalized form label "NAME" using T component
  • Internationalized placeholder "Employee name" using useGT hook
    Summary

apps/app/src/app/(public)/auth/page.tsx

  • Added T import from gt-next
  • Wrapped JSX content with T component for "Get Started with Comp AI" title, description, and terms/privacy text

apps/app/src/components/forms/organization/delete-organization.tsx

  • Added T and useGT imports from gt-next
  • Wrapped JSX elements with T component for delete organization title, description, dialog content, and buttons
  • Converted toast messages and Delete button text to use t() function for strings

apps/app/src/components/forms/organization/update-organization-name.tsx

  • Added T and useGT imports from gt-next
  • Wrapped JSX elements with T component for organization name title, description, and validation message
  • Converted toast messages and Save button text to use t() function

apps/app/src/components/forms/organization/update-organization-website.tsx

  • Added T and useGT imports from gt-next
  • Wrapped JSX elements with T component for website title, description, and validation message
  • Converted toast messages, placeholder text, and Save button text to use t() function

apps/app/src/components/forms/policies/policy-overview.tsx

  • Added T and useGT imports from gt-next
  • Wrapped form labels with T component for Status, Review Frequency, Department, Review Date, and Signature Requirement
  • Converted placeholder texts, Pick a date text, toast messages, and Save button to use t() function

apps/app/src/components/forms/policies/update-policy-form.tsx

  • Added T and useGT imports from gt-next
  • Wrapped JSX elements with T component for Policy accordion trigger, form labels, and select items
  • Converted placeholder texts, toast messages, and Save button text to use t() function
    Now I need to review the files that weren't internationalized to confirm they don't need it:
  1. types.ts - Only contains TypeScript type definitions, no user-facing content
  2. FrameworkSelection.tsx - Only contains error handling console.error statements, no user-facing content
  3. WebsiteInput.tsx - Only contains utility functions for URL processing, no user-facing content

All target files have been internationalized successfully. Here's the summary of changes:

apps/app/src/app/(app)/setup/actions/create-organization-minimal.ts

  • Internationalized validation error messages in schema
  • Internationalized user-facing error messages
  • Internationalized context question for framework selection

apps/app/src/app/(app)/setup/components/OnboardingStepInput.tsx

  • Internationalized placeholder text for website input
  • Internationalized dynamic placeholder for company description
  • Internationalized search placeholder with interpolation

apps/app/src/app/(app)/setup/lib/constants.ts

  • Created async functions for schema and steps generation with translations
  • Internationalized all validation messages
  • Internationalized all step questions, placeholders, and option values
  • Internationalized welcome text

apps/app/src/app/(app)/setup/hooks/useOnboardingForm.ts

  • Updated to use translated steps and schema functions
  • Internationalized toast error messages
  • Added proper async loading for steps and schema

apps/app/src/app/(app)/setup/components/OnboardingFormActions.tsx

  • Internationalized button text using T component

apps/app/src/app/(app)/setup/components/OrganizationSetupForm.tsx

  • Internationalized step counter display with variable components
  • Internationalized AI personalization message
  • Added safety checks for async loaded data

apps/app/src/app/(app)/setup/[setupId]/page.tsx

  • Internationalized page metadata title using generateMetadata function
    apps/app/src/app/(app)/[orgId]/people/dashboard/components/EmployeeCompletionChart.tsx
  • Internationalized card titles, error messages, legend labels, and tooltip text using T component and useGT hook

apps/app/src/app/(app)/[orgId]/people/devices/components/DeviceComplianceChart.tsx

  • Internationalized card title, error message, chart labels, and legend items using T component and useGT hook

apps/app/src/app/(app)/[orgId]/people/devices/components/EmployeeDevicesColumns.tsx

  • Internationalized column headers "Device Name" and "Is Compliant" using useGT hook

apps/app/src/app/(app)/[orgId]/people/devices/components/HostDetails.tsx

  • Internationalized button text, card title with device name interpolation, policy status labels, and empty state message using T component and useGT hook

apps/app/src/app/(app)/[orgId]/people/dashboard/page.tsx

  • Internationalized page metadata title using getGT server function
    apps/app/src/components/data-table/faceted.tsx
  • Wrapped dynamic placeholder content in component to prevent runtime changes in component

apps/app/src/components/data-table/data-table-filter-list.tsx

  • Replaced ternary operators with components for conditional rendering in components

apps/app/src/components/data-table/data-table-filter-menu.tsx

  • Wrapped dynamic value content in component to prevent runtime changes in component

apps/app/src/components/data-table/data-table-sort-list.tsx

  • Replaced ternary operators with components for conditional rendering in components
    apps/app/src/app/(app)/[orgId]/people/[employeeId]/components/EmployeeTasks.tsx
  • Added Var import from gt-next
  • Fixed dynamic content issue by wrapping host.computer_name with Var component within the T component
    apps/app/src/app/(app)/[orgId]/policies/(overview)/components/policy-assignee-chart.tsx
  • Internationalized chart title "Policies by Assignee", badge text "Distribution", empty state message "No policies assigned to users", column headers "Assignee" and "Policy Count", badge text with variable "Top: {assigneeName}", and chart legend labels using useGT() and T component

apps/app/src/app/(app)/[orgId]/policies/(overview)/components/policy-status-chart.tsx

  • Internationalized chart title "Policy by Status", badge text "Overview", empty state message "No policy data available", badge text with variable "Most: {statusName}", chart label "Policies", tooltip label "Count", and status names in chart data using useGT() and T component

apps/app/src/app/(app)/[orgId]/policies/(overview)/page.tsx

  • Internationalized metadata title "Policies" using getGT() in generateMetadata function

apps/app/src/app/(app)/[orgId]/policies/[policyId]/components/PolicyActionDialog.tsx

  • Internationalized placeholder text "Add optional comment or reason (will be added as a comment)" using useGT() and button text "Cancel" using T component
    All internationalization work has been completed. Here is the summary of changes:

apps/app/src/app/(app)/[orgId]/policies/[policyId]/page.tsx

  • Added gt-next/server import and getGT() function
  • Internationalized "Policies" and "Policy" breadcrumb labels
  • Internationalized "Policy Overview" metadata title

apps/app/src/app/(app)/[orgId]/policies/all/components/policies-table-columns.tsx

  • Added useGT() import and translation function
  • Internationalized column headers: "Policy Name", "Status", "Last Updated"
  • Internationalized meta labels and placeholder text for search functionality

apps/app/src/app/(app)/[orgId]/policies/all/components/policies-table.tsx

  • Added useGT() import and translation function
  • Internationalized "Create Policy" action button text

apps/app/src/app/(app)/[orgId]/policies/all/page.tsx

  • Added gt-next/server import and getGT() function
  • Internationalized "Policies" breadcrumb label and metadata title

apps/app/src/app/(app)/[orgId]/risk/(overview)/components/table/RiskColumns.tsx

  • Added useGT() import and translation function
  • Internationalized column headers: "Risk", "Status", "Department", "Assignee"
  • Internationalized meta labels and placeholder text
  • Internationalized "None" text for empty assignee state

apps/app/src/app/(app)/[orgId]/risk/(overview)/RisksTable.tsx

  • Added useGT() import and translation function
  • Internationalized "Create Risk" action button text
    Perfect! I have successfully fixed the warning by:
  1. Adding the T import to the existing useGT import from 'gt-next'
  2. Wrapping the hardcoded "Apr 15" date text with the <T> component

apps/app/src/app/(app)/[orgId]/tasks/components/TaskCard.tsx

  • Added T component import alongside existing useGT import
  • Wrapped hardcoded "Apr 15" date text with Apr 15 component
    apps/app/src/app/(app)/[orgId]/settings/context-hub/components/context-form.tsx
  • Fixed logical AND conditional rendering inside T component by replacing {isPending && <Loader2 className="ml-2 h-4 w-4 animate-spin" />} with a Branch component
    apps/app/src/app/(app)/[orgId]/vendors/[vendorId]/components/VendorResidualRiskSheet.tsx
  • Internationalized "Update Residual Risk" and "Select the residual risk level for this vendor" text using <T> component
  • Added import for T from 'gt-next'
    apps/app/src/app/(app)/[orgId]/people/all/components/TeamMembersClient.tsx
  • Removed translation wrapper from error.message to fix validation error with non-string literal

apps/app/src/app/(app)/[orgId]/people/all/components/InviteMembersModal.tsx

  • Internationalized aria-label "Remove invite" using translation function for accessibility
    All target files have been successfully internationalized. Here's a summary of the changes made:

apps/app/src/app/(app)/[orgId]/risk/(overview)/page.tsx

  • Added import for getGT from gt-next/server
  • Internationalized 'Risk Management' title, description, CTA text, imageAlt, and FAQ content
  • Internationalized 'Risks' breadcrumb label and metadata title

apps/app/src/app/(app)/[orgId]/risk/[riskId]/page.tsx

  • Added import for getGT from gt-next/server
  • Internationalized 'Risks' breadcrumb label and 'Risk Overview' metadata title

apps/app/src/app/(app)/[orgId]/settings/api-keys/components/CreateApiKeyDialog.tsx

  • Added import for useGT from gt-next
  • Internationalized all form labels, placeholders, button text, dialog titles and descriptions
  • Internationalized toast messages and error handling text

apps/app/src/app/(app)/[orgId]/settings/api-keys/components/table/ApiKeysColumns.tsx

  • Added import for useGT from gt-next
  • Internationalized all column headers, meta labels, and table cell content
  • Internationalized dialog content for API key revocation including button text and status messages
    apps/app/src/app/(app)/[orgId]/vendors/[vendorId]/components/VendorInherentRiskChart.tsx
  • Internationalized title and description props using useGT() hook

apps/app/src/app/(app)/[orgId]/vendors/[vendorId]/components/VendorResidualRiskChart.tsx

  • Internationalized title and description props using useGT() hook

apps/app/src/app/(app)/[orgId]/vendors/[vendorId]/actions/schema.ts

  • Added internationalized versions of all validation schemas with async functions using getTranslations()
  • Internationalized error messages for all form validation rules

apps/app/src/app/(app)/[orgId]/vendors/[vendorId]/components/title-and-description/update-title-and-description-form.tsx

  • Internationalized toast messages using useGT() hook
  • Internationalized form labels using T component
  • Internationalized placeholder text and button text using useGT() hook

apps/app/src/app/(app)/[orgId]/vendors/[vendorId]/components/title-and-description/update-title-and-description-sheet.tsx

  • Internationalized sheet titles and descriptions using T component

apps/app/src/app/(app)/[orgId]/vendors/[vendorId]/components/secondary-fields/update-secondary-fields-form.tsx

  • Internationalized toast messages using useGT() hook
  • Internationalized form labels using T component
  • Internationalized placeholder text and button text using useGT() hook
    apps/app/src/app/(app)/[orgId]/vendors/[vendorId]/page.tsx
  • Internationalized breadcrumb label "Vendors" using getGT() in async component
  • Internationalized metadata title "Vendors" using getGT() in async generateMetadata function

apps/app/src/app/(app)/[orgId]/vendors/backup-overview/layout.tsx

  • Internationalized AppOnboarding props (title, description, cta) using T component
  • Internationalized FAQ questions and answers using T component
  • Internationalized SecondaryMenu labels ("Overview", "Vendors") using T component
  • Internationalized loading text using T component

apps/app/src/app/(app)/[orgId]/vendors/backup-overview/page.tsx

  • Internationalized metadata title "Vendors" using getGT() in async generateMetadata function

apps/app/src/app/(app)/setup/go/[id]/components/onboarding-status.tsx

  • Internationalized "Redirecting" text using T component

apps/app/src/app/(app)/setup/go/[id]/page.tsx

  • Internationalized "Onboarding in progress" heading using T component
  • Internationalized "This may take a few minutes." text using T component

apps/app/src/app/(app)/upgrade/[orgId]/components/AnimatedPricingBanner.tsx

  • Converted messages array to getMessages function accepting t callback
  • Internationalized all animation messages using useGT() hook

apps/app/src/app/(app)/upgrade/[orgId]/constants/pricing.ts

  • Converted PRICING_FEATURES constant to getPricingFeatures function accepting t callback
  • Internationalized all feature descriptions for starter and managed plans
  • Converted PLAN_TYPES constant to getPlanTypes function accepting t callback
  • Internationalized plan type labels
    apps/app/src/app/(app)/[orgId]/frameworks/[frameworkInstanceId]/requirements/[requirementKey]/components/RequirementControls.tsx
  • Wrapped standalone component with component for proper translation context
    apps/app/src/app/(app)/[orgId]/vendors/(overview)/page.tsx
  • Internationalized AppOnboarding component title, description, and cta props using getGT
    Perfect! I have successfully internationalized all the target files that needed internationalization. Here is the summary:

apps/app/src/app/(app)/[orgId]/policies/[policyId]/components/PolicyControlMappingConfirmDeleteModal.tsx

  • Wrapped user-facing text in <T> components including dialog title, description, and button text
  • Used useGT() for toast messages with ICU message syntax for variables
  • Used <Var> component to properly handle dynamic content within <T> component

apps/app/src/app/(app)/[orgId]/policies/[policyId]/components/PolicyControlMappingModal.tsx

  • Wrapped user-facing text in <T> components including dialog elements and button text
  • Used useGT() for placeholder text and toast messages with ICU message syntax
  • Applied proper variable handling for dynamic toast messages

apps/app/src/app/(app)/[orgId]/settings/context-hub/components/context-hub-list.tsx

  • Wrapped static user-facing text in <T> components for card title and description

apps/app/src/app/(app)/[orgId]/settings/context-hub/components/context-list.tsx

  • Wrapped user-facing text in <T> components throughout the component
  • Used useGT() for aria-label and toast messages
  • Applied internationalization to dialog titles, descriptions, buttons, and alert dialog content

apps/app/src/app/(app)/[orgId]/vendors/[vendorId]/components/VendorInherentRiskSheet.tsx

  • Wrapped user-facing text in <T> components for sheet titles and descriptions

apps/app/src/app/(app)/[orgId]/vendors/[vendorId]/components/VendorResidualRiskForm.tsx

  • Wrapped form labels and save button text in <T> components
  • Used useGT() for toast messages
  • Applied <Num> component for proper numeric formatting within form descriptions
    apps/app/src/app/(app)/[orgId]/vendors/[vendorId]/components/tasks/data-table/empty-states.tsx
  • Fixed ternary operator inside <T> component by replacing with <Branch> component for conditional rendering
  • Added Branch import from 'gt-next'
    apps/app/src/app/(app)/[orgId]/tests/dashboard/components/TestCard.tsx
  • Wrapped dynamic content {test.title || t('Untitled Test')} in <Var> component to fix validation error with <T> component containing runtime-dynamic content
    apps/app/src/app/(app)/[orgId]/policies/[policyId]/editor/components/PolicyHeader.tsx
  • Fixed unnecessary T component wrapper by replacing T/Var usage with useGT() to properly translate saveStatus strings
  • Removed T and Var imports and added useGT import
    Perfect! I have completed internationalizing all the target files. Let me provide the summary of changes:

apps/app/src/app/(app)/[orgId]/tasks/[taskId]/layout.tsx

  • Added import for getGT from gt-next/server
  • Internationalized 'Tasks' breadcrumb label using getGT

apps/app/src/app/(app)/[orgId]/tasks/actions/updateTask.ts

  • Added import for getGT from gt-next/server
  • Internationalized error messages: 'Not authorized - no organization found' and 'Failed to update task'

apps/app/src/app/(app)/[orgId]/tasks/[taskId]/actions/delete-task.ts

  • Added import for getGT from gt-next/server
  • Internationalized error messages: 'Not authorized', 'Task not found', and 'Failed to delete task'

apps/app/src/app/(app)/[orgId]/tasks/[taskId]/components/TaskDeleteDialog.tsx

  • Added imports for T and useGT from gt-next
  • Internationalized dialog title, description, button text, and toast messages using T component for JSX content and useGT for string content

apps/app/src/app/(app)/[orgId]/tasks/actions/deleteTaskAttachment.ts

  • Added import for getGT from gt-next/server
  • Internationalized error messages: 'Not authorized', 'Attachment not found or access denied', and 'Failed to delete attachment.'

apps/app/src/app/(app)/[orgId]/tasks/actions/getTaskAttachmentUrl.ts

  • Added import for getGT from gt-next/server
  • Internationalized all error messages including authorization, attachment access, URL processing, and database errors

apps/app/src/app/(app)/[orgId]/tasks/[taskId]/components/TaskBody.tsx

  • Added imports for T and useGT from gt-next
  • Internationalized placeholders, labels, button text, toast messages, and descriptive text using appropriate T component for JSX content and useGT for strings

apps/app/src/app/(app)/[orgId]/tasks/[taskId]/components/TaskMainContent.tsx

  • Added import for T from gt-next
  • Internationalized 'Comments' heading using T component

apps/app/src/app/(app)/[orgId]/tasks/[taskId]/components/PropertySelector.tsx

  • Added import for useGT from gt-next
  • Internationalized default prop values for search placeholder, empty text, and unassign label by providing translated defaults when props are not specified

Summary

I have successfully internationalized the target files that needed it using gt-next. Here's a summary of the changes:

apps/app/src/app/(app)/[orgId]/settings/trust-portal/components/TrustPortalDomain.tsx

  • Added T and useGT imports from gt-next
  • Converted schema validation to use translation function
  • Wrapped all user-facing JSX content with <T> components
  • Updated toast messages to use translation function
  • Added proper form labels, button text, table headers, and status messages with translations

apps/app/src/app/(app)/[orgId]/settings/trust-portal/components/TrustPortalSwitch.tsx

  • Added T and useGT imports from gt-next
  • Updated all toast success/error messages to use translation function
  • Wrapped user-facing JSX content including titles, descriptions, form labels with <T> components
  • Added translations for compliance framework status options (Started, In Progress, Compliant, Disabled)
  • Updated placeholder text and status messages for friendly URL checking

apps/app/src/app/(app)/[orgId]/settings/trust-portal/page.tsx

  • Added getGT import from gt-next/server
  • Updated metadata title generation to use translation function

apps/app/src/app/(app)/[orgId]/settings/trust-portal/actions/check-dns-record.ts

  • Added getGT import from gt-next/server
  • Updated error messages in DNS verification process to use translation function
  • Added translations for validation errors and system errors

apps/app/src/app/(app)/[orgId]/settings/trust-portal/actions/custom-domain.ts

  • Added getGT import from gt-next/server
  • Updated error messages for domain conflicts and general failures to use translation function

apps/app/src/app/(app)/[orgId]/settings/trust-portal/actions/trust-portal-switch.ts

  • Added getGT import from gt-next/server
  • Updated error message to use translation function with more appropriate text

apps/app/src/app/(app)/[orgId]/settings/trust-portal/actions/update-trust-portal-frameworks.ts

  • Added getGT import from gt-next/server
  • Updated authentication and trust portal not found error messages to use translation function

Files that were not modified (no user-facing content):

  • apps/app/src/app/(app)/[orgId]/settings/trust-portal/actions/is-friendly-available.ts
  • apps/app/src/app/(app)/[orgId]/settings/trust-portal/components/logos.tsx
  • apps/app/src/app/(app)/[orgId]/tasks/[taskId]/actions.ts
    Perfect! I've successfully fixed the linting issue by:
  1. Adding Branch to the imports from 'gt-next'
  2. Replacing the ternary operator {policy.isRequiredToSign ? 'Required' : 'Not Required'} with a <Branch> component that uses:
    • branch={policy.isRequiredToSign.toString()} to convert the boolean to a string
    • true="Required" for when the condition is true
    • false="Not Required" for when the condition is false

The fix follows the internationalization guide exactly as specified, using the <Branch> component for conditional rendering within a <T> component.

apps/app/src/app/(app)/[orgId]/policies/[policyId]/components/UpdatePolicyOverview.tsx

  • Added Branch import from gt-next
  • Replaced ternary operator in component with component for conditional rendering of 'Required'/'Not Required' text
    apps/app/src/app/(app)/[orgId]/vendors/[vendorId]/tasks/[taskId]/components/title/title.tsx
  • Wrapped "Loading..." text in component to internationalize the loading fallback message
    Perfect! I have successfully internationalized all 10 target files. Here's the summary of the changes made:

Summary of Changes

apps/app/src/app/api/v1/employees/[id]/route.ts

  • Added gt-next/server import for getGT function
  • Internationalized error messages: "Employee not found", "Failed to fetch employee", "Employee deleted successfully", "Failed to delete employee"

apps/app/src/app/api/v1/risks/[id]/route.ts

  • Added gt-next/server import for getGT function
  • Internationalized error messages: "Risk not found", "Failed to fetch risk", "Risk deleted successfully", "Failed to delete risk"

apps/app/src/app/(app)/[orgId]/controls/[controlId]/actions/delete-control.ts

  • Added gt-next/server import for getGT function
  • Internationalized error messages: "Not authorized", "Control not found", "Failed to delete control"

apps/app/src/app/(app)/[orgId]/people/[employeeId]/actions/get-employee-details.ts

  • Updated import to use getAppErrors instead of static appErrors
  • Added gt-next/server import for getGT function
  • Used getAppErrors function with translation to generate internationalized error messages

apps/app/src/app/(app)/[orgId]/people/[employeeId]/actions/update-department.ts

  • Updated import to use getAppErrors instead of static appErrors
  • Added gt-next/server import for getGT function
  • Used getAppErrors function with translation to generate internationalized error messages

apps/app/src/app/(app)/[orgId]/people/[employeeId]/actions/update-employee-details.ts

  • Updated import to use getAppErrors instead of static appErrors
  • Added gt-next/server import for getGT function
  • Used getAppErrors function with translation to generate internationalized error messages

apps/app/src/app/(app)/[orgId]/people/[employeeId]/actions/update-employee-status.ts

  • Updated import to use getAppErrors instead of static appErrors
  • Added gt-next/server import for getGT function
  • Used getAppErrors function with translation to generate internationalized error messages

apps/app/src/app/(app)/[orgId]/people/[employeeId]/components/EditableDepartment.tsx

  • Added useGT hook import from gt-next
  • Converted static DEPARTMENTS array to getDepartments function using translation
  • Internationalized toast messages, placeholder text, and department labels

apps/app/src/app/(app)/[orgId]/people/[employeeId]/components/EditableDetails.tsx

  • Added T component import from gt-next
  • Wrapped static text labels "Name" and "Email" with T component for translation

apps/app/src/app/(app)/[orgId]/people/[employeeId]/components/EditableStatus.tsx

  • Added useGT hook import from gt-next
  • Converted static STATUS_OPTIONS array to getStatusOptions function using translation
  • Internationalized toast messages, placeholder text, and status labels

Fixed errors

Perfect! The validation now passes successfully. The error has been fixed.

Summary

apps/app/src/app/(app)/[orgId]/policies/[policyId]/editor/components/PolicyHeader.tsx

  • Fixed non-string literal error by replacing t(saveStatus) with conditional rendering that applies translation to each specific string value ('Saved', 'Saving', 'Unsaved')

Localization completed by the Locadex bot in 1153 seconds.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

0 participants