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

Issue #00000 chore: Updated language constants #429

Open
wants to merge 2 commits into
base: j4x
Choose a base branch
from

Conversation

iamnileshmittha
Copy link

@iamnileshmittha iamnileshmittha commented Dec 20, 2024

Summary by CodeRabbit

  • New Features
    • Enhanced clarity of success messages for trashing and unpublishing items.
    • Improved specificity and grammatical accuracy in user-facing messages.
    • Updated labels for filtering options and consistency in capitalization.
  • Bug Fixes
    • Corrected capitalization inconsistencies in various labels and messages for better readability.

Copy link

coderabbitai bot commented Dec 20, 2024

Walkthrough

The pull request involves modifications to the English (Great Britain) language files for the TJ Universal Content Manager (UCM) component. The changes focus on rephrasing success messages, refining labels, and ensuring consistent capitalization across various user-facing strings. These updates aim to enhance clarity and grammatical accuracy in the application's interface text, providing a more uniform presentation of messages for users.

Changes

File Changes
src/components/com_tjucm/languages/administrator/en-GB/en-GB.com_tjucm.ini - Updated success messages for trashing and unpublishing items
- Modified filter selection label
- Adjusted capitalization for test label and "Modified By" label
src/components/com_tjucm/languages/site/en-GB/en-GB.com_tjucm.ini - Updated success message for item saving
- Refined deletion confirmation message
- Adjusted capitalization for various labels
- Rephrased error messages for clarity
- Updated category and type labels for consistency

Detailed String Updates

  1. Administrator Language File:

    • Success Messages:
      • COM_TJUCM_N_ITEMS_TRASHED_1: Changed from "%d item successfully trashed" to "%d item trashed successfully"
      • COM_TJUCM_N_ITEMS_UNPUBLISHED: Changed from "%d items successfully unpublished" to "%d items unpublished successfully"
      • COM_TJUCM_N_ITEMS_UNPUBLISHED_1: Changed from "%d item successfully unpublished" to "%d item unpublished successfully"
    • Label Modifications:
      • COM_TJUCM_FILTER_SELECT_LABEL: Changed from " - Select %s - " to " - Choose %s - "
      • COM_TJUCM_TEST_LABEL: Changed from "Test label" to "Test Label"
      • COM_TJUCM_TYPES_MODIFIED_BY: Changed from "Modified by" to "Modified By"
  2. Site Language File:

    • Success Message:
      • COM_TJUCM_ITEM_SAVED_SUCCESSFULLY: Changed from "Item saved successfully" to "The item has been saved successfully"
    • Deletion Confirmation:
      • COM_TJUCM_DELETE_MESSAGE: Changed from "Are you sure that you want delete this item?" to "Are you sure you want to delete this item?"
    • Label Adjustments:
      • COM_TJUCM_ITEMS_CATEGORY_ID: Changed from "Category Id" to "Category ID"
      • COM_TJUCM_ITEMS_TYPE_ID: Changed from "Type Id" to "Type ID"
      • COM_TJUCM_ITEMS_CHECKED_OUT: Changed from "Not Applicable" to "Not Applicable"
      • COM_TJUCM_ITEMS_CREATED_BY: Changed from "Created by" to "Created By"
    • Error Messages:
      • COM_TJUCM_FORM_VALIDATATION_FAILED: Changed from "Provided data is not valid" to "The provided data is invalid."
      • COM_TJUCM_FORM_SAVE_FAILED: Changed from "Unable to process the request" to "Request processing failed."
    • Other:
      • COM_TJUCM_LOGIN_MSG: Changed from "You need to log in." to "You need to log in." (no change)
      • COM_TJUCM_FILTER_SELECT_CATEGORY_LABEL: Changed from "Select Category" to "Choose Category"

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 generate docstrings to generate docstrings for this PR. (Beta)
  • @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.

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

@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: 2

📜 Review details

Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 10b37e2 and 131e113.

📒 Files selected for processing (1)
  • src/components/com_tjucm/languages/administrator/en-GB/en-GB.com_tjucm.ini (2 hunks)
🔇 Additional comments (1)
src/components/com_tjucm/languages/administrator/en-GB/en-GB.com_tjucm.ini (1)

16-18: LGTM! Improved message clarity and consistency

The changes enhance readability by adopting a more natural English sentence structure, placing "successfully" at the end of the messages. This also maintains consistency with other success messages in the codebase.

COM_TJUCM_NO_ITEM_SELECTED="No items selected"
COM_TJUCM_SAVE_SUCCESS="Item successfully saved"
COM_TJUCM_ITEM_ID_SELECT_LABEL="Select the item ID"
COM_TJUCM_SELECT_UCM_TYPE_LBL="UCM Type"
COM_TJUCM_SELECT_UCM_TYPE_DESC="Select UCM Type"
COM_TJUCM_FIELDSET_UCM_TYPE_SELECT_LABEL="UCM Config"
COM_TJUCM_FILTER_SELECT_LABEL=" - Select %s - "
COM_TJUCM_TEST_LABEL="Test label"
COM_TJUCM_FILTER_SELECT_LABEL=" - Choose %s - "
Copy link

Choose a reason for hiding this comment

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

💡 Codebase verification

Consider maintaining consistency in selection-related labels

The review comment is valid. There is an inconsistency between the site and administrator language files:

  • Administrator file uses "Choose" (" - Choose %s - ")
  • Site file uses "Select" (" - Select %s - ")

Additionally, all other selection-related labels in both files consistently use "Select":

  • COM_TJUCM_ITEM_ID_SELECT_LABEL
  • COM_TJUCM_SELECT_UCM_TYPE_DESC
  • COM_TJUCM_SELECT_SOURCE_FORM
  • COM_TJUCM_FILTER_SELECT_CATEGORY_LABEL
    etc.

Recommendation: Keep "Select" for consistency across all labels by reverting the change from "Select" to "Choose".

🔗 Analysis chain

Consider maintaining consistency in selection-related labels

While "Choose" is user-friendly, it creates inconsistency with other similar labels in the file that use "Select" (e.g., COM_TJUCM_ITEM_ID_SELECT_LABEL, COM_TJUCM_SELECT_UCM_TYPE_LBL). Consider either:

  1. Keeping "Select" for consistency, or
  2. Updating all selection-related labels to use "Choose"

Let's check for other selection-related labels in the codebase:

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Search for other selection-related labels
rg "SELECT_LABEL|Select|Choose" --type ini

Length of output: 72


Script:

#!/bin/bash
# Search for selection-related labels in all files
rg -l "SELECT_LABEL|Select|Choose" 

Length of output: 918


Script:

#!/bin/bash
# Get content of the language file
cat src/components/com_tjucm/languages/administrator/en-GB/en-GB.com_tjucm.ini

Length of output: 10797


Script:

#!/bin/bash
# Search for similar labels in other language files
fd "\.ini$" | xargs rg "SELECT_LABEL|Select|Choose"

Length of output: 2389

COM_TJUCM_FILTER_SELECT_LABEL=" - Select %s - "
COM_TJUCM_TEST_LABEL="Test label"
COM_TJUCM_FILTER_SELECT_LABEL=" - Choose %s - "
COM_TJUCM_TEST_LABEL="Test Label"
Copy link

Choose a reason for hiding this comment

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

💡 Codebase verification

Inconsistent capitalization found in labels

