Skip to content

Commit

Permalink
Fix for the StatusBar line count grammar error by changing the string…
Browse files Browse the repository at this point in the history
… when the file has 1 line
  • Loading branch information
TomMalbran committed Apr 24, 2013
1 parent 26e9c90 commit 534a90e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion src/editor/EditorStatusBar.js
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand Down
3 changes: 2 additions & 1 deletion src/nls/root/strings.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 534a90e

Please sign in to comment.