Audacity Bug Summary
••• Introduction •••
••• Keywords •••
    Audacity 3.0.3 development began 19th April 2021

Audacity Bugzilla



Bug 2613 - Selection bar sample display incorrectly in German
Selection bar sample display incorrectly in German
Status: RESOLVED FIXED
Product: Audacity
Classification: Unclassified
Component: Application Core
unspecified
All All
: P2 RepeatableAll
Assigned To: Default Assignee for New Bugs
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2020-12-11 06:54 UTC by Steve Daulton
Modified: 2021-02-09 12:24 UTC (History)
8 users (show)

See Also:
Steps To Reproduce:
1. Create a new audio track. 2. Click on the track at about 2 seconds. 3. Set the time format in the Selection Toolbar to "samples". 4. Observe that the "Start" time is around 88200 samples. 5. Change the locale to "Deutsch". 6. Observe that the "Start" time now (incorrectly) displays completely the wrong number of samples (example 200,000,000 samples).
Release Note:
First Git SHA:
Group: ---
Workaround:
Closed: 2021-01-15 00:00:00
stevethefiddle: Regression+
petersampsonaudacity: Test‑OK‑Win+
petersampsonaudacity: Test‑OK‑Mac+


Attachments
Audacity auf Deutsch (67.36 KB, image/png)
2021-01-14 14:16 UTC, Peter Sampson
Details
Audacity en Francais (60.76 KB, image/png)
2021-01-14 14:33 UTC, Peter Sampson
Details
Audacity in Norsk (Norwegian) (59.03 KB, image/png)
2021-01-14 14:41 UTC, Peter Sampson
Details
Audacity auf Deutsch inconsistency (566.89 KB, image/png)
2021-01-14 15:34 UTC, Peter Sampson
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Steve Daulton 2020-12-11 06:54:50 UTC
When the time format in the Selection Toolbar is set to "samples", and the locale is set to German ("Deutsch"), the displayed selection times are wrong.

This is believed to be a regression, though I can reproduce the problem on Linux back to 2.3.2 (the earliest version I have on Linux).
Comment 1 Peter Sampson 2020-12-11 09:06:22 UTC
Fo me when I test on W10 this is a regression on 2.4.2 )2.4.1 and earlier are fine)

