Skip to content

Conversation

@Satya-egov
Copy link
Collaborator

@Satya-egov Satya-egov commented Feb 20, 2025

Summary by CodeRabbit

  • New Features

    • Expanded localization messages and configuration options for campaign delivery and targeting across multiple languages.
    • Introduced additional guidance for detailed targeting, including options for age groups, household counts, and product distribution.
  • Refactor

    • Updated campaign identifiers and validation rules to enhance consistency in campaign configuration.
    • Streamlined localization and targeting structures for a smoother setup and improved user experience.

@Satya-egov Satya-egov requested a review from a team as a code owner February 20, 2025 04:16
@Satya-egov Satya-egov requested review from sathishp-eGov and removed request for a team February 20, 2025 04:16
@coderabbitai
Copy link

coderabbitai bot commented Feb 20, 2025

Walkthrough

This pull request updates localization and schema files for the HCM Admin Console and Campaign Manager. In the localization files, it removes legacy campaign delivery messages (LLIN/MILDA) from the admin schemas and adds corresponding entries in the campaign manager files for English, French, and Portuguese locales. Additionally, in the MDMS files, the schema for campaign boundaries is enhanced with new target-related properties and stricter validation rules, and the campaign identifier is standardized by replacing "LLIN-mz" with "LLIN".

Changes

File(s) Change Summary
localisation/.../hcm-admin-schemas.json (en_MZ, fr_MZ, pt_MZ) en_MZ: Removed legacy CAMPAIGN_DELIVERY_TAB_SUB_TEXT_LLIN and added multiple new HCM_ADMIN_CONSOLE_TARGET_* entries.
fr_MZ & pt_MZ: Removed the respective legacy campaign delivery messages.
localisation/.../hcm-campaignmanager.json (en_MZ, fr_MZ, pt_MZ) Added a new CAMPAIGN_DELIVERY_TAB_SUB_TEXT_LLIN entry with localized messages to configure campaign delivery conditions.
mdms/.../adminSchema.json Modified the JSON schema for “boundary” and “boundaryWithTarget”:
– Updated campaignType from "LLIN-mz" to "LLIN".
– Added new target properties (e.g., HCM_ADMIN_CONSOLE_TARGET_SMC_AGE_3_TO_11, HCM_ADMIN_CONSOLE_TARGET) with specific validation constraints for MR-DN and LLIN campaigns.
mdms/.../(allAttributes.json, projectTypesLLIN.json, targetConfigs.json) Standardized the LLIN campaign identifier by replacing "LLIN-mz" with "LLIN" in project types and campaign configuration fields.

Possibly related PRs

Suggested reviewers

  • GhanshyamRawat-eGov
  • kavi-egov
  • jagankumar-egov
  • elzanmathew-eGov

Poem

I'm a bunny coding under the moon's soft gleam,
Hopping through JSON fields like a dream.
Removing old strings, adding targets anew,
Each commit a carrot—so fresh, so true!
With every schema hop, our code garden grows,
A rabbit’s delight in the changes it shows.


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.

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

@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 comments (1)
localisation/HCM Admin Console/v0.3.1 patch/pt_MZ/hcm-campaignmanager.json (1)

32-37: ⚠️ Potential issue

Locale Inconsistency Detected
The entry for "FACILITY_MAPPING_POP_HEADER_TITLE" shows "locale": "pt_IN" instead of the expected "pt_MZ". Please correct this to ensure that the localization file is consistent with the Mozambique locale.

🧹 Nitpick comments (3)
localisation/HCM Admin Console/v0.3.1 patch/en_MZ/hcm-admin-schemas.json (1)

15-20: Fix Typographical Error in Household Target Message

In the "HCM_ADMIN_CONSOLE_TARGET_HOUSEHOLD" object, the message reads "Household Targe" instead of the intended "Household Target." Please correct the typo to maintain consistency and clarity in the UI messaging.

A suggested diff is provided below:

-        "message": "Household Targe",
+        "message": "Household Target",
localisation/HCM Admin Console/v0.3.1 patch/fr_MZ/hcm-campaignmanager.json (2)

2-7: New Localization Entry Added for fr_MZ
A new entry for "CAMPAIGN_DELIVERY_TAB_SUB_TEXT_LLIN" is added with the message "Configurer les conditions de livraison pour la campagne MILDA". Note that the French entry uses “MILDA” rather than “LLIN” (as in the en_MZ and pt_MZ files). Please verify that this difference is intentional and aligns with your campaign nomenclature for the French locale.


645-661: Review Campaign Naming Consistency in French
Within the French localization file, there’s an apparent discrepancy in naming. For example, the keys:

  • "CAMPAIGN_CYCLE_CONFIGURE_HEADING_LLIN" and
  • "CAMPAIGN_PROJECT_LLIN"
    have messages set to "Configuration pour la campagne MILDA", while the entry for code "LLIN" uses the message "Configurer les MILD ".
    Please review these entries for consistency (and correct any typos such as “MILD” vs. “MILDA”) so that the campaign names are uniform across French translations.
📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between b9fb0ad and 9839d32.

