Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: signing volume #1358

Merged
merged 19 commits into from
Dec 3, 2024
Merged

feat: signing volume #1358

merged 19 commits into from
Dec 3, 2024

Conversation

ephraimduncan
Copy link
Contributor

@ephraimduncan ephraimduncan commented Sep 19, 2024

CleanShot 2024-09-19 at 14 28 49@2x

Summary by CodeRabbit

Release Notes

  • New Features

    • Enhanced German, English, Spanish, and French translations for user interface strings, including new entries for "Leaderboard" and "Signing Volume."
    • Introduced a new leaderboard interface for administrators, allowing for sorting and pagination of signing volumes.
    • Added a LeaderboardTable component for displaying signing volumes with search and pagination functionalities.
  • Bug Fixes

    • Improved clarity and accuracy of existing translations across multiple languages.
  • Documentation

    • Updated localization files to ensure accurate and contextually relevant translations for a better user experience.

Copy link

vercel bot commented Sep 19, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
prd-app 🔄 Building (Inspect) Visit Preview 💬 Add feedback Dec 3, 2024 0:32am
prd-marketing 🔄 Building (Inspect) Visit Preview 💬 Add feedback Dec 3, 2024 0:32am
prd-openpage-api ❌ Failed (Inspect) Dec 3, 2024 0:32am
stg-app ✅ Ready (Inspect) Visit Preview 💬 Add feedback Dec 3, 2024 0:32am
stg-docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Dec 3, 2024 0:32am
stg-marketing ✅ Ready (Inspect) Visit Preview 💬 Add feedback Dec 3, 2024 0:32am
1 Skipped Deployment
Name Status Preview Comments Updated (UTC)
prd-docs ⬜️ Ignored (Inspect) Visit Preview Dec 3, 2024 0:32am

Copy link
Contributor

coderabbitai bot commented Sep 19, 2024

Important

Review skipped

Auto reviews are limited to specific labels.

🏷️ Labels to auto review (1)
  • coderabbit

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

📝 Walkthrough
📝 Walkthrough

Walkthrough

This pull request includes extensive updates to localization files for both German and English translations, enhancing user interface strings across the application. It introduces new translation entries, modifies existing ones, and adds new functionality for fetching and displaying leaderboard data. New components and actions related to the leaderboard feature have been created, including asynchronous functions for data retrieval and React components for rendering the leaderboard interface.

Changes

File Path Change Summary
packages/lib/translations/de/web.po Updated German translations for UI strings, adding new entries and modifying existing ones for clarity and accuracy.
packages/lib/translations/en/web.po Updated English translations, adding new entries for "Leaderboard" and "Signing Volume," and refining existing messages.
apps/web/src/app/(dashboard)/admin/leaderboard/fetch-leaderboard.actions.ts Introduced search function for fetching leaderboard data with authorization checks.
packages/lib/server-only/admin/get-signing-volume.ts Added getSigningVolume function to retrieve signing volume data, including query parameters and pagination.
packages/lib/translations/de/web.js Introduced German localization module with structured messages for UI prompts and error handling.
packages/lib/translations/en/web.js Introduced English localization module with structured messages for UI prompts and error handling.
apps/web/src/app/(dashboard)/admin/leaderboard/page.tsx Added Leaderboard component for rendering the leaderboard interface with session and authorization checks.
apps/web/src/app/(dashboard)/admin/leaderboard/data-table-leaderboard.tsx Added LeaderboardTable component for displaying leaderboard data, including search and pagination functionality.
packages/lib/translations/de/common.po Updated German translations for document-related notifications and actions, refining existing messages for clarity.
packages/lib/translations/de/marketing.po Updated German marketing translations, enhancing clarity and consistency for user engagement phrases.
packages/lib/translations/es/common.po Updated Spanish translations for document management and team interactions, improving clarity and accuracy.
packages/lib/translations/es/marketing.po Updated Spanish marketing translations for improved localization and accuracy.
packages/lib/translations/es/web.po Updated Spanish translations for UI elements, adding new entries and refining existing translations for clarity.
packages/lib/translations/fr/common.po Updated French translations for document-related actions and notifications, ensuring clarity and accuracy.
packages/lib/translations/fr/marketing.po Updated French marketing translations for improved clarity and consistency.
packages/lib/translations/fr/web.po Updated French translations for UI strings, adding new entries and refining existing messages for clarity.

Possibly related PRs

  • chore: add translations #1327: This PR adds translations to the German localization files, which directly relates to the updates made in the main PR for German translations in web.po.
  • feat: add french #1355: This PR introduces initial French translations, which aligns with the main PR's focus on enhancing localization for German translations, indicating a broader effort in translation updates across languages.
  • feat: allow editing pending documents #1346: This PR allows editing pending documents and includes updates to translations, which may relate to the changes in user interface strings in the main PR.
  • style: Update common.po #1402: This PR updates the German translation file common.po, which is relevant to the main PR's updates to the same file.
  • style: Update web.po #1403: This PR updates the German translation file web.po, which is directly related to the changes made in the main PR.
  • chore: add translations #1444: This PR updates the German translations in common.po, which is relevant to the main PR's focus on translation updates.
  • chore: add translations #1461: This PR updates the German translations in common.po, which aligns with the main PR's updates to the same file.
  • chore: add translations #1463: This PR introduces Polish translations, which indicates a broader effort in translation updates across languages, similar to the main PR's focus on German translations.
  • chore: add translations #1474: This PR updates the German translations in common.po, which is relevant to the main PR's updates to the same file.

Suggested labels

pkg: ee changes, apps: marketing

Suggested reviewers

  • dguyen
  • ElTimuro

Poem

🐰 In the meadow where translations bloom,
New words sprout, dispelling the gloom.
With leaders tall and volumes bright,
We guide our users, day and night.
From German fields to English skies,
Clarity reigns, as our app flies! 🌼


Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 5

Outside diff range and nitpick comments (1)
apps/web/src/app/(dashboard)/admin/leaderboard/fetch-leaderboard.actions.ts (1)

18-20: Consider providing more specific error messages.

Instead of throwing a generic 'Unauthorized' error, consider providing more context about why the error occurred. For example:

throw new Error('Only admin users can access the leaderboard data.');

This can help with debugging and provides a clearer message to the client.

Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

Commits

Files that changed from the base of the PR and between efb2bc9 and 89154e6.

Files selected for processing (7)
  • apps/web/src/app/(dashboard)/admin/leaderboard/data-table-leaderboard.tsx (1 hunks)
  • apps/web/src/app/(dashboard)/admin/leaderboard/fetch-leaderboard.actions.ts (1 hunks)
  • apps/web/src/app/(dashboard)/admin/leaderboard/page.tsx (1 hunks)
  • apps/web/src/app/(dashboard)/admin/nav.tsx (2 hunks)
  • packages/lib/server-only/admin/get-signing-volume.ts (1 hunks)
  • packages/lib/translations/de/web.po (7 hunks)
  • packages/lib/translations/en/web.po (7 hunks)
Additional comments not posted (19)
apps/web/src/app/(dashboard)/admin/leaderboard/fetch-leaderboard.actions.ts (1)

15-25: LGTM! The function provides a secure and flexible way to retrieve leaderboard data.

The implementation looks good overall:

  • It correctly uses server-side rendering.
  • It properly checks for admin privileges before executing the main logic.
  • It uses clear parameter types for the search options.
  • It delegates data fetching to a separate function, which is a good separation of concerns.
apps/web/src/app/(dashboard)/admin/leaderboard/page.tsx (5)

1-18: Imports and type definitions look good!

The component imports all the necessary dependencies and defines a clear type structure for its props. The AdminLeaderboardProps type provides flexibility by making all search parameters optional.


20-23: Component function signature and setup are well-structured!

The Leaderboard component is properly defined as an async default export function, accepting optional search parameters as props. Setting up internationalization and retrieving the user session are appropriate steps for an admin-facing component.


25-27: Admin access control is properly implemented!

