Alfresco / alfresco-ng2-components

Alfresco Angular Components
https://www.alfresco.com/abn/adf/docs/
Apache License 2.0
294 stars 262 forks source link

Translation of search facets #3270

Closed kaspereden closed 6 years ago

kaspereden commented 6 years ago

I am not really sure whether or not this is a bug or feature request. But for our clients localization is really a big thing. Literally everything must be in Dutch.

Type of issue: (check with "[x]")

  • [ ] New feature request
  • [ ] Bug
  • [ ] Support request
  • [ ] Documentation

Current behaviour: The search filter component has the option to set some of the labels in the app.config.json. Only the ones on the top level are being translated. The rest is not. Also titles like "Facet Queries" cannot be translated. (https://github.com/Alfresco/alfresco-ng2-components/blob/master/lib/content-services/search/components/search-filter/search-filter.component.html#L22)

I am having config like this:

{
          "id": "queryType",
          "name": "SEARCH.TYPE.LABEL",
          "enabled": true,
          "expanded": false,
          "component": {
            "selector": "adf-search-radio",
            "settings": {
              "field": null,
              "options": [
                {
                  "name": "SEARCH.TYPE.OPTIONS.NONE",
                  "value": "",
                  "default": true
                },
                {
                  "name": "SEARCH.TYPE.OPTIONS.ALL",
                  "value": "TYPE:'cm:folder' OR TYPE:'cm:content'"
                },
                {
                  "name": "SEARCH.TYPE.OPTIONS.FOLDER",
                  "value": "TYPE:'cm:folder'"
                },
                {
                  "name": "SEARCH.TYPE.OPTIONS.DOCUMENT",
                  "value": "TYPE:'cm:content'"
                }
              ]
            }
          }
        },

Which results in this: image

Expected behavior: Expected that all labels could be translated.

Steps to reproduce the issue: Implement i18n and search facets. Copy the config from above and it will result in the same.

Component name and version: search-module and all its child components.

Browser and version: all

Node version (for build issues):
v9.4.0

New feature request:

DenysVuika commented 6 years ago

Thanks for pointing out. We are working on the full i18n support for faceted search widgets at the moment. I will ensure check/radio lists support that.

kaspereden commented 6 years ago

Also lists and so. :)

eromano commented 6 years ago

@kaspereden could be some missing string in the translate files , we are going to give a look but it will be fixed in the next version if is a bug. For now you can add the keys in your local i18n files of your app as workaround

eromano commented 6 years ago

https://issues.alfresco.com/jira/browse/ADF-2928

DenysVuika commented 6 years ago

It is definitely a bug for radio widget. But we will review entire i18n support for the next release. Everything is going to be translatable.