Skip to content

Commit

Permalink
Fix dynamic translation for filter, fix #363
Browse files Browse the repository at this point in the history
  • Loading branch information
arildm committed May 10, 2024
1 parent b2e8eaf commit ebf37c3
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@
- Disable Trend diagram and Map buttons while waiting for statistics search to finish [#346](https://github.com/spraakbanken/korp-frontend/issues/346)
- Error when clicking trend diagram with multiple series [#358](https://github.com/spraakbanken/korp-frontend/issues/358)
- Strip HTML from total hits in annotated KWIC dowload
- Fix dynamic translation for tabs etc
- Fix dynamic translation for tabs, filters etc
- Modes in "More" menu sorted locale-awarely
- Allow dash in attribute name

Expand Down
6 changes: 3 additions & 3 deletions app/scripts/filter_directives.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,15 @@ korpApp.directive("globalFilters", [
},
template: `\
<div ng-if="dataObj.showDirective" class="mb-4">
<span class="font-bold"> {{ 'global_filter' | loc:lang}}:</span>
<span class="font-bold"> {{ 'global_filter' | loc:$root.lang}}:</span>
<div class="inline-block">
<span ng-repeat="filterKey in dataObj.defaultFilters">
<global-filter attr="filterKey"
attr-def="dataObj.attributes[filterKey]"
attr-value="dataObj.filterValues[filterKey].value",
possible-values="dataObj.filterValues[filterKey].possibleValues"
lang="lang"></global-filter>
<span ng-if="!$last">{{"and" | loc:lang}}</span>
<span ng-if="!$last">{{"and" | loc:$root.lang}}</span>
</span>
</div>
</div>`,
Expand Down Expand Up @@ -55,7 +55,7 @@ korpApp.directive("globalFilter", [
<span uib-dropdown auto-close="outsideClick" on-toggle="dropdownToggle(open)">
<button uib-dropdown-toggle class="btn btn-sm btn-default mr-1 align-baseline">
<span ng-if="attrValue.length == 0">
<span>{{ "add_filter_value" | loc:lang }}</span>
<span>{{ "add_filter_value" | loc:$root.lang }}</span>
<span>{{filterLabel | locObj:lang}}</span>
</span>
<span ng-if="attrValue.length != 0">
Expand Down

0 comments on commit ebf37c3

Please sign in to comment.