hterm: preferences: replace key name with human readable string for display |
||
Issue descriptionin the options page, we show the raw pref key to users so they know what the preference does. e.g. we show "cursor-blink" so they know the checkbox controls the blinking behavior of the cursor. but this gets a bit messy for longer prefs (e.g. "alt-backspace-is-meta-backspace"), and makes it impossible to translate. we should add a new element in hterm.PreferenceManager.defaultPreferences specifically as a human readable string to show in the options page. we can demote the raw pref string to a tooltip or something if we really want to keep exposing it. or make it a named anchor so people could link to it like chrome-extension://okddffdblfhhnmhodogpojmfkjmhinfp/html/nassh_preferences_editor.html#cursor-blink
,
Oct 30
The following revision refers to this bug: https://chromium.googlesource.com/apps/libapps/+/c57d37eab99abcfac18e79312886d60b3306e4d2 commit c57d37eab99abcfac18e79312886d60b3306e4d2 Author: Mike Frysinger <vapier@chromium.org> Date: Tue Oct 30 02:00:02 2018 hterm: turn default pref settings into proper objects Working with the hterm.PreferenceManager.defaultPreferences object is a bit of a pain: each entry is an array and people have to hardcode the indices when accessing each field (and remember what each number means). Trying to add new fields is painful as we have to reindex. Using a real object allows us to name the different fields. The churn here is reindenting the arguments, and while we're here, convert the help text to use `...` instead of '...' so we don't have to escape embedded single quotes. The content otherwise shouldn't be changed. Bug: chromium:717742 Change-Id: If04b56ce82f83c8469142145477387a59534c630 Reviewed-on: https://chromium-review.googlesource.com/c/1218682 Tested-by: Mike Frysinger <vapier@chromium.org> Reviewed-by: Vitaliy Shipitsyn <vsh@google.com> [modify] https://crrev.com/c57d37eab99abcfac18e79312886d60b3306e4d2/hterm/js/hterm_preference_manager.js [modify] https://crrev.com/c57d37eab99abcfac18e79312886d60b3306e4d2/nassh/js/nassh_preferences_editor.js [modify] https://crrev.com/c57d37eab99abcfac18e79312886d60b3306e4d2/hterm/js/hterm_preference_manager_tests.js
,
Jan 2
The following revision refers to this bug: https://chromium.googlesource.com/apps/libapps/+/581999c154ea2c0c009361a80fe3e26d0f563f9e commit 581999c154ea2c0c009361a80fe3e26d0f563f9e Author: Mike Frysinger <vapier@chromium.org> Date: Wed Jan 02 07:50:28 2019 hterm: provide readable pref strings Rather than try to make all of our pref keys somewhat human readable, add support for an actual human readable string. Now people can see 'AltGr key mode' instead of 'alt-gr-mode', and we can translate them for users. Bug: chromium:717742 Change-Id: I29efcebc188f3949b230f3b6a1f9ba21cd56da04 Reviewed-on: https://chromium-review.googlesource.com/c/1339402 Tested-by: Mike Frysinger <vapier@chromium.org> Reviewed-by: Vitaliy Shipitsyn <vsh@google.com> [modify] https://crrev.com/581999c154ea2c0c009361a80fe3e26d0f563f9e/hterm/js/hterm_preference_manager.js [modify] https://crrev.com/581999c154ea2c0c009361a80fe3e26d0f563f9e/nassh/js/nassh_preferences_editor.js [modify] https://crrev.com/581999c154ea2c0c009361a80fe3e26d0f563f9e/nassh/_locales/en/messages.json [modify] https://crrev.com/581999c154ea2c0c009361a80fe3e26d0f563f9e/nassh/css/nassh_preferences_editor.css [modify] https://crrev.com/581999c154ea2c0c009361a80fe3e26d0f563f9e/hterm/js/hterm_preference_manager_tests.js
,
Jan 2
the 0.11 release will have translations |
||
►
Sign in to add a comment |
||
Comment 1 Deleted