Support UTF-8 in all translation strings.

Bug #997104 reported by Daniel Schürmann
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Mixxx
Fix Released
Low
Konarak Ratnakar

Bug Description

QObject::tr can handle only ASCII by default.

See:
http://qt-project.org/doc/qt-4.8/qobject.html#tr
http://qt-project.org/doc/qt-4.8/qobject.html#trUtf8

I would prefer to escape those characters in string literals, to get around source file encoding issues.

Tags: easy i18n
summary: - non ASCII Character is Tooltips "see Preferences→Vinyl Control"
+ non ASCII Character in Tooltips "see Preferences→Vinyl Control"
Revision history for this message
RJ Skerry-Ryan (rryan) wrote : Re: non ASCII Character in Tooltips "see Preferences→Vinyl Control"

It seems we can do QTextCodec::setCodecForTr("UTF-8") to switch tr() to be interpreted as UTF-8.

Changed in mixxx:
milestone: none → 1.11.0
assignee: nobody → RJ Ryan (rryan)
importance: Undecided → Low
status: New → Confirmed
Revision history for this message
RJ Skerry-Ryan (rryan) wrote :

Looks like jus fixed this by switching away from the → character. We may want to address this in the future, so renaming and removing from 1.11.0

Changed in mixxx:
milestone: 1.11.0 → none
assignee: RJ Ryan (rryan) → nobody
summary: - non ASCII Character in Tooltips "see Preferences→Vinyl Control"
+ Support UTF-8 in all translation strings.
tags: added: i18n
Revision history for this message
RJ Skerry-Ryan (rryan) wrote :

Instead of find-replacing all tr() calls with trUtf8(), I think we should go the setCodecForTr route.

tags: added: easy
Changed in mixxx:
assignee: nobody → Konarak Ratnakar (konarak)
Revision history for this message
Daniel Schürmann (daschuer) wrote :

Thank you for adopting this one,

Before you do any changes please read:
http://qt-project.org/doc/qt-4.8/qobject.html#trUtf8
and check what happens if you checkout on Windows with a Latin-1 char set.
.. and report the result here.

Revision history for this message
Konarak Ratnakar (konarak) wrote :

I think I have fixed this but when I run tests I get:

ControllerEngine: Loading "./res/controllers/common-controller-scripts.js"
TearDown
ControllerEngine shutting down...
[1] 8912 segmentation fault (core dumped) ./mixxx-test

Any idea what might be wrong? (I have no controllers attached)

Revision history for this message
Daniel Schürmann (daschuer) wrote :

have you tried the test without your changes?

You can run the tests inside gdb to find out what happens.

http://www.mixxx.org/wiki/doku.php/creating_backtraces
just replace mixxx with mixxx-test.

Revision history for this message
Konarak Ratnakar (konarak) wrote :

I tried the test without my changes and it gave me same result as I've mentioned.
I also tried tests inside gdb but I'm clueless. Here's the backtrace: http://www.pastebin.ca/2363159.

Revision history for this message
Max Linke (max-linke) wrote :

That is not your fault. The test build does not work currently see Bug #1038234

Revision history for this message
Konarak Ratnakar (konarak) wrote :
Changed in mixxx:
status: Confirmed → In Progress
Revision history for this message
Konarak Ratnakar (konarak) wrote :

Here's the patch. I have verified this using
qDebug() << QTextCodec::codecForTr()->name();

Revision history for this message
Konarak Ratnakar (konarak) wrote :

I've tested this with non-ascii characters on linux and it's working. I do not have access to a windows machine so I'm not sure about that.

Revision history for this message
Max Linke (max-linke) wrote :

If you explain how you verified it I can test it on windows over the weekend

Revision history for this message
Max Linke (max-linke) wrote :

It also works on windows. I commited your patch to trunk

Changed in mixxx:
status: In Progress → Fix Committed
RJ Skerry-Ryan (rryan)
Changed in mixxx:
milestone: none → 1.12.0
RJ Skerry-Ryan (rryan)
Changed in mixxx:
status: Fix Committed → Fix Released
Revision history for this message
Swiftb0y (swiftb0y) wrote :

Mixxx now uses GitHub for bug tracking. This bug has been migrated to:
https://github.com/mixxxdj/mixxx/issues/6419

lock status: Metadata changes locked and limited to project staff
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.