Skip to content

Commit

Permalink
v0.7.0 - Names and Descriptions for preferences (Brackets 1.4)
Browse files Browse the repository at this point in the history
  • Loading branch information
Hirse committed Jul 28, 2015
1 parent ef4a155 commit 21a7bc2
Show file tree
Hide file tree
Showing 5 changed files with 63 additions and 12 deletions.
9 changes: 9 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,15 @@ All notable changes to this project will be documented in this file.
This project tries to adhere to [Semantic Versioning](http://semver.org/).


## 0.7.0 - 2015-07-28
### Added
- Names and Descriptions for preferences

### Changed
- Requires Brackets 1.4
- Reduced Toolbar Icon size to fit design guide


## 0.6.0 - 2015-07-02
### Added
- Support for arrow functions in JavaScript (see [#28](https://github.com/Hirse/brackets-outline-list/issues/28))
Expand Down
15 changes: 12 additions & 3 deletions nls/de/strings.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,16 @@ define({

COMMAND_SORT: "Liste sortieren",
COMMAND_UNNAMED: "Anonyme Funktionen anzeigen",
COMMAND_ARGS: "Argumente anzeigen"
});
COMMAND_ARGS: "Argumente anzeigen",

/* Last translated for 41a691e45e34f3ebde20bc5e3fdca8014871490d */
PREF_ENABLED_NAME: "Outline - Aktiviert",
PREF_ENABLED_DESC: "Aktiviert/deaktiviert die Outline Liste",
PREF_UNNAMED_NAME: "Outline - Anonyme Funktionen",
PREF_UNNAMED_DESC: "Zeigt/versteckt anonyme Funktionen in der Outline Liste",
PREF_ARGS_NAME: "Outline - Argumente",
PREF_ARGS_DESC: "Zeigt/versteckt Funktionsparameter und HTML Klassen in der Outline Liste",
PREF_SIDEBAR_NAME: "Outline - Seitenleiste",
PREF_SIDEBAR_DESC: "True, um die Outline Liste in der Seitenleiste und dem Dateibaum anzuzeigen",
PREF_SORT_NAME: "Outline - Sortierung",
PREF_SORT_DESC: "True, um die Einträge in der Outline Liste zu sortieren"
});
13 changes: 12 additions & 1 deletion nls/root/strings.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,16 @@ define({

COMMAND_SORT: "Sort Functions",
COMMAND_UNNAMED: "Show Unnamed Functions",
COMMAND_ARGS: "Show Arguments"
COMMAND_ARGS: "Show Arguments",

PREF_ENABLED_NAME: "Outline - Enabled",
PREF_ENABLED_DESC: "Enable/disable Outline List",
PREF_UNNAMED_NAME: "Outline - Unnamed",
PREF_UNNAMED_DESC: "Show/hide unnamed functions in the Outline List",
PREF_ARGS_NAME: "Outline - Arguments",
PREF_ARGS_DESC: "Show/hide function parameters and HTML classes in the Outline List",
PREF_SIDEBAR_NAME: "Outline - Sidebar",
PREF_SIDEBAR_DESC: "True to show the Outline List in the Sidebar below the file tree",
PREF_SORT_NAME: "Outline - Sorting",
PREF_SORT_DESC: "True to sort the content of the Outline List"
});
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
{
"name": "hirse.outline-list",
"version": "0.6.0",
"version": "0.7.0",
"title": "Brackets Outline List",
"description": "Displays a list of the functions or definitions in the currently opened document. Works with JavaScript, CoffeeScript, CSS, SCSS, LESS, XML, HTML, SVG, Markdown and PHP. Now with Icons!",
"engines": {
"brackets": ">=1.3.0"
"brackets": ">=1.4.0"
},
"homepage": "https://github.com/Hirse/brackets-outline-list",
"author": "Jan Pilzer (https://github.com/Hirse)",
Expand Down
34 changes: 28 additions & 6 deletions src/Preferences.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,30 +4,52 @@ define(function (require, exports, module) {
var _ = brackets.getModule("thirdparty/lodash");
var PreferencesManager = brackets.getModule("preferences/PreferencesManager");

var Strings = require("../strings");

var prefix = "hirse.outline";
var prefs = PreferencesManager.getExtensionPrefs(prefix);

var defaultPreferences = {
enabled: {
type: "boolean",
value: false
value: false,
options: {
name: Strings.PREF_ENABLED_NAME,
description: Strings.PREF_ENABLED_DESC
}
}, unnamed: {
type: "boolean",
value: true
value: true,
options: {
name: Strings.PREF_UNNAMED_NAME,
description: Strings.PREF_UNNAMED_DESC
}
}, args: {
type: "boolean",
value: true
value: true,
options: {
name: Strings.PREF_ARGS_NAME,
description: Strings.PREF_ARGS_DESC
}
}, sidebar: {
type: "boolean",
value: true
value: true,
options: {
name: Strings.PREF_SIDEBAR_NAME,
description: Strings.PREF_SIDEBAR_DESC
}
}, sort: {
type: "boolean",
value: false
value: false,
options: {
name: Strings.PREF_SORT_NAME,
description: Strings.PREF_SORT_DESC
}
}
};

_.each(defaultPreferences, function (definition, key) {
prefs.definePreference(key, definition.type, definition.value);
prefs.definePreference(key, definition.type, definition.value, definition.options);
});
prefs.save();

Expand Down

0 comments on commit 21a7bc2

Please sign in to comment.