advanced search filter block title is not translated

Bug #1682292 reported by Ben Shum
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Fix Released

Bug Description

Evergreen master / 2.12

With the new advanced filter search blocks added from bug 1005040 and subsequent restyling in bug 1670425, it would appear that the type of filter being applied is not being translated and always is displayed in English.

Screenshots illustrating issue to follow, along with further work.

Revision history for this message
Ben Shum (bshum) wrote :
tags: added: i18n
Revision history for this message
Ben Shum (bshum) wrote :
Changed in evergreen:
status: New → Triaged
importance: Undecided → Medium
Revision history for this message
Mike Rylander (mrylander) wrote :

The "Filtered By" string is translatable, it just doesn't have a translation yet. The record attribute labels (Audience etc) are also translatable, via the in-db mechanism, but likewise are just not, yet.

A generic interface, such as the one that the old dojo interface provided, for translating any fieldmapper field marked as translatable is what we need IMO. Then all admin interfaces could be used to update local values.

I suppose we just need to wait for translators to do their thing on the see data and new translatable code?

Revision history for this message
Mike Rylander (mrylander) wrote :

Looking further, the problem with record attributes is that the label is not marked as translatable in the IDL. Here's a fix:;a=shortlog;h=refs/heads/user/miker/lp-1682292-make-record-attrs-i18n-friendly

tags: added: pullrequest
Revision history for this message
Ben Shum (bshum) wrote :

Tested the fix from Mike, but couldn't tell if it was working till I found the following path to success...

With that fix in place on the fm_IDL.xml file, we should expect that any database values matching the crad.label or crad.description in config.i18n_core (of which there aren't many) to display the relevant translated value as part of the filter entry.

So if I were to see a row like in config.i18n_core like:

4693 | crad.label | item_type | fr-CA | Type de document

That ought to show me the translated value for "item_type" as "Type de document" when looking at French's translation using the item type filter. However, I didn't see it, and it's because the base code says crad.description || crad.label. So if you only have the label, and not the description, it will still display the description as english only.

Inserting a new row for crad.description with a translated value made things display as I expected.

So not 100% sure if we should also swap around the advanced search filter to be crad.label || crad.description (since I think label ought to be more commonly employed than descriptions in this area), but that can be the subject of another bug in the future.

Pushing fix to master and backporting to rel_2_12. Thanks Mike!

Revision history for this message
Ben Shum (bshum) wrote :

Hmmmm.... in, I see entries like:

INSERT INTO config.record_attr_definition (name,label,fixed_field,description) values ('audience','Audn','Audn', oils_i18n_gettext('audience', 'Audience', 'crad', 'label'));

Where it seems like we're applying the oils_i18n_gettext for the "description" field, but using the "label" as the identifier. This would cause confusion for sure too and would explain why we have label entries in the translations, but no descriptions as of yet.

Changed in evergreen:
status: Triaged → Fix Committed
milestone: none → 2.12.1
Changed in evergreen:
status: Fix Committed → Fix Released
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.