Opened 7 years ago

Last modified 7 years ago

#8050 assigned bug

Saved queries and query templates messed up when switching locale

Reported by: humdinger Owned by: aldeck
Priority: normal Milestone: R1
Component: Applications/Tracker Version: R1/Development
Keywords: localization Cc:
Blocked By: Blocking:
Has a Patch: no Platform: All

Description

This is hrev42901.

If you change your Locale prefs, saved queries and query templates may not work anymore. For example, create and save this query template:

screenshot of an example query

Now change locale from English to German and restart Tracker.
-> The "after" and "contains" disappeared.

This is because the attribute _trk/qryinitattrs contains localized keywords. This is from another example, switching from German to English.

~/config/settings/Mail/Menu Links> catattr _trk/qryinitattrs /boot/home/config/settings/Mail/Menu\ Links/Same\ sender\ this\ week
/boot/home/config/settings/Mail/Menu Links/Same sender this week : message : BMessage(0x0) {
        menuSelection[0] = string("When", 5 bytes)
        menuSelection[1] = string("From", 5 bytes)
        subMenuSelection[0] = string("nach", 5 bytes)
        subMenuSelection[1] = string("enthält", 9 bytes)
        attrViewText[0] = string("last 7 days", 12 bytes)
        attrViewText[1] = string("", 1 bytes)
        logicalRelation = int32(0x0 or 0)
}

You see, "after" became "nach", and "contains" is now "enthält". Under an English locale, the find panel doesn't understand that anymore...

Attachments (1)

querytemplate.png (11.9 KB) - added by humdinger 7 years ago.
screenshot of an example query

Download all attachments as: .zip

Change History (4)

Changed 7 years ago by humdinger

Attachment: querytemplate.png added

screenshot of an example query

comment:1 Changed 7 years ago by humdinger

Where I wrote

Now change locale from English to German and restart Tracker.
-> The "after" and "contains" disappeared.

I meant that there is no "after" and "contains" when you open the saved query template again.

comment:2 Changed 7 years ago by anevilyak

Owner: changed from anevilyak to aldeck
Status: newassigned

comment:3 Changed 7 years ago by diver

Component: Kits/libtracker.soApplications/Tracker
Note: See TracTickets for help on using tickets.