[fix] [frontend] permanent i18n key in auth pages #211
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What type of PR is this?
cn:在中文模式下的授权面板中,选择secret key 的超时时间为永久时,依然是英文显示。
en:In the authorization panel in Chinese mode, when you select the secret key timeout period as permanent, the display is still in English.
这是我们在扩展开发API授权时,发现的一个问题。切换中文模式时,过期时间永久的选项,仍是英文Permanent显示。
分析了一下,可能是以下问题导致的。
词库里这行本身是中文翻译。不过问题在于 permanent 这个通用 key 在别的模块(common中)里也被用到,最终打包进来的顺序会把它覆盖回英文,所以 PAT 面板里通过 I18n.t('permanent') 拿到的还是 “Permanent”。我们给永久有效选项加了一个专用 key permanent_duration,并让代码改用这个 key,就不会再被其它地方的同名词条覆盖了。
因为不知道common 中的permanent是否可以删除,我们新增了一个permanent_duration。
麻烦大佬看一下。