The component correctly enforces admin access control by checking the user's admin status using the isAdmin function. Throwing an "Unauthorized" error for non-admin users is an appropriate way to handle unauthorized access attempts.


29-41: Search parameter handling and data fetching are well-implemented!

The component effectively extracts and processes the search parameters, assigning default values for pagination and sorting. This ensures a consistent and predictable behavior for the component. Using a separate search function for data fetching promotes separation of concerns and maintainability.


43-60: Component's return statement and rendering are well-structured!

The component returns a well-structured JSX with a heading and the LeaderboardTable component. Using the Trans component for the heading ensures proper internationalization. Passing the fetched data and other relevant props to the LeaderboardTable component allows for a clean separation of concerns and maintainable code structure.

apps/web/src/app/(dashboard)/admin/nav.tsx (1)

83-95: LGTM!

The new button for the leaderboard section follows the existing patterns and conventions of the AdminNav component. It is correctly linked to the "/admin/leaderboard" route, uses an appropriate icon and label, and is properly styled to highlight when active.

The use of the Trans component for the label allows for easy internationalization, which is a good practice.

Overall, this is a clean and consistent addition to the navigation.

apps/web/src/app/(dashboard)/admin/leaderboard/data-table-leaderboard.tsx (5)

1-30: LGTM!

The imports and type definitions are appropriate and cover the necessary dependencies. The SigningVolume and LeaderboardTableProps types provide a clear structure for the data and props used in the component.


32-45: LGTM!

The component definition and state management are implemented correctly. The usage of hooks like useState, useTransition, and useDebouncedValue is appropriate for managing state and optimizing search performance. The useUpdateSearchParams custom hook is a good choice for updating the URL search params.


47-98: LGTM!

The columns definition and memoization are implemented correctly. Using useMemo is a good practice to memoize the columns array and avoid unnecessary re-renders. The column definitions are clear and include the necessary properties. The sortable columns have appropriate click handlers to trigger the sorting functionality. The usage of the satisfies keyword ensures type safety of the columns array.


100-133: LGTM!

The useEffect hook and pagination handling are implemented correctly. The useEffect hook properly updates the search params whenever the debounced search string changes. The onPaginationChange function correctly updates the page and perPage values in the search params. The handleChange function updates the search string state when the input value changes. The handleColumnSort function appropriately toggles the sort order and updates the search params when a sortable column header is clicked.


135-162: LGTM!

The rendering logic and loading state handling are implemented correctly. The search input is rendered with appropriate props and change handler. The DataTable component is rendered with the necessary props, including columns, data, pagination, and callbacks. The DataTablePagination component is correctly rendered as a child of DataTable to handle pagination. The loading indicator is conditionally rendered based on the isPending state, providing visual feedback during loading states.

packages/lib/translations/de/web.po (3)

1800-1802: LGTM!

The new translation entry for "Leaderboard" looks good. It's correctly referenced in the admin navigation component.


2819-2822: Looks good!

The new translation entry for "Signing Volume" is correctly added with references to the leaderboard components.


2832-2833: Reference update looks good!

The line number reference for the "Site Settings" translation entry has been correctly updated in apps/web/src/app/(dashboard)/admin/nav.tsx, indicating the navigation item has moved.

packages/lib/translations/en/web.po (2)

1818-1820: New translation looks good!

The new "Leaderboard" translation entry is clear, accurate and consistent.


2841-2844: New translation looks good!

The new "Signing Volume" translation entry is clear, accurate and consistent.

packages/lib/server-only/admin/get-signing-volume.ts (2)

45-46: Verify the existence and correctness of getOrderByClause function

Ensure that the getOrderByClause function is correctly defined and available in the scope before it's used.

Run the following script to check for any issues:

Verification successful

getOrderByClause function is correctly defined and used

The getOrderByClause function is properly defined and available in the scope before it's used. It's defined as a const arrow function in the same file (packages/lib/server-only/admin/get-signing-volume.ts) where it's being used. The function is called with the correct parameters (sortBy and sortOrder), and there are no naming conflicts or multiple definitions.

Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Check for the definition and export of getOrderByClause.

# Test: Search for the function definition.
# Expect: The function should be defined only once and exported if used externally.
rg --type typescript 'function getOrderByClause'

# Test: Ensure there are no naming conflicts.
# Expect: No other functions with the same name.
rg --type typescript 'getOrderByClause' | grep -v 'function getOrderByClause'

Length of output: 198


Script:

#!/bin/bash
# Search for getOrderByClause function definition
echo "Searching for getOrderByClause function definition:"
fd -e ts -e js | xargs rg 'function getOrderByClause'

# Search for getOrderByClause usage
echo "Searching for getOrderByClause usage:"
fd -e ts -e js | xargs rg 'getOrderByClause'

# Check the specific file for function usage
echo "Checking get-signing-volume.ts for getOrderByClause usage:"
rg 'getOrderByClause' packages/lib/server-only/admin/get-signing-volume.ts

# Search for imports of getOrderByClause
echo "Searching for imports of getOrderByClause:"
fd -e ts -e js | xargs rg 'import.*getOrderByClause'

Length of output: 1032


119-142: Verify the correctness of ordering by signing volume

When sorting by signingVolume, the current orderBy implementation may not work as intended because Prisma does not support ordering by the combined counts of relations directly in this manner.

Consider the following steps to verify and correct the ordering:

  1. Adjust the orderBy clause: Modify the orderBy to use _count with relation paths.

      default:
        return [
    -      {
    -        User: {
    -          Document: {
    -            _count: sortOrder,
    -          },
    -        },
    -      },
    -      {
    -        team: {
    -          document: {
    -            _count: sortOrder,
    -          },
    -        },
    -      },
    -    ];
    +      {
    +        _count: {
    +          User: {
    +            Document: sortOrder,
    +          },
    +        },
    +      },
    +      {
    +        _count: {
    +          team: {
    +            document: sortOrder,
    +          },
    +        },
    +      },
        ];
  2. Verify if Prisma supports this ordering: Since Prisma may not support ordering by combined counts across different relations, you might need to fetch the signing volumes first and then sort them in your application code.

    To verify, run the following script:

    Ensure you have a script verify-orderby.ts that attempts to run the query with the existing orderBy clause.

  3. Alternative solution: Fetch the counts separately and sort the leaderboardWithVolume array in your application.

    // After calculating signingVolume
    leaderboardWithVolume.sort((a, b) => {
      if (sortOrder === 'asc') {
        return a.signingVolume - b.signingVolume;
      } else {
        return b.signingVolume - a.signingVolume;
      }
    });

    Adjust your getOrderByClause to handle this case appropriately.

Verification successful

Ordering by signing volume is implemented correctly

The getOrderByClause function in packages/lib/server-only/admin/get-signing-volume.ts correctly implements the ordering for signing volume. It uses a nested structure to count documents for both User and team, which effectively represents the signing volume. This approach is valid in Prisma for ordering by related model counts.

  • For 'name' sorting, it orders by User name and team name.
  • For 'createdAt' sorting, it uses the createdAt field directly.
  • For 'signingVolume' (default case), it orders by the count of documents for both User and team.

This implementation should correctly order the results based on the total number of documents (signing volume) associated with each user or team.

Scripts executed

The following scripts were executed for the analysis:

Script:

   #!/bin/bash
   # Description: Check if ordering by combined counts works as intended.

   # Test: Attempt to query with the current orderBy clause.
   # Expect: Verify whether Prisma allows this operation or throws an error.
   npx prisma generate
   npx ts-node verify-orderby.ts
   

Length of output: 195


Script:

#!/bin/bash

# Find the implementation of getOrderByClause
ast-grep --lang typescript --pattern 'function getOrderByClause($_) {
  $$$
}'

# Search for mentions of leaderboard or signing volume
rg -i "leaderboard|signing volume" -A 5 -B 5

# Look for Prisma schema definitions
rg "model User|model Team|model Document" -A 10 schema.prisma

