将 tap-i18n 与流星一起使用时的本地化文件路径错误

Localization file path error when using tap-i18n with meteor

我是运行文件夹里面的流星,像这样

ROOT_URL="http://localhost:3000/registration" meteor

此外,我正在使用 tap:i18n 包来支持国际化。问题是 tap_i18n 没有更新本地化文件的 url 并且仍然向 http://localhost:3000/tap-i18n/en-US.json 发出请求,这不是一个有效的地址,因此抛出 404 错误。它应该向 http://localhost:3000/registration/tap-i18n/en-US.json 提出请求。注意启动 meteor 时通过 ROOT_URL 传递的注册文件夹。

我如何告诉 tap_i18n 包裹兑现 ROOT_URL?

检查配置,可以设置i18n_files_route参数

Configuring tap-i18n

To configure tap-i18n add to it a file named project-tap.i18n.

This JSON can have the following properties. All of them are optional. The values bellow are the defaults.

project-root/project-tap.i18n ----------------------------- { "helper_name": "_", "supported_languages": null, "i18n_files_route": "/tap-i18n", "cdn_path": null }

Source link for configuration

兰詹,

我已经设置了一个小型演示项目,其中包含一些关于如何实现您的配置的说明。如果您能解决您的问题,请告诉我。

How to configure tap:i18n with custom ROOT_URL