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

Added locale and text direction to html templates #1486

Merged
merged 1 commit into from Aug 18, 2019

Conversation

@kostasdizas
Copy link
Contributor

commented Jun 11, 2019

Added top level flags to allow browsers to render locale specific features correctly

@ssddanbrown

This comment has been minimized.

Copy link
Member

commented Jun 11, 2019

Thank you for this @kostasdizas, Is actually quite timely since I was looking to add the lang attribute soon as part of accessibility recommendations.

I think we'll need to use different locale values for the lang attribute. We have a few values in the BookStack list that are not really official lang values (de_informal for example). We have a mapping to system locales for some of the date logic so we can look to expose those values for this.

In regards to the text direction, do you have much experience of globally forcing the direction on an application like this? So far I've been only applying the direction selectively as I know it can have other side effects from my own working experience, and the browser should auto-set the direction based on the text itself. Would be good to understand if this is solving an issue otherwise auto could possibly be better? Just thinking about multi-region scenarios where perhaps the bulk of the content is written in English but the user's native language is a RTL language so they use that just for the interface.

@kostasdizas

This comment has been minimized.

Copy link
Contributor Author

commented Jun 11, 2019

Indeed, that wouldn't work for some of the non-standard names. I've updated it to use that map instead.

As for text direction, I cannot claim any expertise in the subject. It is how it's normally done, but you'd probably need some expert's advice about how the layout is affected.

@kostasdizas kostasdizas force-pushed the kostasdizas:unicode branch from 4c45fc3 to 86f56dd Jun 11, 2019

@ssddanbrown ssddanbrown merged commit 86f56dd into BookStackApp:master Aug 18, 2019

2 checks passed

codeclimate All good!
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details

@ssddanbrown ssddanbrown added this to the v0.27.0 milestone Aug 18, 2019

@ssddanbrown

This comment has been minimized.

Copy link
Member

commented Aug 18, 2019

Thanks again @kostasdizas, Now merged for next release.

I've removed the direction items for now to not effect live instances, Can always add in the future if found to be needed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
2 participants
You can’t perform that action at this time.