jdaugherty commented on code in PR #15974:
URL: https://github.com/apache/grails-core/pull/15974#discussion_r3565428542


##########
grails-forge/grails-forge-core/src/main/resources/i18n/messages_sk.properties:
##########
@@ -53,4 +53,51 @@ typeMismatch.java.lang.Long=Položka {0} musí byť celé číslo
 typeMismatch.java.lang.Short=Položka {0} musí byť celé číslo
 typeMismatch.java.math.BigDecimal=Položka {0} musí byť desatinné číslo
 typeMismatch.java.math.BigInteger=Položka {0} musí byť celé číslo
+typeMismatch=Položka {0} má nesprávny typ

Review Comment:
   This adds a second `typeMismatch` key — line 57 already defines 
`typeMismatch=Položka {0} má nezhodný typ`, so the new line is silently 
shadowed (Properties last-one-wins). Only the Slovak bundle has this duplicate; 
the profiles mirror 
(`grails-profiles/base/skeleton/grails-app/i18n/messages_sk.properties`) 
carries the same pair. One of the two should be dropped from both copies. The 
key-completeness spec can't catch duplicates since `Properties` collapses them 
— might be worth asserting no duplicate keys per bundle while you're in there.



##########
grails-forge/grails-forge-core/src/main/resources/gsp/index.gsp:
##########
@@ -332,8 +379,40 @@
                                 </tbody>
                             </table>
                         </div>
+                        <p id="plugins-empty" class="small text-body-secondary 
d-none mb-0"><g:message code="welcome.filter.none"/></p>
                     </div>
                 </div>
+
+                <%-- ACTUATORS: shown only when Spring Boot Actuator is 
present and exposes web endpoints --%>
+                <g:set var="actuatorSupplierType"
+                       
value="${ClassUtils.isPresent('org.springframework.boot.actuate.endpoint.web.WebEndpointsSupplier',
 null) ? 
ClassUtils.forName('org.springframework.boot.actuate.endpoint.web.WebEndpointsSupplier',
 null) : null}"/>
+                <g:set var="actuatorEndpoints"
+                       value="${actuatorSupplierType && 
applicationContext.getBeanNamesForType(actuatorSupplierType) ? 
applicationContext.getBean(actuatorSupplierType).endpoints.toList().sort { 
it.endpointId.toString() } : []}"/>
+                <g:if test="${actuatorEndpoints}">
+                    <g:set var="actuatorBasePath"
+                           
value="${grailsApplication.config.getProperty('management.endpoints.web.base-path')
 ?: '/actuator'}"/>
+                    <div class="card border-1 shadow-sm mt-4">
+                        <div class="card-body">
+                            <div class="d-flex align-items-center 
justify-content-between mb-3">
+                                <h6 class="card-title mb-0 
fw-semibold"><g:message code="welcome.actuators"/></h6>
+                                <span class="badge bg-body-tertiary text-body 
border">
+                                    ${actuatorEndpoints.size()}
+                                </span>
+                            </div>
+                            <ul class="list-group list-group-flush small">
+                                <g:each var="endpoint" 
in="${actuatorEndpoints}">
+                                    <li class="list-group-item d-flex 
justify-content-between align-items-center px-0">
+                                        <span 
class="fw-medium">${endpoint.endpointId}</span>
+                                        <a 
href="${request.contextPath}${actuatorBasePath}/${endpoint.rootPath}" 
target="_blank" rel="noopener"

Review Comment:
   These links assume the actuator endpoints are served on the application 
port. With `management.server.port` set, the card still renders but every link 
404s on the app port. Probably fine for a dev welcome page, but worth either 
noting or skipping the card when a separate management port is configured.



##########
grails-forge/grails-forge-core/src/main/resources/gsp/main.gsp:
##########
@@ -26,33 +51,42 @@
                         <i class="bi bi-globe 
me-1"></i>${currentLocale.getDisplayName(currentLocale)}
                     </a>
                     <ul class="dropdown-menu dropdown-menu-end" 
aria-labelledby="localeDropdown">
+                        <%-- The default language stays pinned on top: a user 
who switched to a
+                             language they cannot read must always find a 
recognizable way back. --%>
+                        <g:set var="defaultLocale" 
value="${java.util.Locale.ENGLISH}"/>

Review Comment:
   The pinned "way back" language is hardcoded to `Locale.ENGLISH`. That 
matches the template's defaults today, but if an app configures a different 
default locale the pinned entry no longer reflects it. Consider resolving the 
application's configured default locale (falling back to English) so the pin 
stays truthful.



##########
grails-forge/grails-forge-core/src/main/resources/i18n/messages.properties:
##########
@@ -54,3 +54,49 @@ typeMismatch.java.lang.Short=Property {0} must be a valid 
number
 typeMismatch.java.math.BigDecimal=Property {0} must be a valid number
 typeMismatch.java.math.BigInteger=Property {0} must be a valid number
 typeMismatch=Property {0} is type-mismatched
+
+# Welcome page
+welcome.title=Welcome to Grails
+welcome.congratulations=Congratulations, you have successfully started a 
Grails application.
+welcome.default.page=At the moment this is the default page, feel free to 
modify it to either redirect to a controller or display whatever content you 
may choose.
+welcome.runtime.versions=Runtime versions
+welcome.application=Application
+welcome.reloading.active=Reloading active
+welcome.reloading.inactive=Reloading inactive
+welcome.app.name=Name
+welcome.app.version=Version
+welcome.app.profile=Profile
+welcome.app.environment=Environment
+welcome.server=Server
+welcome.server.servlet.container=Servlet Container
+welcome.server.host=Host
+welcome.server.os=OS
+welcome.artefact.counts=Artefact counts
+welcome.artefact.controllers=Controllers
+welcome.artefact.domains=Domains
+welcome.artefact.services=Services
+welcome.artefact.taglibs=Tag Libraries
+welcome.controllers.title=Available Controllers
+welcome.controllers.click=Click a controller to execute its default action.
+welcome.namespace.default=Default namespace
+welcome.plugins.title=Installed plugins
+welcome.plugins.name=Name
+welcome.plugins.version=Version
+welcome.plugins.load.order=Load order
+welcome.plugins.sort.name=Sort by name
+welcome.plugins.sort.version=Sort by version
+welcome.plugins.sort.order=Sort by load order
+welcome.filter.name=Filter by name
+welcome.filter.none=No matches
+layout.guides.title=Grails Guides
+layout.guides.text=Building your first Grails app? Looking to add security, or 
create a Single-Page-App? Check out the Grails Guides for step-by-step 
tutorials.
+layout.docs.title=Documentation
+layout.docs.text=Ready to dig in? You can find in-depth documentation for all 
the features of Grails in the User Guide.
+layout.community.title=Join the Community
+layout.community.text=Get feedback and share your experience with other Grails 
developers on the Grails mailing lists, GitHub discussions, or the community 
Slack channel.
+layout.theme.toggle=Toggle theme
+layout.theme.light=Light
+layout.theme.dark=Dark
+layout.theme.auto=Auto
+layout.loading=Loading...
+welcome.actuators=Actuators

Review Comment:
   `welcome.actuators` stays "Actuators" in every bundle (zh_CN uses 
"Actuator"). If that's deliberate — treating it as the Spring Boot product term 
— a short comment in the bundles would prevent future "missing translation" 
reports; otherwise it's the one card title the language selector doesn't 
translate.



##########
grails-forge/grails-forge-core/src/main/resources/assets/javascripts/welcome.js:
##########
@@ -106,11 +106,51 @@
             state.key = defaultKey;
             state.dir = 1;
             setSortIndicator(table, defaultTh, 'ascending', 'asc');

Review Comment:
   The comment above still says "(and sort to match)" but the `sortTableBy` 
call was removed. The removal itself looks right — the GSP already renders 
`pluginsWithOrder` sorted by name ascending, so the initial sort was redundant 
— but the comment should be updated to say the DOM order already matches the 
indicator, otherwise the next reader will wonder whether the call was dropped 
by accident.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to