feat: add capitalize and titleCase method for i18n#168
feat: add capitalize and titleCase method for i18n#168warjiang wants to merge 4 commits intokarmada-io:mainfrom
Conversation
There was a problem hiding this comment.
Shall we always use title case?
There was a problem hiding this comment.
+1, for this case capitalize and titleCase method share the same effect, but titleCase is more suitable.
Signed-off-by: warjiang <1096409085@qq.com>
…tleCase Signed-off-by: warjiang <1096409085@qq.com>
… switcher Signed-off-by: warjiang <1096409085@qq.com>
2075e7a to
a645653
Compare
|
/assign @RainbowMango @samzong |
Signed-off-by: warjiang <1096409085@qq.com>
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
There was a problem hiding this comment.
It seems unnecessary to handle it like this. recommended to correct the i18n text, otherwise, this part of the code logic will confuse users; Additionally, will there be any issues when concatenating prompt words?
There was a problem hiding this comment.
yes~. Only for some corner-case, there is need to use capitalize、titleCase、lowerCase kinds of method. For example, assume that we need to translate 概览 into overview, for some cases, like the sidebard menu or card title, we need to use Overview, for some other cases, like tag view, we need to use overview in lowercase, but these kind of cases if not very common. So just change the translation dictionary firstly, for corner case, use format method. cc @RainbowMango
There was a problem hiding this comment.
I feel it is kind of redundant to add titleCase to each term. I prefer to correct it at i18n text.
for some cases, like the sidebard menu or card title, we need to use Overview, for some other cases, like tag view, we need to use overview in lowercase, but these kind of cases if not very common.
Then define two terms to differentiate them.
What type of PR is this?
/kind feature
What this PR does / why we need it:
1. capitalize or titleCase for some special usages.
2. set english as default language.
Which issue(s) this PR fixes:
Fixes #
Special notes for your reviewer:
Does this PR introduce a user-facing change?: