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
Changes from 1 commit
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