(bug 42374) Provide clear indication of lack of IME support for a language

Change-Id: Id637eed3544a66aac4185f9e9d967691fe481331
This commit is contained in:
Santhosh Thottingal
2012-11-23 15:02:26 +05:30
committed by Niklas Laxström
parent e3d8189162
commit ea8bbfd35d
4 changed files with 14 additions and 11 deletions

View File

@@ -36,6 +36,7 @@
"jquery-ime-help": "Help", "jquery-ime-help": "Help",
"ext-uls-input-disable": "Disable input method tools", "ext-uls-input-disable": "Disable input method tools",
"ext-uls-input-enable": "Enable input method tools", "ext-uls-input-enable": "Enable input method tools",
"ext-uls-input-disable-info": "Input method tools are disabled." "ext-uls-input-disable-info": "Input method tools are disabled.",
"ext-uls-input-settings-noime": "No input methods are available for this language."
} }

View File

@@ -37,5 +37,6 @@
"ext-uls-input-disable": "\u0d0e\u0d34\u0d41\u0d24\u0d4d\u0d24\u0d41\u0d2a\u0d15\u0d30\u0d23\u0d02 \u0d35\u0d47\u0d23\u0d4d\u0d1f", "ext-uls-input-disable": "\u0d0e\u0d34\u0d41\u0d24\u0d4d\u0d24\u0d41\u0d2a\u0d15\u0d30\u0d23\u0d02 \u0d35\u0d47\u0d23\u0d4d\u0d1f",
"ext-uls-input-enable": "\u0d0e\u0d34\u0d41\u0d24\u0d4d\u0d24\u0d41\u0d2a\u0d15\u0d30\u0d23\u0d02 \u0d35\u0d47\u0d23\u0d02", "ext-uls-input-enable": "\u0d0e\u0d34\u0d41\u0d24\u0d4d\u0d24\u0d41\u0d2a\u0d15\u0d30\u0d23\u0d02 \u0d35\u0d47\u0d23\u0d02",
"ext-uls-input-disable-info": "\u0d0e\u0d34\u0d41\u0d24\u0d4d\u0d24\u0d41\u0d2a\u0d15\u0d30\u0d23\u0d02 \u0d35\u0d47\u0d23\u0d4d\u0d1f\u0d46\u0d28\u0d4d\u0d28\u0d41\u0d35\u0d46\u0d1a\u0d4d\u0d1a\u0d3f\u0d30\u0d3f\u0d15\u0d4d\u0d15\u0d41\u0d28\u0d4d\u0d28\u0d41", "ext-uls-input-disable-info": "\u0d0e\u0d34\u0d41\u0d24\u0d4d\u0d24\u0d41\u0d2a\u0d15\u0d30\u0d23\u0d02 \u0d35\u0d47\u0d23\u0d4d\u0d1f\u0d46\u0d28\u0d4d\u0d28\u0d41\u0d35\u0d46\u0d1a\u0d4d\u0d1a\u0d3f\u0d30\u0d3f\u0d15\u0d4d\u0d15\u0d41\u0d28\u0d4d\u0d28\u0d41",
"ext-uls-input-enable-info": "\u0d0e\u0d34\u0d41\u0d24\u0d4d\u0d24\u0d41\u0d2a\u0d15\u0d30\u0d23\u0d02 \u0d09\u0d2a\u0d2f\u0d4b\u0d17\u0d24\u0d4d\u0d24\u0d3f\u0d32\u0d41\u0d23\u0d4d\u0d1f\u0d41\u0d4d" "ext-uls-input-enable-info": "\u0d0e\u0d34\u0d41\u0d24\u0d4d\u0d24\u0d41\u0d2a\u0d15\u0d30\u0d23\u0d02 \u0d09\u0d2a\u0d2f\u0d4b\u0d17\u0d24\u0d4d\u0d24\u0d3f\u0d32\u0d41\u0d23\u0d4d\u0d1f\u0d41\u0d4d",
"ext-uls-input-settings-noime": "ഈ ഭാഷയ്ക്കു് എഴുത്തുപകരണങ്ങളൊന്നും ലഭ്യമല്ല."
} }

View File

@@ -37,5 +37,6 @@
"jquery-ime-help": "Text for help link", "jquery-ime-help": "Text for help link",
"ext-uls-input-disable": "Label for disable input tools button", "ext-uls-input-disable": "Label for disable input tools button",
"ext-uls-input-enable": "Label for enable input tools button", "ext-uls-input-enable": "Label for enable input tools button",
"ext-uls-input-disable-info": "Info text for the disable input tools button" "ext-uls-input-disable-info": "Info text for the disable input tools button",
"ext-uls-input-settings-noime": "Text to be shown when no input methods are available for a selected language"
} }

View File

@@ -125,19 +125,22 @@
$imeListContainer = this.$template.find( '.uls-input-settings-inputmethods-list' ); $imeListContainer = this.$template.find( '.uls-input-settings-inputmethods-list' );
$imeListContainer.show(); $imeListContainer.show();
$imeListContainer.find( 'label' ).remove(); $imeListContainer.find( 'label' ).remove();
if ( !imes ) { if ( !imes ) {
$imeListContainer.append( $( '<label>' )
.addClass( 'uls-input-settings-no-inputmethods' )
.text( $.i18n( 'ext-uls-input-settings-noime' ) ) );
$imeListTitle.text( '' ); $imeListTitle.text( '' );
$imeListContainer.hide();
return; return;
} }
inputSettings = this;
$imeListTitle.text( $.i18n( 'ext-uls-input-settings-ime-settings', $imeListTitle.text( $.i18n( 'ext-uls-input-settings-ime-settings',
$.uls.data.getAutonym( language ) ) ); $.uls.data.getAutonym( language ) ) );
inputSettings = this;
defaultInputmethod = $.ime.preferences.getIM( language ) || imes.inputmethods[0]; defaultInputmethod = $.ime.preferences.getIM( language ) || imes.inputmethods[0];
for ( index in imes.inputmethods ) { for ( index in imes.inputmethods ) {
@@ -264,12 +267,9 @@
} }
$button.data( 'language', language ); $button.data( 'language', language );
$languages.append( $button );
if ( $.ime.languages[language] && $.ime.languages[language].inputmethods ) {
$caret = $( '<span>' ).addClass( 'uls-input-settings-caret' ); $caret = $( '<span>' ).addClass( 'uls-input-settings-caret' );
$languages.append( $caret );
} $languages.append( $button ).append( $caret );
$button.on( 'click', buttonHandler( $button ) ); $button.on( 'click', buttonHandler( $button ) );
} }