"octaves", "semitones + cents", "decades" is not translated

Windows 7 64-bit - Audacity 2.2.0-beta-Sep 1 2017 - .exe-installer

The spectrum selection bar says “octaves”, “semitones + cents”, “decades”.
It seems they are not translated.

There are some strings in the po file that i guess should be used for that.

#. i18n-hint: Name of display format that shows log of frequency
#. * in octaves
#: src/widgets/NumericTextCtrl.cpp:494
msgid "octaves"
msgstr "oktaver"

#. i18n-hint: Name of display format that shows log of frequency
#. * in semitones and cents
#: src/widgets/NumericTextCtrl.cpp:504
msgid "semitones + cents"
msgstr "halvtoner + cent"

#. i18n-hint: Name of display format that shows log of frequency
#. * in decades
#: src/widgets/NumericTextCtrl.cpp:515
msgid "decades"
msgstr "dekader"

I presume that there are translations of these strings in the PO files (at least for Danish), but you are saying that they don’t show in the Spectral Selection Toolbar when Dansk is the selected language. Do I understand correctly?

Do translations of the units for the time controls in the Selection Toolbar and Generate effects work? In other words, is this problem common to all of this type of numeric control?

Yep the translations are in the PO file but does dont seem to get used in Audacity.
Same with the selection tool bar. Its always in english. I tried to change to multiple languages but its always in english. Same in generate dialog.

This issue is the same in Audacity 2.1.3 isn’t it?


I’ve logged it.

In the Selection toolbar, I can change formats to “seconds”, “samples”, and others that contain English words like “milliseconds”

Do these translate correctly?

They are translated in the PO file, but Audacity does not show the translation.

I not sure this is it but it might be:

In the PO file it does say “src/widgets/NumericTextCtrl.cpp:280”:

#: src/prefs/PlaybackPrefs.cpp:111 src/widgets/NumericTextCtrl.cpp:280
msgid “seconds”

Which i guess means its being used there.

For the english string is used, not the translated string.

I know what’s wrong here: It’s the use of the _(“…”) underscore macro in a statically allocated table outside any function, which is a mistake that causes the translations to be looked up to early after program startup, when they are not yet available.

I will have a fix for it.