tgrosinger / ledger-obsidian

Plain text accounting in Obsidian.md
GNU General Public License v3.0
388 stars 38 forks source link

change currency symbol from $ to #35

Closed Ravenclawer closed 2 years ago

Ravenclawer commented 2 years ago

Describe the bug A clear and concise description of what the bug is. change currency symbol from $ to ¥ causing parsing error on ledger dashboard image

To Reproduce Steps to reproduce the behavior:

  1. Go to ledger plugin setting image

  2. Click on the currency symbol

  3. change $ to ¥

  4. ctrl + p add a ledger entry and goto ledger dashboard

  5. See error

Expected behavior A clear and concise description of what you expected to happen.

Screenshots If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

Additional context Add any other context about the problem here.

Ravenclawer commented 2 years ago

similar to #33, but the thing is that the plugin already supports multilingual but with bugs

tgrosinger commented 2 years ago

Here's the list of currency symbols I think it should support: https://github.com/tgrosinger/ledger-obsidian/blob/main/grammar/ledger.ne#L41

Is the character you pasted above (¥) different from the one in my code (¥)?

Ravenclawer commented 2 years ago

I see, it's a different character. since in Chinese input software, the ¥ symbol could only be typed when you are in Chinese mode and when you switch to English mode the button for the symbol will give $ instead. So one who use Chinese input software could never type an English ¥symbol into a computer

Ravenclawer commented 2 years ago

¥ The above symbol you may add to the plugin. image

tgrosinger commented 2 years ago

I've added the new symbol and created a new release. Please let me know if that resolves the issue for you. Thanks!