Skip to content

Conversation

@CyanVoxel
Copy link
Member

@CyanVoxel CyanVoxel commented Sep 7, 2025

Summary

Fixes #1100 by preventing the mnemonic removal logic from removing escaped ampersands.

Tasks Completed

  • Platforms Tested:
    • Windows x86
    • Windows ARM
    • macOS x86
    • macOS ARM
    • Linux x86
    • Linux ARM
  • Tested For:
    • Basic functionality
    • PyInstaller executable

@CyanVoxel CyanVoxel added this to the Alpha v9.5.5 milestone Sep 7, 2025
@CyanVoxel CyanVoxel added Type: UI/UX User interface and/or user experience Type: Translations Modifies translation keys or translation capabilities. Priority: Medium An issue that shouldn't be be saved for last labels Sep 7, 2025
@CyanVoxel CyanVoxel moved this to 🍃 Pending Merge in TagStudio Development Sep 7, 2025
if ch == "&":
# escaped ampersand "&&"
if i + 1 < len(label) and label[i + 1] == "&":
result += "&"
Copy link
Collaborator

Choose a reason for hiding this comment

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

Can you try changing this to result += "&&"? I think that should fix it too and would technically be more robust

Copy link
Member Author

Choose a reason for hiding this comment

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

That also seems to fix it - It was just difficult to parse the logic and see what was going wrong where. I can go ahead and make this change though, I'm not the biggest fan of using a placeholder like in the original logic, even if it did simplify it to an easier to follow one-liner

@CyanVoxel CyanVoxel changed the title fix: revert mnemonic removal logic fix: prevent mnemonic removal from removing escaped ampersands Sep 7, 2025
@CyanVoxel CyanVoxel merged commit 1c5e001 into main Sep 7, 2025
10 checks passed
@github-project-automation github-project-automation bot moved this from 🍃 Pending Merge to ✅ Done in TagStudio Development Sep 7, 2025
@CyanVoxel CyanVoxel deleted the fix-1100 branch September 7, 2025 20:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Priority: Medium An issue that shouldn't be be saved for last Type: Translations Modifies translation keys or translation capabilities. Type: UI/UX User interface and/or user experience

Projects

Status: ✅ Done

Development

Successfully merging this pull request may close these issues.

[Bug]: Escaped Ampersands in Translations Malfunctioning

3 participants