如何更改 ian:accounts-ui-bootstrap-3 上的下拉文本

How can I change dropdown text on ian:accounts-ui-bootstrap-3

我有一个 helpers/config.js

Accounts.ui.config({

});

玩了几个小时并进行搜索后,我一直无法找到一种方法来更改在顶部 bootstrap 导航中生成的 tex SIGNIN/JOIN。

我该如何正确操作?

此包使用 anti:i18n,如 :

中所示

https://github.com/ianmartorell/meteor-accounts-ui-bootstrap-3/blob/master/package.js#L15

所以您可以做的就是简单地覆盖在那里声明的默认 i18n 字符串:

https://github.com/ianmartorell/meteor-accounts-ui-bootstrap-3/blob/master/i18n/en.i18n.js#L25

我从未使用过 anti:i18n,但我认为将此代码放入您的应用程序中应该可以解决问题:

i18n.map("en",{
  loginButtonsLoggedOutDropdown: {
    signIn: "YOUR SIGN IN TEXT",
    up: "YOUR JOIN TEXT"
  }
});

您还需要使用此命令将程序包添加到您的应用程序中:

meteor add anti:i18n

那是因为即使该包是 ian:accounts-ui-bootstrap-3 的依赖项,您也不允许在您的应用程序中访问它,您必须明确地将其列为您的应用程序的依赖项。