Skip to content

Commit

Permalink
Add fallbacks for critical messages
Browse files Browse the repository at this point in the history
This is not a fix for bug 68033. But it's good to have fallbacks for
the most critical messages in case something is wrong. The "more"
message is the message next to the expand arrow in all experts.
The calendar model can very easily show the untranslated calendar
model name. In both cases the alternative was to show "null" which
is not helpful, doesn't show up in any log but makes the UI unusable
for no good reason.

Bug: 68033
  • Loading branch information
thiemowmde committed Jul 15, 2014
1 parent 38cf06b commit 8e7949c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/ExpertExtender/ExpertExtender.Toggler.js
Expand Up @@ -43,7 +43,7 @@
init: function( $extender ) {
this.$toggler
.addClass( 'valueview-expertextender-advancedtoggler' )
.text( this._messageProvider.getMessage( 'valueview-expert-advancedadjustments' ) );
.text( this._messageProvider.getMessage( 'valueview-expert-advancedadjustments' ) || 'more' );
$extender.append( this.$toggler );
},

Expand Down
4 changes: 2 additions & 2 deletions src/experts/TimeInput.js
Expand Up @@ -103,7 +103,7 @@
_options: {
messages: {
'valueview-expert-timeinput-precision': 'Precision',
'valueview-expert-timeinput-calendar': 'Calendar',
'valueview-expert-timeinput-calendar': 'Calendar'
}
},

Expand Down Expand Up @@ -173,7 +173,7 @@
$.each( timeSettings.calendarnames, function( calendarKey, calendarTerms ) {
var label = messageProvider.getMessage(
'valueview-expert-timevalue-calendar-' + calendarTerms[0].toLowerCase()
);
) || calendarTerms[0];
calendarValues.push( { value: calendarTerms[0], label: label } );
} );
return calendarValues;
Expand Down

0 comments on commit 8e7949c

Please sign in to comment.