It does not seem to afflict other foreign language choices
Comment 2 Steve Daulton 2020-12-11 09:39:51 UTC
(In reply to Peter Sampson from comment #1)
Do you mean that it does occur in 2.4.2 (a regression against 2.4.1)?

I do NOT think it's related to the update to wx3.1 as I see the problem in Audacity 2.3.2 built with wx3.0.4.
Comment 3 Peter Sampson 2020-12-11 09:53:50 UTC
(In reply to Steve Daulton from comment #2)
Yes for me on W10 it does occur in 2.4.2 and latest alpha 3.0.0 

But not in 2.4.1 or earlier (I started testing back at 2.3.0)
Comment 4 David Bailes 2020-12-14 06:33:12 UTC
Looks like it's due to this commit:
Author:			Joachim Huffer <joachim.huffer@gmail.com>
Date:			6 months ago (09/06/2020 17:23:04)
Committer:		James Crook <james.k.crook@gmail.com>
Commit hash:	55718497192376ed77834710ff44c7547c15e88a
Parent:			039ac974

Update German Translation

change:
 msgid "01000,01000,01000 samples|#"
-msgstr "01000,01000,01000 Samples|#"
+msgstr "01000.01000.01000 Samples|#"

I think there are also incorrect changes for frames as well.
Comment 5 Leland Lucius 2021-01-13 22:05:59 UTC
Fix in:

https://github.com/audacity/audacity/commit/171d8cf

It is based on a comment that James had included in the code as part of the fix for bug #s 2241 and 2399:

   // A correct fix would require changing all the format
   // strings to make it explicit when ',' is a thousands separator
   // and when ',' is a decimal separator

I’ve implemented such a method by changing all of the format strings to use a “>” for the decimal (“.”) separator which the translators can change to “<” if their separator is supposed to be a “,” instead. I’ve also updated all of the current translations to reflect this…at least I hope I got them all correct.
Comment 6 Peter Sampson 2021-01-14 11:04:16 UTC
(In reply to Leland Lucius from comment #5)
Tested on W10 with Audacity 3.0.0 9e53df0

This now works properly on Windows
with both the Selection Toolbar and the Timer Toolbar
Comment 7 Peter Sampson 2021-01-14 11:06:05 UTC
(In reply to Leland Lucius from comment #5)
Tested on macOS 11.1 with Audacity 3.0.0 9e53df0

This now works properly on MAC
with both the Selection Toolbar and the Timer Toolbar
Comment 8 David Bailes 2021-01-14 13:06:20 UTC
(In reply to Leland Lucius from comment #5)
> Fix in:
> 
> https://github.com/audacity/audacity/commit/171d8cf
> 
> It is based on a comment that James had included in the code as part of the
> fix for bug #s 2241 and 2399:
> 
>    // A correct fix would require changing all the format
>    // strings to make it explicit when ',' is a thousands separator
>    // and when ',' is a decimal separator
> 
> I’ve implemented such a method by changing all of the format strings to use
> a “>” for the decimal (“.”) separator which the translators can change to
> “<” if their separator is supposed to be a “,” instead. I’ve also updated
> all of the current translations to reflect this…at least I hope I got them
> all correct.

- The description of the syntax at the top of NumericTextCtrl.cpp could probably do with updating to reflect this change.
- The german translation still incorrectly uses . as the thousands separator - but this no longer has any unwanted side effects.
- the following hint may need updating:
/* i18n-hint: Format string for displaying log of frequency in decades.
       * Change the decimal points for your locale. Don't change the numbers. */
      XO("10>01000 decades|0.434294482"),   // Scale factor is 1 / ln (10)
Comment 9 Peter Sampson 2021-01-14 14:16:16 UTC
Created attachment 1043 [details]
Audacity auf Deutsch

(In reply to David Bailes from comment #8)
Microsoft states in their gudelines (and we tend to follow Microsoft anf Apple guidelines)

>Number Formatting
>
>The character used as the thousands separator.
>In the United States, this character is a comma (,). 
>In Germany, it is a period (.). 
>Thus one thousand and twenty-five is displayed as 1,025 in the United States 
>and 1.025 in Germany. In Sweden, the thousands separator is a space.
>
>The character used as the decimal separator.
>In the United States, this character is a period (.). 
>In Germany, it is a comma (,). 
>Thus one thousand twenty-five and seven tenths is displayed as 
>1,025.7 in the United States and 1.025,7 in Germany.

This says to me that the format we have auf Deutsch in the Selection Toolbar and the Timer toolbar is correct – see attachment.
Comment 10 David Bailes 2021-01-14 14:25:41 UTC
(In reply to Peter Sampson from comment #9)
> Created attachment 1043 [details]
> Audacity auf Deutsch
> 
> (In reply to David Bailes from comment #8)
> Microsoft states in their gudelines (and we tend to follow Microsoft anf
> Apple guidelines)
> 
> >Number Formatting
> >
> >The character used as the thousands separator.
> >In the United States, this character is a comma (,). 
> >In Germany, it is a period (.). 
> >Thus one thousand and twenty-five is displayed as 1,025 in the United States 
> >and 1.025 in Germany. In Sweden, the thousands separator is a space.
> >
> >The character used as the decimal separator.
> >In the United States, this character is a period (.). 
> >In Germany, it is a comma (,). 
> >Thus one thousand twenty-five and seven tenths is displayed as 
> >1,025.7 in the United States and 1.025,7 in Germany.
> 
> This says to me that the format we have auf Deutsch in the Selection Toolbar
> and the Timer toolbar is correct – see attachment.

Sorry, my mistake!
Comment 11 Peter Sampson 2021-01-14 14:33:19 UTC
Created attachment 1044 [details]
Audacity en Francais

Though having said that I note that we do not follow the same convention for French where they also use the comma as the decimal separator (and period for thousands) - in line with UK and US usage  - See attachment.
Comment 12 Peter Sampson 2021-01-14 14:41:49 UTC
Created attachment 1045 [details]
Audacity in Norsk (Norwegian)

Here agin it is diffent - the thousands separator is blank and the decimal separator is period.

The decimal separator is wrong as the Norwegians usually use comma for that.
The blank thousands separator is fine.  See: https://en.wikipedia.org/wiki/Decimal_separator#Digit_grouping

But when I worked in Oslo I recall that my Excel spreadsheets had numbers expressed as
>1.234.567,89
just as we currently have for German
Comment 13 Peter Sampson 2021-01-14 14:51:17 UTC
(In reply to David Bailes from comment #10)
>Sorry, my mistake!

That's OK David - I've had some fun digging around in this  ;-)

In the process I've discovered from my Gernan-speaking (Züri-Deutsch) wife that she would write Swiss numbers as
>1'234'567,89
with single-quotes as the thousands separator.

What a strange world we live in ...


But as we have had no complaints about such formatting I suggest we let various sleeping dogs/Hunde/Chiens lie (quietly and peacefully)
Comment 14 Peter Sampson 2021-01-14 15:04:31 UTC
And with regard to the German testing shows that up to 2.4.1 auf Deutsch we were following UK/US standards for the selection toolbar.

It was only with 2.4.2 that it got changed to proper German standard.
Comment 15 Steve Daulton 2021-01-14 15:09:06 UTC
Testing on Linux, I'm now seeing the correct numbers.

I don't know if we are using the correct separators. Some of them "look wrong" to me, but I'm unsure what is correct.

Example - French selected in Prefs.

Spectral Selection Toolbar uses a comma (as expected).

Time in the Selection Toolbar shows a dot in "hh:mm:ss + milliseconds" between seconds and milliseconds, whereas I'd have expected a comma.

I'm also seeing a dot used as the decimal separator in effects and generators.
Comment 16 Peter Sampson 2021-01-14 15:34:44 UTC
Created attachment 1046 [details]
Audacity auf Deutsch inconsistency

(In reply to Steve Daulton from comment #15)
Well in German we are certainly not consistent

a) The Timer and Selection toolbars use "," period as the thousands separator

b) the Spectral selection toolbar uses "," comma as the thousands separator

See attachment.

So do we want 
a) keep this bug open for this minor residual with Spectral Selection toolbar not
conforming to Selection and Timer Toolbars in German
b) close this (as the numbers are right) and open a residual (low-P) bug for the formatting.

I favour the latter.
Comment 17 Peter Sampson 2021-01-14 16:58:37 UTC
(In reply to Peter Sampson from comment #16)
I also note that the Spectral selection toolbar is inconsistent in that it doesn't use a thousands separator.
Comment 18 Peter Sampson 2021-01-15 09:24:07 UTC
Since the critical part of this bug is fixed (as set out in the steps to reproduce) I am closing this as fixed.

I will consider add bug(s) later for the mild separator formatting issues - but if I do they will only be P5 I'm thinking.