From 956893594260c27385c507388ef1a74cdb36256a Mon Sep 17 00:00:00 2001 From: Sagar Date: Sun, 23 Sep 2012 17:04:30 -0400 Subject: [PATCH 1/4] Committing fix for Issue 1705 Added a switch case to set the dialogLabel correctly depending on which Navigation option is chosen. --- src/search/QuickOpen.js | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/src/search/QuickOpen.js b/src/search/QuickOpen.js index ea600f3009c..ca91ae3f69b 100644 --- a/src/search/QuickOpen.js +++ b/src/search/QuickOpen.js @@ -651,8 +651,21 @@ define(function (require, exports, module) { origSelection = null; } + // Set dialogLabel depending on which Navigation option is chosen + var dialogLabel = ""; + switch (prefix) { + case "": + dialogLabel = Strings.CMD_QUICK_OPEN; + break; + case ":": + dialogLabel = Strings.CMD_GOTO_LINE; + break; + case "@": + dialogLabel = Strings.CMD_GOTO_DEFINITION; + break; + } // Show the search bar ("dialog") - var dialogHTML = Strings.CMD_QUICK_OPEN + ": "; + var dialogHTML = dialogLabel + ": "; that._createDialogDiv(dialogHTML); that.$searchField = $("input#quickOpenSearch"); From cacfef0cf758a2a803e76bf30c95ff603d0cc5b3 Mon Sep 17 00:00:00 2001 From: Narciso Jaramillo Date: Thu, 27 Sep 2012 13:31:50 -0700 Subject: [PATCH 2/4] Update src/nls/README.md --- src/nls/README.md | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/nls/README.md b/src/nls/README.md index 8c0832684f2..00d9bd5eb78 100644 --- a/src/nls/README.md +++ b/src/nls/README.md @@ -3,15 +3,17 @@ 1. Create a subfolder of the `nls` folder whose name is the language or locale you want to create a translation for. - * If you're creating a general translation for a language, just use its two-letter code - (e.g. `en`, `de`). + * If you're creating a general translation for a language, just use its two-letter code + (e.g. `en`, `de`). - * If you're creating a locale-specific translation for a particular country, add a hyphen - and the country code in lowercase (e.g. `en-ca`, `en-gb`). + * If you're creating a locale-specific translation for a particular country, add a hyphen + and the country code in lowercase (e.g. `en-ca`, `en-gb`). 2. Add an entry for your translation to the `module.exports` object in `nls/strings.js`. (Eventually, we should remove this requirement and just scan the folder for available languages.) +3. Copy the root `strings.js` file into your subfolder and start translating! + Strings not specified in a given locale will fall back to the language for that locale, if any, and strings not specified in either the locale or its language will fall back to the `root` string entry. From 7d6a238ea2ced228df272fcc5632dca2197bf1f7 Mon Sep 17 00:00:00 2001 From: Narciso Jaramillo Date: Thu, 27 Sep 2012 13:33:21 -0700 Subject: [PATCH 3/4] Update src/nls/README.md --- src/nls/README.md | 4 ---- 1 file changed, 4 deletions(-) diff --git a/src/nls/README.md b/src/nls/README.md index 00d9bd5eb78..faf530f9158 100644 --- a/src/nls/README.md +++ b/src/nls/README.md @@ -2,16 +2,12 @@ 1. Create a subfolder of the `nls` folder whose name is the language or locale you want to create a translation for. - * If you're creating a general translation for a language, just use its two-letter code (e.g. `en`, `de`). - * If you're creating a locale-specific translation for a particular country, add a hyphen and the country code in lowercase (e.g. `en-ca`, `en-gb`). - 2. Add an entry for your translation to the `module.exports` object in `nls/strings.js`. (Eventually, we should remove this requirement and just scan the folder for available languages.) - 3. Copy the root `strings.js` file into your subfolder and start translating! Strings not specified in a given locale will fall back to the language for that locale, if any, From 2a62d64a088368adf9ced83b4aeb98099d3340e6 Mon Sep 17 00:00:00 2001 From: Sagar Date: Sun, 23 Sep 2012 17:04:30 -0400 Subject: [PATCH 4/4] Committing fix for Issue 1705 Added a switch case to set the dialogLabel correctly depending on which Navigation option is chosen. --- src/search/QuickOpen.js | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/src/search/QuickOpen.js b/src/search/QuickOpen.js index ea600f3009c..ca91ae3f69b 100644 --- a/src/search/QuickOpen.js +++ b/src/search/QuickOpen.js @@ -651,8 +651,21 @@ define(function (require, exports, module) { origSelection = null; } + // Set dialogLabel depending on which Navigation option is chosen + var dialogLabel = ""; + switch (prefix) { + case "": + dialogLabel = Strings.CMD_QUICK_OPEN; + break; + case ":": + dialogLabel = Strings.CMD_GOTO_LINE; + break; + case "@": + dialogLabel = Strings.CMD_GOTO_DEFINITION; + break; + } // Show the search bar ("dialog") - var dialogHTML = Strings.CMD_QUICK_OPEN + ": "; + var dialogHTML = dialogLabel + ": "; that._createDialogDiv(dialogHTML); that.$searchField = $("input#quickOpenSearch");