Skip to content

Commit

Permalink
Merge pull request #343 from sbglasius/grails4.x
Browse files Browse the repository at this point in the history
Fix #341, add trace logging to resolveMessage
  • Loading branch information
sbglasius authored Apr 8, 2024
2 parents aadd6bc + 80d875d commit bf5f0c8
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ package grails.plugin.formfields

import grails.core.GrailsApplication
import groovy.transform.CompileStatic
import groovy.util.logging.Slf4j
import groovy.xml.MarkupBuilder
import org.apache.commons.lang.StringUtils
import org.grails.buffer.FastStringWriter
Expand All @@ -44,6 +45,7 @@ import java.text.NumberFormat

import static FormFieldsTemplateService.toPropertyNameFormat

@Slf4j
class FormFieldsTagLib {
static final namespace = 'f'

Expand Down Expand Up @@ -615,6 +617,9 @@ class FormFieldsTagLib {
def message = keysInPreferenceOrder.findResult { key ->
message(code: key, default: null) ?: null
}
if(log.traceEnabled && !message) {
log.trace("i18n missing translation for one of ${keysInPreferenceOrder}")
}
message ?: defaultMessage
}

Expand Down

0 comments on commit bf5f0c8

Please sign in to comment.