更改 Liferay 登录页面中的 "OpenId Connect" link 的最佳方法是什么?

What's the best way to change the "OpenId Connect" link in the Liferay login page?

我们在 Liferay 7.3 门户中添加了几个社交登录。其中包括内置的 Facebook 和 OpenId Connect 功能以及用于 Twitter、LinkedIn 等的自定义过滤器。 OpenId Connect 配置为 Google 登录。

一切正常,但我需要将登录页面中的 link 从“OpenId Connect”更改为“Google”。

我发现该值是在 portal-security-sso-openid-connect-api 模块的语言文件中的键 open-id-connect-configuration-name 中设置的。然后通过 com.liferay.portal.settings.authentication.openid.connect.web.internal.portal.settings.configuration.admin.display.OpenIdConnectPortalSettingsConfigurationScreenContributor class 的 getName() 方法访问它。我相信这个贡献者将值提供给导航器以用作标签。

我的问题是更改此值的最简单且最易于维护的方法是什么?我的想法是提供备用 Language_*.properties 文件,但我不确定如何覆盖现有文件。 portal-security-sso-openid-connect-api 模块的 JSP 挂钩是否允许我这样做?

我不知道一个干净的方法 - 希望有人会插话 - 但我遇到了同样的问题并且不得不用 navigation.jspf 中的一小部分 JavaScript 来解决它:

<script>
    $( document ).ready(function() {
        $(".taglib-text").filter(function () {
        return ($(this).text() === 'OpenId Connect')
    }).text("Google");
});
</script>

虽然这有效,但仍然有点奇怪,因为单击 link 将转到 OpenId Connect portlet,该 portlet 有一个下拉列表,其中包含一个项目 - Google - 被选中,然后用户必须单击另一个登录按钮。我知道这是为了允许多个 OpenID Connect 客户端,但我肯定喜欢 Google.

的直接方法