mirror of
https://github.com/octoleo/syncthing.git
synced 2024-11-10 07:11:08 +00:00
gui: Don't use italic text for CJK languages (#8172)
Even though technically possible, CJK languages normally don't use italic text at all, as not only does it make the characters/letters look unnatural, but also, in the case of complex characters, unreadable too. For these reasons, it is usually recommended not to use the italic font style at all [1][2]. This commit changes the default font-style of the i element for Chinese, Japanese, and Korean langauge to "normal" instead of "italic". In order to do so, the HTML lang attribute is also changed following each change of the GUI language. [1] https://bobtung.medium.com/best-practice-in-chinese-layout-f933aff1728f [2] https://devblogs.microsoft.com/oldnewthing/20060914-02/?p=29743 Signed-off-by: Tomasz Wilczyński <twilczynski@naver.com>
This commit is contained in:
parent
d35d7d2360
commit
c396124bc9
@ -506,3 +506,10 @@ ul.three-columns li, ul.two-columns li {
|
||||
padding-top: 6px;
|
||||
padding-bottom: 6px;
|
||||
}
|
||||
|
||||
/* CJK languages don't use italic at all, hence don't force it on them. */
|
||||
html[lang|="zh"] i,
|
||||
html[lang="ja"] i,
|
||||
html[lang|="ko"] i {
|
||||
font-style: normal;
|
||||
}
|
||||
|
@ -99,6 +99,7 @@ angular.module('syncthing.core')
|
||||
function useLocale(language, save2Storage) {
|
||||
if (language) {
|
||||
$translate.use(language).then(function () {
|
||||
document.documentElement.setAttribute("lang", language);
|
||||
if (save2Storage && _localStorage)
|
||||
_localStorage[_SYNLANG] = language;
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user