Length of output: 142023


Script:

#!/bin/bash

# Search for getOrderByClause function implementation
rg "function getOrderByClause" -A 10

# Examine leaderboard-related files
cat packages/lib/server-only/admin/get-signing-volume.ts

# Try to locate Prisma schema file
fd schema.prisma

Length of output: 3389

Copy link
Member

@ElTimuro ElTimuro left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good overall, a few points:

This commit enhances the leaderboard by adding a clickable link to each
customer's name, which directs to their Stripe subscription page. It also
removes the ID column and includes the planId in the signing volume data
for improved user experience and easier access to subscription details.
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 0

🧹 Outside diff range and nitpick comments (3)
packages/lib/translations/en/web.po (2)

Line range hint 15-16: Consider using a more specific placeholder name.

The placeholder "{0}" is used here. While this works, it might be more maintainable to use a named placeholder that describes what will be inserted, e.g., "{date}" or "{formatted_date}".


Line range hint 30-31: Consider adding context for pluralization.

These translations use plural forms correctly. Consider adding a comment to explain the plural rules for translators of other languages where plural forms might be more complex.

Also applies to: 33-34

packages/lib/translations/de/web.po (1)

Line range hint 1-3524: Several translations are missing or incomplete.

There are numerous instances where translations are either missing entirely (empty msgstr) or still in English. This needs to be addressed to ensure a complete German localization. Here are a few examples:

  1. Line 1823-1825: "Leaderboard" is not translated.
  2. Line 2015-2020: "Signing Volume" is not translated.
  3. Line 2846-2850: "Signing Volume" is not translated again.

Please review the entire file and provide translations for all missing or incomplete entries.

Inconsistencies in formatting and translation style detected.

There are some inconsistencies in how certain terms or phrases are translated throughout the file. For example:

  1. "Sign in" is translated as both "Einloggen" and "Anmelden" in different places.
  2. "Dashboard" is sometimes left in English and sometimes translated to "Übersicht".

Standardize these translations for consistency across the application.

Some translations could be improved for clarity or naturalness.

While many translations are accurate, some could be improved to sound more natural in German or to better convey the original meaning. For example:

  1. Line 964: "Created" is translated as "Erstellt", which is correct but could be more specific depending on the context, such as "Erstellungsdatum" for a date field.
  2. Line 1009-1013: "Customer Type" is not translated and commented out. Consider translating this to "Kundentyp" if it's still needed.

Review these instances and consider refining the translations for better clarity and naturalness in German.

Potential functional issues in translations.

Some translations might affect functionality if not handled correctly:

  1. Lines 2859-2860: "Site Settings" is translated as "Website Einstellungen", but the space might cause issues if this is used as a key in the code. Consider using "Website-Einstellungen" instead.
  2. Throughout the file, there are instances where placeholders like {0}, {1} are used. Ensure that these are kept in the correct order in the German translations, as word order often differs between English and German.

Review these instances carefully to prevent any potential functional issues arising from the translations.

Suggestion for handling gender-neutral language.

German often requires gendered forms of words. Consider implementing a system for handling gender-neutral language or providing both masculine and feminine forms where appropriate. For example:

  1. Line 2015: "User" could be translated as "Benutzer*in" or "Benutzer/in" to be more inclusive.

This approach would make the application more inclusive and aligned with modern German language practices.

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

📥 Commits

Files that changed from the base of the PR and between a274e9b and 7929e2f.

📒 Files selected for processing (2)
  • packages/lib/translations/de/web.po (7 hunks)
  • packages/lib/translations/en/web.po (7 hunks)
🧰 Additional context used
🔇 Additional comments (5)
packages/lib/translations/en/web.po (5)

Line range hint 1-13: LGTM: File header and metadata look correct.

The file header contains the necessary metadata for a PO file, including the MIME type, content type, and language specification. This is correctly set up for English translations.


Line range hint 18-19: Ensure consistent use of quotation marks.

The translation uses double quotes around "{documentTitle}", which is correct. Ensure this style is consistently used throughout the file for similar placeholders.


