mirror of
https://github.com/Prominence/grails-translations-plugin.git
synced 2026-07-03 02:36:46 +03:00
Added error message if bundle wasn't found.
This commit is contained in:
+4
-2
@@ -12,13 +12,15 @@ class TranslationsOverviewController {
|
||||
def show() {
|
||||
|
||||
if (!params.bundleName) {
|
||||
// render error
|
||||
redirect action: 'index'
|
||||
return
|
||||
}
|
||||
|
||||
Bundle bundle = bundleService.findBundleByName(params.bundleName as String)
|
||||
|
||||
if (!bundle) {
|
||||
// render error
|
||||
render view: 'index', model: [message: g.message(code: 'plugin.translations.error.bundleNotFound', args: [params.bundleName as String])]
|
||||
return
|
||||
}
|
||||
|
||||
render view: 'show', model: [bundle: bundle]
|
||||
|
||||
Reference in New Issue
Block a user