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
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -13,17 +13,17 @@ COM_TJUCM_N_ITEMS_DELETED_1="%d item successfully deleted"
COM_TJUCM_N_ITEMS_PUBLISHED="%d items successfully published"
COM_TJUCM_N_ITEMS_PUBLISHED_1="%d item successfully published"
COM_TJUCM_N_ITEMS_TRASHED="%d items successfully trashed"
COM_TJUCM_N_ITEMS_TRASHED_1="%d item successfully trashed"
COM_TJUCM_N_ITEMS_UNPUBLISHED="%d items successfully unpublished"
COM_TJUCM_N_ITEMS_UNPUBLISHED_1="%d item successfully unpublished"
COM_TJUCM_N_ITEMS_TRASHED_1="%d item trashed successfully"
COM_TJUCM_N_ITEMS_UNPUBLISHED="%d items unpublished successfully"
COM_TJUCM_N_ITEMS_UNPUBLISHED_1="%d item unpublished successfully"
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_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

COM_TJUCM_FIELDSET_RULES="Permissions"
COM_TJUCM_FROM_FILTER="From %s"
COM_TJUCM_TO_FILTER="To %s"
Expand All @@ -48,7 +48,7 @@ COM_TJUCM_TYPES_CHECKED_OUT="N/A"
COM_TJUCM_TYPES_CHECKED_OUT_TIME="N/A"
COM_TJUCM_TYPES_CREATED_BY="Created by"
COM_TJUCM_TYPES_CREATED_DATE="Created Date"
COM_TJUCM_TYPES_MODIFIED_BY="Modified by"
COM_TJUCM_TYPES_MODIFIED_BY="Modified By"
COM_TJUCM_TYPES_MODIFIED_DATE="Modified Date"
COM_TJUCM_TYPES_IMPORT="Import UCM Types"
COM_TJUCM_TYPES_IMPORT_TYPES_JSON="Import UCM Types"
Expand Down
48 changes: 24 additions & 24 deletions src/components/com_tjucm/languages/site/en-GB/en-GB.com_tjucm.ini
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
COM_TJUCM="TJ - UCM"
COM_TJUCM_ITEM_SAVED_SUCCESSFULLY="Item saved successfully"
COM_TJUCM_ITEM_SAVED_SUCCESSFULLY="The item has been saved successfully"
COM_TJUCM_ITEM_DRAFT_SAVED_SUCCESSFULLY="Item successfully saved as draft"
COM_TJUCM_ITEM_DELETED_SUCCESSFULLY="Item deleted successfully"
COM_TJUCM_ITEM_DOESNT_EXIST="Item does not exist"
Expand All @@ -10,7 +10,7 @@ COM_TJUCM_ADD_ITEM="Add"
COM_TJUCM_IMPORT_ITEM="Import Records"
COM_TJUCM_EDIT_ITEM="Edit"
COM_TJUCM_DELETE_ITEM="Delete"
COM_TJUCM_DELETE_MESSAGE="Are you sure that you want delete this item?"
COM_TJUCM_DELETE_MESSAGE="Are you sure you want to delete this item?"
COM_TJUCM_PUBLISH_ITEM="Publish"
COM_TJUCM_UNPUBLISH_ITEM="Unpublish"
COM_TJUCM_NO_ITEMS="There are no items in the list"
Expand Down Expand Up @@ -69,11 +69,11 @@ COM_TJUCM_TITLE_ITEMS="Items"
COM_TJUCM_ITEMS_ID="ID"
COM_TJUCM_ITEMS_ORDERING="Order"
COM_TJUCM_ITEMS_STATE="State"
COM_TJUCM_ITEMS_CATEGORY_ID="Category Id"
COM_TJUCM_ITEMS_TYPE_ID="Type Id"
COM_TJUCM_ITEMS_CHECKED_OUT="N/A"
COM_TJUCM_ITEMS_CHECKED_OUT_TIME="N/A"
COM_TJUCM_ITEMS_CREATED_BY="Created by"
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"
Comment on lines +72 to +76
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.

COM_TJUCM_ITEMS_CREATED_DATE="Created Date"
COM_TJUCM_ITEMS_MODIFIED_BY="Modified by"
COM_TJUCM_ITEMS_MODIFIED_DATE="Modified Date"
Expand All @@ -84,7 +84,7 @@ COM_TJUCM_FORM_DESC_TYPE_ID=""
COM_TJUCM_FORM_LBL_TYPE_ORDERING="Order"
COM_TJUCM_FORM_DESC_TYPE_ORDERING=""
COM_TJUCM_FORM_LBL_TYPE_TITLE="Title"
COM_TJUCM_FORM_DESC_TYPE_TITLE="Enter title of type"
COM_TJUCM_FORM_DESC_TYPE_TITLE="Enter a title for the type."
COM_TJUCM_FORM_LBL_TYPE_ALIAS="Alias"
COM_TJUCM_FORM_DESC_TYPE_ALIAS=""
COM_TJUCM_FORM_LBL_TYPE_STATE="State"
Expand All @@ -95,11 +95,11 @@ COM_TJUCM_FORM_LBL_TYPE_UNIQUE_IDENTIFIER="Unique Identifier"
COM_TJUCM_FORM_DESC_TYPE_UNIQUE_IDENTIFIER=""
COM_TJUCM_FORM_LBL_TYPE_PARAMS="Params"
COM_TJUCM_FORM_DESC_TYPE_PARAMS=""
COM_TJUCM_FORM_LBL_TYPE_CHECKED_OUT="N/A"
COM_TJUCM_FORM_LBL_TYPE_CHECKED_OUT="Not Applicable"
COM_TJUCM_FORM_DESC_TYPE_CHECKED_OUT=""
COM_TJUCM_FORM_LBL_TYPE_CHECKED_OUT_TIME="N/A"
COM_TJUCM_FORM_LBL_TYPE_CHECKED_OUT_TIME="Not Applicable"
COM_TJUCM_FORM_DESC_TYPE_CHECKED_OUT_TIME=""
COM_TJUCM_FORM_LBL_TYPE_CREATED_BY="Created by"
COM_TJUCM_FORM_LBL_TYPE_CREATED_BY="Created By"
COM_TJUCM_FORM_DESC_TYPE_CREATED_BY=""
COM_TJUCM_FORM_LBL_TYPE_CREATED_DATE="Created Date"
COM_TJUCM_FORM_DESC_TYPE_CREATED_DATE=""
Expand Down Expand Up @@ -178,12 +178,12 @@ COM_TJUCM_EDIT_FORM="EDIT"