📒 Files selected for processing (10)
  • localisation/HCM Admin Console/v0.3.1 patch/en_MZ/hcm-admin-schemas.json (1 hunks)
  • localisation/HCM Admin Console/v0.3.1 patch/en_MZ/hcm-campaignmanager.json (1 hunks)
  • localisation/HCM Admin Console/v0.3.1 patch/fr_MZ/hcm-admin-schemas.json (1 hunks)
  • localisation/HCM Admin Console/v0.3.1 patch/fr_MZ/hcm-campaignmanager.json (1 hunks)
  • localisation/HCM Admin Console/v0.3.1 patch/pt_MZ/hcm-admin-schemas.json (0 hunks)
  • localisation/HCM Admin Console/v0.3.1 patch/pt_MZ/hcm-campaignmanager.json (1 hunks)
  • mdms/HCM/HCM ADMINCONSOLE v0.3.1 patch/JSON DATAS/HCM Admin Console/adminSchema.json (2 hunks)
  • mdms/HCM/HCM ADMINCONSOLE v0.3.1 patch/JSON DATAS/HCM Admin Console/allAttributes.json (1 hunks)
  • mdms/HCM/HCM ADMINCONSOLE v0.3.1 patch/JSON DATAS/HCM Admin Console/projectTypesLLIN.json (1 hunks)
  • mdms/HCM/HCM ADMINCONSOLE v0.3.1 patch/JSON DATAS/HCM Admin Console/targetConfigs.json (1 hunks)
💤 Files with no reviewable changes (1)
  • localisation/HCM Admin Console/v0.3.1 patch/pt_MZ/hcm-admin-schemas.json
🔇 Additional comments (11)
mdms/HCM/HCM ADMINCONSOLE v0.3.1 patch/JSON DATAS/HCM Admin Console/allAttributes.json (1)

60-60: Standardize Project Type Value for MemberCount

The value in the "projectTypes" array for the memberCount attribute has been updated from the legacy "LLIN-mz" to the new standardized "LLIN". This change aligns with the overall effort to simplify campaign type identifiers. Please verify that any downstream logic consuming this attribute is updated accordingly.

mdms/HCM/HCM ADMINCONSOLE v0.3.1 patch/JSON DATAS/HCM Admin Console/targetConfigs.json (1)

20-20: Update Campaign Type Identifier

The "campaignType" value has been updated from "LLIN-mz" to "LLIN", ensuring consistency across MDMS configurations. Confirm that front-end and API consumers of this configuration recognize the updated identifier without issues.

mdms/HCM/HCM ADMINCONSOLE v0.3.1 patch/JSON DATAS/HCM Admin Console/projectTypesLLIN.json (1)

3-3: Standardize Project Type Code

The "code" field has been changed from the legacy "LLIN-mz" to the simplified "LLIN" for the LLIN campaign type configuration. This update supports the overall standardization effort.

localisation/HCM Admin Console/v0.3.1 patch/en_MZ/hcm-admin-schemas.json (1)

2-8: Add New Target Message Entries

A set of new JSON objects has been added to enhance target-related messaging for the HCM Admin Console. These entries provide improved clarity on target populations and configurations. The changes appear well structured and consistent with the standardization effort.

localisation/HCM Admin Console/v0.3.1 patch/fr_MZ/hcm-admin-schemas.json (1)

1-8: Remove Legacy Campaign Delivery Message

The legacy JSON object associated with the MILDA (LLIN) campaign delivery message has been successfully removed. The update removes outdated messaging from the French localization schema and aligns with the changes made in other locale files.

mdms/HCM/HCM ADMINCONSOLE v0.3.1 patch/JSON DATAS/HCM Admin Console/adminSchema.json (4)

177-222: New MR-DN Target Properties Added
New numeric properties for the “MR-DN” campaign (e.g. HCM_ADMIN_CONSOLE_TARGET_SMC_AGE_3_TO_11, HCM_ADMIN_CONSOLE_TARGET_SMC_AGE_12_TO_59, etc.) have been introduced. Please verify that their required status and validation constraints match the business rules for MR-DN campaigns and that downstream validations/data providers are updated accordingly.


320-320: Update Campaign Type for LLIN Boundary
The "campaignType" for the boundary object has been updated from the legacy value (likely "LLIN-mz") to "LLIN". This change appears to align with recent project standards. Please confirm that this update propagates consistently across the application.


327-335: New Required Target Field Added for LLIN BoundaryWithTarget
A new property named "HCM_ADMIN_CONSOLE_TARGET" (with bounds, minimum 1 and maximum 100000000, and set as required) has been added in the LLIN boundaryWithTarget definition. Ensure that this stricter validation meets the intended business requirements and that any consumers of this schema are updated accordingly.


367-367: Update Campaign Type for LLIN BoundaryWithTarget
Similar to the boundary object, the boundaryWithTarget entry now has "campaignType": "LLIN". This uniform naming helps align schemas across modules. Please verify that this change doesn’t affect any backward compatibility or integration tests.

localisation/HCM Admin Console/v0.3.1 patch/en_MZ/hcm-campaignmanager.json (1)

2-7: New Localization Entry Added for en_MZ
A new entry for the code "CAMPAIGN_DELIVERY_TAB_SUB_TEXT_LLIN" has been inserted with the message "Configure delivery condition for LLIN Campaign". Confirm that this label correctly reflects the intended user-facing text and is consistent with other localization entries.

localisation/HCM Admin Console/v0.3.1 patch/pt_MZ/hcm-campaignmanager.json (1)

2-7: New Localization Entry Added for pt_MZ
The new entry for "CAMPAIGN_DELIVERY_TAB_SUB_TEXT_LLIN" now appears with the message "Configurar condição de entrega para campanha LLIN", which is appropriate for the Portuguese (Mozambique) locale.

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.

2 participants