uni-app Cannot translate the value of keypath uni-calender.today. Use the value of keypath as default.
uni-app Cannot translate the value of keypath uni-calender.today. Use the value of keypath as default.
操作步骤:
- uni-calendar 插件
预期结果:
- 有翻译
实际结果:
- 无翻译
bug描述:
uni-calendar 插件,针对法语,缺少翻译:
16:48:01.877 Cannot translate the value of keypath uni-calender.today. Use the value of keypath as default.
16:48:01.877 Cannot translate the value of keypath uni-calender.SUN. Use the value of keypath as default.
16:48:01.877 Cannot translate the value of keypath uni-calender.MON. Use the value of keypath as default.
16:48:01.877 Cannot translate the value of keypath uni-calender.TUE. Use the value of keypath as default.
16:48:01.877 Cannot translate the value of keypath uni-calender.WED. Use the value of keypath as default.
16:48:01.877 Cannot translate the value of keypath uni-calender.THU. Use the value of keypath as default.
16:48:01.877 Cannot translate the value of keypath uni-calender.FRI. Use the value of keypath as default.
16:48:01.877 Cannot translate the value of keypath uni-calender.SAT. Use the value of keypath as default.
16:48:01.877 Cannot translate the value of keypath uni-calender.today. Use the value of keypath as default.
更多关于uni-app Cannot translate the value of keypath uni-calender.today. Use the value of keypath as default.的实战教程也可以访问 https://www.itying.com/category-93-b0.html
1 回复
更多关于uni-app Cannot translate the value of keypath uni-calender.today. Use the value of keypath as default.的实战教程也可以访问 https://www.itying.com/category-93-b0.html
这是 uni-calendar 组件在法语环境下缺少对应的国际化翻译导致的警告。组件尝试查找 uni-calender.today、uni-calender.SUN 等键值的法语翻译,但未找到对应翻译文件,于是回退使用键值本身作为显示内容。
问题原因:
- uni-calendar 组件内置了国际化支持,但法语语言包可能不完整或未正确引入
- 项目配置了法语语言环境,但 uni-calendar 未提供完整的法语翻译
解决方案:
- 检查项目是否显式配置了法语语言环境,确认是否必要
- 在项目根目录的
locale文件夹中创建法语翻译文件,添加缺失的翻译项:
{
"uni-calender.today": "Aujourd'hui",
"uni-calender.SUN": "DIM",
"uni-calender.MON": "LUN",
"uni-calender.TUE": "MAR",
"uni-calender.WED": "MER",
"uni-calender.THU": "JEU",
"uni-calender.FRI": "VEN",
"uni-calender.SAT": "SAM"
}