; Since 1.2.1
COM_TJUCM_FORM_VALIDATATION_FAILED="Provided data is not valid"
COM_TJUCM_FORM_SAVE_FAILED="Unable to process the request"
COM_TJUCM_FORM_SAVE_FAILED_CLIENT_REQUIRED="Unable to process the request as client is not provided"
COM_TJUCM_FORM_SAVE_FAILED_RECORD_ID_REQUIRED="Unable to process the request as record id is not provided"
COM_TJUCM_FORM_SAVE_FAILED_FIELD_DATA_REQUIRED="Unable to process the request as field data is not provided"
COM_TJUCM_FORM_SAVE_FAILED_AUTHORIZATION_ERROR="You are not authorized to perform this operation."
COM_TJUCM_FORM_VALIDATATION_FAILED="The provided data is invalid."
COM_TJUCM_FORM_SAVE_FAILED="Request processing failed."
COM_TJUCM_FORM_SAVE_FAILED_CLIENT_REQUIRED="Client information is required to process the request."
COM_TJUCM_FORM_SAVE_FAILED_RECORD_ID_REQUIRED="Record ID is required to process the request."
COM_TJUCM_FORM_SAVE_FAILED_FIELD_DATA_REQUIRED="Field data is required to process the request."
COM_TJUCM_FORM_SAVE_FAILED_AUTHORIZATION_ERROR="You are not authorized to perform this action."

; Since 1.2.3
COM_TJUCM_COPY_ITEM="Copy"
Expand All @@ -197,29 +197,29 @@ COM_TJUCM_SOMETHING_WENT_WRONG="Something went wrong"
COM_TJUCM_DATA_STATUS_DRAFT="Draft"
COM_TJUCM_DATA_STATUS_SAVE="Saved"
COM_TJUCM_DATA_STATUS="Status"
COM_TJUCM_DATA_STATUS_SELECT_OPTION="Select item status"
COM_TJUCM_DATA_STATUS_SELECT_OPTION="Choose the item status"

; Since 1.2.4
COM_TJUCM_ITEMS_UPLOAD_CSV_FILE_HELP="Note: To import records using CSV file for this form you should have CSV file in the following format. %s to download sample CSV file"
COM_TJUCM_ITEMS_CSV_FILE_UPLOAD_ERROR="Error in uploading the CSV file"
COM_TJUCM_ITEMS_INVALID_CSV_FILE="Selected file is invalid"
COM_TJUCM_ITEMS_INVALID_CSV_FILE="The selected file is not valid."
COM_TJUCM_ITEMS_INVALID_CSV_FILE_REQUIRED_COLUMN_MISSING="Some required column(s) are missing in the uploaded CSV file"
COM_TJUCM_ITEMS_UPLOAD_CSV_FILE="Choose CSV File"
COM_TJUCM_ITEMS_UPLOAD_CSV_FILE="Upload CSV File"
COM_TJUCM_CLICK_HERE="Click Here"
COM_TJUCM_ITEMS_IMPORTED_SCUUESSFULLY="%d record(s) imported successfully"
COM_TJUCM_ITEMS_IMPORT_REJECTED_RECORDS="%d invalid record(s) were not imported"
COM_TJUCM_ITEMS_NO_RECORDS_TO_IMPORT="No records found to import"
COM_TJUCM_ITEMS_IMPORTING_MSG="Please wait, Records are being imported..."
COM_TJUCM_LOGIN_MSG="Please login"
COM_TJUCM_SELECT_SOURCE_FORM="Select data source"
COM_TJUCM_LOGIN_MSG="You need to log in."
COM_TJUCM_SELECT_SOURCE_FORM="Choose data source"
COM_TJUCM_PROCESS_DATA="Process"
COM_TJUCM_CANCEL_COPY="Cancel"

COM_TJUCM_COPY_ITEMS="Copy Items"
COM_TJUCM_COPY_ITEMS_SELECT_UCM_TYPE="Select Copy To"
COM_TJUCM_COPY_ITEMS_BUTTON="Process"
COM_TJUCM_COPY_ITEMS_SELECT_CLUSTER="Select Cluster"
COM_TJUCM_ITEM_COPY_TO_QUEUE_SUCCESSFULLY="Item Successfully saved to queue for copy"
COM_TJUCM_ITEM_COPY_TO_QUEUE_SUCCESSFULLY="Item added to copy queue successfully."

; Since 1.2.5
COM_TJUCM_FILTER_SELECT_CATEGORY_LABEL="Select Category"
COM_TJUCM_FILTER_SELECT_CATEGORY_LABEL="Choose Category"