-
Notifications
You must be signed in to change notification settings - Fork 1
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
Bugfix/subtitle localization #106
Conversation
WalkthroughThe pull request introduces localization improvements across two Vue components. The changes focus on enhancing internationalization by modifying date formatting in the Changes
Poem
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
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.
Actionable comments posted: 0
🧹 Nitpick comments (1)
components/Article.vue (1)
22-24
: Consider using locale-specific date formats.The current implementation forces English month names for Russian locale, which might not be the best user experience. Consider:
- Using Russian month names for Russian locale
- Moving date formats to i18n configuration for better maintainability
- {{ locale === 'ru' ? dayjs(date).locale('en').format('D MMMM YYYY') : dayjs(date).format('MMM D, YYYY') }} + {{ dayjs(date).locale(locale).format(locale === 'ru' ? 'D MMMM YYYY' : 'MMM D, YYYY') }}
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (2)
components/Article.vue
(2 hunks)pages/contents/solutions/[slug].vue
(2 hunks)
⏰ Context from checks skipped due to timeout of 90000ms (2)
- GitHub Check: Codacy Static Code Analysis
- GitHub Check: docker
🔇 Additional comments (3)
components/Article.vue (1)
8-8
: LGTM! Good i18n practice.Using
useI18n()
to get the current locale is the correct approach for internationalization.pages/contents/solutions/[slug].vue (2)
13-13
: LGTM! Well-implemented breadcrumb localization.The breadcrumb meta tag correctly uses both the dynamic locale for the path and the translated title.
75-75
: LGTM! Clear and concise translations.The translations for both Russian ("Примеры внедрений") and English ("Solutions") are appropriate and maintain the meaning across languages.
Also applies to: 81-81
@@ -18,7 +19,9 @@ const to = props.url || `${route.path}${route.path.at(-1) === '/' ? '' : '/'}${p | |||
/> | |||
<div> | |||
<h4 class="article-title">{{ title }}</h4> | |||
<time :datetime="date" class="article-date">{{ dayjs(date).locale('ru').format('D MMMM YYYY') }}</time> | |||
<time :datetime="date" class="article-date"> | |||
{{ locale === 'ru' ? dayjs(date).locale('en').format('D MMMM YYYY') : dayjs(date).format('MMM D, YYYY') }} |
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.
i18n же умеет во всякое хитрое форматирование в зависимости от локали. Почему это в переводы не перенести? Выглядело бы более красиво
Поправил заголовок страницы en и формат даты
Summary by CodeRabbit