Refacotring: fix styles of i18n-content names (concerned with the language options).

Replaced i18n-content names from c_hacker_style to camelCaseStyle except for some names which are generated by chromeos::options::GetI18nContentValue.

This CL is forked from https://codereview.chromium.org/16141002/.

BTW, I couldn't find where the below names are used:
- extension_ime_description
- extension_ime_label

Review URL: https://chromiumcodereview.appspot.com/16025007

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@203142 0039d316-1c4b-4281-b951-d872f2087c98
parent b3139550
......@@ -5,7 +5,7 @@
<div class="option">
<table class="option-control-table">
<tr>
<td class="option-name" i18n-content="hangul_keyboard_layout"></td>
<td class="option-name" i18n-content="hangulKeyboardLayout"></td>
<td class="option-value">
<select id="keyboard-layout-select" class="control"
data-type="string"
......
<div id="add-language-overlay-page" class="page" hidden>
<div class="close-button"></div>
<!-- TODO(kevers): Fix format of i18n-content labels -->
<h1 i18n-content="add_language_title"></h1>
<h1 i18n-content="addLanguageTitle"></h1>
<div class="content-area">
<span i18n-content="add_language_select_label"></span>
<span i18n-content="addLanguageSelectLabel"></span>
<select id="add-language-overlay-language-list"></select>
</div>
<div class="action-area button-strip">
......
......@@ -14,7 +14,7 @@ cr.define('options', function() {
*/
function AddLanguageOverlay() {
OptionsPage.call(this, 'addLanguage',
loadTimeData.getString('add_button'),
loadTimeData.getString('addButton'),
'add-language-overlay-page');
}
......
......@@ -6,11 +6,10 @@
<span>&nbsp;</span>
<span class="link"><span class="link-color"></span></span>
</div>
<!-- TODO(kevers): Fix format of i18n-content labels -->
<div class="language-options-header">
<div i18n-content="add_language_instructions"></div>
<div i18n-content="addLanguageInstructions"></div>
<if expr="pp_ifdef('chromeos')">
<div i18n-content="input_method_instructions"></div>
<div i18n-content="inputMethodInstructions"></div>
</if>
</div>
<div class="language-options">
......@@ -19,7 +18,7 @@
<list id="language-options-list"></list>
<div class="language-options-lower-left">
<button id="language-options-add-button"
i18n-content="add_button">
i18n-content="addButton">
</button>
</div>
<div id="language-options-list-dropmarker"></div>
......@@ -32,42 +31,42 @@
<if expr="os == 'win32' or pp_ifdef('chromeos')">
<div class="language-options-contents">
<button id="language-options-ui-language-button"
i18n-content="display_in_this_language">
i18n-content="displayInThisLanguage">
</button>
<span id="language-options-ui-language-message" hidden></span>
</div>
</if>
<div id="language-options-spellcheck" class="language-options-contents">
<button id="language-options-spell-check-language-button"
i18n-content="use_this_for_spell_checking">
i18n-content="useThisForSpellChecking">
</button>
<span id="language-options-spell-check-language-message" hidden>
</span>
<span id="language-options-dictionary-downloading-message"
i18n-content="downloading_dictionary" hidden>
i18n-content="downloadingDictionary" hidden>
</span>
</div>
<div id="language-options-dictionary-download-failed-message"
class="language-options-notification" hidden>
<div i18n-content="download_failed"></div>
<div i18n-content="downloadFailed"></div>
<div id="language-options-dictionary-download-fail-help-message"
i18n-content="download_fail_help" hidden>
i18n-content="downloadFailHelp" hidden>
</div>
<button id="dictionary-download-retry-button"
i18n-content="retry_button">
i18n-content="retryButton">
</button>
</div>
<div id="language-options-ui-notification-bar"
class="language-options-notification" hidden>
<div i18n-content="restart_required"></div>
<div i18n-content="restartRequired"></div>
<if expr="pp_ifdef('chromeos')">
<button id="language-options-ui-restart-button"
i18n-content="restart_button">
i18n-content="restartButton">
</button>
</if>
</div>
<if expr="pp_ifdef('chromeos')">
<h3 i18n-content="input_method"></h3>
<h3 i18n-content="inputMethod"></h3>
<div id="language-options-input-method-template" class="input-method"
hidden>
<div class="checkbox">
......@@ -89,8 +88,8 @@
</div>
<div class="language-options-footer">
<if expr="pp_ifdef('chromeos')">
<div i18n-content="switch_input_methods_hint"></div>
<div i18n-content="select_previous_input_method_hint"></div>
<div i18n-content="switchInputMethodsHint"></div>
<div i18n-content="selectPreviousInputMethodHint"></div>
<button id="edit-dictionary-button"
class="link-button standalone-link-button"
i18n-content="languageDictionaryOverlayTitle"></button>
......@@ -100,7 +99,7 @@
<label>
<input id="enable-spell-check" pref="browser.enable_spellchecking"
metric="Options_SpellCheck" type="checkbox">
<span i18n-content="enable_spell_check"></span>
<span i18n-content="enableSpellCheck"></span>
</label>
<button id="edit-dictionary-button" class="link-button"
i18n-content="languageDictionaryOverlayTitle" hidden></button>
......@@ -110,7 +109,7 @@
<input id="enable-auto-spell-correction"
pref="browser.enable_autospellcorrect"
metric="Options_AutoSpellCorrection" type="checkbox">
<span i18n-content="enable_auto_spell_correction"></span>
<span i18n-content="enableAutoSpellCorrection"></span>
</label>
</div>
</if>
......
......@@ -521,7 +521,7 @@ cr.define('options', function() {
if (languageCode == this.prospectiveUiLanguageCode_) {
uiLanguageMessage.textContent =
loadTimeData.getString('is_displayed_in_this_language');
loadTimeData.getString('isDisplayedInThisLanguage');
showMutuallyExclusiveNodes(
[uiLanguageButton, uiLanguageMessage, uiLanguageNotification], 1);
} else if (languageCode in loadTimeData.getValue('uiLanguageCodeSet')) {
......@@ -532,7 +532,7 @@ cr.define('options', function() {
uiLanguageMessage.hidden = true;
} else {
uiLanguageButton.textContent =
loadTimeData.getString('display_in_this_language');
loadTimeData.getString('displayInThisLanguage');
showMutuallyExclusiveNodes(
[uiLanguageButton, uiLanguageMessage, uiLanguageNotification], 0);
uiLanguageButton.onclick = function(e) {
......@@ -541,7 +541,7 @@ cr.define('options', function() {
}
} else {
uiLanguageMessage.textContent =
loadTimeData.getString('cannot_be_displayed_in_this_language');
loadTimeData.getString('cannotBeDisplayedInThisLanguage');
showMutuallyExclusiveNodes(
[uiLanguageButton, uiLanguageMessage, uiLanguageNotification], 1);
}
......@@ -574,7 +574,7 @@ cr.define('options', function() {
if (languageCode == this.spellCheckDictionary_) {
if (!(languageCode in this.spellcheckDictionaryDownloadStatus_)) {
spellCheckLanguageMessage.textContent =
loadTimeData.getString('is_used_for_spell_checking');
loadTimeData.getString('isUsedForSpellChecking');
showMutuallyExclusiveNodes(
[spellCheckLanguageButton, spellCheckLanguageMessage], 1);
} else if (this.spellcheckDictionaryDownloadStatus_[languageCode] ==
......@@ -590,7 +590,7 @@ cr.define('options', function() {
} else if (languageCode in
loadTimeData.getValue('spellCheckLanguageCodeSet')) {
spellCheckLanguageButton.textContent =
loadTimeData.getString('use_this_for_spell_checking');
loadTimeData.getString('useThisForSpellChecking');
showMutuallyExclusiveNodes(
[spellCheckLanguageButton, spellCheckLanguageMessage], 0);
spellCheckLanguageButton.languageCode = languageCode;
......@@ -599,7 +599,7 @@ cr.define('options', function() {
spellCheckLanguageMessage.hidden = true;
} else {
spellCheckLanguageMessage.textContent =
loadTimeData.getString('cannot_be_used_for_spell_checking');
loadTimeData.getString('cannotBeUsedForSpellChecking');
showMutuallyExclusiveNodes(
[spellCheckLanguageButton, spellCheckLanguageMessage], 1);
}
......@@ -715,8 +715,8 @@ cr.define('options', function() {
if (this.preloadEngines_.length == 1 && !checkbox.checked) {
// Don't allow disabling the last input method.
this.showNotification_(
loadTimeData.getString('please_add_another_input_method'),
loadTimeData.getString('ok_button'));
loadTimeData.getString('pleaseAddAnotherInputMethod'),
loadTimeData.getString('okButton'));
checkbox.checked = true;
return;
}
......
......@@ -73,30 +73,30 @@ void CrosLanguageOptionsHandler::GetLocalizedValues(
RegisterTitle(localized_strings, "languagePage",
IDS_OPTIONS_SETTINGS_LANGUAGES_AND_INPUT_DIALOG_TITLE);
localized_strings->SetString("ok_button", l10n_util::GetStringUTF16(IDS_OK));
localized_strings->SetString("okButton", l10n_util::GetStringUTF16(IDS_OK));
localized_strings->SetString("configure",
l10n_util::GetStringUTF16(IDS_OPTIONS_SETTINGS_LANGUAGES_CONFIGURE));
localized_strings->SetString("input_method",
localized_strings->SetString("inputMethod",
l10n_util::GetStringUTF16(IDS_OPTIONS_SETTINGS_LANGUAGES_INPUT_METHOD));
localized_strings->SetString("please_add_another_input_method",
localized_strings->SetString("pleaseAddAnotherInputMethod",
l10n_util::GetStringUTF16(
IDS_OPTIONS_SETTINGS_LANGUAGES_PLEASE_ADD_ANOTHER_INPUT_METHOD));
localized_strings->SetString("input_method_instructions",
localized_strings->SetString("inputMethodInstructions",
l10n_util::GetStringUTF16(
IDS_OPTIONS_SETTINGS_LANGUAGES_INPUT_METHOD_INSTRUCTIONS));
localized_strings->SetString("switch_input_methods_hint",
localized_strings->SetString("switchInputMethodsHint",
l10n_util::GetStringUTF16(
IDS_OPTIONS_SETTINGS_LANGUAGES_SWITCH_INPUT_METHODS_HINT));
localized_strings->SetString("select_previous_input_method_hint",
localized_strings->SetString("selectPreviousInputMethodHint",
l10n_util::GetStringUTF16(
IDS_OPTIONS_SETTINGS_LANGUAGES_SELECT_PREVIOUS_INPUT_METHOD_HINT));
localized_strings->SetString("restart_button",
localized_strings->SetString("restartButton",
l10n_util::GetStringUTF16(
IDS_OPTIONS_SETTINGS_LANGUAGES_SIGN_OUT_BUTTON));
localized_strings->SetString("extension_ime_label",
localized_strings->SetString("extensionImeLable",
l10n_util::GetStringUTF16(
IDS_OPTIONS_SETTINGS_LANGUAGES_INPUT_METHOD_EXTENSION_IME));
localized_strings->SetString("extension_ime_description",
localized_strings->SetString("extensionImeDescription",
l10n_util::GetStringUTF16(
IDS_OPTIONS_SETTINGS_LANGUAGES_INPUT_METHOD_EXTENSION_DESCRIPTION));
localized_strings->SetString("noInputMethods",
......
......@@ -26,7 +26,7 @@ void LanguageHangulHandler::GetLocalizedValues(
RegisterTitle(localized_strings, "languageHangulPage",
IDS_OPTIONS_SETTINGS_LANGUAGES_HANGUL_SETTINGS_TITLE);
localized_strings->SetString("hangul_keyboard_layout",
localized_strings->SetString("hangulKeyboardLayout",
l10n_util::GetStringUTF16(IDS_OPTIONS_SETTINGS_KEYBOARD_LAYOUT_TEXT));
localized_strings->Set("HangulkeyboardLayoutList", GetKeyboardLayoutList());
......
......@@ -44,50 +44,50 @@ void LanguageOptionsHandlerCommon::GetLocalizedValues(
DictionaryValue* localized_strings) {
DCHECK(localized_strings);
static OptionsStringResource resources[] = {
{ "add_button", IDS_OPTIONS_SETTINGS_LANGUAGES_ADD_BUTTON },
{ "addButton", IDS_OPTIONS_SETTINGS_LANGUAGES_ADD_BUTTON },
{ "languages", IDS_OPTIONS_SETTINGS_LANGUAGES_LANGUAGES },
{ "add_language_instructions",
{ "addLanguageInstructions",
IDS_OPTIONS_SETTINGS_LANGUAGES_ADD_LANGUAGE_INSTRUCTIONS },
{ "cannot_be_displayed_in_this_language",
{ "cannotBeDisplayedInThisLanguage",
IDS_OPTIONS_SETTINGS_LANGUAGES_CANNOT_BE_DISPLAYED_IN_THIS_LANGUAGE,
IDS_PRODUCT_NAME },
{ "is_displayed_in_this_language",
{ "isDisplayedInThisLanguage",
IDS_OPTIONS_SETTINGS_LANGUAGES_IS_DISPLAYED_IN_THIS_LANGUAGE,
IDS_PRODUCT_NAME },
{ "display_in_this_language",
{ "displayInThisLanguage",
IDS_OPTIONS_SETTINGS_LANGUAGES_DISPLAY_IN_THIS_LANGUAGE,
IDS_PRODUCT_NAME },
{ "restart_required", IDS_OPTIONS_RELAUNCH_REQUIRED },
{ "restartRequired", IDS_OPTIONS_RELAUNCH_REQUIRED },
// OS X uses the OS native spellchecker so no need for these strings.
#if !defined(OS_MACOSX)
{ "use_this_for_spell_checking",
{ "useThisForSpellChecking",
IDS_OPTIONS_SETTINGS_USE_THIS_FOR_SPELL_CHECKING },
{ "cannot_be_used_for_spell_checking",
{ "cannotBeUsedForSpellChecking",
IDS_OPTIONS_SETTINGS_CANNOT_BE_USED_FOR_SPELL_CHECKING },
{ "is_used_for_spell_checking",
{ "isUsedForSpellChecking",
IDS_OPTIONS_SETTINGS_IS_USED_FOR_SPELL_CHECKING },
{ "enable_spell_check", IDS_OPTIONS_ENABLE_SPELLCHECK },
{ "enable_auto_spell_correction",
{ "enableSpellCheck", IDS_OPTIONS_ENABLE_SPELLCHECK },
{ "enableAutoSpellCorrection",
IDS_OPTIONS_ENABLE_AUTO_SPELL_CORRECTION },
{ "downloading_dictionary", IDS_OPTIONS_DICTIONARY_DOWNLOADING },
{ "download_failed", IDS_OPTIONS_DICTIONARY_DOWNLOAD_FAILED },
{ "retry_button", IDS_OPTIONS_DICTIONARY_DOWNLOAD_RETRY },
{ "download_fail_help", IDS_OPTIONS_DICTIONARY_DOWNLOAD_FAIL_HELP },
{ "downloadingDictionary", IDS_OPTIONS_DICTIONARY_DOWNLOADING },
{ "downloadFailed", IDS_OPTIONS_DICTIONARY_DOWNLOAD_FAILED },
{ "retryButton", IDS_OPTIONS_DICTIONARY_DOWNLOAD_RETRY },
{ "downloadFailHelp", IDS_OPTIONS_DICTIONARY_DOWNLOAD_FAIL_HELP },
#endif // !OS_MACOSX
{ "add_language_title", IDS_OPTIONS_LANGUAGES_ADD_TITLE },
{ "add_language_select_label", IDS_OPTIONS_LANGUAGES_ADD_SELECT_LABEL },
{ "restart_button", IDS_OPTIONS_SETTINGS_LANGUAGES_RELAUNCH_BUTTON }
{ "addLanguageTitle", IDS_OPTIONS_LANGUAGES_ADD_TITLE },
{ "addLanguageSelectLabel", IDS_OPTIONS_LANGUAGES_ADD_SELECT_LABEL },
{ "restartButton", IDS_OPTIONS_SETTINGS_LANGUAGES_RELAUNCH_BUTTON }
};
#if defined(ENABLE_SETTINGS_APP)
static OptionsStringResource app_resources[] = {
{ "cannot_be_displayed_in_this_language",
{ "cannotBeDisplayedInThisLanguage",
IDS_OPTIONS_SETTINGS_LANGUAGES_CANNOT_BE_DISPLAYED_IN_THIS_LANGUAGE,
IDS_SETTINGS_APP_LAUNCHER_PRODUCT_NAME },
{ "is_displayed_in_this_language",
{ "isDisplayedInThisLanguage",
IDS_OPTIONS_SETTINGS_LANGUAGES_IS_DISPLAYED_IN_THIS_LANGUAGE,
IDS_SETTINGS_APP_LAUNCHER_PRODUCT_NAME },
{ "display_in_this_language",
{ "displayInThisLanguage",
IDS_OPTIONS_SETTINGS_LANGUAGES_DISPLAY_IN_THIS_LANGUAGE,
IDS_SETTINGS_APP_LAUNCHER_PRODUCT_NAME },
};
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment