Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

internal: Include AD_Language in layout ETags #428

Closed
teosarca opened this issue Jun 1, 2017 · 5 comments
Closed

internal: Include AD_Language in layout ETags #428

teosarca opened this issue Jun 1, 2017 · 5 comments

Comments

@teosarca
Copy link
Member

teosarca commented Jun 1, 2017

Is this a bug or feature request?

bug

Which are the steps to reproduce?

  • open a sales order
  • open advanced edit for that sales order => remark the field names language
  • close the advanced edit
  • in another window, go and change the language: https://w101.metasfresh.com:8443/settings
  • in your first window try opening the advanced edit again
    => it shall use the current language but usually (when it's coming from cache) it's using the previous language

What is the expected or desired behavior?

Language switching shall be instant.

NOTE: this is a follow-up of #402

teosarca added a commit that referenced this issue Jun 1, 2017
@teosarca
Copy link
Member Author

teosarca commented Jun 1, 2017

Update:

  1. Cached API calls (i.e. "GET layout" endpoints atm) will provide following headers:
Content-Language:session language, e.g. en-US
Vary:Accept-Language
  1. If enabled (see Debug REST controller's "http.use.AcceptLanguage" property) the backend will first check the "Accept-Language" header and if nothing found it will consider current session's language

  2. the language is incorporated in the resulting ETag.

Note to IT:

  • before this change, no matter what language you picked, the advanced edit layout is provided using the language of the first retrieval (because it's cached on browser and the ETag was not language dependent)
  • after this change:
    ** after browser cache expires (atm it's 1min by default) the layout using the right language is provided
    ** to make this really instant, the frontend shall provide the "Accept-Language" header: HTTP header "Accept-Language" shall be correctly set metasfresh-webui-frontend-legacy#819

@teosarca
Copy link
Member Author

teosarca commented Jun 1, 2017

TODO: after metasfresh/metasfresh-webui-frontend-legacy#819 is implemented, enable the "metasfresh.webui.http.use.AcceptLanguage" by default.

metas-ts added a commit to metasfresh/metasfresh that referenced this issue Jun 1, 2017
[#819](metasfresh/metasfresh-webui-frontend-legacy#819) HTTP header "Accept-Language" shall be correctly set
[#1663](#1663) new order checkup jasper
[#1687](#1687) Refactor Request Tab in Partner Window to allow zoom and advanced edit
[#1239](#1239) Barcode on Bestellkontrolle report
[#428](metasfresh/metasfresh-webui-api-legacy#428) internal: Include AD_Language in layout ETags
[#376](metasfresh/metasfresh-webui-api-legacy#376) Hide Roles on Logon that are not ideal for WebUI
[#426](metasfresh/metasfresh-webui-api-legacy#426) internal: JSONDocument - drop "fields" array field
[#600](metasfresh/metasfresh-webui-frontend-legacy#600) Lookup revamp – collective issue
[#425](metasfresh/metasfresh-webui-api-legacy#425) API support for bookmarking menu items
[#86](metasfresh/metasfresh-webui-api-legacy#86) Check and get rid of "Parameter 'UOMConversion' not found in context" console warnings
[#812](metasfresh/metasfresh-webui-frontend-legacy#812) 1 Key Press save action error during typing
[#1701](#1701) Customer Return Window additional Fields
[#801](metasfresh/metasfresh-webui-frontend-legacy#801) Included row: show row's references in context menu
[#744](metasfresh/metasfresh-webui-frontend-legacy#744) product/packing lookup does nothing when clicking on the single result
[#1640](#1640) fix prepare_services_superuser.sh
[#810](metasfresh/metasfresh-webui-frontend-legacy#810) quickInput endpoints are wrongly called
[#415](metasfresh/metasfresh-webui-api-legacy#415) Notification for Vendor returns jumps to wrong window
[#418](metasfresh/metasfresh-webui-api-legacy#418) Disable zoom into string lookups until it's fixed
[#1644](#1644) Add email validator syntax
[#410](metasfresh/metasfresh-webui-api-legacy#410) Provide view row field zoom-into endpoint

me-45
@metas-lc metas-lc self-assigned this Jun 9, 2017
@metas-lc
Copy link

metas-lc commented Jun 9, 2017

IT

  1. open an already existing sales order, advance edit, close advance edit
    => in advance edit language is DE
  2. in other tab open settings, change language to EN
  3. go back to sales order tab (do not refresh the page), open advance edit again
    => language is still DE. NOK should be EN
    (if you refresh the page then it works)

lang

@teosarca
Copy link
Member Author

teosarca commented Jun 9, 2017

If that's the case then it's OK.
Will work as you described when this will be implemented: metasfresh/metasfresh-webui-frontend-legacy#802 (comment)

@metas-mk
Copy link
Member

Tested after Implementation of metasfresh/metasfresh-webui-frontend-legacy#802 (comment). Works very nice. The Language settings are instantly w/o refresh. Closing/ Done

@metas-mk metas-mk self-assigned this Jun 13, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants