-
Notifications
You must be signed in to change notification settings - Fork 81
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
Fix problem #8084
base: dev
Are you sure you want to change the base?
Fix problem #8084
Conversation
WalkthroughThis pull request introduces localization and UI improvements for the Green City project, focusing on messages and templates related to place management. The changes primarily involve updating message properties files (English and Ukrainian) to consolidate break time labels, add new geographical coordinate labels, and modify the HTML template to support these changes. The modifications enhance the user interface's clarity and internationalization support. Changes
Possibly related PRs
Suggested Reviewers
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
Documentation and Community
|
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 (3)
core/src/main/resources/templates/core/management_places.html (2)
169-169
: Consider accessibility improvements for the table headers.While the column structure is well-organized, consider adding ARIA labels and scope attributes to improve accessibility for screen readers.
- <th colspan="4"> + <th colspan="4" scope="colgroup" aria-label="Opening Hours Section"> <span class="header-text">[[#{greenCity.pages.table.opening.hours}]]</span> </th> - <th rowspan="2"> + <th rowspan="2" scope="col"> <span class="header-text">[[#{greenCity.pages.table.break.lat}]]</span> </th> - <th rowspan="2"> + <th rowspan="2" scope="col"> <span class="header-text">[[#{greenCity.pages.table.break.lng}]]</span> </th>Also applies to: 213-216
Line range hint
246-257
: Good handling of null break times!The conditional rendering for break times is well implemented with proper null checks and a fallback display.
Consider adding a title attribute for better tooltip support:
- <td th:if="${openingHours.breakTime == null}">---</td> + <td th:if="${openingHours.breakTime == null}" title="No break time">---</td>core/src/main/resources/messages.properties (1)
151-152
: Consider using more descriptive coordinate labels.While
Lat
andLng
are common abbreviations, consider using more descriptive labels for better user understanding.-greenCity.pages.table.break.lat=Lat -greenCity.pages.table.break.lng=Lng +greenCity.pages.table.break.lat=Latitude +greenCity.pages.table.break.lng=Longitude
📜 Review details
Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (3)
core/src/main/resources/messages.properties
(2 hunks)core/src/main/resources/messages_ua.properties
(1 hunks)core/src/main/resources/templates/core/management_places.html
(5 hunks)
⏰ Context from checks skipped due to timeout of 90000ms (1)
- GitHub Check: build
🔇 Additional comments (8)
core/src/main/resources/messages.properties (3)
132-132
: Well-structured localization keys!The new entries follow consistent naming patterns and provide clear, concise labels for the break time feature. The consolidation of break time labels improves maintainability.
Also applies to: 150-152
132-132
: LGTM! Clear and consistent day label.The addition of the
greenCity.pages.table.day
property aligns well with the table structure in the HTML template.
150-150
: LGTM! Improved break time label consolidation.Consolidating break time into a single property
greenCity.pages.table.break.time
improves maintainability.core/src/main/resources/templates/core/management_places.html (3)
225-229
: Well-structured subheader row!The subheader implementation for break time details is clean and properly uses message keys for localization.
169-169
: LGTM! Well-structured table header modifications.The table header changes are well-organized with:
- Proper column spanning for opening hours
- Clear labeling using localized text
- Logical grouping of related columns
Also applies to: 213-216, 225-229
Line range hint
246-257
: LGTM! Robust break time display implementation.The break time display implementation includes:
- Proper null checks
- Clear formatting of time ranges
- Fallback display when break time is not set
core/src/main/resources/messages_ua.properties (2)
132-132
: Excellent localization coverage!The Ukrainian translations are complete and properly encoded. The translations maintain semantic equivalence with their English counterparts.
Also applies to: 136-138
132-132
: LGTM! Accurate Ukrainian translations.The Ukrainian translations are accurate and maintain consistency with their English counterparts:
День
for Dayчас перерви
for Break TimeШирота
for LatitudeДовгота
for LongitudeAlso applies to: 136-138
|
Add Break Time in table on Admin page eco-places
Summary by CodeRabbit
Localization
User Interface