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

IR spectrum window: incorrectly formatted x-axis label #1954

Open
stanpapa opened this issue Jan 27, 2025 · 9 comments
Open

IR spectrum window: incorrectly formatted x-axis label #1954

stanpapa opened this issue Jan 27, 2025 · 9 comments

Comments

@stanpapa
Copy link

stanpapa commented Jan 27, 2025

Avogadro version:

  • Avogadrolibs: 1.100.0
  • Qt: 6.8.1

Desktop version:

  • OS: NixOS
  • Version 25.05

ORCA version:
6

Describe the bug
The x-axis label in the IR spectrum is incorrectly formatted, namely the HTML for the superscript is still showing. It is displayed as

Wavenumber (cm<sup>-1</sup>)

To Reproduce
Steps to reproduce the behavior:

  1. Load ORCA output file containing IR spectrum
  2. Click on Analysis > Import Spectra

Expected behavior
HTML should be processed, so the label is displayed as "Wavenumber (cm-1)"

Screenshots

Image

Additional context
ORCA input to reproduce

! def2-SVP AnFreq

! bohrs
* xyz 0 1
 O          -1.396288    -0.075107     0.052125
 O           1.396289    -0.016261    -0.089970
 H          -1.775703     1.309756    -1.111179
 H           1.775687     0.140443     1.711854
*

Relevant section of the output:

-----------
IR SPECTRUM
-----------

 Mode   freq       eps      Int      T**2         TX        TY        TZ
       cm**-1   L/(mol*cm) km/mol    a.u.
----------------------------------------------------------------------------
  6:    757.14   0.048289  244.03  0.019903  (-0.000027  0.130305  0.054068)
  7:    886.14   0.002170   10.97  0.000764  (-0.000002  0.025533  0.010595)
  8:   1493.20   0.021753  109.93  0.004546  ( 0.067259  0.001804 -0.004374)
  9:   1641.32   0.000006    0.03  0.000001  (-0.000011 -0.000972 -0.000405)
 10:   3747.36   0.030530  154.29  0.002542  (-0.021942  0.017169 -0.042026)
 11:   3751.13   0.005737   28.99  0.000477  (-0.000187  0.020368  0.007897)
Copy link

welcome bot commented Jan 27, 2025

Thanks for opening your first issue here! Please try to include example files and screenshots if possible. If you're looking for support, please post on our forum: https://discuss.avogadro.cc/

@ghutchis
Copy link
Member

How did you install Avogadro? From a package? From source? I'd be curious to know what version of VTK is being used, thanks.

@stanpapa
Copy link
Author

I downloaded and used the AppImage from the GitHub releases page.

@ghutchis
Copy link
Member

I went through the code, because I was pretty sure I did all of that with Unicode. What is your language / localization?

e.g.,
xTitle = tr("Wavenumbers (cm⁻¹)");

@stanpapa
Copy link
Author

stanpapa commented Jan 29, 2025

These are my locale settings (taken from /etc/locale.conf)

LANG=en_GB.UTF-8
LC_ADDRESS=nl_NL.UTF-8
LC_IDENTIFICATION=nl_NL.UTF-8
LC_MEASUREMENT=nl_NL.UTF-8
LC_MONETARY=nl_NL.UTF-8
LC_NAME=nl_NL.UTF-8
LC_NUMERIC=nl_NL.UTF-8
LC_PAPER=nl_NL.UTF-8
LC_TELEPHONE=nl_NL.UTF-8
LC_TIME=nl_NL.UTF-8

Not sure if this might be relevant, but I use the following fonts:

defaultFonts = {
  serif = [ "Noto Serif" "Noto Color Emoji" ];
  sansSerif = [ "Inter" "Noto Color Emoji" ];
  monospace = [ "JetBrains Mono" "Noto Color Emoji" ];
  emoji = [ "Noto Color Emoji" ];
};

@ghutchis
Copy link
Member

I'm really really confused. That string is not in the app or translations / localizations anymore. It should be using Unicode as I indicated above.

I'll check and make sure the builds are using the latest localizations...

@matterhorn103
Copy link
Contributor

I can confirm that the stable Flatpak (1.100) does the same when I use my system language i.e. en-gb. With en-us though the superscript is only 1 rather than -1.

I'll also note that, like @stanpapa, my default sans-serif is Inter. The font used for the axis labels is not Inter though, in either localization.

Clearly there's also a translation error as well since "Operations" should be "Options", I'll fix that if I remember.

@ghutchis
Copy link
Member

ghutchis commented Feb 5, 2025

Yes, for some reason some of the fonts (via VTK) don't seem to have the superscript - symbol. Not quite sure what to do for that.

Personally? I'd love to find a better chart library, but in any case, this seems to mostly be that the translations aren't up-to-date in the build.

@matterhorn103
Copy link
Contributor

The translations of "Options", the x-axis label, the y-axis label, and the menu entry were all fixed by @andibing 7 months ago according to Weblate.

So there's clearly something funky happened with the translations. It's not just in the AppImage either, they're wrong in the Flatpak too.

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

No branches or pull requests

3 participants