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

Task priority labels are not internationalized with old array style #571

Open
dianabarsan opened this issue Aug 14, 2023 · 2 comments
Open
Labels
Help wanted Good for first time contributions Type: Bug Fix something that isn't working as intended

Comments

@dianabarsan
Copy link
Member

Describe the bug
According to our documentation, task priority labels can be arrays to support translations for multiple languages. However, cht-conf schema validation requires the label to be a string.

To Reproduce

  1. Create a task according to documentation.
  2. Compile app settings
  3. See error
ERROR tasks.js invalid schema: 
ERROR Invalid schema at tasks[3].priority.label
"priority" should be an object with optional fields "level" and "label" or a function which returns the same
Current value of tasks[3].priority.label is [{"locale":"en","content":"Home Birth"}]

Additional context
This was reported on the forum: https://forum.communityhealthtoolkit.org/t/tasks-with-medium-priority/2978

@dianabarsan dianabarsan added the Type: Bug Fix something that isn't working as intended label Aug 14, 2023
@dianabarsan
Copy link
Member Author

dianabarsan commented Aug 14, 2023

It looks like webapp has been updated to allow for translation keys for task priority labels, with the old array format style still being supported.

@dianabarsan dianabarsan changed the title Task priority labels are not internationalized Task priority labels are not internationalized with old array style Aug 14, 2023
@garethbowen
Copy link
Member

We're generally moving away from arrays for labels - it makes the config complex and the translations not able to be reused. Consider just updating the documentation.

@garethbowen garethbowen added the Help wanted Good for first time contributions label Oct 31, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Help wanted Good for first time contributions Type: Bug Fix something that isn't working as intended
Projects
None yet
Development

No branches or pull requests

2 participants