The review comment is correct. There are multiple inconsistencies in capitalization across similar labels in both administrator and site language files:

  • In administrator/en-GB/en-GB.com_tjucm.ini:
    • COM_TJUCM_TYPES_MODIFIED_BY="Modified By" (uses title case)
    • COM_TJUCM_TYPES_CREATED_BY="Created by" (doesn't use title case)
    • COM_TJUCM_ITEMS_MODIFIED_BY="Modified by" (doesn't use title case)
    • COM_TJUCM_ITEMS_CREATED_BY="Created by" (doesn't use title case)
    • COM_TJUCM_FORM_LBL_TYPE_CREATED_BY="Created by" (doesn't use title case)
    • COM_TJUCM_FORM_LBL_TYPE_MODIFIED_BY="Modified by" (doesn't use title case)

All similar labels should follow the same capitalization pattern for consistency.

🔗 Analysis chain

Ensure consistent capitalization across all labels

While the capitalization changes improve individual labels, there are still inconsistencies with similar labels in the file. Consider updating all role-based labels to use consistent title case:

  • "Created by" → "Created By"
  • "Modified by" → "Modified By"

Let's check for other inconsistent capitalizations:

Also applies to: 51-51

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Search for inconsistent capitalizations in role-based labels
rg "by$|By$" --type ini

Length of output: 53


Script:

#!/bin/bash
# Search for all labels containing "by" or "By" in language files
rg -i "by\"$|By\"$" src/components/com_tjucm/languages/

Length of output: 1903


Script:

#!/bin/bash
# Get all content from the specific language file to analyze capitalization patterns
cat src/components/com_tjucm/languages/administrator/en-GB/en-GB.com_tjucm.ini

Length of output: 10797

Copy link

@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

🧹 Nitpick comments (1)
src/components/com_tjucm/languages/site/en-GB/en-GB.com_tjucm.ini (1)

200-200: Standardize action verbs across the interface

While the changes improve clarity, there's inconsistency in the use of "Select" vs "Choose":

  • Line 219: "Select Copy To"
  • Line 220: "Select Cluster"

Consider standardizing to "Choose" throughout:

-COM_TJUCM_COPY_ITEMS_SELECT_UCM_TYPE="Select Copy To"
+COM_TJUCM_COPY_ITEMS_SELECT_UCM_TYPE="Choose Copy To"
-COM_TJUCM_COPY_ITEMS_SELECT_CLUSTER="Select Cluster"
+COM_TJUCM_COPY_ITEMS_SELECT_CLUSTER="Choose Cluster"

Also applies to: 205-205, 207-208, 213-214

📜 Review details

Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 131e113 and 490bd77.

📒 Files selected for processing (1)
  • src/components/com_tjucm/languages/site/en-GB/en-GB.com_tjucm.ini (7 hunks)
🔇 Additional comments (5)
src/components/com_tjucm/languages/site/en-GB/en-GB.com_tjucm.ini (5)

2-2: LGTM! Improved message clarity

The changes enhance readability and maintain a professional tone:

  • Success message is now more specific and complete
  • Delete confirmation message is grammatically correct

Also applies to: 13-13


87-87: LGTM! Consistent terminology

The changes maintain consistency in terminology and improve clarity:

  • Added helpful description for type title
  • Consistent use of "Not Applicable" instead of "N/A"
  • Proper capitalization in labels

Also applies to: 98-98, 100-100, 102-102


181-186: LGTM! Clear validation messages

The new validation messages are well-structured and provide clear feedback:

  • Specific error messages for different validation scenarios
  • Professional tone in error communication

222-222: LGTM! Clear success message

The message clearly confirms the action's success and follows the established pattern.


225-225: LGTM! Consistent with other filter labels

The label follows the established pattern of using "Choose" for selection controls.

Comment on lines +72 to +76
COM_TJUCM_ITEMS_CATEGORY_ID="Category ID"
COM_TJUCM_ITEMS_TYPE_ID="Type ID"
COM_TJUCM_ITEMS_CHECKED_OUT="Not Applicable"
COM_TJUCM_ITEMS_CHECKED_OUT_TIME="Not Applicable"
COM_TJUCM_ITEMS_CREATED_BY="Created By"
Copy link

Choose a reason for hiding this comment

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

🛠️ Refactor suggestion

Ensure consistent capitalization across all similar labels

While these changes improve consistency within this section, there are inconsistencies with similar labels elsewhere in the file:

  • Line 120: "Created by" vs "Created By"
  • Line 123: "Type Id" vs "Type ID"

Consider updating these related strings for consistency:

-COM_TJUCM_FORM_LBL_ITEM_CREATED_BY="Created by"
+COM_TJUCM_FORM_LBL_ITEM_CREATED_BY="Created By"
-COM_TJUCM_FORM_LBL_ITEM_TYPE_ID="Type Id"
+COM_TJUCM_FORM_LBL_ITEM_TYPE_ID="Type ID"

Committable suggestion skipped: line range outside the PR's diff.

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

Successfully merging this pull request may close these issues.

1 participant