Line range hint 21-22: LGTM: Consistent use of placeholders and parentheses.

These translations correctly use the {0} placeholder and maintain consistent formatting with parentheses.

Also applies to: 24-25, 27-28


Line range hint 36-37: LGTM: Correct use of HTML-like tags and pluralization.

These translations correctly use HTML-like tags for formatting and handle pluralization. The structure is consistent across similar messages.

Also applies to: 39-40, 42-43, 45-46, 48-49


Line range hint 51-52: Ensure placeholder consistency across similar messages.

These two messages use {0} as a placeholder for what seems to be the same type of information. Ensure that this is intentional and that the placeholder represents the same data in both cases.

Also applies to: 54-55

@ElTimuro
Copy link
Member

@ephraimduncan Looks good so far. Can you fix the merge conflicts, so I can it to to staging to test with the stripe dev account?

@ephraimduncan
Copy link
Contributor Author

working on it now

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 4

🧹 Outside diff range and nitpick comments (2)
packages/lib/translations/fr/web.po (2)

Line range hint 751-757: Missing translations for new features

The following strings are missing French translations:

  • "Leaderboard" should be translated as "Classement" or "Tableau des scores"
  • "Signing Volume" should be translated as "Volume de signatures"

Apply this diff to add the missing translations:

msgid "Leaderboard"
-msgstr ""
+msgstr "Classement"

msgid "Signing Volume"
-msgstr ""
+msgstr "Volume de signatures"

Also applies to: 2155-2158, 3322-3326


Line range hint 4470-4803: Inconsistent translation of error messages

I notice some inconsistency in how error messages are translated. For example, some use "Nous ne pouvons pas..." while others use "Impossible de...". We should standardize on one format.

Consider standardizing error message translations to use "Impossible de..." format consistently throughout the file for better user experience.

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

📥 Commits

Reviewing files that changed from the base of the PR and between c2e6362 and a0bc4c4.

📒 Files selected for processing (13)
  • apps/web/src/app/(dashboard)/admin/leaderboard/page.tsx (1 hunks)
  • packages/lib/translations/de/common.po (0 hunks)
  • packages/lib/translations/de/marketing.po (0 hunks)
  • packages/lib/translations/de/web.js (1 hunks)
  • packages/lib/translations/de/web.po (15 hunks)
  • packages/lib/translations/en/web.js (1 hunks)
  • packages/lib/translations/en/web.po (15 hunks)
  • packages/lib/translations/es/common.po (0 hunks)
  • packages/lib/translations/es/marketing.po (0 hunks)
  • packages/lib/translations/es/web.po (14 hunks)
  • packages/lib/translations/fr/common.po (0 hunks)
  • packages/lib/translations/fr/marketing.po (0 hunks)
  • packages/lib/translations/fr/web.po (14 hunks)
💤 Files with no reviewable changes (6)
  • packages/lib/translations/de/common.po
  • packages/lib/translations/de/marketing.po
  • packages/lib/translations/es/common.po
  • packages/lib/translations/es/marketing.po
  • packages/lib/translations/fr/common.po
  • packages/lib/translations/fr/marketing.po
🚧 Files skipped from review as they are similar to previous changes (4)
  • apps/web/src/app/(dashboard)/admin/leaderboard/page.tsx
  • packages/lib/translations/de/web.js
  • packages/lib/translations/de/web.po
  • packages/lib/translations/en/web.js
🔇 Additional comments (7)
packages/lib/translations/en/web.po (2)

2155-2157: LGTM! New translation added for Leaderboard.

The translation entry for "Leaderboard" has been added correctly.


3322-3325: LGTM! New translation added for Signing Volume.

The translation entry for "Signing Volume" has been added correctly.

packages/lib/translations/es/web.po (4)

4803-4804: Verify translation consistency

The translation for "Free Plan" should be consistent with other plan-related translations in the file. The current translation looks good but ensure it aligns with your terminology guidelines.


4855-4857: Verify customer support related translation

The translation for the customer support message is accurate and maintains a professional tone while clearly conveying the message about contacting support.


