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

Added localization messages for IRS Dashboard #132

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

LataNaik-eGov
Copy link
Collaborator

@LataNaik-eGov LataNaik-eGov commented Oct 22, 2024

Summary by CodeRabbit

  • New Features

    • Added new localization entries for health and household data in English, French, and Portuguese for various modules.
    • Introduced a new JSON file for the French and Portuguese versions of the hcm-dashboard and rainmaker-dss modules, enhancing user experience.
  • Updates

    • Modified existing message strings for clarity and accuracy in multiple localization files.
    • Expanded vocabulary with new terms related to household management and health metrics.
  • Removals

    • Removed obsolete entries from localization files to streamline content.

@LataNaik-eGov LataNaik-eGov requested a review from a team as a code owner October 22, 2024 12:54
@LataNaik-eGov LataNaik-eGov requested review from sathishp-eGov and removed request for a team October 22, 2024 12:54
Copy link

coderabbitai bot commented Oct 22, 2024

Walkthrough

The changes involve extensive updates to localization files across multiple languages (English, French, and Portuguese) for the HCM and Rainmaker modules. New entries have been added, existing entries modified, and some removed to improve clarity and relevance in user interface messages. The modifications enhance the localization support for health-related functionalities, household management, and dashboard metrics, ensuring that users in Mozambique can interact with the application in their preferred language.

Changes

File Path Change Summary
localisation/HCM/V1.5/en_MZ/rainmaker-common.json Added four new localization entries related to health and household data.
localisation/HCM/V1.5/en_MZ/rainmaker-dss.json Significant updates including renaming existing codes and adding new entries for health metrics.
localisation/HCM/V1.5/fr_MZ/hcm-common.json Updated messages for existing entries and added new entries for improved localization in French.
localisation/HCM/V1.5/fr_MZ/hcm-dashboard.json Introduced a new localization file with various health metrics and dashboard messages in French.
localisation/HCM/V1.5/fr_MZ/hcm-household.json Modified existing messages and added new entries to enhance household management localization.
localisation/HCM/V1.5/fr_MZ/rainmaker-dss.json New localization file added with comprehensive entries for health and household metrics in French.
localisation/HCM/V1.5/pt_MZ/hcm-common.json Added new entries and updated existing messages for Portuguese localization.
localisation/HCM/V1.5/pt_MZ/hcm-dashboard.json New localization file added for dashboard metrics and statuses in Portuguese.
localisation/HCM/V1.5/pt_MZ/hcm-household.json Updated existing messages and added new entries for household management in Portuguese.
localisation/HCM/V1.5/pt_MZ/rainmaker-common.json Added four new entries for health-related functionalities in Portuguese.
localisation/HCM/V1.5/pt_MZ/rainmaker-dss.json New localization file added with various health and household metrics for Portuguese users.

Poem

🐰 In the fields where health does bloom,
New words sprout, dispelling gloom.
With messages clear, in every tongue,
The tale of care is sweetly sung.
For every home, a brighter day,
In languages rich, we find our way! 🌼


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

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

🧹 Outside diff range and nitpick comments (21)
localisation/HCM/V1.5/en_MZ/rainmaker-common.json (2)

43695-43699: Consider including date range information in the message.

The code "DSS_HEALTH_OVERVIEW_HOUSEHOLDS_SPRAYED_OVER_DATERANGE" suggests that this metric is over a specific date range. However, the message "Households Sprayed" doesn't reflect this temporal aspect. Consider modifying the message to something like "Households Sprayed (Date Range)" or "Households Sprayed Over Period" to better match the code's intent.


43681-43704: Overall assessment of new localization entries.

The new entries enhance the localization support for health-related functionalities, which aligns with the PR objectives. However, there are a few areas where improvements could be made:

  1. Ensure consistency in naming conventions across all entries.
  2. Verify that the messages accurately reflect the intent of their corresponding codes.
  3. Consider adding more context to messages where appropriate, such as including date range information.

Maintaining consistency and clarity in localization files is crucial for providing a seamless user experience across different languages and regions. Please review the specific comments for each entry and make adjustments as necessary.

localisation/HCM/V1.5/pt_MZ/hcm-dashboard.json (2)

3-4: Remove trailing space from message

The message for "BOTTLES_USED_TODAY" ends with a space, which might cause unintended spacing issues in the UI.

Consider removing the trailing space:

-        "message": "Garrafas ",
+        "message": "Garrafas",

1-218: Standardize punctuation usage in messages

There's inconsistent use of punctuation at the end of messages throughout the file. Some messages end with punctuation marks while others don't. This might affect the visual consistency of the UI.

Consider standardizing the use of punctuation across all messages. If ending punctuation is needed, add it to all applicable messages. If not, remove it from messages that currently have it.

Examples:

  • "Erro de rede!!! Conecte-se à Internet para atualizar o painel" (ends with punctuation)
  • "Nº de casas visitadas hoje" (no ending punctuation)

Decide on a consistent approach and apply it throughout the file.

localisation/HCM/V1.5/fr_MZ/hcm-dashboard.json (3)

3-19: Consider consolidating similar codes

The codes "DSS_HEALTH_NATIONAL_BED_NETS_DISTRIBUTED_TODAY" and "DSS_HEALTH_NATIONAL_BED_NET_DISTRIBUTED_TODAY" are very similar and have the same message. Consider consolidating these to avoid potential confusion or redundancy in the codebase.


3-7: Enhance clarity of "BOTTLES_USED_TODAY" message

The message for "BOTTLES_USED_TODAY" is simply "Bouteilles", which lacks context compared to other entries. Consider expanding this to provide more clarity, e.g., "Bouteilles utilisées aujourd'hui".


39-43: Refine error message punctuation

The message for "DSS_NETWORK_FAILURE_ERROR" contains multiple exclamation marks. Consider simplifying to a single exclamation mark for a more professional tone:

- "message": "Erreur de réseau ! !! Veuillez vous connecter à Internet pour actualiser le tableau de bord.",
+ "message": "Erreur de réseau ! Veuillez vous connecter à Internet pour actualiser le tableau de bord.",
localisation/HCM/V1.5/pt_MZ/hcm-household.json (1)

26-31: Consider separating type and quantity into distinct messages.

The addition of "DELIVER_INTERVENTION_TYPE_OF_INSECTICIDE_USED" is valuable for tracking insecticide distribution. However, combining the type and quantity in a single message ("Tipo de inseticida utilizado: Quantidade distribuída") might limit flexibility in the UI.

