-
Notifications
You must be signed in to change notification settings - Fork 8
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
feat(i18n): display banner for outdated translations #22
base: main
Are you sure you want to change the base?
Changes from 1 commit
fa47a92
2a3b84d
0f193b0
51bb222
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
{ | ||
"version": 0, | ||
"root.description": "Et alternativ til Nix økosystemet", | ||
|
||
"header.community": "Community", | ||
|
Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
@@ -0,0 +1,14 @@ | ||||||||||||||||||||||||||||
--- | ||||||||||||||||||||||||||||
import { useTranslations } from "../../i18n/utils"; | ||||||||||||||||||||||||||||
import type { Params } from "../../i18n/utils"; | ||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||
const { lang } = Astro.params as Params; | ||||||||||||||||||||||||||||
const translation = useTranslations(lang); | ||||||||||||||||||||||||||||
--- | ||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||
<section id="i18n-outdated"> | ||||||||||||||||||||||||||||
<h2>{translation("i18n-outdated.title")}</h2> | ||||||||||||||||||||||||||||
<p class="description"> | ||||||||||||||||||||||||||||
{translation("i18n-outdated.description")} | ||||||||||||||||||||||||||||
</p> | ||||||||||||||||||||||||||||
</section> | ||||||||||||||||||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Something like this might look better to serve as a warning, apart from the content on the website itself:
Suggested change
Not quite sure about the use of There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This stands out much better this way, thanks! There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Definitely much better now! I noticed you still made the entire banner "prose-like". It'd be great to hear what other reviewers think, but I have two suggestions:
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
I fully agree. Sorry, I was too invested in the original styling of the element, that I didn't realize that you didn't merely move the styling out of Both your suggestions are solid, let me adjust this too... There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ah, no worries! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How about displaying this as a banner before the Hero instead? The hero does not take up the full width, but the header does. Currently, the warning looks to be a part of the content itself, which isn't.
See suggestion in the i18n component...
So putting it all together:

Keeping it in the same place as before:

Component:
A possible design that puts it at the very top, marking the entire page as "possibly outdated":

There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've decided to choose your initial suggestion of placing it above the hero. Somehow it attracts my attention much less when at the top. But also, it's much better above the hero than below it.