This repository has been archived by the owner on Feb 22, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 63
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Replace paths and routes with `localePath`s and `localeRoutes`s
zackkrida
approved these changes
Apr 15, 2021
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.
There are many nice small details here; great work.
Comment on lines
+14
to
+17
head() { | ||
return this.$nuxtI18nHead({ addSeoAttributes: true }) | ||
}, | ||
} |
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.
Excellent
@@ -4,7 +4,7 @@ | |||
<h1 v-if="error.statusCode === 404"> | |||
{{ $t('not-found') }} | |||
</h1> | |||
<h1 v-else>An error occurred</h1> | |||
<h1 v-else>{{ $t('error-occurred') }}</h1> |
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.
Great idea to translate this 👍
Please remove the french and russian translations, so only english displays in the locale chooser, and then merge. |
Co-authored-by: Zack Krida <zackkrida@pm.me>
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Labels
♿️ aspect: a11y
Concerns related to the project's accessibility
✨ goal: improvement
Improvement to an existing user-facing feature
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes #13
This PR finishes setting up i18n support for Search using nuxt-i18n module.
The setup uses prefixes for locales (
<wpphotos.com>/fr/search
). The only exception is English as the default language: it can be accessed with both prefixed and unprefixed URLs (<wpphotos.com>/en/search
and<wpphotos.com>/search
).When the user opens the main page without a prefix (eg.
wpphotos.com
), the site redirects to:i18n-redirected
cookie if the cookie has already been set beforeAll paths and routes inside the app were wrapped with special 'localePath' and 'localeRoute' functions that automatically redirect the users to their selected locale.
The locale chooser is temporarily located in the footer. The Russian and French locales are also temporary, and will need to be replaced by correct translations.
This PR also extracts all the text in components and pages that hasn't been extracted before, and adds Documentation.