From 534a90e2dee495d7037cd36dd72a34296ea8678d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1s=20Malbr=C3=A1n?= Date: Wed, 24 Apr 2013 04:28:02 -0300 Subject: [PATCH] Fix for the StatusBar line count grammar error by changing the string when the file has 1 line --- src/editor/EditorStatusBar.js | 3 ++- src/nls/root/strings.js | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/editor/EditorStatusBar.js b/src/editor/EditorStatusBar.js index ffd738a92a1..176086963a6 100644 --- a/src/editor/EditorStatusBar.js +++ b/src/editor/EditorStatusBar.js @@ -54,7 +54,8 @@ define(function (require, exports, module) { } function _updateFileInfo(editor) { - $fileInfo.text(StringUtils.format(Strings.STATUSBAR_LINE_COUNT, editor.lineCount())); + var lines = editor.lineCount(); + $fileInfo.text(StringUtils.format(lines > 1 ? Strings.STATUSBAR_LINE_COUNT_PLURAL : Strings.STATUSBAR_LINE_COUNT_SINGULAR, lines)); } function _updateIndentType() { diff --git a/src/nls/root/strings.js b/src/nls/root/strings.js index 65a5e4cfcf0..371dbbd8316 100644 --- a/src/nls/root/strings.js +++ b/src/nls/root/strings.js @@ -157,7 +157,8 @@ define({ "STATUSBAR_INDENT_SIZE_TOOLTIP_TABS" : "Click to change tab character width", "STATUSBAR_SPACES" : "Spaces", "STATUSBAR_TAB_SIZE" : "Tab Size", - "STATUSBAR_LINE_COUNT" : "{0} Lines", + "STATUSBAR_LINE_COUNT_SINGULAR" : "{0} Line", + "STATUSBAR_LINE_COUNT_PLURAL" : "{0} Lines", /** * Command Name Constants