Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Missing lang attribute for kanji displayed in the story box #137

Closed
fabd opened this issue Jun 5, 2018 · 6 comments
Closed

Missing lang attribute for kanji displayed in the story box #137

fabd opened this issue Jun 5, 2018 · 6 comments
Assignees
Labels

Comments

@fabd
Copy link
Owner

fabd commented Jun 5, 2018

(Windows 7, Google Chrome), if a story contains a kanji, be it just the kanji or as a kanji reference (in the markdown enclosed in {} braces), they are displayed as Chinese characters. Not an expert on HTML, but probably setting lang="ja-jp" or so to the relevant div elements like "story" and "storybox" should fix the issue.

@fabd fabd added the bug label Jun 5, 2018
@fabd fabd self-assigned this Jun 5, 2018
@fabd
Copy link
Owner Author

fabd commented Jun 6, 2018

##Issue

  • Ubuntu Google / Firefox uses Japanese font (without a fix)
  • Chinese font is picked by Windows OS + Chrome

https://en.m.wiktionary.org/wiki/%E8%AA%A4

Firefox vs Google Chrome (without the lang attribute in the story element)
issue-137

@fabd
Copy link
Owner Author

fabd commented Jun 13, 2018

Added lang="ja"to the Edit Story and Shared Stories lists.

The Shared Stories will not display changes until the cached templates are refreshed, which could take a while.

@steffahn
Copy link

steffahn commented Jul 13, 2018

Hi, Frank here again - I’ll comment on the issue directly this time ^^

I found a few places where it’s still incorrectly displayed. First one is the search box on the study pages. Also the input areas in the add flashcards or remove flashcards custom selection pages display Chinese characters. Probably other text fields are missing as well, but I guess those are the ones missing where you actually would want to input a Kanji and that’s used reasonably often (as opposed to something like "Import Customized Keywords", which is also doing Chinese).

And (btw. still everything in Chrome on Windows 7 of course) I’m noticing that the font used in general is a little bit different on Chrome between Chinese and Japanese. Well … zooming in on the characters, it looks like we’re getting a font with serifs for Chinese and some sans-serif for Japanese. That affects characters in explanatory texts of your’s like on the Study Page Quick Tour’s section about Formatting or the explanations on the Custom Selection pages, the Help page, etc.. etc.

And I don’t know if you ever looked into the Forum. I don’t use that, but glancing at it it appeared as if it might me displaying entirely Chinese characters right now. …skimming through the forum some more - the serif-Hanzi together with sans-serif kanji look pretty ugly. By the way, you can only see the serifs though, when zooming in a lot (or maybe if you have like an ultra-high resolution display, IDK :D).

EDIT: Btw, I’m not sure how to go about that in the correct manner (except for the input fields, especially the search box), since the main content of the forum for example definitely is English, and I believe, that search engines might care about "lang" attributes, so making everything Japanese is not the best solution. — Again and again I’m getting the feeling that Han unification was not the best idea in the world xD

@fabd
Copy link
Owner Author

fabd commented Jul 13, 2018

Regarding the forum
This may be more of a Chrome / Win issue then. There are some very experienced Japanese learners on the forum, I'm sure they would have pestered me may times over the years if this was an issue for them. So I can only guess they're not seeing Chinese character variants.

Customize fonts in browser
While I acknowledge the issue for Win/Chrome specifically, unless I get more feedback it's hard to prioritize.

I would try to address this at the browser level, in Chrome if you go to Settings > Customize fonts , there is an advanced option apparently where you can chose fonts per script.

@steffahn
Copy link

Yeah, I’ve been googling about this for an hour now and this seems to be pretty much somewhat a Chrome on Windows problem. At least the sans-serif and serif mixing thing.

(Experimenting a bit more …)

Okay, I now tried Chrome on Android and there you get a sans-serif Chinese font. Fond a random page with a lot of characters in the forum where I could actually test it. And Firefox on Windows gives me some actual Japanese characters. For whatever reason. This whole stuff is pretty messed up :/

@steffahn
Copy link

steffahn commented Jul 13, 2018

Hi, just an additional comment because I just fixed the issue for me. The easy solution in Chrome is to change the Chrome “Language” options. There’s an entry where you can “Order languages based on your preference”. Adding Japanese to the end of the list does the trick :-)

Also, I’d be guessing, most “very experienced Japanese learners“ have changed their browser to Japanese, so they avoid the issue not only on your site but throughout the internet ^^

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants