From 9f15ef61d9cb212aebcd34cef5e836a0e239e65e Mon Sep 17 00:00:00 2001 From: Simon Lydell Date: Sun, 11 Sep 2016 14:15:00 +0200 Subject: [PATCH] Consistently refer to options as "options" In documentation, UI and error messages, consistently refer to options af "options", not "settings" and not "prefs". --- README.md | 4 +- documentation/api.md | 63 +++++++++++++------------ documentation/commands.md | 6 +-- documentation/config-file.md | 12 ++--- documentation/notifications.md | 2 +- documentation/options.md | 48 +++++++++---------- documentation/questions-and-answers.md | 2 +- documentation/shortcuts.md | 6 +-- extension/lib/api.coffee | 8 ++-- extension/lib/prefs-bulk.coffee | 2 +- extension/lib/prefs.coffee | 4 +- extension/locale/de/vimfx.properties | 12 ++--- extension/locale/en-US/vimfx.properties | 12 ++--- extension/locale/es/vimfx.properties | 12 ++--- extension/locale/fr/vimfx.properties | 12 ++--- extension/locale/id/vimfx.properties | 12 ++--- extension/locale/it/vimfx.properties | 12 ++--- extension/locale/ja/vimfx.properties | 12 ++--- extension/locale/nl/vimfx.properties | 12 ++--- extension/locale/pt-BR/vimfx.properties | 12 ++--- extension/locale/ru/vimfx.properties | 12 ++--- extension/locale/zh-CN/vimfx.properties | 12 ++--- extension/locale/zh-TW/vimfx.properties | 12 ++--- extension/test/test-api.coffee | 12 ++--- 24 files changed, 157 insertions(+), 156 deletions(-) diff --git a/README.md b/README.md index 9a00879..b5dcfba 100644 --- a/README.md +++ b/README.md @@ -60,7 +60,7 @@ Half a page: d, u. There are of course many more shortcuts! Press ? to see them all, and then / to search among them. Click on a command or open VimFx’s -[settings] page in the Add-ons Manager to customize the [default shortcuts]. +[options] page in the Add-ons Manager to customize the [default shortcuts]. You can temporarily disable VimFx by using Ignore mode. Press i to enter it, and shift-escape to exit. Use the [blacklist] to @@ -68,7 +68,7 @@ automatically enter Ignore mode on specific sites. There’s also an [article on ghacks.net][ghacks] which is a good introduction. -[settings]: https://github.com/akhodakivskiy/VimFx/blob/master/documentation/options.md +[options]: https://github.com/akhodakivskiy/VimFx/blob/master/documentation/options.md [default shortcuts]: https://github.com/akhodakivskiy/VimFx/blob/master/extension/lib/defaults.coffee [blacklist]: https://github.com/akhodakivskiy/VimFx/blob/master/documentation/options.md#blacklist [ghacks]: http://www.ghacks.net/2016/07/01/vimfx-improve-firefox-keyboard-use/ diff --git a/documentation/api.md b/documentation/api.md index 28b8f1c..23352cc 100644 --- a/documentation/api.md +++ b/documentation/api.md @@ -19,16 +19,16 @@ In `config.js`, the following API is available as the variable `vimfx`. ### `vimfx.get(...)`, `vimfx.getDefault(...)` and `vimfx.set(...)` -Gets or sets the (default) value of a VimFx pref. +Gets or sets the (default) value of a VimFx option. -You can see all prefs in [defaults.coffee], or by opening [about:config] and +You can see all options in [defaults.coffee], or by opening [about:config] and filtering by `extensions.vimfx`. Note that you can also access the [special options], which may not be accessed in [about:config], using `vimfx.get(...)` and `vimfx.set(...)`—in fact, this is the _only_ way of accessing those options. -#### `vimfx.get(pref)` +#### `vimfx.get(option)` -Gets the value of the VimFx pref `pref`. +Gets the value of the VimFx option `option`. ```js // Get the value of the Hint characters option: @@ -37,15 +37,15 @@ vimfx.get('hints.chars') vimfx.get('mode.normal.follow') ``` -#### `vimfx.getDefault(pref)` +#### `vimfx.getDefault(option)` -Gets the default value of the VimFx pref `pref`. +Gets the default value of the VimFx option `option`. Useful when you wish to extend a default, rather than replacing it. See below. -#### `vimfx.set(pref, value)` +#### `vimfx.set(option, value)` -Sets the value of the VimFx pref `pref` to `value`. +Sets the value of the VimFx option `option` to `value`. ```js // Set the value of the Hint characters option: @@ -54,15 +54,15 @@ vimfx.set('hints.chars', 'abcdefghijklmnopqrstuvwxyz') vimfx.set('mode.normal.follow', vimfx.getDefault('mode.normal.follow') + ' ee') ``` -When extending a pref (as in the second example above), be sure to use +When extending an option (as in the second example above), be sure to use `vimfx.getDefault` rather than `vimfx.get`. Otherwise you get a multiplying -effect. In the above example, after starting Firefox a few times the pref would -be `f e e e e`. Also, if you find that example very verbose: Remember that -you’re using a programming language! Write a small helper function that suits -your needs. +effect. In the above example, after starting Firefox a few times the option +would be `f e e e e`. Also, if you find that example very verbose: Remember +that you’re using a programming language! Write a small helper function that +suits your needs. Note: If you produce conflicting keyboard shortcuts, the order of your code does -not matter. The command that comes first in VimFx’s settings page in the Add-ons +not matter. The command that comes first in VimFx’s options page in the Add-ons Manager (and in the Keyboard Shortcuts help dialog) gets the shortcut; the other one(s) do(es) not. See the notes about order in [mode object], [category object] and [command object] for more information about order. @@ -70,7 +70,7 @@ and [command object] for more information about order. ```js // Even though we set the shortcut for focusing the search bar last, the command // for focusing the location bar “wins”, because it comes first in VimFx’s -// settings page in the Add-ons Manager. +// options page in the Add-ons Manager. vimfx.set('mode.normal.focus_location_bar', 'ö') vimfx.set('mode.normal.focus_search_bar', 'ö') @@ -88,10 +88,10 @@ Creates a new command. - name: `String`. The name used when accessing the command via `vimfx.modes[options.mode].commands[options.name]`. It is also used for the - pref used to store the shortcuts for the command: + option name (preference key) used to store the shortcuts for the command: `` `custom.mode.${options.mode}.${options.name}` ``. - description: `String`. Shown in the Keyboard Shortcuts help dialog and VimFx’s - settings page in the Add-ons Manager. + options page in the Add-ons Manager. - mode: `String`. Defaults to `'normal'`. The mode to add the command to. The value has to be one of the keys of [`vimfx.modes`]. - category: `String`. Defaults to `'misc'` for Normal mode and `''` @@ -106,7 +106,7 @@ Creates a new command. below for more information. Note that you have to give the -new command a shortcut in VimFx’s settings page in the Add-ons Manager or set +new command a shortcut in VimFx’s options page in the Add-ons Manager or set one using `vimfx.set(...)` to able to use the new command. ```js @@ -137,13 +137,13 @@ found it is applied. No more rules will be applied. #### `vimfx.addOptionOverrides(...rules)` -The rules are matched any time the value of a VimFx pref is needed. +The rules are matched any time the value of a VimFx option is needed. The matching function receives a [location object]. -The override is an object whose keys are VimFx pref names and whose values -override the pref in question. The values should be formatted as in an [options -object]. +The override is an object whose keys are VimFx option names and whose values +override the option in question. The values should be formatted as in an +[options object]. ```js vimfx.addOptionOverrides( @@ -320,7 +320,7 @@ The event is useful for knowing when to update UI showing the current mode. #### The `focusTypeChange` event Occurs when focusing or blurring any element. See also the [`blur_timeout`] -pref. +option. `data`: @@ -568,7 +568,7 @@ vimfx.listen('highlight_marker_element', ({id, color}) => { A mode is an object with the following properties: - name: `String`. A human readable name of the mode used in the Keyboard - Shortcuts help dialog and VimFx’s settings page in the Add-ons Manager. Config + Shortcuts help dialog and VimFx’s options page in the Add-ons Manager. Config file users adding custom modes could simply use a hard-coded string; extension authors are encouraged to look up the name from a locale file. - order: `Number`. The first of the default modes has the order `100` and then @@ -619,7 +619,7 @@ to the browser and web pages, and `false` otherwise. A category is an object with the following properties: - name: `String`. A human readable name of the category used in the Keyboard - Shortcuts help dialog and VimFx’s settings page in the Add-ons Manager. Config + Shortcuts help dialog and VimFx’s options page in the Add-ons Manager. Config file users adding custom categories could simply a use hard-coded string; extension authors are encouraged to look up the name from a locale file. - order: `Number`. The first of the default categories is the “uncategorized” @@ -630,10 +630,11 @@ A category is an object with the following properties: A command is an object with the following properties: -- pref: `String`. The pref used to store the shortcuts for the command. +- pref: `String`. The option name (preference key) used to store the shortcuts + for the command. - run(args): `Function`. Called when the command is activated. - description: `String`. A description of the command, shown in the Keyboard - Shortcuts help dialog and VimFx’s settings page in the Add-ons Manager. Config + Shortcuts help dialog and VimFx’s options page in the Add-ons Manager. Config file users adding custom commands could simply use a hard-coded string; extension authors are encouraged to look up the name from a locale file. - category: `String`. The category to add the command to. The value has to be @@ -772,12 +773,12 @@ source code. They may change at any time. ### Options object An `options` object provides access to all of VimFx’s options. It is an object -whose keys are VimFx pref names. +whose keys are VimFx option names. -Note that the values are not just simply `vimfx.get(pref)` for the `pref` in -question; they are _parsed_ (`parse(vimfx.get(pref))`): +Note that the values are not just simply `vimfx.get(option)` for the `option` in +question; they are _parsed_ (`parse(vimfx.get(option))`): -- Space-separated prefs are parsed into arrays of strings. For example, +- Space-separated options are parsed into arrays of strings. For example, `pattern_attrs: ['class']`. - `blacklist`, `prev_patterns` and `next_patterns` are parsed into arrays of diff --git a/documentation/commands.md b/documentation/commands.md index 0bd3e23..a30346f 100644 --- a/documentation/commands.md +++ b/documentation/commands.md @@ -150,7 +150,7 @@ position by pressing `'` followed by the same letter, e.g. `'a`. One mark is special: `'`. Pressing `''` takes you to the scroll position before the last `gg`, `G`, `0`, `$`, `/`, `n`, `N` or `'`. (You can change this mark -using the [`scroll.last_position_mark`] pref.) +using the [`scroll.last_position_mark`] option.) Note: Firefox has a `'` shortcut by default. It opens the Quick Find bar. VimFx provides the `g/` shortcut instead. @@ -235,7 +235,7 @@ about the [Hint characters] option. Hints are added on top of the corresponding element. If they obscure the display too much you can hold down ctrl and shift simultaneously to make them transparent, letting you peek through them. (See [Styling] and the -[`hints.peek_through`] pref if you’d like to change that.) The hints can also +[`hints.peek_through`] option if you’d like to change that.) The hints can also sometimes cover each other. Press `` and `` to switch which one should be on top. @@ -284,7 +284,7 @@ with a different color, and can be activated by pressing ``. Holding alt or ctrl works there too: `` toggles same/new tab and `` toggles background/foreground tab. -(Also see the advanced prefs [`hints.toggle_in_tab`] and +(Also see the advanced options [`hints.toggle_in_tab`] and [`hints.toggle_in_background`].) Finally, if the element you wanted to interact with didn’t get a hint marker you diff --git a/documentation/config-file.md b/documentation/config-file.md index 9bf5806..401f5e1 100644 --- a/documentation/config-file.md +++ b/documentation/config-file.md @@ -44,7 +44,7 @@ Follow these steps to get started with your config file: 2. Create two empty plain text files in your directory, called `config.js` and `frame.js`. -3. Set the [`config_file_directory`] pref (that’s an [advanced option]) to the +3. Set the [`config_file_directory`] option (that’s an [advanced option]) to the path of the directory you created above. It can be either absolute, such as `/home/you/.config/vimfx` or `C:\Users\you\vimfx`, or start with a `~`, which is a shortcut to your home directory, such as `~/.config/vimfx` or `~\vimfx`. @@ -121,13 +121,13 @@ vimfx.set('custom.mode.normal.zoom_in', 'zi') If you add custom commands, remember to [add shortcuts to them][custom-command-shortcuts]! -Tip: If you already have made customizations in VimFx’s settings page in the -Add-ons Manager, you can use the “Export all” button there to copy all prefs as -JSON. Paste it in your config file and either edit it, or iterate of it: +Tip: If you already have made customizations in VimFx’s options page in the +Add-ons Manager, you can use the “Export all” button there to copy all options +as JSON. Paste it in your config file and either edit it, or iterate of it: ```js -let prefs = {"hints.chars": "1234567 89"} // Pasted exported prefs. -Object.entries(prefs).forEach(([pref, value]) => vimfx.set(pref, value)) +let options = {"hints.chars": "1234567 89"} // Pasted exported options. +Object.entries(options).forEach(([option, value]) => vimfx.set(option, value)) ``` [custom-command-shortcuts]: api.md#user-content-custom-command-shortcuts diff --git a/documentation/notifications.md b/documentation/notifications.md index 20cfe9b..35613b6 100644 --- a/documentation/notifications.md +++ b/documentation/notifications.md @@ -18,6 +18,6 @@ focusing links, but is placed on the opposite side. Notifications are shown until you click something, press a key or switch tab. -(See also the [`notifications_enabled`] pref.) +(See also the [`notifications_enabled`] option.) [`notifications_enabled`]: options.md#notifications_enabled diff --git a/documentation/options.md b/documentation/options.md index b3d6b0c..231fcec 100644 --- a/documentation/options.md +++ b/documentation/options.md @@ -18,7 +18,7 @@ file]. ## Regular options -These options are available in VimFx’s settings page in the Add-ons Manager +These options are available in VimFx’s options page in the Add-ons Manager (where you can also customize [keyboard shortcuts]). [keyboard shortcuts]: shortcuts.md @@ -285,7 +285,7 @@ back on looking for links on the page that seem to go to the previous/next page using patterns. The patterns are matched at the beginning and end of link text (and the -attributes defined by the advanced setting [`pattern_attrs`]). The patterns do +attributes defined by the advanced option [`pattern_attrs`]). The patterns do not match in the middle of words, so “previous” does not match “previously”. The matching is case insensitive. @@ -305,7 +305,7 @@ Note: If you need to include a space in your pattern, use `\s`. For example: ## Advanced options -These options are _not_ available in VimFx’s settings page in the Add-ons +These options are _not_ available in VimFx’s options page in the Add-ons Manager. They can only be changed in [about:config] or using a [config file]. They all start with `extensions.VimFx.`. @@ -352,8 +352,8 @@ Controls whether [counts] are enabled or not. Toggles whether the various find commands are Vim-style or Firefox default-style. -Disable this pref if you want `/` to work more like `` and `n`/`N` to work -more like ``/``. +Disable this option if you want `/` to work more like `` and `n`/`N` to +work more like ``/``. If there is selected text on the page, Firefox starts searching after that. VimFx does so too, but only if the selection is currently _visible_ (inside the @@ -365,7 +365,7 @@ viewport. The VimFx behavior is designed to be less disorienting. It is also similar to how searching in Vim works. Again, you can return to the Firefox default -behavior (if you prefer that) by disabling this pref. +behavior (if you prefer that) by disabling this option. One of the main benefits of the VimFx behavior is that you can scroll past a block of the text with lots of search matches and then continue going through @@ -397,9 +397,9 @@ Space separated list of modes where `prevent_autofocus` should be used. ### `config_file_directory` VimFx can optionally be customized using a [config file]. If you want to that, -you need to tell VimFx where that file is. That’s what this pref is for. +you need to tell VimFx where that file is. That’s what this option is for. -By default this pref is blank (the empty string), which means that no config +By default this option is blank (the empty string), which means that no config file should be loaded. If non-blank, it should be the path to the directory where the config file @@ -419,15 +419,15 @@ shortcut instead of typing into the text input, which can be quite annoying. To avoid the problem, VimFx waits a bit before checking if you have left the text input. -### Scrolling prefs +### Scrolling options -Apart from its own prefs, VimFx also respects a few built-in Firefox prefs. +Apart from its own options, VimFx also respects a few built-in Firefox options. #### Smooth scrolling If you want to customize Firefox’s smooth scrolling, adjusting `general.smoothScroll.{lines,pages,other}.duration{Min,Max}MS` is the way to -go. VimFx has similar prefs for the scrolling commands, but they work like +go. VimFx has similar options for the scrolling commands, but they work like `layout.css.scroll-behavior.spring-constant`. Basically, the higher the value, the faster the scrolling. @@ -438,15 +438,15 @@ These are VimFx’s variants, and the commands they affect: - `smoothScroll.pages.spring-constant`: `d`, `u`, ``, `` - `smoothScroll.other.spring-constant`: `gg`, `G`, `0`, `^`, `$`, `'` -Note that the value of these prefs are _strings,_ not numbers! +Note that the value of these options are _strings,_ not numbers! Unfortunately, Firefox provides no way for code to tell which “spring constant” it wants when scrolling smoothly. All VimFx can do is to temporarily set -Firefox’s `layout.css.scroll-behavior.spring-constant` pref. It is reset again +Firefox’s `layout.css.scroll-behavior.spring-constant` option. It is reset again after one second (by default). If that doesn’t work out for you, you can -customize that timeout using the `scroll.reset_timeout` pref. +customize that timeout using the `scroll.reset_timeout` option. -The Firefox pref `general.smoothScroll` lets you turn off smooth scrolling +The Firefox option `general.smoothScroll` lets you turn off smooth scrolling entirely, including all of VimFx’s scrolling commands. `general.smoothScroll.lines`, `general.smoothScroll.pages`, and @@ -457,12 +457,12 @@ categorization as in the above list. #### Scroll step By default you can scroll using the arrow keys in Firefox. You can control how -much they scroll by adjusting the following prefs: +much they scroll by adjusting the following options: - `toolkit.scrollbox.horizontalScrollDistance`: ``, ``, `h`, `l` - `toolkit.scrollbox.verticalScrollDistance`: ``, ``, `j`, `k` -(VimFx used to have a `scroll_step` pref, but is has been replaced by the +(VimFx used to have a `scroll_step` option, but is has been replaced by the above.) #### `scroll.full_page_adjustment` and `scroll.half_page_adjustment` @@ -479,7 +479,7 @@ For this reason, both VimFx and Firefox by default scroll _about a line less than a whole page_ when pressing ``. This solves the sliced-last-line problem, and provides some context on where you are in the text you’re reading. -These two prefs control how many pixels “about a line” actually means for the +These two options control how many pixels “about a line” actually means for the different page scrolling commands. - `scroll.full_page_adjustment`: `, `` @@ -511,7 +511,7 @@ disappearing (or resetting). ### `hints.sleep` In Hints mode, VimFx continually checks if the element for a hint marker has -moved. If so, the marker is moved as well. This pref controls how many +moved. If so, the marker is moved as well. This option controls how many milliseconds VimFx should “sleep” between each check. The shorter, the more CPU usage, the longer, the more stuttery marker movement. @@ -524,16 +524,16 @@ Set it to -1 to disable the marker movement feature entirely. ### `hints.match_text` If you strongly dislike that typing non-[Hint characters] filters hint markers -by element text, disable this pref. (That’ll make things work like it did in +by element text, disable this option. (That’ll make things work like it did in VimFx 0.18.x and older.) [Hint characters]: #hint-characters ### `hints.peek_through` -This pref doesn’t do much. If you’ve used custom [styling] to change which +This option doesn’t do much. If you’ve used custom [styling] to change which modifier lets you peek through markers in [Hints mode], you might want to change -this pref as well. Otherwise VimFx’s Keyboard Shortcuts dialog will still tell +this option as well. Otherwise VimFx’s Keyboard Shortcuts dialog will still tell you to press shift for this task. [styling]: styling.md @@ -565,14 +565,14 @@ an “adjustable” element (form control or video player) is focused. The default values are ``, respectively. Those keys are specially handled after focusing a text input using [`gi`]. To disable this -special handling, set the prefs to the empty string. +special handling, set the options to the empty string. [`gi`]: commands.md#gi-1 ## Special options -These options are available in neither VimFx’s settings page in the Add-ons +These options are available in neither VimFx’s options page in the Add-ons Manager nor in [about:config]. The only way to change them is by using the a [config file]. diff --git a/documentation/questions-and-answers.md b/documentation/questions-and-answers.md index 0a212b4..7bba3a2 100644 --- a/documentation/questions-and-answers.md +++ b/documentation/questions-and-answers.md @@ -81,7 +81,7 @@ which is specialized at searching your keyboard shortcuts. ## Can I edit shortcuts in the Keyboard Shortcuts help dialog? -No, but clicking on any command in it opens VimFx’s settings page in the Add-ons +No, but clicking on any command in it opens VimFx’s options page in the Add-ons Manager and automatically selects the text input for that command. Tip: Use the `eb` command to click without using the mouse. diff --git a/documentation/shortcuts.md b/documentation/shortcuts.md index 3bde866..dbe04f1 100644 --- a/documentation/shortcuts.md +++ b/documentation/shortcuts.md @@ -6,12 +6,12 @@ See the file README.md for copying conditions. # Shortcuts -All of VimFx’s keyboard shortcuts can be customized in VimFx’s settings page in +All of VimFx’s keyboard shortcuts can be customized in VimFx’s options page in the Add-ons Manager. Doing so is really easy. You get far just by looking at the defaults and trying things out. If not, read on. In VimFx’s Keyboard Shortcuts help dialog (which can be opened by pressing `?`) -you can click any command to open VimFx’s settings page in the Add-ons Manager +you can click any command to open VimFx’s options page in the Add-ons Manager and automatically select the text input for that command. Tip: Use the `eb` command to click without using the mouse. @@ -26,7 +26,7 @@ several different shortcuts. Read about [modes] for more information. VimFx’s key notation is inspired by Vim’s key notation. Here is an example of what you can type into a text input for a command in -VimFx’s settings page in the Add-ons Manager: +VimFx’s options page in the Add-ons Manager: J gT g diff --git a/extension/lib/api.coffee b/extension/lib/api.coffee index 696484e..4975302 100644 --- a/extension/lib/api.coffee +++ b/extension/lib/api.coffee @@ -37,7 +37,7 @@ createConfigAPI = (vimfx, {allowDeprecated = true} = {}) -> { when pref of defaults.all_prefs or pref?.startsWith('custom.') prefs.get(pref) else - throw new Error("VimFx: Unknown pref: #{pref}") + throw new Error("VimFx: Unknown option: #{pref}") getDefault: (inputPref) -> pref = alias(inputPref, allowDeprecated) @@ -45,11 +45,11 @@ createConfigAPI = (vimfx, {allowDeprecated = true} = {}) -> { try return prefs.default.get(inputPref) return switch when pref of defaults.parsed_options or pref?.startsWith('custom.') - throw new Error("VimFx: No default for pref: #{pref}") + throw new Error("VimFx: No default for option: #{pref}") when pref of defaults.all_prefs defaults.all_prefs[pref] else - throw new Error("VimFx: Unknown pref: #{pref}") + throw new Error("VimFx: Unknown option: #{pref}") set: (inputPref, value) -> pref = alias(inputPref, allowDeprecated) @@ -63,7 +63,7 @@ createConfigAPI = (vimfx, {allowDeprecated = true} = {}) -> { prefs.set(pref, value) onShutdown(vimfx, -> prefs.set(pref, previousValue)) else - throw new Error("VimFx: Unknown pref: #{pref}") + throw new Error("VimFx: Unknown option: #{pref}") addCommand: ({name, description, mode, category, order} = {}, fn) -> mode ?= 'normal' diff --git a/extension/lib/prefs-bulk.coffee b/extension/lib/prefs-bulk.coffee index cd48bc1..ec4b2dc 100644 --- a/extension/lib/prefs-bulk.coffee +++ b/extension/lib/prefs-bulk.coffee @@ -79,7 +79,7 @@ createImportErrorReport = ({numSuccesses, errors}) -> s1 = if numSuccesses == 1 then '' else 's' s2 = if errors.length == 1 then '' else 's' """ - #{numSuccesses} preference#{s1} imported successfully. + #{numSuccesses} option#{s1} imported successfully. #{errors.length} error#{s2} occurred: """ diff --git a/extension/lib/prefs.coffee b/extension/lib/prefs.coffee index b29e430..09d0352 100644 --- a/extension/lib/prefs.coffee +++ b/extension/lib/prefs.coffee @@ -61,8 +61,8 @@ set = (branch, key, value) -> branch.clearUserPref(key) else throw new Error( - "VimFx: Preferences may only be set to a boolean, number, string or - null. Got: #{typeof value}" + "VimFx: Options may only be set to a boolean, number, string or null. + Got: #{typeof value}" ) has = (branch, key) -> diff --git a/extension/locale/de/vimfx.properties b/extension/locale/de/vimfx.properties index 1f2893b..cdde918 100644 --- a/extension/locale/de/vimfx.properties +++ b/extension/locale/de/vimfx.properties @@ -195,14 +195,14 @@ prefs.instructions.desc=%S Nächsten Tastendruck als Text einfügen\n%S Voreinst prefs.documentation=Dokumentation prefs.reset.label=Reset all -prefs.reset.enter=Reset all VimFx preferences? -prefs.reset.success=All VimFx preferences reset. +prefs.reset.enter=Reset all VimFx options? +prefs.reset.success=All VimFx options reset. prefs.export.label=Export all -prefs.export.none=No VimFx preferences to export. You are using the default for everything. -prefs.export.success=All VimFx preferences copied to the clipboard. +prefs.export.none=No VimFx options to export. You are using the default for everything. +prefs.export.success=All VimFx options copied to the clipboard. prefs.import.label=Import -prefs.import.enter=Paste exported VimFx preferences: -prefs.import.success=Pasted VimFx preferences successfully imported. +prefs.import.enter=Paste exported VimFx options: +prefs.import.success=Pasted VimFx options successfully imported. error.invalid_key=%S: Ungültiger Tastendruck. error.unknown_modifier=%S: Unbekannter Modifikator: %S. Benutze nur a, c, m und s. diff --git a/extension/locale/en-US/vimfx.properties b/extension/locale/en-US/vimfx.properties index 9072c6d..f0633d3 100644 --- a/extension/locale/en-US/vimfx.properties +++ b/extension/locale/en-US/vimfx.properties @@ -195,14 +195,14 @@ prefs.instructions.desc=%S Insert next keypress as text\n%S Insert default\n%S R prefs.documentation=Documentation prefs.reset.label=Reset all -prefs.reset.enter=Reset all VimFx preferences? -prefs.reset.success=All VimFx preferences reset. +prefs.reset.enter=Reset all VimFx options? +prefs.reset.success=All VimFx options reset. prefs.export.label=Export all -prefs.export.none=No VimFx preferences to export. You are using the default for everything. -prefs.export.success=All VimFx preferences copied to the clipboard. +prefs.export.none=No VimFx options to export. You are using the default for everything. +prefs.export.success=All VimFx options copied to the clipboard. prefs.import.label=Import -prefs.import.enter=Paste exported VimFx preferences: -prefs.import.success=Pasted VimFx preferences successfully imported. +prefs.import.enter=Paste exported VimFx options: +prefs.import.success=Pasted VimFx options successfully imported. error.invalid_key=%S: Invalid key. error.unknown_modifier=%S: Unknown modifier: %S. Use only a, c, m and s. diff --git a/extension/locale/es/vimfx.properties b/extension/locale/es/vimfx.properties index 3393e45..56de2a7 100644 --- a/extension/locale/es/vimfx.properties +++ b/extension/locale/es/vimfx.properties @@ -195,14 +195,14 @@ prefs.instructions.desc=%S Insertar las próximas pulsaciones de teclado como te prefs.documentation=Documentación prefs.reset.label=Reset all -prefs.reset.enter=Reset all VimFx preferences? -prefs.reset.success=All VimFx preferences reset. +prefs.reset.enter=Reset all VimFx options? +prefs.reset.success=All VimFx options reset. prefs.export.label=Export all -prefs.export.none=No VimFx preferences to export. You are using the default for everything. -prefs.export.success=All VimFx preferences copied to the clipboard. +prefs.export.none=No VimFx options to export. You are using the default for everything. +prefs.export.success=All VimFx options copied to the clipboard. prefs.import.label=Import -prefs.import.enter=Paste exported VimFx preferences: -prefs.import.success=Pasted VimFx preferences successfully imported. +prefs.import.enter=Paste exported VimFx options: +prefs.import.success=Pasted VimFx options successfully imported. error.invalid_key=%S: Clave no válida. error.unknown_modifier=%S: Modificador desconocido: %S. Usar sólo a, c, m y s. diff --git a/extension/locale/fr/vimfx.properties b/extension/locale/fr/vimfx.properties index 61dfc62..12a9194 100644 --- a/extension/locale/fr/vimfx.properties +++ b/extension/locale/fr/vimfx.properties @@ -195,14 +195,14 @@ prefs.instructions.desc=%S Insérer la combinaison de touches suivante comme du prefs.documentation=Documentation prefs.reset.label=Reset all -prefs.reset.enter=Reset all VimFx preferences? -prefs.reset.success=All VimFx preferences reset. +prefs.reset.enter=Reset all VimFx options? +prefs.reset.success=All VimFx options reset. prefs.export.label=Export all -prefs.export.none=No VimFx preferences to export. You are using the default for everything. -prefs.export.success=All VimFx preferences copied to the clipboard. +prefs.export.none=No VimFx options to export. You are using the default for everything. +prefs.export.success=All VimFx options copied to the clipboard. prefs.import.label=Import -prefs.import.enter=Paste exported VimFx preferences: -prefs.import.success=Pasted VimFx preferences successfully imported. +prefs.import.enter=Paste exported VimFx options: +prefs.import.success=Pasted VimFx options successfully imported. error.invalid_key=%S: Touche invalide. error.unknown_modifier=%S: Modificateur inconnu: %S. Utilisez seulement a, c, m et s. diff --git a/extension/locale/id/vimfx.properties b/extension/locale/id/vimfx.properties index 083d593..a2982aa 100644 --- a/extension/locale/id/vimfx.properties +++ b/extension/locale/id/vimfx.properties @@ -195,14 +195,14 @@ prefs.instructions.desc=%S Masukkan tekan tombol berikut sebagai teks\n%S Masukk prefs.documentation=Dokumentasi prefs.reset.label=Reset all -prefs.reset.enter=Reset all VimFx preferences? -prefs.reset.success=All VimFx preferences reset. +prefs.reset.enter=Reset all VimFx options? +prefs.reset.success=All VimFx options reset. prefs.export.label=Export all -prefs.export.none=No VimFx preferences to export. You are using the default for everything. -prefs.export.success=All VimFx preferences copied to the clipboard. +prefs.export.none=No VimFx options to export. You are using the default for everything. +prefs.export.success=All VimFx options copied to the clipboard. prefs.import.label=Import -prefs.import.enter=Paste exported VimFx preferences: -prefs.import.success=Pasted VimFx preferences successfully imported. +prefs.import.enter=Paste exported VimFx options: +prefs.import.success=Pasted VimFx options successfully imported. error.invalid_key=%S: Key salah. error.unknown_modifier=%S: Modifier tidak dikenali: %S. Gunakan hanya a, c, m dan s. diff --git a/extension/locale/it/vimfx.properties b/extension/locale/it/vimfx.properties index 73fd481..22eee3f 100644 --- a/extension/locale/it/vimfx.properties +++ b/extension/locale/it/vimfx.properties @@ -195,14 +195,14 @@ prefs.instructions.desc=%S Inserisci il prossimo carattere come testo\n%S Inseri prefs.documentation=Documentazione prefs.reset.label=Reset all -prefs.reset.enter=Reset all VimFx preferences? -prefs.reset.success=All VimFx preferences reset. +prefs.reset.enter=Reset all VimFx options? +prefs.reset.success=All VimFx options reset. prefs.export.label=Export all -prefs.export.none=No VimFx preferences to export. You are using the default for everything. -prefs.export.success=All VimFx preferences copied to the clipboard. +prefs.export.none=No VimFx options to export. You are using the default for everything. +prefs.export.success=All VimFx options copied to the clipboard. prefs.import.label=Import -prefs.import.enter=Paste exported VimFx preferences: -prefs.import.success=Pasted VimFx preferences successfully imported. +prefs.import.enter=Paste exported VimFx options: +prefs.import.success=Pasted VimFx options successfully imported. error.invalid_key=%S: tasto non valido. error.unknown_modifier=%S: Modificatore sconosciuto: %S. Usa solamente a, c, m ed s. diff --git a/extension/locale/ja/vimfx.properties b/extension/locale/ja/vimfx.properties index f0fbd26..c86e07b 100644 --- a/extension/locale/ja/vimfx.properties +++ b/extension/locale/ja/vimfx.properties @@ -195,14 +195,14 @@ prefs.instructions.desc=%S 次のキー入力をテキストとして挿入\n%S prefs.documentation=ドキュメント prefs.reset.label=Reset all -prefs.reset.enter=Reset all VimFx preferences? -prefs.reset.success=All VimFx preferences reset. +prefs.reset.enter=Reset all VimFx options? +prefs.reset.success=All VimFx options reset. prefs.export.label=Export all -prefs.export.none=No VimFx preferences to export. You are using the default for everything. -prefs.export.success=All VimFx preferences copied to the clipboard. +prefs.export.none=No VimFx options to export. You are using the default for everything. +prefs.export.success=All VimFx options copied to the clipboard. prefs.import.label=Import -prefs.import.enter=Paste exported VimFx preferences: -prefs.import.success=Pasted VimFx preferences successfully imported. +prefs.import.enter=Paste exported VimFx options: +prefs.import.success=Pasted VimFx options successfully imported. error.invalid_key=%S: 無効なキーです。 error.unknown_modifier=%S: 不明な修飾キー: %S. a, c, m, s のみが使用できます。 diff --git a/extension/locale/nl/vimfx.properties b/extension/locale/nl/vimfx.properties index c448640..1b1f006 100644 --- a/extension/locale/nl/vimfx.properties +++ b/extension/locale/nl/vimfx.properties @@ -195,14 +195,14 @@ prefs.instructions.desc=%S Voer volgende toetsaanslag in als text\n%S Voer stand prefs.documentation=Documentatie prefs.reset.label=Reset all -prefs.reset.enter=Reset all VimFx preferences? -prefs.reset.success=All VimFx preferences reset. +prefs.reset.enter=Reset all VimFx options? +prefs.reset.success=All VimFx options reset. prefs.export.label=Export all -prefs.export.none=No VimFx preferences to export. You are using the default for everything. -prefs.export.success=All VimFx preferences copied to the clipboard. +prefs.export.none=No VimFx options to export. You are using the default for everything. +prefs.export.success=All VimFx options copied to the clipboard. prefs.import.label=Import -prefs.import.enter=Paste exported VimFx preferences: -prefs.import.success=Pasted VimFx preferences successfully imported. +prefs.import.enter=Paste exported VimFx options: +prefs.import.success=Pasted VimFx options successfully imported. error.invalid_key=%S: Ongeldige toets error.unknown_modifier=%S: Ongeldig commando: %S. Gebruik alleen a, c, m en s. diff --git a/extension/locale/pt-BR/vimfx.properties b/extension/locale/pt-BR/vimfx.properties index a7281d1..d462836 100644 --- a/extension/locale/pt-BR/vimfx.properties +++ b/extension/locale/pt-BR/vimfx.properties @@ -195,14 +195,14 @@ prefs.instructions.desc=%S Inserir próximo keypress como texto\n%S Inserir padr prefs.documentation=Documentação prefs.reset.label=Reset all -prefs.reset.enter=Reset all VimFx preferences? -prefs.reset.success=All VimFx preferences reset. +prefs.reset.enter=Reset all VimFx options? +prefs.reset.success=All VimFx options reset. prefs.export.label=Export all -prefs.export.none=No VimFx preferences to export. You are using the default for everything. -prefs.export.success=All VimFx preferences copied to the clipboard. +prefs.export.none=No VimFx options to export. You are using the default for everything. +prefs.export.success=All VimFx options copied to the clipboard. prefs.import.label=Import -prefs.import.enter=Paste exported VimFx preferences: -prefs.import.success=Pasted VimFx preferences successfully imported. +prefs.import.enter=Paste exported VimFx options: +prefs.import.success=Pasted VimFx options successfully imported. error.invalid_key=%S: Tecla inválida. error.unknown_modifier=%S: Modificador desconhecido: %S. Use somente a, c, m e s. diff --git a/extension/locale/ru/vimfx.properties b/extension/locale/ru/vimfx.properties index b564420..8f8bd3a 100644 --- a/extension/locale/ru/vimfx.properties +++ b/extension/locale/ru/vimfx.properties @@ -195,14 +195,14 @@ prefs.instructions.desc=%S Вставить следующее нажатие к prefs.documentation=Документация prefs.reset.label=Reset all -prefs.reset.enter=Reset all VimFx preferences? -prefs.reset.success=All VimFx preferences reset. +prefs.reset.enter=Reset all VimFx options? +prefs.reset.success=All VimFx options reset. prefs.export.label=Export all -prefs.export.none=No VimFx preferences to export. You are using the default for everything. -prefs.export.success=All VimFx preferences copied to the clipboard. +prefs.export.none=No VimFx options to export. You are using the default for everything. +prefs.export.success=All VimFx options copied to the clipboard. prefs.import.label=Import -prefs.import.enter=Paste exported VimFx preferences: -prefs.import.success=Pasted VimFx preferences successfully imported. +prefs.import.enter=Paste exported VimFx options: +prefs.import.success=Pasted VimFx options successfully imported. error.invalid_key=%S: Неверная клавиша. error.unknown_modifier=%S: Неизвестный модификатор: %S. Используйте только a, c, m и s. diff --git a/extension/locale/zh-CN/vimfx.properties b/extension/locale/zh-CN/vimfx.properties index 8aac9a9..dff1868 100644 --- a/extension/locale/zh-CN/vimfx.properties +++ b/extension/locale/zh-CN/vimfx.properties @@ -195,14 +195,14 @@ prefs.instructions.desc=%S 将下一个按键当作文本插入 \n%S 插入默 prefs.documentation=文档 prefs.reset.label=Reset all -prefs.reset.enter=Reset all VimFx preferences? -prefs.reset.success=All VimFx preferences reset. +prefs.reset.enter=Reset all VimFx options? +prefs.reset.success=All VimFx options reset. prefs.export.label=Export all -prefs.export.none=No VimFx preferences to export. You are using the default for everything. -prefs.export.success=All VimFx preferences copied to the clipboard. +prefs.export.none=No VimFx options to export. You are using the default for everything. +prefs.export.success=All VimFx options copied to the clipboard. prefs.import.label=Import -prefs.import.enter=Paste exported VimFx preferences: -prefs.import.success=Pasted VimFx preferences successfully imported. +prefs.import.enter=Paste exported VimFx options: +prefs.import.success=Pasted VimFx options successfully imported. error.invalid_key=%S: 无效按键. error.unknown_modifier=%S: 未知修饰键: %S. 只能使用 a, c, m 和 s. diff --git a/extension/locale/zh-TW/vimfx.properties b/extension/locale/zh-TW/vimfx.properties index e1d48bf..06e44c6 100644 --- a/extension/locale/zh-TW/vimfx.properties +++ b/extension/locale/zh-TW/vimfx.properties @@ -195,14 +195,14 @@ prefs.instructions.desc=%S 下一個插入按鍵當作文字\n%S 預設插入\n% prefs.documentation=說明 prefs.reset.label=Reset all -prefs.reset.enter=Reset all VimFx preferences? -prefs.reset.success=All VimFx preferences reset. +prefs.reset.enter=Reset all VimFx options? +prefs.reset.success=All VimFx options reset. prefs.export.label=Export all -prefs.export.none=No VimFx preferences to export. You are using the default for everything. -prefs.export.success=All VimFx preferences copied to the clipboard. +prefs.export.none=No VimFx options to export. You are using the default for everything. +prefs.export.success=All VimFx options copied to the clipboard. prefs.import.label=Import -prefs.import.enter=Paste exported VimFx preferences: -prefs.import.success=Pasted VimFx preferences successfully imported. +prefs.import.enter=Paste exported VimFx options: +prefs.import.success=Pasted VimFx options successfully imported. error.invalid_key=%S: 無效按鍵. error.unknown_modifier=%S: 未知的修飾鍵: %S.只能使用 a, c, m 或 s. diff --git a/extension/test/test-api.coffee b/extension/test/test-api.coffee index 67f2b4b..e4d54a0 100644 --- a/extension/test/test-api.coffee +++ b/extension/test/test-api.coffee @@ -386,23 +386,23 @@ exports['test vimfx.on and vimfx.off'] = (assert, $vimfx) -> exports['test vimfx.[gs]et(Default)? errors'] = (assert, $vimfx) -> vimfx = createConfigAPI($vimfx) - throws(assert, /unknown pref/i, 'undefined', -> + throws(assert, /unknown option/i, 'undefined', -> vimfx.get() ) - throws(assert, /unknown pref/i, 'undefined', -> + throws(assert, /unknown option/i, 'undefined', -> vimfx.getDefault() ) - throws(assert, /unknown pref/i, 'undefined', -> + throws(assert, /unknown option/i, 'undefined', -> vimfx.set() ) - throws(assert, /unknown pref/i, 'unknown_pref', -> + throws(assert, /unknown option/i, 'unknown_pref', -> vimfx.get('unknown_pref') ) - throws(assert, /unknown pref/i, 'unknown_pref', -> + throws(assert, /unknown option/i, 'unknown_pref', -> vimfx.getDefault('unknown_pref') ) @@ -414,7 +414,7 @@ exports['test vimfx.[gs]et(Default)? errors'] = (assert, $vimfx) -> vimfx.getDefault('translations') ) - throws(assert, /unknown pref/i, 'unknown_pref', -> + throws(assert, /unknown option/i, 'unknown_pref', -> vimfx.set('unknown_pref', 'foo') ) -- 2.39.3