MFEs aren't changing html lang attribute
还没有人认领这个 Issue。
评估
- 难度
- 2/5
- 预计耗时
- 1-3 小时
- 新手友好度
- 76/100
- Issue 类型
- 缺陷
- 描述清晰度
- 描述清楚
- 活跃度
- 冷清
- 技术栈
- javascript
调研方向
从 src/i18n/lib.js 中第 262 行附近的 i18n configure 函数开始,将现有的 handleRtl 行为与 issue 建议的 HTML 更新进行比较。验证加载非 en-us 语言后,MFE 文档的 html lang 属性会更改为配置的 locale;当该属性反映 getLocale() 时即表示完成。
由索引模型根据 Issue 内容生成。
描述
When loading MFE using a language different than en-us. Eg: change the preferred language on the account MFE.
When we reload any MFE page, the lang html attribute didn't change even the application is translated to that new different language.
I think the MFEs should change the html lang attribute when it has been loaded with different language.
<html lang="en-us" dir="ltr">
Suggested change:
I think that the i18n configure function should change that value.
https://github.com/openedx/frontend-platform/blob/07ee86cf54d26dd1a8a98e24cf1a402e98157f61/src/i18n/lib.js#L262
Create a similar Should have a handleHTMLLang similar to handleRtl function, with code:
globalThis.document.getElementsByTagName('html')[0].setAttribute('lang', getLocale());
- 主要语言
- JavaScript
- 星标
- 38
- 派生
- 90
- 平均合并
- 3 分钟
- 30 天内合并 PR
- 4
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
openedx/frontend-platform 的其他 Issue
-
难度 5/5 一周以上 新手友好度 45/100
openedx/frontend-platform#892 · 4 条评论 ·
-
难度 3/5 1-2 天 新手友好度 48/100
openedx/frontend-platform#837 ·
-
难度 4/5 3-5 天 新手友好度 35/100
openedx/frontend-platform#835 · 1 条评论 ·
-
难度 5/5 一周以上 新手友好度 25/100
openedx/frontend-platform#833 ·
-
难度 5/5 一周以上 新手友好度 30/100
openedx/frontend-platform#764 ·
查看 openedx/frontend-platform 的全部 Issue
相似的 Issue
-
Client execution contract accepts a grant the code never takes可能已有人在做 关联的 PR 仍在进行中或已合并。 未关闭area: client enhancement priority: medium
难度 2/5 1-3 小时 新手友好度 78/100
opensro-dev/opensro#3808 ·
维护者通常 1 天内回复
-
luciano_blocktronics: sysop chat status views are both keyed TL10 and use itemFormat, which a TextView ignores可能已有人在做 @Z3NMA 今天认领。 未关闭bug
难度 2/5 1-3 小时 新手友好度 82/100
NuSkooler/enigma-bbs#1058 ·
维护者通常 1 天内回复
-
marketing
难度 2/5 1-3 小时 新手友好度 76/100
维护者通常 1 天内回复
-
enhancement good first issue help wanted
难度 2/5 1-3 小时 新手友好度 88/100
-
enhancement good first issue severity: low
难度 2/5 1-3 小时 新手友好度 78/100
TMHSDigital/Static_Chess#163 ·
维护者通常 1 天内回复