Replies: 12 comments
-
Oh yeah, don't translate the README.html yet... I may still further improve it based on our discussion here. |
Beta Was this translation helpful? Give feedback.
-
I'd vote to keep it as it currently is. The KeyMap containing the the defs and the keymaps. A single file is also easier to maintain.. and update whenever new keymaps are added. I would recommend however, to have a help page mirrored within the documentation with all available keyboard shortcuts (or at the very least a good number of examples) and how to change them. It is what documentation is for. Have a nice day! |
Beta Was this translation helpful? Give feedback.
-
Thanks for the input. The reason it's being "fixed" is that there's a few problems with it at the moment:
This is meant to be a pre-cursor to the INI overhaul that's up and coming. |
Beta Was this translation helpful? Give feedback.
-
In this context it makes sense to remove the definitions from KeyMap.txt since then we would only need to add new keymaps when available. But is important to not ever modify user customized keymaps. If this ends up being the case, I think the keymap descriptions/help should be moved down to where the actual keymaps are being set, to assist the user. Anyway. Is not a change I would take lightly. |
Beta Was this translation helpful? Give feedback.
-
Hi, personnally, I agree with this split of Keymap.txt in two files. Even if list of options has never to be updated by any user, it's nevertheless useful to have it in a text file, in order to allow users to check the name (and exact spelling) of various options. On the other hand, I agree with @mdnava when he writes "less files, less clutter, less chance of a mess" And I repeat (and detail a little bit more) what could be the best (IMHO) process to manage this .ini file (or THESE files in case keymap.txt remain distinct from Jpegview.ini) in order to
|
Beta Was this translation helpful? Give feedback.
-
@LaurentGrenet Thanks for your input. Unfortunately the INI is options. It is based on one value being something. KeyMap is very flexible and permits anything to be anything. In INI can be "loaded in a hierarchy", aka, system options + user options, but that doesn't make sense for a KeyMap. For example, if a global INI had A=true
B=1
C=Test and a user INI had A=false
C=Hello You can read the values of A, B, C and it works as expected. In a keymap, in the same example
user Keymap
what happens when you press B? etc etc. The semantics of the file and what it's trying to do is inherently different... (Also, while the whole "merging" INIs flow up above sounds nice, it also doesn't quite work like that in code. We can discuss that on a separate thread though. I'm not ready to tackle the INI problems yet.) |
Beta Was this translation helpful? Give feedback.
-
Whatever files are merged or not, I don't think it's a good thing that INI file is "loaded in a hierarchy" as you say. For me, It would be a lot easier to understand if we didn't have this hierarchy. If there is a "user" INI file, the global file should be completely ignored. And the global INI file taken into consideration ONLY if there is no User INI. In the example you ask for above (with keymap) for me, without any doubt nor hesitation, nothing should happen when I press B, since there is a user Keymap and this user Keymap do not mention key B. Currently, the concept of "user keymap" do not exist. If you do not implement it, and if you do not implement a flow like the one I describe to manage it when new version of JPEGView comes, I really do not see the interest to split existing file in two.... For me, the ONLY real issue we are facing today is how to preserve user settings when a new version comes... |
Beta Was this translation helpful? Give feedback.
-
Ok ok. It's fine... lol. The restructure is EXACTLY to allow a user keymap. You can't have a user keymap when the definitions are tied to the keymap. You'll see. So, your specific use case is managing stuff manually because you're not installing. But I also have to consider the installed use case... this whole problem isn't to solve one use case. It needs to work with both, and there is actually other use cases, specifically like PortableApps, or other installers. But it's fine. Like I said, this discussion wasn't for that issue. Let me go back to the original question. Is it easy to localize an HTML file the way it is. I'm going to put the strings out into one area and it will render with CSS. |
Beta Was this translation helpful? Give feedback.
-
That makes sense. I suppose it is the right reason to separate the definitions from the keymaps. Then I believe JPEGView should just start ignoring the definitions in any KeyMap.txt files current users have in place. So any definitions in KeyMap.txt would have no effect whatsoever. This shouldn't have any consequence to the user. @sylikc if you're reviewing the JPEGView.ini file please consider adding up an option for items in "User commands" and/or "Open with" to be hidden from the context menus. In a way that we could have some commands or utilities available with keyboard shortcuts without cluttering those menus. I already have both menus pretty filled up. |
Beta Was this translation helpful? Give feedback.
-
Ok, let's go back to the original question. And then I ask my own question : Are you sure it worth localizing such a file ? Personnally, I'm not convinced (at all !). Nevertheless, if you prefer to localize it, and we have a similar way of doing than for other localization (ie. a list of pairs english text / localized text) I don't understand how, when and where will be generated the localized HTML ? This is quite different from localizing GUI of the application... |
Beta Was this translation helpful? Give feedback.
-
Or best: have a runtime dialog box to configure hotkeys, with live capture of hotkey. |
Beta Was this translation helpful? Give feedback.
-
Thanks for the inputs @sdneon .
While the defines are (in theory) unnecessary, I think it makes the KeyMap a lot more readable by mapping the numeric IDs to brief descriptions. Just like DNS entries are unnecessary if everyone could just use IP addresses.
I do want to flip the order though like your example, where the ID is on the left, and the keys are on the right. That might come in the future. It would require existing users to do the inversion though, and break everyone's keymaps.
As for the IDs from resource.h, I did notice a lot of them not being exposed, but that's also probably to keep the list manageable... I'll think about adding them all. Probably just need a short blurb comment to each of them so it propagates to the keymap defines.
If you want to code this up and issue a PR, I'll take it. One of the reasons I did this refactor in this specific way is that it doesn't affect existing KeyMaps. The code changes minimally for the features that are gained. The change is actually invisible to users, as their existing #defines will be ignored, and the KeyMap.txt file won't be overwritten (I'm renaming the default in a few commits) |
Beta Was this translation helpful? Give feedback.
-
@LaurentGrenet I just made a pretty big change to
KeyMap.txt
which I'm hoping will help localization. Do you think this will help you with localization?This is how it was previously: KeyMap.txt before the change which combined both the help, the definitions, and the configuration
This is what the new way looks like:
I'd like to ask for your feedback to this change, since you have done French localization.
(In the next phase of this refactoring, I'm going to generate some
strings.txt
and coming up with an automated way to keep that up to date.)Beta Was this translation helpful? Give feedback.
All reactions