On Sun, Feb 24, 2019 at 2:40 PM Gabriel Huerta Araujo <
[email protected]> wrote:

> By the way how do you make that these fields(their labels in particular)
> can be translated according to chosen language if they are contained into
> guacamole_user table and I do not see any reference to them into
> manageUser.html file?
>
>
Many of those fields are dynamic. The fields driven by custom user
attributes like "expired", "disabled", etc. are given translation strings
through adding a namespace and applying a transform to the attribute name.
Within the user administration interface, an attribute like "expired" will
be associated with the translation string
"USER_ATTRIBUTES.FIELD_HEADER_EXPIRED":

https://github.com/apache/guacamole-client/blob/87aa2e6c34d11bb30626c6c27a42796506493ffd/extensions/guacamole-auth-jdbc/modules/guacamole-auth-jdbc-base/src/main/resources/translations/en.json#L93

The "USER_ATTRIBUTES" namespace comes from here:

https://github.com/apache/guacamole-client/blob/87aa2e6c34d11bb30626c6c27a42796506493ffd/guacamole/src/main/webapp/app/manage/templates/manageUser.html#L43-L48

That namespace gets assembled together with the "FIELD_HEADER_" prefix and
the transformed attribute name here:

https://github.com/apache/guacamole-client/blob/7481c181edfa3dfa80127289c7b0dd59a58ed8bc/guacamole/src/main/webapp/app/form/directives/formField.js#L95-L96

- Mike

<#m_-1198024402858664124_DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2>
>

Reply via email to