Consider separating this into two distinct messages:

  1. "Tipo de inseticida utilizado"
  2. "Quantidade distribuída"

This separation would allow for more flexible UI layouts and potential reuse of these components independently.

localisation/HCM/V1.5/pt_MZ/rainmaker-common.json (2)

710-715: Consider adding date range reference to the message.

The current message "Famílias pulverizadas" (Sprayed families) is accurate but doesn't reflect the "OVER_DATERANGE" part of the code. Consider modifying the message to include a reference to the date range, e.g., "Famílias pulverizadas no período".


716-720: Consider standardizing the code format for "IRS-mz_NDSS_DASHBOARD".

The code "IRS-mz_NDSS_DASHBOARD" uses a mix of hyphens and underscores, which is inconsistent with the format of other codes in this file. Consider standardizing it to use only underscores, e.g., "IRS_MZ_NDSS_DASHBOARD", to maintain consistency across the localization entries.

localisation/HCM/V1.5/fr_MZ/hcm-common.json (2)

34-37: Approved change with minor suggestion.

The rephrasing of "CAPTURING_LOCATION" message improves the French syntax. However, there's an extra space at the end of the message that should be removed.

Consider removing the trailing space:

-        "message": "Capture en cours de l'emplacement ",
+        "message": "Capture en cours de l'emplacement",

644-649: Approved addition with minor corrections needed.

The new "CORE_COMMON_FAILED_TO_FETCH" message is a good addition, but there are two minor issues:

  1. There's a double space between "Récupération" and "échouée".
  2. "échouée" should agree with "Récupération" in gender (feminine).

Please apply the following corrections:

-        "message": "Récupération  échouée",
+        "message": "Récupération échouée",
localisation/HCM/V1.5/pt_MZ/rainmaker-dss.json (1)

1681-2114: Clarify the purpose of the "TIP_" prefix in codes

Many entries in this section use a "TIP_" prefix in their codes (e.g., lines 1729-1733, 1735-1739). It would be helpful to add a comment explaining that these are likely tooltip texts. This would improve clarity for developers and make it easier to locate and update tooltip content.

Overall file structure and consistency is good

The file maintains a consistent structure throughout, with each entry containing the required fields (code, message, module, and locale). The file also ends properly with a closing bracket. This consistency is commendable and makes the file easier to maintain and update.

Consider adding a header comment

While the file structure is good, it might be helpful to add a header comment at the beginning of the file. This comment could include information such as:

  • The purpose of the file
  • The language and locale it represents
  • Any special prefixes used (like "SUB_" and "TIP_") and their meanings
  • The date of last update or version number

This would provide valuable context for anyone working with this file in the future.

localisation/HCM/V1.5/en_MZ/rainmaker-dss.json (4)

219-220: Enhanced inventory and stock management terminology

The additions and modifications related to inventory and stock management provide more comprehensive tracking and efficiency metrics. This includes:

  • New terms like "Insecticide usage efficiency" and "Theoretical Vs Manual Stock Count".
  • More specific inventory status descriptions.

These changes will likely improve inventory management and resource allocation.

Consider standardizing the spelling of "receive" across all entries. For example, in the entry for "TIP_DSS_HEADER_PRODUCT_TARGET_TO_RECEIVE", "recieve" is misspelled.

Also applies to: 225-226, 231-232, 237-238, 297-298, 303-304, 309-310, 339-340, 345-346, 351-352, 1575-1578, 1581-1584, 1839-1840, 1845-1846, 1851-1852, 1857-1858, 1875-1876, 1881-1882, 1893-1894, 1899-1900, 1905-1906


105-106: Improved complaint and issue tracking system

The changes related to complaints and issue tracking provide a more comprehensive and categorized approach. This includes:

  • New categories for different types of issues (e.g., "Data Issues", "Performance Issues").
  • More detailed entries for complaint status and resolution time.

These improvements will likely enhance problem resolution and reporting capabilities.

For consistency, consider standardizing the capitalization in issue category names. For example, "Secutiry Issues" (which is also misspelled) uses a different capitalization pattern compared to "Data Issues" and "Performance Issues".

Also applies to: 111-112, 117-118, 123-124, 129-130, 135-136, 459-460, 465-466, 471-472, 477-478, 483-484, 489-490, 495-498, 501-504, 1029-1030, 1035-1036, 1125-1126, 1129-1130, 1179-1180, 1209-1210, 1761-1762, 1767-1768, 1773-1774, 1779-1780, 1785-1786, 1791-1792, 2235-2236, 2241-2242


441-442: Expanded dashboard and reporting capabilities

The additions related to dashboard features and reporting significantly enhance the system's monitoring and management capabilities. Key improvements include:

  • New entries for various types of supervisors and their activities
  • Additional metrics and reports for different aspects of the health campaign
  • More detailed breakdown of data quality and performance indicators

These enhancements will likely lead to more comprehensive and effective campaign management.

To ensure proper utilization of these new features, consider creating or updating user documentation that explains each new dashboard element and report. This will help users understand and effectively use the expanded capabilities. Would you like assistance in drafting an outline for this documentation?

Also applies to: 447-448, 453-454, 507-510, 513-516, 519-522, 525-528, 531-534, 537-540, 543-546, 555-558, 561-564, 567-570, 573-576, 579-582, 585-588, 591-594, 597-600, 603-606, 609-612, 615-618, 621-624, 627-630, 633-636, 639-642, 645-648, 651-654, 2175-2176, 2181-2182, 2187-2188, 2193-2194, 2199-2200, 2205-2206, 2211-2212, 2217-2218, 2223-2224, 2229-2230, 2277-2278, 2283-2284, 2289-2290, 2295-2296, 2301-2302


Line range hint 1-2424: Overall improvement in dashboard localization

The extensive updates and additions to this localization file significantly enhance the functionality and usability of the health campaign dashboard. Key improvements include:

  1. More specific and detailed metrics for household spraying and coverage
  2. Enhanced inventory and stock management terminology
  3. Improved complaint and issue tracking categorization
  4. Updated administrative and geographic terms for more flexible descriptions
  5. Expanded dashboard and reporting capabilities

These changes will likely result in a more comprehensive, clear, and effective tool for managing the health campaign.

While the overall quality is high, there are a few minor inconsistencies in spelling and capitalization throughout the file. A final proofreading pass could help ensure complete consistency.

localisation/HCM/V1.5/fr_MZ/rainmaker-dss.json (4)

1-2432: Overall structure and consistency look good.

The JSON file is well-structured with consistent "module" and "locale" fields across all entries. Each entry contains the required "code", "message", "module", and "locale" fields.

However, there are a few points to consider:

  1. Ensure that all translations are reviewed by a native French speaker for accuracy and natural language use.
  2. Consider adding comments or grouping related entries together to improve maintainability.
  3. Verify that all codes are unique and match their corresponding English versions in other localization files.

8-14: Consider adding more context to the "BENEFICIARY_REFUSED" translation.

The current translation "Refus" (Refusal) is quite short and might lack context. Consider expanding it to provide more clarity, such as "Refus du bénéficiaire" (Beneficiary's refusal) or "Bénéficiaire a refusé" (Beneficiary refused).


26-32: Enhance clarity for "CLOSED_HOUSEHOLD" translation.

The current translation "Fermé" (Closed) is quite brief and might lack context. Consider expanding it to "Ménage fermé" (Closed household) or "Domicile fermé" (Closed home) to provide more clarity and context.


74-2432: Overall translation quality is good, pay attention to placeholders.

The remaining entries in the file appear to be well-translated and consistent. However, please ensure that:

  1. All placeholders (e.g., "{0}") are correctly maintained in the French translations where they appear in the original English text.
  2. The translations are reviewed by a native French speaker to confirm natural language use and context-appropriate translations.
  3. The translated strings fit well in the UI without causing layout issues due to length differences.
📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

📥 Commits

Files that changed from the base of the PR and between f1c716b and 4d8669f.

📒 Files selected for processing (11)
  • localisation/HCM/V1.5/en_MZ/rainmaker-common.json (1 hunks)
  • localisation/HCM/V1.5/en_MZ/rainmaker-dss.json (4 hunks)
  • localisation/HCM/V1.5/fr_MZ/hcm-common.json (6 hunks)
  • localisation/HCM/V1.5/fr_MZ/hcm-dashboard.json (1 hunks)
  • localisation/HCM/V1.5/fr_MZ/hcm-household.json (7 hunks)
  • localisation/HCM/V1.5/fr_MZ/rainmaker-dss.json (1 hunks)
  • localisation/HCM/V1.5/pt_MZ/hcm-common.json (5 hunks)
  • localisation/HCM/V1.5/pt_MZ/hcm-dashboard.json (1 hunks)
  • localisation/HCM/V1.5/pt_MZ/hcm-household.json (7 hunks)
  • localisation/HCM/V1.5/pt_MZ/rainmaker-common.json (1 hunks)
  • localisation/HCM/V1.5/pt_MZ/rainmaker-dss.json (1 hunks)
🧰 Additional context used
🔇 Additional comments (39)
localisation/HCM/V1.5/en_MZ/rainmaker-common.json (3)

43683-43687: LGTM: New localization entry added correctly.

The new entry for "SUB_DSS_HEALTH_TOTAL_HOUSEHOLDS_REFUSED" is well-formatted and consistent with the localization file structure. The message is clear and appropriate for the given code.


43689-43693: Please clarify the message content for this entry.

The code "SUB_DSS_HEALTH_NATIONAL_TOTAL_HOUSEHOLDS_NOT_SPRAYED_BY_REASON" suggests content about households not sprayed, but the message "Click on the slice to drill down to the boundary" appears to be a UI instruction. Could you please confirm if this is the intended message for this code, or if there's a mismatch between the code and the message?


43701-43704: Review naming convention and clarify message content.

  1. The code "IRS-mz_NDSS_DASHBOARD" uses a different naming convention compared to other entries in this file. Consider updating it to follow the established convention (e.g., "IRS_MZ_NDSS_DASHBOARD").

  2. The message "IRS Mbezi Highlands" appears to be a specific location name, while the code suggests this is for a dashboard. Could you please confirm if this is the intended message for this code, or if there should be a more general dashboard title?

localisation/HCM/V1.5/pt_MZ/hcm-dashboard.json (2)

1-218: LGTM: File structure is consistent and well-formed.

The JSON file structure is valid and consistent. Each entry correctly includes the required fields (code, message, module, and locale) with consistent values for "module" and "locale" across all entries.


1-218: Overall assessment: Good addition with minor improvements needed

This new localization file for the HCM dashboard in Portuguese (Mozambique) is a valuable addition. The structure is consistent and well-formed, and it covers a wide range of necessary UI elements. However, there are a few minor issues that should be addressed:

  1. Remove the trailing space in the "BOTTLES_USED_TODAY" message.
  2. Resolve the duplicate entries for bed nets distribution.
  3. Fix the typo in the "NO._OF_HOUSES_NOT_SPRAYE" code.
  4. Standardize the use of punctuation in messages for consistency.

Once these small issues are addressed, the file will be in excellent shape for use in the HCM dashboard localization.

localisation/HCM/V1.5/fr_MZ/hcm-dashboard.json (5)

1-218: LGTM: Overall structure and format

The file structure is correct and consistent. It's a valid JSON array with multiple localization entries, each containing the required keys (code, message, module, and locale). The module and locale values are consistent throughout the file.


45-49: Review long messages for UI compatibility

The message for "DSS_NOTE_DESCRIPTION" is quite long. Ensure that this message displays correctly in the UI and consider if it needs to be broken into smaller parts or if line breaks need to be added for better readability.


141-151: Review potential duplication

There's a potential duplication between "NO._OF_HOUSES_NOT_SPRAYE" and "NO._OF_HOUSES_NOT_SPRAYED_TODAY". Consider if both are necessary, or if they can be consolidated into a single entry.


183-187: Review consistency of "QUANTITY" message

The message for "QUANTITY" translates to "Number of people" (Nombre de personnes), which seems inconsistent with the generic nature of the code. Consider if this is the intended meaning, or if a more general translation like "Quantité" would be more appropriate.


1-218: Overall assessment: Good quality with minor improvements needed

The localization file is well-structured and provides comprehensive French translations for the hcm-dashboard module. The consistency in formatting and key structure is commendable. However, addressing the identified issues will further enhance the quality and reliability of the localization:

  1. Consolidate similar codes to reduce redundancy.
  2. Enhance clarity of some messages, particularly short ones like "BOTTLES_USED_TODAY".
  3. Refine error message punctuation for a more professional tone.
  4. Review long messages for UI compatibility.
  5. Fix the truncated code "NO._OF_HOUSES_NOT_SPRAYE".
  6. Review potential duplications and inconsistencies in message meanings.

Resolving these minor issues will result in a more robust and maintainable localization file.

localisation/HCM/V1.5/fr_MZ/hcm-household.json (8)

14-19: LGTM: New entry for "CEMENT" added

The new entry for "CEMENT" with the French translation "Ciment" has been correctly added.


21-25: LGTM: New entry for "CLAY" added

The new entry for "CLAY" with the French translation "Argile" has been correctly added.


33-37: LGTM: New entry for "GLASS" added

The new entry for "GLASS" with the French translation "Verre" has been correctly added.


249-253: LGTM: New entry for "METAL" added

The new entry for "METAL" with the French translation "Métal" has been correctly added.


Line range hint 1-332: Overall assessment: Localization improvements with minor considerations

The changes to this file enhance the French (Mozambique) localization by adding new entries for materials (CEMENT, CLAY, GLASS, METAL) and refining existing labels. The modifications are consistent with the provided AI summary and appear to be correct translations.

Key points to consider:

  1. Verify the consistency of the "ADMINISTRATION_AREA_FORM_LABEL" change across the application.
  2. Address the potential issue with the space in the "LLIN BEDNET_TYPE_OF_RESOURCE_USED" key.
  3. Ensure consistent usage of the new "VILLAGE_LABEL" in relation to "ADMINISTRATION_AREA_FORM_LABEL".

These changes will improve the user experience for French-speaking users in Mozambique.


4-4: Verify consistency of "ADMINISTRATION_AREA_FORM_LABEL" change

The label has been changed from "Zone administrative" to "Village". While this aligns with the changes in other locales, please ensure this more specific term is appropriate for all contexts where it's used in the application.

#!/bin/bash
# Search for usage of ADMINISTRATION_AREA_FORM_LABEL in the codebase
rg "ADMINISTRATION_AREA_FORM_LABEL" -t js -t jsx -t ts -t tsx

327-330: LGTM: New entry for "VILLAGE_LABEL" added

The new entry for "VILLAGE_LABEL" with the French translation "Village" has been correctly added. This addition aligns with the change made to "ADMINISTRATION_AREA_FORM_LABEL".

Please verify that this new label is used consistently in relation to "ADMINISTRATION_AREA_FORM_LABEL" throughout the application.

#!/bin/bash
# Search for usage of VILLAGE_LABEL in the codebase
rg "VILLAGE_LABEL" -t js -t jsx -t ts -t tsx

225-229: Approve new entry, but note potential issue with key format

The new entry for "LLIN BEDNET_TYPE_OF_RESOURCE_USED" with the French translation "Ressources utilisées : Quantité distribuée" has been correctly added. However, the key contains a space, which might cause issues in some systems.

Consider replacing the space with an underscore or camelCase. Please verify that this key format is consistently used and supported across the application.

localisation/HCM/V1.5/pt_MZ/hcm-household.json (7)

4-4: LGTM: Improved specificity in terminology.

The change from "Área administrativa" to "Aldeia" (village) provides a more specific and relatable term for users. This aligns well with the addition of "VILLAGE_LABEL" later in the file, ensuring consistency in terminology.


14-19: LGTM: Consistent addition of building material term.

The addition of "CEMENT" ("Cimento") expands the vocabulary for building materials. This is consistent with similar additions in other localization files and enhances the ability to describe household structures or construction-related information.


20-25: LGTM: Consistent addition of another building material term.

The addition of "CLAY" ("Argila") further expands the vocabulary for building materials. This is in line with the previous "CEMENT" addition and maintains consistency across localization files.


32-37: LGTM: Consistent addition of building material term.

The addition of "GLASS" ("Vidro") continues the pattern of expanding the vocabulary for building materials. This is consistent with the previous additions (CEMENT, CLAY) and enhances the ability to describe household structures or materials used in construction.


248-253: LGTM: Consistent addition of building material term.

The addition of "METAL" ("Metal") continues the pattern of expanding the vocabulary for building materials. This is consistent with the previous additions (CEMENT, CLAY, GLASS) and further enhances the ability to describe household structures or materials used in construction.


268-268: LGTM: Improved terminology, but verify if field is still required.

The message for "NO_OF_MEMBERS_COUNT_LABEL" has been refined:

  • "N.º" is used instead of "Número" for brevity.
  • "agregado familiar" (household) replaces "domicílio" (residence), which may be more accurate in this context.

The asterisk (*) has been removed from the end of the message. This symbol often indicates a required field. Please verify if this field is still required and if the asterisk should be retained or if it's handled differently in the UI.


296-301: LGTM: Consistent addition of building material term.

The addition of "REEDS" ("Palha") continues the pattern of expanding the vocabulary for building materials. This is consistent with the previous additions (CEMENT, CLAY, GLASS, METAL) and further enhances the ability to describe household structures or materials used in construction, particularly in rural or traditional settings.

localisation/HCM/V1.5/pt_MZ/rainmaker-common.json (2)

697-703: LGTM: New localization entry added correctly.

The new entry for "SUB_DSS_HEALTH_TOTAL_HOUSEHOLDS_REFUSED" is correctly formatted and the Portuguese translation appears accurate.


704-709: Verify message accuracy for "SUB_DSS_HEALTH_NATIONAL_TOTAL_HOUSEHOLDS_NOT_SPRAYED_BY_REASON".

The message "Clique na fatia para detalhar a Unidade Organizacional" (Click on the slice to detail the Organizational Unit) doesn't seem to directly correspond to the code, which suggests information about households not sprayed by reason. Please confirm if this is the intended message for this code.

localisation/HCM/V1.5/fr_MZ/hcm-common.json (4)

1048-1051: Approved change in mobile number length requirement.

The update to the "INDIVIDUAL_DETAILS_MOBILE_NUMBER_LENGTH" message correctly expands the acceptable length for mobile numbers to include both 9 and 10 digits, which likely reflects the actual phone number format in Mozambique. The wording change from "portable" to "téléphone mobile" is also appropriate and more formal.


686-691: Approved new loading text message.

The addition of "CORE_COMMON_LOADING_TEXT" with the message "Chargement..." is correct and appropriate for indicating a loading state in French.


716-721: Approved addition of "meters" translation.

The new "CORE_COMMON_METERS" message with "mètres" is correct for the plural form of "meter" in French. The lowercase format is appropriate for flexible usage in the UI.


Line range hint 1-1503: Overall improvement to French localization for Mozambique.

This update to the French localization file for Mozambique (hcm-common.json) brings several positive changes:

  1. Improved phrasing for existing messages (e.g., "CAPTURING_LOCATION").
  2. Updated content to reflect local requirements (e.g., mobile number length).
  3. Addition of new messages to enhance the user interface (e.g., loading text, error messages).

These changes will contribute to a better user experience for French-speaking users in Mozambique. A few minor corrections have been suggested for optimal quality.

localisation/HCM/V1.5/pt_MZ/hcm-common.json (3)

644-649: New error message added: CORE_COMMON_FAILED_TO_FETCH

The addition of this new error message "Falha ao buscar" (Failed to fetch) is appropriate and will be useful for various scenarios where data fetching fails.


716-721: New entry added for plural form of "meter"

The addition of "CORE_COMMON_METERS" with the translation "metros" is appropriate. It's good to have both singular ("CORE_COMMON_METER") and plural forms available for flexibility in different contexts.


1048-1048: Updated mobile number length requirement

The message for mobile number length has been updated to allow for both 9 and 10 digit numbers, which provides more flexibility. The translation is correct and uses the term "telemóvel" which is appropriate for Portuguese (Mozambique).

localisation/HCM/V1.5/pt_MZ/rainmaker-dss.json (2)

1-2114: Summary of localization file review

The localisation/HCM/V1.5/pt_MZ/rainmaker-dss.json file is well-structured and provides a comprehensive set of localization strings for the rainmaker-dss module in Portuguese (Mozambique). The file maintains consistency in its structure, with each entry containing the required fields.

Key observations and suggestions:

  1. Consider standardizing code formatting (underscores vs dots).
  2. Verify the handling of HTML entities in messages.
  3. Break long messages into multiple lines for improved readability.
  4. Group related entries and add comments for better organization.
  5. Clarify the purpose of prefixes like "SUB_" and "TIP_" in codes.
  6. Consider parameterizing similar messages to reduce duplication.
  7. Add a header comment to provide context for the file.

Overall, the file is well-formed and should function as intended. Implementing these suggestions would further improve its maintainability and clarity for developers working with these localization strings.


1-420: 💡 Codebase verification

Consider standardizing code formatting

There's an inconsistency in how codes are formatted. Some use underscores (e.g., "AVERAGE_NO_OF_HOUSES_SPRAYED"), while others use dots (e.g., "DSS.HEADER.ADMINISTRATIVEPROVINCE"). It's recommended to stick to one format for better maintainability and consistency.

Verify handling of HTML entities in messages

Some messages contain HTML entities (e.g., "<" in line 58). Ensure that the application correctly handles these entities when displaying the messages. If the entities are not needed, consider replacing them with actual characters for better readability.

✅ Verification successful

Consider standardizing code formatting

There's an inconsistency in how codes are formatted. Some use underscores (e.g., "AVERAGE_NO_OF_HOUSES_SPRAYED"), while others use dots (e.g., "DSS.HEADER.ADMINISTRATIVEPROVINCE"). It's recommended to standardize the format for better maintainability and consistency.

HTML entities in messages are handled correctly

No HTML entities were found in the messages.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Search for HTML entities in the messages
grep -n '&[a-z]\+;' localisation/HCM/V1.5/pt_MZ/rainmaker-dss.json

Length of output: 68


Script:

#!/bin/bash
# Search for HTML entities in the messages using extended regex
grep -En '&[a-z]+;' localisation/HCM/V1.5/pt_MZ/rainmaker-dss.json

Length of output: 68

localisation/HCM/V1.5/en_MZ/rainmaker-dss.json (2)

3-4: Improved specificity in household spraying metrics

The changes in terminology and addition of new entries provide more detailed and specific information about household spraying activities. This includes:

  • Replacing vague terms like "vulnerable/non-vulnerable houses" with specific metrics such as "Average Number of Houses Sprayed" and "Households with more than 10 rooms".
  • Adding new entries for various aspects of spraying coverage and efficiency.

These changes will likely improve the clarity and usefulness of the dashboard for users.

Also applies to: 9-10, 15-16, 21-22, 27-28, 171-172, 177-178, 183-184, 189-190, 195-196, 201-202, 207-208, 213-214, 375-376, 381-382, 387-388, 393-394, 399-400, 405-406, 411-412, 1455-1458, 1479-1482, 1485-1488, 1491-1494, 1497-1500, 1503-1506, 1509-1512, 1515-1518, 1521-1524


81-82: Updated administrative and geographic terminology

The changes in administrative and geographic terms provide more options for describing different levels of organization. This includes:

  • Specific terms like "Administrative Post"
  • General terms like "Administrative Area"
  • Various levels such as District, Province, and Village

These updates allow for more flexible and precise geographic descriptions.

Please clarify the intended usage and hierarchy of the different administrative terms (e.g., Administrative Area, Administrative Post, District, Province). This will ensure consistent application across the application. Consider adding comments or documentation to explain the relationship between these terms.

Also applies to: 87-88, 93-94, 99-100, 141-142, 147-148, 219-220, 243-244, 249-250, 255-256, 261-262, 417-418, 423-424, 1005-1006, 1035-1036, 1749-1750, 1965-1966

localisation/HCM/V1.5/fr_MZ/rainmaker-dss.json (1)

56-62: Verify the empty message for "DSS_CMN_TABLE_INFO".

The message for this entry is currently just a space character. This might be intentional, but it's unusual and could potentially be an error. Please verify if this is the intended content or if it should contain actual text.

Comment on lines +9 to +19
"code": "DSS_HEALTH_NATIONAL_BED_NETS_DISTRIBUTED_TODAY",
"message": "Total de mosquiteiros distribuídos hoje",
"module": "hcm-dashboard",
"locale": "pt_MZ"
},
{
"code": "DSS_HEALTH_NATIONAL_BED_NET_DISTRIBUTED_TODAY",
"message": "Total de mosquiteiros distribuídos hoje",
"module": "hcm-dashboard",
"locale": "pt_MZ"
},
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue

Resolve duplicate entries for bed nets distribution

There are two very similar entries for bed nets distribution with slightly different codes but identical messages. This might lead to confusion or redundancy in the codebase.

Consider keeping only one of these entries and updating all references in the code accordingly. If both are needed, ensure their purposes are distinct and consider adding comments to clarify their usage.

Comment on lines +141 to +145
"code": "NO._OF_HOUSES_NOT_SPRAYE",
"message": "Nº de casas não pulverizadas",
"module": "hcm-dashboard",
"locale": "pt_MZ"
},
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue

Fix typo in localization code

The code "NO._OF_HOUSES_NOT_SPRAYE" appears to have a typo. It's missing the last 'D'.

Correct the typo in the code:

-        "code": "NO._OF_HOUSES_NOT_SPRAYE",
+        "code": "NO._OF_HOUSES_NOT_SPRAYED",

Ensure to update any references to this code in the codebase as well.

📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
"code": "NO._OF_HOUSES_NOT_SPRAYE",
"message": "Nº de casas não pulverizadas",
"module": "hcm-dashboard",
"locale": "pt_MZ"
},
"code": "NO._OF_HOUSES_NOT_SPRAYED",
"message": "Nº de casas não pulverizadas",
"module": "hcm-dashboard",
"locale": "pt_MZ"
},

Comment on lines +141 to +145
"code": "NO._OF_HOUSES_NOT_SPRAYE",
"message": "Nombre de maisons non pulvérisées",
"module": "hcm-dashboard",
"locale": "fr_MZ"
},
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue

Fix truncated code

The code "NO._OF_HOUSES_NOT_SPRAYE" appears to be truncated. This could lead to issues in the application. Consider correcting it to "NO._OF_HOUSES_NOT_SPRAYED" for consistency with other codes.

Comment on lines +212 to +217
{
"code": "IRS_TYPE_OF_RESOURCE_USED",
"message": "Tipo de inseticida utilizado: Quantidade distribuída",
"module": "hcm-household",
"locale": "pt_MZ"
},
Copy link

Choose a reason for hiding this comment

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

🛠️ Refactor suggestion

Consider using a shared key for identical messages.

The message for "IRS_TYPE_OF_RESOURCE_USED" is identical to "DELIVER_INTERVENTION_TYPE_OF_INSECTICIDE_USED". While this might be intentional for different contexts (IRS likely stands for Indoor Residual Spraying), it could lead to maintenance issues.

Consider using a shared key for both entries to improve maintainability. For example:

{
  "code": "INSECTICIDE_TYPE_AND_QUANTITY",
  "message": "Tipo de inseticida utilizado: Quantidade distribuída",
  "module": "hcm-household",
  "locale": "pt_MZ"
}

Then, you can use this shared key in both contexts. If different labels are needed in the UI, consider handling that at the component level rather than in the localization file.

Comment on lines +224 to +235
{
"code": "LLIN BEDNET_TYPE_OF_RESOURCE_USED",
"message": "Recursos utilizados: Quantidade distribuída",
"module": "hcm-household",
"locale": "pt_MZ"
},
{
"code": "LLIN_TYPE_OF_RESOURCE_USED",
"message": "Recursos utilizados: Quantidade distribuída",
"module": "hcm-household",
"locale": "pt_MZ"
},
Copy link

Choose a reason for hiding this comment

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

🛠️ Refactor suggestion

Refactor LLIN-related entries for consistency and maintainability.

The additions of "LLIN BEDNET_TYPE_OF_RESOURCE_USED" and "LLIN_TYPE_OF_RESOURCE_USED" with identical messages raise several points:

  1. The space in "LLIN BEDNET" might cause issues in some systems.
  2. The duplicate messages could lead to maintenance problems.
  3. The structure differs from the insecticide-related entries, potentially causing inconsistency in the UI.

Consider the following improvements:

  1. Remove the space in the "LLIN BEDNET" key: "LLIN_BEDNET_TYPE_OF_RESOURCE_USED".
  2. If these truly represent different contexts, keep them separate but ensure the keys clearly differentiate their use cases.
  3. If they are identical in all cases, consider using a single shared key.
  4. Align the message structure with the insecticide-related entries for consistency:
    {
      "code": "LLIN_TYPE_AND_QUANTITY",
      "message": "Tipo de recurso utilizado: Quantidade distribuída",
      "module": "hcm-household",
      "locale": "pt_MZ"
    }

This approach would improve consistency across different types of resources (insecticides, bednets) and enhance maintainability.

Comment on lines +302 to +307
{
"code": "SMC CAMPAIGN_TYPE_OF_RESOURCE_USED",
"message": "Recursos utilizados: Quantidade distribuída",
"module": "hcm-household",
"locale": "pt_MZ"
},
Copy link

Choose a reason for hiding this comment

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

🛠️ Refactor suggestion

Refactor SMC-related entry for consistency and maintainability.

The addition of "SMC CAMPAIGN_TYPE_OF_RESOURCE_USED" raises several points:

  1. The space in "SMC CAMPAIGN" might cause issues in some systems.
  2. The message structure differs from the insecticide-related entries but is similar to the LLIN entries.
  3. This inconsistency could lead to confusion in the UI and maintenance challenges.

Consider the following improvements:

  1. Remove the space in the key: "SMC_CAMPAIGN_TYPE_OF_RESOURCE_USED".
  2. Align the message structure with other resource-related entries for consistency:
    {
      "code": "SMC_CAMPAIGN_TYPE_OF_RESOURCE_USED",
      "message": "Tipo de recurso utilizado: Quantidade distribuída",
      "module": "hcm-household",
      "locale": "pt_MZ"
    }

This approach would improve consistency across different types of resources (insecticides, bednets, SMC campaign resources) and enhance maintainability.

Comment on lines +686 to +691
{
"code": "CORE_COMMON_LOADING_TEXT",
"message": "Carregando...",
"module": "hcm-common",
"locale": "pt_MZ"
},
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue

New loading message added and duplicate entry detected

The addition of the loading message "Carregando..." (Loading...) is appropriate. However, there's a duplicate entry with an extra apostrophe in the code that should be removed.

Please remove the following duplicate entry:

-    {
-        "code": "CORE_COMMON_LOADING_TEXT'",
-        "message": "Carregando...",
-        "module": "hcm-common",
-        "locale": "pt_MZ"
-    },

Also applies to: 692-695