5001-5003: Verify payment-related translation

The translation for the payment overdue message is accurate and maintains the urgency while being polite and professional.


751-754: ⚠️ Potential issue

Missing translation for "Billing"

The English string "Billing" has been left untranslated. Consider translating it to "Facturación" to maintain consistency with other billing-related translations in the file.

-msgstr "Billing"
+msgstr "Facturación"

Likely invalid or redundant comment.

packages/lib/translations/fr/web.po (1)

Line range hint 1-5001: Overall translation quality is good

The majority of translations are accurate and maintain proper French grammar and idioms. The file shows good attention to:

  • Proper use of French punctuation (spaces before/after punctuation marks)
  • Consistent use of formal "vous" form
  • Accurate translation of technical terms

packages/lib/translations/es/web.po Show resolved Hide resolved
packages/lib/translations/es/web.po Show resolved Hide resolved
packages/lib/translations/es/web.po Outdated Show resolved Hide resolved
packages/lib/translations/fr/web.po Outdated Show resolved Hide resolved
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🧹 Outside diff range and nitpick comments (2)
packages/lib/translations/en/web.po (1)

Line range hint 1181-1224: New leaderboard translations added

The new translations for leaderboard functionality have been added correctly. However, there are some duplicate entries that should be cleaned up:

- #: apps/web/src/app/(dashboard)/admin/leaderboard/data-table-leaderboard.tsx:94
- #: apps/web/src/app/(dashboard)/admin/leaderboard/leaderboard-table.tsx:94
- #~ msgid "Customer Type"
- #~ msgstr "Customer Type"

Remove the duplicate entries to maintain a cleaner translation file.

packages/lib/translations/de/web.po (1)

Line range hint 1-4000: Consider standardizing formality in translations

The translations alternate between formal "Sie" and informal "du" forms. For consistency, consider standardizing to one form throughout the file.

Examples:

  • "Warte auf" (informal) vs "Warten Sie" (formal)
  • "dein Dokument" (informal) vs "Ihr Dokument" (formal)
📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

📥 Commits

Reviewing files that changed from the base of the PR and between a0bc4c4 and 2a7a2c9.

📒 Files selected for processing (10)
  • packages/lib/translations/de/common.po (0 hunks)
  • packages/lib/translations/de/marketing.po (0 hunks)
  • packages/lib/translations/de/web.po (7 hunks)
  • packages/lib/translations/en/web.po (7 hunks)
  • packages/lib/translations/es/common.po (0 hunks)
  • packages/lib/translations/es/marketing.po (0 hunks)
  • packages/lib/translations/es/web.po (6 hunks)
  • packages/lib/translations/fr/common.po (0 hunks)
  • packages/lib/translations/fr/marketing.po (0 hunks)
  • packages/lib/translations/fr/web.po (6 hunks)
💤 Files with no reviewable changes (6)
  • packages/lib/translations/de/common.po
  • packages/lib/translations/de/marketing.po
  • packages/lib/translations/es/common.po
  • packages/lib/translations/es/marketing.po
  • packages/lib/translations/fr/common.po
  • packages/lib/translations/fr/marketing.po
🚧 Files skipped from review as they are similar to previous changes (2)
  • packages/lib/translations/es/web.po
  • packages/lib/translations/fr/web.po
🔇 Additional comments (3)
packages/lib/translations/en/web.po (3)

3337-3341: New signing volume translations look good

The translations for "Signing Volume" have been properly added and are consistent with the rest of the file.


2169-2172: LGTM: Leaderboard navigation translation

The translation for the leaderboard navigation item has been properly added.


Line range hint 1-24: File metadata looks good

The PO file header contains all required metadata fields and is properly formatted.

packages/lib/translations/de/web.po Show resolved Hide resolved
@Mythie Mythie merged commit bdd33bd into main Dec 3, 2024
15 of 17 checks passed
@Mythie Mythie deleted the signing-volume branch December 3, 2024 00:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
apps: web Issues related to the webapp
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants