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

fix: item name format and capitalization #1468

Merged

Conversation

pedrolamas
Copy link
Member

Fluidd item names/labels format currently removes any non-letter/digit and adds spaces between then, which is incorrect.

The new approach works like this:

  • Replace any _ with (single space)
  • Split string by single space
  • Remove any empty entry (resulted from multiple consecutive spaces)
  • Capitalize the first letter of each part of the splited string
  • Join the result, separating the items with a single space

Before

image

After

image

Fixes #1460

Signed-off-by: Pedro Lamas <pedrolamas@gmail.com>
@pedrolamas pedrolamas added the GH - Bug Something isn't working label Jul 25, 2024
@pedrolamas pedrolamas added this to the 1.30.2 milestone Jul 25, 2024
@pedrolamas pedrolamas requested a review from matmen July 25, 2024 11:02
@pedrolamas pedrolamas merged commit d1ba830 into fluidd-core:develop Jul 26, 2024
5 checks passed
@pedrolamas pedrolamas deleted the pedrolamas/fix-pretty-naming branch July 26, 2024 09:38
HelgeKeck added a commit to HelgeKeck/fluidd that referenced this pull request Jul 26, 2024
fix: item name format and capitalization (fluidd-core#1468)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
GH - Bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Temperature sensor name incorrect
2 participants