Comment on lines +421 to +840
"code": "DSS_HEALTH_SUPERVISION_DISTRICT_SUPERVISORS_CHECKLISTS_COMPLETION_RATE",
"message": "Contagem de conclusão das listas de verificação dos supervisores distritais",
"module": "rainmaker-dss",
"locale": "pt_MZ"
},
{
"code": "DSS_HEALTH_SUPERVISION_NATIONAL_SUPERVISORS_CHECKLISTS_COMPLETION_RATE",
"message": "Contagem de conclusão das listas de verificação dos supervisores nacionais",
"module": "rainmaker-dss",
"locale": "pt_MZ"
},
{
"code": "DSS_HEALTH_SUPERVISION_PROVINCIAL_SUPERVISORS_CHECKLISTS_COMPLETION_RATE",
"message": "Contagem de conclusão das listas de verificação dos supervisores provinciais",
"module": "rainmaker-dss",
"locale": "pt_MZ"
},
{
"code": "DSS_HEALTH_SUPERVISION_SUMMARY",
"message": "Relatório resumido",
"module": "rainmaker-dss",
"locale": "pt_MZ"
},
{
"code": "DSS_HEALTH_SUPERVISION_SUPERVISOR_USER_SYNC_RATE",
"message": "Sincronização de dados",
"module": "rainmaker-dss",
"locale": "pt_MZ"
},
{
"code": "DSS_HEALTH_SUPERVISION_TEAM_SUPERVISORS_CHECKLISTS_COMPLETION_RATE",
"message": "Contagem de conclusão de listas de verificação de supervisores de equipe",
"module": "rainmaker-dss",
"locale": "pt_MZ"
},
{
"code": "DSS_HEALTH_SUPERVISION_TEAM_SUPERVISOR_USER_SYNC_RATE",
"message": "Sincronização de dados",
"module": "rainmaker-dss",
"locale": "pt_MZ"
},
{
"code": "DSS_HEALTH_SUSPECTED_FRAUDS",
"message": "Suspeitas de Fraudes",
"module": "rainmaker-dss",
"locale": "pt_MZ"
},
{
"code": "DSS_HEALTH_TEAM_PERFORMANCE",
"message": "Desempenho da equipe",
"module": "rainmaker-dss",
"locale": "pt_MZ"
},
{
"code": "DSS_HEALTH_THEORETICAL_VS_MANUAL_STOCK",
"message": "Contagem de estoque teórico versus manual",
"module": "rainmaker-dss",
"locale": "pt_MZ"
},
{
"code": "DSS_HEALTH_TOTAL_HOUSEHOLDS_NOT_SPRAYED_BY_REASON",
"message": "Casas não pulverizadas pela razão",
"module": "rainmaker-dss",
"locale": "pt_MZ"
},
{
"code": "DSS_HEALTH_TOTAL_HOUSEHOLDS_NOT_SPRAYED_BY_REASON_OVERVIEW",
"message": "Casas não pulverizadas",
"module": "rainmaker-dss",
"locale": "pt_MZ"
},
{
"code": "DSS_HEALTH_TOTAL_HOUSEHOLDS_REFUSED",
"message": "Número de casas recusadas",
"module": "rainmaker-dss",
"locale": "pt_MZ"
},
{
"code": "DSS_HEALTH_TOTAL_INCOMPATIBLE_HOUSES",
"message": "Total de famílias em casas nao PIDOM",
"module": "rainmaker-dss",
"locale": "pt_MZ"
},
{
"code": "DSS_HEALTH_TOTAL_INCOMPATIBLE_HOUSES_PROVINCE",
"message": "Total de famílias em casas nao PIDOM",
"module": "rainmaker-dss",
"locale": "pt_MZ"
},
{
"code": "DSS_HEALTH_VULNERABLE_POPULATION_COVERAGE_CHILDREN_U5",
"message": "Cobertura de crianças com menos de 5 anos",
"module": "rainmaker-dss",
"locale": "pt_MZ"
},
{
"code": "DSS_HEALTH_VULNERABLE_POPULATION_COVERAGE_PREGNANT_WOMEN",
"message": "Cobertura populacional de mulheres grávidas",
"module": "rainmaker-dss",
"locale": "pt_MZ"
Copy link

Choose a reason for hiding this comment

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

🛠️ Refactor suggestion

Consider breaking long messages into multiple lines

Some messages are quite long, which can make the file harder to read and maintain. Consider breaking these messages into multiple lines for improved readability. For example, the message in lines 434-437 could be formatted as:

"message": "Reclamações por tipo e Unidade Organizacional",

This change would make the file easier to read and edit.

Group related entries for better organization

There are several entries related to complaints (e.g., lines 406-409, 412-415, 418-421). Consider grouping these entries together and adding a comment to indicate the start of the "Complaints" section. This would improve the overall organization of the file and make it easier to locate related entries.

Comment on lines +841 to +1260
"code": "DSS_TOTAL_TEAM_LEADS_SYNCED_AT_LEAST_ONCE",
"message": "Total de chefes de equipe sincronizados pelo menos uma vez",
"module": "rainmaker-dss",
"locale": "pt_MZ"
},
{
"code": "DSS_TOTAL_WMS",
"message": "Total de fiel de armazém",
"module": "rainmaker-dss",
"locale": "pt_MZ"
},
{
"code": "DSS_TOTAL_WMS_SYNCED_AT_LEAST_ONCE",
"message": "Total de fiel de armazém sincronizados pelo menos uma vez",
"module": "rainmaker-dss",
"locale": "pt_MZ"
},
{
"code": "DSS_UNIQUE_SPRAY_OPERATORS_SYNCED",
"message": "Total de Rociadores sincronizados pelo menos uma vez",
"module": "rainmaker-dss",
"locale": "pt_MZ"
},
{
"code": "Dataissues",
"message": "Problemas de dados",
"module": "rainmaker-dss",
"locale": "pt_MZ"
},
{
"code": "FUNERAL",
"message": "Funeral",
"module": "rainmaker-dss",
"locale": "pt_MZ"
},
{
"code": "GLASS",
"message": "Vidro",
"module": "rainmaker-dss",
"locale": "pt_MZ"
},
{
"code": "HF_ASMT",
"message": "Asmt HF",
"module": "rainmaker-dss",
"locale": "pt_MZ"
},
{
"code": "INCOMPATIBLE",
"message": "Não PIDOM",
"module": "rainmaker-dss",
"locale": "pt_MZ"
},
{
"code": "METAL",
"message": "Metal",
"module": "rainmaker-dss",
"locale": "pt_MZ"
},
{
"code": "NotEnoughStock",
"message": "Estoque insuficiente",
"module": "rainmaker-dss",
"locale": "pt_MZ"
},
{
"code": "Notenoughstock",
"message": "Estoque insuficiente",
"module": "rainmaker-dss",
"locale": "pt_MZ"
},
{
"code": "Pending_assignment",
"message": "Tarefa pendente",
"module": "rainmaker-dss",
"locale": "pt_MZ"
},
{
"code": "Performanceissue",
"message": "Problema de desempenho",
"module": "rainmaker-dss",
"locale": "pt_MZ"
},
{
"code": "REEDS",
"message": "Caniço",
"module": "rainmaker-dss",
"locale": "pt_MZ"
},
{
"code": "SICK",
"message": "Doente",
"module": "rainmaker-dss",
"locale": "pt_MZ"
},
{
"code": "SUB_AVERAGE_NO_OF_HOUSES_SPRAYED",
"message": "Número Médio de Casas Pulverizadas",
"module": "rainmaker-dss",
"locale": "pt_MZ"
Copy link

Choose a reason for hiding this comment

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

🛠️ Refactor suggestion

Consider expanding abbreviations in codes for clarity

Some codes use abbreviations that might not be immediately clear to all developers. For example, "DSS_HEADER_WM_STOCK_ENTRIES" (lines 381-385) uses "WM" which could stand for "Warehouse Manager" or something else. Consider either expanding these abbreviations or adding comments to explain their meaning.

Add comments to group related entries

This section contains entries for various metrics and statistics that seem to be related to dashboard elements. Consider adding comments to group related entries together. For example, you could add a comment like "// Stock-related entries" before the stock-related entries (lines 381-391, 297-301, etc.). This would improve the overall organization and make it easier for developers to find specific entries.

Comment on lines +1261 to +1680
"code": "TIP_DSS_HEADER_HOUSES_COVERAGE_RATIO",
"message": "Taxa de cobertura da casa",
"module": "rainmaker-dss",
"locale": "pt_MZ"
},
{
"code": "TIP_DSS_HEADER_INCOMING_STOCK",
"message": "Inseticida recebido",
"module": "rainmaker-dss",
"locale": "pt_MZ"
},
{
"code": "TIP_DSS_HEADER_INCOMPLETE_HOUSES",
"message": "Nº de registros incompletos",
"module": "rainmaker-dss",
"locale": "pt_MZ"
},
{
"code": "TIP_DSS_HEADER_INSECTICIDES_SPRAYED",
"message": "Inseticida usado",
"module": "rainmaker-dss",
"locale": "pt_MZ"
},
{
"code": "TIP_DSS_HEADER_INSECTICIDE_USAGE_EFFICIENCY",
"message": "Eficiência no uso de inseticidas",
"module": "rainmaker-dss",
"locale": "pt_MZ"
},
{
"code": "TIP_DSS_HEADER_NATIONAL_SUPERVISORS_CHECKLIST_FILL_RATE",
"message": "Contagem de listas de verificação dos supervisores nacionais",
"module": "rainmaker-dss",
"locale": "pt_MZ"
},
{
"code": "TIP_DSS_HEADER_NON_DELIVERY_HH_REFUSED",
"message": "Não entrega (recusada)",
"module": "rainmaker-dss",
"locale": "pt_MZ"
},
{
"code": "TIP_DSS_HEADER_OUTGOING_STOCK",
"message": "Inseticida usado",
"module": "rainmaker-dss",
"locale": "pt_MZ"
},
{
"code": "TIP_DSS_HEADER_PRODUCT_TARGET_TO_RECEIVE",
"message": "Inseticida para receber conforme microplano",
"module": "rainmaker-dss",
"locale": "pt_MZ"
},
{
"code": "TIP_DSS_HEADER_PROVINCIAL_SUPERVISORS_CHECKLIST_FILL_RATE",
"message": "Contagem de listas de verificação dos supervisores provinciais",
"module": "rainmaker-dss",
"locale": "pt_MZ"
},
{
"code": "TIP_DSS_HEADER_RETURNED_STOCK",
"message": "Inseticida devolvido",
"module": "rainmaker-dss",
"locale": "pt_MZ"
},
{
"code": "TIP_DSS_HEADER_SPRAY_OPERATORS_ATTENDANCE_COUNT",
"message": "Presença",
"module": "rainmaker-dss",
"locale": "pt_MZ"
},
{
"code": "TIP_DSS_HEADER_STOCK_LEFT",
"message": "Inseticida em estoque",
"module": "rainmaker-dss",
"locale": "pt_MZ"
},
{
"code": "TIP_DSS_HEADER_TEAM_SUPERVISORS_CHECKLIST_FILL_RATE",
"message": "Contagem de listas de verificação dos supervisores da equipe",
"module": "rainmaker-dss",
"locale": "pt_MZ"
},
{
"code": "TIP_DSS_HEADER_TOTAL_HOUSES_SPRAYED",
"message": "Número total de casas visitadas no período selecionado",
"module": "rainmaker-dss",
"locale": "pt_MZ"
},
{
"code": "TIP_DSS_HEADER_TOTAL_HOUSES_SPRAYED_COUNT",
"message": "Total de casas pulverizadas",
"module": "rainmaker-dss",
"locale": "pt_MZ"
},
{
"code": "TIP_DSS_HEADER_TOTAL_ROOMS_SPRAYED",
"message": "Número total de salas pulverizadas para o período selecionado",
"module": "rainmaker-dss",
"locale": "pt_MZ"
Copy link

Choose a reason for hiding this comment

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

🛠️ Refactor suggestion

Clarify the purpose of the "SUB_" prefix in codes

Several entries use a "SUB_" prefix in their codes (e.g., lines 1257-1261, 1263-1267). It would be helpful to add a comment explaining the purpose of this prefix and how these entries differ from those without the prefix. This would improve clarity for developers working with these localization strings.

Consider parameterizing similar messages

There are instances of very similar messages with slight variations. For example, lines 1298-1303 and 1304-1309 have nearly identical messages, differing only in the specific metric mentioned. Consider if it's possible to parameterize these messages to reduce duplication and make updates easier. This could be done by using placeholders in the messages and providing the specific metric as a parameter when the message is used.

Example of parameterization:

{
  "code": "SUB_DSS_HEALTH_METRIC_DESCRIPTION",
  "message": "Mostra a {metric} em uma Unidade Organizacional",
  "module": "rainmaker-dss",
  "locale": "pt_MZ"
}

Then, when using this message, you would provide the specific metric (e.g., "cobertura por tipo de estrutura" or "cobertura para casas não PIDOM") as a parameter.

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